The officially official Devuan Forum!

You are not logged in.

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

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

[ ARM64 ] build, for Orange PI One Plus

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 :

This release is a major release for this board, as it brings the board to a stable, and almost complete full feature,situation..
This is a revision v0.8 Server build.

Features & Versions:

1) - Arm Trusted Firmware  - v2.3 ( built for arm64 )
     U-boot boot-loader       - v2020.07 ( built for arm64 )
2) - Linux Kernel                - Stable 5.8.1 ( built for arm64 )
3) - UserSpace                  - Devuan Beowulf ( for arm64 )

4) - ChangeLog                  - ATF v2.3, Uboot v2020.07, kernel 5.8.1,{ DVFS, IOMMU, Message Box, SPI } new Allwinner H6 drivers, wireguard vpn driver
5) - Problems & to be done - After coming to Beowulf, its impossible to auto-mount zramfs as swap, automatically..after reboot network doesn't start, duo to regulator vcc-gmac-3v3. not being enabled in that situation( only in reboot situation )

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   1700MB  1599MB  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:70
# 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 earlyprintk=serial,tty0,115200n8 console=tty0 console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootfstype=ext4 fsck.repair=yes rootwait
setenv fdtfile allwinner/sun50i-h6-orangepi-one-plus.dtb
load mmc 0:2 0x43000000 usr/lib/linux-image-5.8.1/${fdtfile}
load mmc 0:1 0x42000000 vmlinuz
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.8.1/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 Userspace Panfrost mesa-3d graphics drivers more.. for a desktop version..):

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

The target will be to reach, at least Linux kernel 5.8, or more if needed, have lot of new features 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..

4) - Changelog

a) kernel update to 5.5.0 5.6.3,5.8.1
b) Thermal driver( as patch )., will be officially added to kernel 5.6..( added on kernel 5.6.3 )
c) Hardware VPU Decode Acceleration, now supports( MJPEG, MPEG2, H.264, HEVC/H.265 )( CEDRUS driver )
d) 3d Video Driver - Pandrost( Kernel Side )
e) Allwiner Crypto Driver
f) { IR, RTC, SPDIF } Kernel Driver test Handlers, including decoders for RAW IR( NEC, RC5(x/sz), RC6, JVC, Sony. SANYO, Sharp, MCE Keyboard/mouse, XMP )
g) Its now possible to boot, without assigning '/dev/urandom' to crng, but a dedicated TRNG driver will come, possibly on 5.6 Kernel it will possibly be merged in the next month, so expect it for 5.7 maybe....
h) PWM driver
i) PMU driver
j) disable red Led, change green to trigger [activity]
k) addition of { DVFS, IOMMU, Message Box, SPI } drivers... DVFS enabled from [ 480 MHz - 1.80 GHz ]( if you pretend to use it in a continuous full load situation, prepare a small heatsink, and small fan above, it would stay ~70°C on those conditions.. )

5) - Problems and testings to be done..

a) After migration to beowulf, its impossible, for now, to automount zramfs as swap, automatically.. we are issuing swapon -a in '/etc/rc.local'.
it could be related with several packages, including those(  most probably): init init-system-helpers initscripts insserv eudev mawk sed
b) Testing is needed, on camera interfaces { BT656, Parallel } merged in Kernel 5.4 for Allwinner Multiple aarch64 SoCs drivers sun8i-csi ..
c) Compile V4l2 Cedrus driver, test it via libvdpau..
d) Test IR driver shipped in Kernel 5.4 for Allwinner A64/H6..
e) Compile UserSpace Mesa Panfrost Driver stack( userspace counterpart for kernel space one.. )
f) USB Driver is still in PIO mode, no DMA yet, and uses some CPU, with transfers rate of ~10MB/s..
g) Test PWM
h) If you reboot your board{ reboot | shutdown -r now }, vcc-gmac-3v3 regulator, doesn't appear enabled( more investigation is needed.. use shutdown -h now, or press the power button.. ).

For this image, to reach more Supported Hardware and Users, your help is also needed smile
Testing devuan-beowulf-sunxi-arm64-0.8-beta, and posting your feedback.
SHA256sum:

$ sha256sum devuan_beowulf_3.0.0_arm64_orangepi_one_plus_0.8.img.xz 
8cc1d5ab28945b0532a770242b46e0a9e34a6123f87d536ae6c9920480a57a16  devuan_beowulf_3.0.0_arm64_orangepi_one_plus_0.8.img.xz

Best Regards,
tux

Last edited by tuxd3v (2020-08-23 22:10:55)


Best Regards,
tux

Offline

Board footer