The officially official Devuan Forum!

You are not logged in.

#1 2019-11-17 03:22:22

tuxd3v
Member
Registered: 2019-11-14
Posts: 65  

[ ARMHF ] build for Olimex OlinuXino Lime2

Hello All,
This is the aarch32( armhf ) counterpart, for Linux Sunxi, Allwinner A20 Hardware..

In the next Iterations, will be also there  a 'Desktop' build type..

In this case, there is a v0.4beta Server build.

Features & Versions:

1) - Arm Trusted Firmware  - Mainline ( built for armhf )
      U-boot boot-loader       - v201910 ( built for armhf )
2) - Linux Kernel                - Stable 5.5.0 + Lima driver + Cedrus driver ( built for armhf )
3) - UserSpace                  - Devuan Beowulf ( for armhf )

4) - Changelog                   - Kernel Update, Cedrus driver( addition of HEVC/H.265 hardware decode )
5) - Known Problems         - Activating Zram, doesn't hapen automatically, but it should need more investigation..

1) BootLoader( aarch32.. only u-boot )

Disk Partitioning scheme:

# parted /dev/mmcblk0
(...)
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  101MB   99.6MB  primary  ext2
 2      101MB   1500MB  1399MB  primary  ext4

a)   - Bootloader( Arm Trusted Firmware + U-Boot ), is between [ beginning - 1st partition ]( starting at sector 16( 8KiB ), til 1MiB )
  a1) - The Bootloader will search for a file called 'boot.scr', and after initialise the u-boot environment, will execute that script..
  a2) - In  'boot.scr', for this image, it will point to 'Olimex Olinuxino Lime2' Device Tree Binary File by default( was tested there.. )..
  a3) - IF you have other board than  'Olimex Olinuxino Lime2', please Read Bellow in the 'Notes Section'..   
b)   - 1st Partition( after BootLoader ) is mounted as  '/boot'
c)   - 2nd Partition is mounted as rootfs '/'

NOTA!
The Bootloader in a) usually takes ~600KiB..
Each time a bootloader is built, all area [ 8KiB - 1MiB ], needs to be clean first( so that you can flash the new bootloader.. because could still be there any bits of the previous one.. which could lead to unpredictable consequences.. ).

If you have Other Board than 'Olimex Olinuxino Lime2', situation described in a3):
The 'boot.cmd' script( format, Human Readable ):

# Send debug info to uart, and also display
setenv stdout serial,vga
setenv stderr serial,vga
setenv bootargs debug=on console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait fsck.repair=yes panic=15
setenv fdtfile sun7i-a20-olinuxino-lime2.dtb
load mmc 0:2 0x43000000 usr/lib/linux-image-5.5.0/${fdtfile}
load mmc 0:1 0x42000000 vmlinuz
bootz 0x42000000 - 0x43000000

Write this Image, to a sd-card.
Mount 1st Partition in '/mnt',

mount /dev/sdb1 /mnt

Then change the 'boot.cmd' script to point to your board..
# You can find a list of supported boards 'dtb' files in: '/usr/lib/linux-image-5.4.6'
# Edit the file 'boot.cmd', with 'vi' for example.
# change the line:

setenv fdtfile sun7i-a20-olinuxino-lime2.dtb

to

setenv fdtfile your_board.dtb

Save the file,
# Generate the real script file( binary ), 'boot.scr'

mkimage -C none -A arm -T script -d /mnt/boot.cmd /mnt/boot.scr

Done!

2) - Linux Kernel

Packages:

There are 3 packages installed( in the future will be at least the graphics drivers more.. ):

# dpkg -l |grep -E "(linux-.*(headers|image|libc-dev))"
ii  linux-headers-5.5.0          5.5.0-5              armhf        Linux kernel headers for 5.5.0 on armhf
ii  linux-image-5.5.0            5.5.0-5              armhf        Linux kernel, version 5.5.0
ii  linux-libc-dev:armhf         5.5.0-5              armhf        Linux support headers for userspace development

The target will be to reach, at least the Linux kernel 5.{7,8}( since there still are few things that need support, but not much.. ), and of course.. work improve the Device Tree Bindings, for each board, when possible.. most important things missing HDMI Audio Codec( see 5.d) ), and keypad driver..


3) - UserSpace -Users & Passwords:

a) root      - password 'toor'
b) devuan - password 'devuan'

NOTA!
SSH is enabled, so that you can login, but root login, is disabled, you should login as 'devuan', only then switch to 'root', if you want to.. for that,
After Login as 'devuan', issue:

sudo su -

And type your 'devuan' password, that's it..

4) - ChangeLog
a) -  Migration to Devuan Beowulf
b) - sun4i_ss prng driver( no more need to use /dev/urandom in rng-tools config.. )
c) - Realtek Network Driver( not generic one.. )
d) - Micrel Network Driver( Newer Boards come with it.. )
e) - Audio sun4i_codec Driver.. see Section 5) ,d)
f)  - Kernel Update to 5.5.0
g) - sun4i-csi - Camera{ BT656, Parallel }, activated
h) - Hardware VPU Decode Acceleration, now supports( MJPEG, MPEG2, H.264, HEVC/H.265 )

5) - Known Problems or Things to test
a) - Activating Zram, doesn't happen automatically( but it should.. need more investigation.. ).
b) - Testing is needed, on camera interfaces { BT656, Parallel } merged in Kernel 5.5.0 for Allwinner A20 drivers sun4i-csi ..
c) - Compile V4l2 Cedrus driver, test it via libvdpau..
d) - HDMI Audio Codec, was submitted in January 2020..next release will bring it!

For this image, to reach more Supported Hardware and Users, your help is also needed smile
Testing this image, posting your feedback, and improvements..
SHA256sum:

$ sha256sum devuan-beowulf-sunxi-armhf-0.4-beta.img.xz
60c69d70154df57ea220b1ea69e7413c726f4604216b57ce9adf3ccb2c2dca6e  devuan-beowulf-sunxi-armhf-0.4-beta.img.xz

Best Regards,
tux

Last edited by tuxd3v (2020-04-03 17:48:01)


Best Regards,
tux

Offline

Board footer