The officially official Devuan Forum!

You are not logged in.

#1 2019-11-14 03:35:44

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

[ ARM64 ] beta builds, for Sunxi Boards

Hello All,
As you probably know, there are an effort, to bring Sunxi Hardware to mainline( Leaving behind each proprietary, vendor builders, tool-chains, and blobs.. we hope ) here :

I started doing some Devuan builds for Sunxi boards, with the objective to have a complete Devuan arm64 build..
In the next Iterations, will be also there  a 'Desktop' build type..

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

Features & Versions:

1) - Arm Trusted Firmware  - Mainline ( built for arm64 )
     U-boot boot-loader       - v201910 ( built for arm64 )
2) - Linux Kernel                - Stable 5.3.10 ( built for arm64 )
3) - UserSpace                  - Devuan ascii ( for arm64 )


1) BootLoader( ATF + 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   1100MB  999MB   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 'Orange PI One Plus' Device Tree Binary File by default( was tested there.. )..
  a3) - If you have other board than  'Orange PI One Plus', 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 'Orange PI One Plus', situation described in a3):
The 'boot.cmd' script( format, Human Readable ):

# setup MAC address
setenv ethaddr 7E:8C:70:59:B5:71
# set console to tty0
setenv console tty0
# Send debug info to uart, and also display
setenv stdout serial,vga
setenv stderr serial,vga
setenv bootargs debug=on console=tty0 console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait fsck.repair=yes panic=15
setenv fdtfile allwinner/sun50i-h6-orangepi-one-plus.dtb
load mmc 0:2 0x43000000 usr/lib/linux-image-5.3.10/${fdtfile} || load mmc 0:1 0x43000000 ${fdtfile} || load mmc 0:1 0x43000000 boot/${fdtfile}
load mmc 0:1 0x42000000 vmlinuz-5.3.10 || load mmc 0:1 0x42000000 Image || load mmc 0:1 0x42000000 boot/vmlinuz-5.3.10 || load mmc 0:1 0x42000000 boot/Image
booti 0x42000000 - 0x43000000

Write this Image, to a sd-card, then mount it, and change the 'boot.cmd' script to point to your board..
# You can find a list of supported boards in: '/usr/lib/linux-image-5.3.10/allwinner'
# Edit the file 'boot.cmd', with 'vi' for example.
# change the line:

setenv fdtfile allwinner/sun50i-h6-orangepi-one-plus.dtb

to

setenv fdtfile allwinner/your_board.dtb

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

mkimage -C none -A arm64 -T script -d boot.cmd boot.scr

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.3.10      5.3.10-3         arm64        Linux kernel headers for 5.3.10 on arm64
ii  linux-image-5.3.10        5.3.10-3         arm64        Linux kernel, version 5.3.10
ii  linux-libc-dev:arm64      5.3.10-3         arm64        Linux support headers for userspace development

The target will be to reach Linux kernel 5.4( which has a lot of new things for ARM hardware.. ), and also work in the Device Tree Bindings, for each board..


3) - UserSpace -Users & Passwords:

1) root      - password 'toor'
2) 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..



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

# sha256sum devuan-ascii-sunxi-arm64-0.2-beta.img.gz
ceecf1fd60d36e32359f78c241b8c68ae6349961405c1da376bec6be5d253b44  devuan-ascii-sunxi-arm64-0.2-beta.img.gz

Best Regards,
tux

Last edited by tuxd3v (2019-11-27 16:14:33)

Offline

Board footer