OrangePi Zero2 - Allwinner H616


Werner
 Share

14 14

Recommended Posts

Hello to you all,

 

Haven't read 2825 yet, will do after this but

did a quick checkout and built both for H6 (opioneplus) and H616( zero2 ), :

 

git pull

sed -i 's/orange-pi-5.11/orange-pi-5.12/g' config/sources/families/include/sunxi64_common.inc


./compile.sh EXPERT=yes EXTRAWIFI=no USEALLCORES=yes

 

compilation.log shows
---

grep error output/debug/*.log

output/debug/compilation.log:drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c:152:27: error: redefinition of ‘sun50i_h616_r_ccu_clks’
output/debug/compilation.log:drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c:178:9: error: ‘CLK_NUMBER_H616’ undeclared here (not in a function); did you mean ‘CLK_NUMBER’?
output/debug/compilation.log:drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c:194:35: error: redefinition of ‘sun50i_h616_r_hw_clks’
output/debug/compilation.log:drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c:226:29: error: redefinition of ‘sun50i_h616_r_ccu_resets’
output/debug/compilation.log:drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c:252:36: error: redefinition of ‘sun50i_h616_r_ccu_desc’

 

 

Suppose once that packaging issue is solved edge will be bumped , so sed no longer needed.

 

cheers chaps!

 

compilation.log

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

On 5/16/2021 at 11:43 PM, Igor said:

Another afternoon and all kernels for 5.12.y are done at build stage.

 

- cleaning

- do we need to archive 5.11.y. I would say no since its not LTS

- testing

 

5.11 to be buried, is EOL ( already ).

imho the non LTS kernels could be buried once mainline kernel hits .1 release. Thus eg. when 5.13.1 will be released bump edge kernel asap so 5.12 can be buried ( and forgotten )

( needless to say , but  "currents" should stay on LTS )

Link to post
Share on other sites

1 hour ago, dolphs said:

5.11 to be buried, is EOL ( already ).


Yes, yes :D 

 

For 5.12.y -> we have to fix packaging problems that were introduced with 5.12.y ... actually code adjustment is already done, testing is undergoing.

Link to post
Share on other sites

The test build  (Hirsute 5.12.6 May 23 2021) gets stack at Starting kernel ...

 

Spoiler

U-Boot SPL 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000)
DRAM: 512 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.4(debug):7eee1da-dirty
NOTICE:  BL31: Built : 11:54:21, May 12 2021
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a084b18, model: OrangePi Zero2
INFO:    ARM GICv2 driver initialized
INFO:    PMIC: Probing AXP305 on I2C
INFO:    PMIC: aldo1 voltage: 3.300V
INFO:    PMIC: aldo2 voltage: 3.300V
INFO:    PMIC: aldo3 voltage: 3.300V
INFO:    PMIC: bldo1 voltage: 1.800V
INFO:    PMIC: dcdcd voltage: 1.500V
INFO:    PMIC: dcdce voltage: 3.300V
INFO:    Changed devicetree to reserve BL31 memory.
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
WARNING: BL31: cortex_a53: CPU workaround for 1530924 was missing!
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9


U-Boot 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: OrangePi Zero2
I2C:   ready
DRAM:  512 MiB
MMC:   mmc@4020000: 0
Loading Environment from FAT... Unable to use mmc 0:1... In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Net:   phy interface7
eth0: ethernet@5020000
starting USB...
No working controllers found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3202 bytes read in 3 ms (1 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
156 bytes read in 2 ms (76.2 KiB/s)
18957 bytes read in 5 ms (3.6 MiB/s)
4191 bytes read in 5 ms (818.4 KiB/s)
Applying kernel provided DT fixup script (sun50i-h6-fixup.scr)
## Executing script at 45000000
11783984 bytes read in 998 ms (11.3 MiB/s)
21997576 bytes read in 1857 ms (11.3 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41750000
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    11783920 Bytes = 11.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 494c3000, end 49fffef0 ... OK
   Loading Device Tree to 0000000049456000, end 00000000494c2fff ... OK

Starting kernel ...

 

 

Link to post
Share on other sites

27 minutes ago, Werner said:

Try increasing verbosity to get more info

As per the documentation I increased verbosity to 7 at armbianEnv.txt but no new output.

 

Spoiler

U-Boot SPL 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000)
DRAM: 512 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.4(debug):7eee1da-dirty
NOTICE:  BL31: Built : 11:54:21, May 12 2021
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a084b18, model: OrangePi Zero2
INFO:    ARM GICv2 driver initialized
INFO:    PMIC: Probing AXP305 on I2C
INFO:    PMIC: aldo1 voltage: 3.300V
INFO:    PMIC: aldo2 voltage: 3.300V
INFO:    PMIC: aldo3 voltage: 3.300V
INFO:    PMIC: bldo1 voltage: 1.800V
INFO:    PMIC: dcdcd voltage: 1.500V
INFO:    PMIC: dcdce voltage: 3.300V
INFO:    Changed devicetree to reserve BL31 memory.
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
WARNING: BL31: cortex_a53: CPU workaround for 1530924 was missing!
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9


U-Boot 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: OrangePi Zero2
I2C:   ready
DRAM:  512 MiB
MMC:   mmc@4020000: 0
Loading Environment from FAT... Unable to use mmc 0:1... In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Net:   phy interface7
eth0: ethernet@5020000
starting USB...
No working controllers found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3202 bytes read in 2 ms (1.5 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
156 bytes read in 1 ms (152.3 KiB/s)
18957 bytes read in 5 ms (3.6 MiB/s)
4191 bytes read in 5 ms (818.4 KiB/s)
Applying kernel provided DT fixup script (sun50i-h6-fixup.scr)
## Executing script at 45000000
11783984 bytes read in 998 ms (11.3 MiB/s)
21997576 bytes read in 1857 ms (11.3 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41750000
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    11783920 Bytes = 11.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 494c3000, end 49fffef0 ... OK
   Loading Device Tree to 0000000049456000, end 00000000494c2fff ... OK

Starting kernel ...

 

 

Link to post
Share on other sites

On 4/29/2021 at 2:22 AM, Gabor5745737 said:

"reboot" is not turning on the board, just off, requires manual power cycling.

Anyone else noticed it?

you can use sandisk tf card,it's will reboot normally .

the sbc  not work well with many tf cards, such as Samsung TF,which can't reboot.

Link to post
Share on other sites

Posted (edited)

 

Am 26.5.2021 um 18:09 schrieb lampra:

The test build  (Hirsute 5.12.6 May 23 2021) gets stack at Starting kernel ...

For me too (Armbian_21.05.2_Orangepizero2_hirsute_edge_5.12.6.img).

Edited by Joerg
Link to post
Share on other sites

Please accept my apologies if I should have posted this in a different place.

 

So I have a working local build environment and I want to test the mainline ATF. Which is the correct way to change the source and the tree and define PLAT=sun50i_h616?

When I change it at the families folder the and running ./compile.sh, I see the following in htop:

./compile.sh  BOARD=orangepizero2 BRANCH=edge RELEASE=hirsute BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,gpg,img,imgATF_PLAT=sun50i_h6

 

and it keeps spiting this:

Spoiler

[ o.k. ] Using config file [ /home/lampra/Downloads/build/userpatches/config-example.conf ]
[ o.k. ] Command line: setting BOARD to [ orangepizero2 ]
[ o.k. ] Command line: setting BRANCH to [ edge ]
[ o.k. ] Command line: setting RELEASE to [ hirsute ]
[ o.k. ] Command line: setting BUILD_MINIMAL to [ yes ]
[ o.k. ] Command line: setting BUILD_DESKTOP to [ no ]
[ o.k. ] Command line: setting KERNEL_ONLY to [ no ]
[ o.k. ] Command line: setting KERNEL_CONFIGURE to [ yes ]
[ o.k. ] Command line: setting COMPRESS_OUTPUTIMAGE to [ sun50i_h6 ]

 

 

 

Alternative can see an ATF folder in the userscripts folder /build/userpatches/atf/atf-sunxi64$ but I couldn't find any documentation how to use it.

Thank you

Link to post
Share on other sites

2 hours ago, Werner said:

sending PR

I probably could, but I am not sure how to handle this without braking everything else.

 

diff --git a/config/sources/families/include/sunxi64_common.inc b/config/sources/families/include/sunxi64_common.inc
index bc59438..1082479 100644
--- a/config/sources/families/include/sunxi64_common.inc
+++ b/config/sources/families/include/sunxi64_common.inc
@@ -27,9 +27,9 @@ case $BRANCH in
 
        edge)
 
-               KERNELSOURCE="https://github.com/megous/linux"
-               KERNELBRANCH="branch:orange-pi-5.12"
-               KERNELPATCHDIR='sunxi-'$BRANCH
+               KERNELSOURCE="https://github.com/apritzel/linux/"
+               KERNELBRANCH="branch:h616-v8-rc"
+               KERNELPATCHDIR='sunxi-orange-pi-5.12'
 
        ;;
 esac
diff --git a/config/sources/families/sun50iw6.conf b/config/sources/families/sun50iw6.conf
index 0862996..0a04279 100644
--- a/config/sources/families/sun50iw6.conf
+++ b/config/sources/families/sun50iw6.conf
@@ -8,14 +8,17 @@ ASOUND_STATE='asound.state.sun50iw2-dev'
 
 if [[ $BOARD == orangepizero2 ]]; then
 
-       ATFSOURCE='https://github.com/apritzel/arm-trusted-firmware'
-       ATFBRANCH='branch:h616-beta'
+       ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
+       ATFBRANCH='branch:master'
 
        ATF_PLAT="sun50i_h616";
        ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
 
-       BOOTSOURCE='https://github.com/jernejsk/u-boot'
-       BOOTBRANCH='branch:h616-v2'
+       BOOTSOURCE='https://github.com/trini/u-boot'
+        BOOTBRANCH='branch:master'
 
        [[ -z $CPUMAX ]] && CPUMAX=1512000

 

Link to post
Share on other sites

overlay for UART5

 

/dts-v1/;

/ {
    compatible = "allwinner,sun50i-h6";

    fragment@0 {
        target-path = "/aliases";

        __overlay__ {
            serial5 = "/soc/serial@5001400";
        };
    };

    fragment@1 {
        target = < 0xffffffff >;

        __overlay__ {

            uart5-pins {
                pins = "PH2\0PH3";
                function = "uart5";
                phandle = < 0x01 >;
            };
        };
    };

    fragment@2 {
        target = < 0xffffffff >;

        __overlay__ {
            pinctrl-names = "default";
            pinctrl-0 = < 0x01 >;
            status = "okay";
        };
    };

    __symbols__ {
        uart5_pins = "/fragment@1/__overlay__/uart5-pins";
    };

    __fixups__ {
        pio = "/fragment@1:target:0";
        uart5 = "/fragment@2:target:0";
    };

    __local_fixups__ {

        fragment@2 {

            __overlay__ {
                pinctrl-0 = < 0x00 >;
            };
        };
    };
};
 

Link to post
Share on other sites

I use self build trunk version whit disabled kernel update for a while now. Besides bugs that are already known it is stable. I have installed BIND9 as a local slave authoritative DNS server and it is up 24/7.

 

If devs need any logs from me let me know.

Link to post
Share on other sites

Yeah seems missing in dtb package. Dont know why.

 

Edit: Got it. Seems like 5.12 does not include the necessary h616 patches but there is a patch folder for 5.13 that can be use for manual inclusion. Trying that atm.

If you want to try too locally edit this line to 5.13 and build:

https://github.com/armbian/build/blob/6844232dd70a47a7dedc066c630c875c3b55e881/config/sources/families/include/sunxi64_common.inc#L31

Also change symlink from 5.12 to 5.13 in patch/kernel folder

Link to post
Share on other sites

As mentioned by @mantouboji 5.13 is working well for the moment with the relevant patches. Though we are missing, among others,  overlays and wifi.

Regarding overlays, I tried to compile w1-gpio-cl but I had issues with the headers on 5.13. Did anyone manage to compile anything with 5.13?

Regarding wifi, as this is new AW hw,  I expect that we need to port the driver from the ventor's legacy sdk. Is anyone familiar with the process? 

Link to post
Share on other sites

What's the correct way to prepare a tftp-bootable kernel from the build outputs ? I've tried various combinations of `mkimage ..` and `booti .. | bootm .. | bootz' variations using `vmlinux` or `Image` as inputs, but i'm obviously lost, getting either "Bad Linux ARM64 Image magic!" or "Wrong Image Format for bootm command"

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

14 14