selcuk Posted May 8, 2017 Posted May 8, 2017 Hi, I have an Orange Pi Zero (256MB) board. I downloaded the prebuilt image named as "Armbian_5.25_Orangepizero_Ubuntu_xenial_default_3.4.113.img" and used it without a problem. Then I cloned the project from github and cross compiled on an Ubuntu 16.04 computer (4.4.0-31-generic kernel) by using the "compile.sh" script. It created an image named as "Armbian_5.27_Orangepizero_Ubuntu_xenial_default_3.4.113.img". But this image halts after printing "ion_reserve_common: ion reserve: [0x47e00000, 0x50000000]!". You may find the log at the end of this post. I compiled the same project (5.27) with development kernel. It created the image named as "Armbian_5.27_Orangepizero_Ubuntu_xenial_dev_4.11.0.img". This one boots up ok but doesn't have wlan0 interface. Besides it's a development version and I'm not sure whether it is stable enough. By the way, it didn't have eth0 last week as well. I think someone has fixed it. I downloaded and compiled 5.20 release version of the project but it ended up with the same 5.27 version image. I think script always updates to the latest version of the project. I have some questions in my mind: 1. Is there a way to compile older releases with the "compile.sh" script. v5.25 seems ok but I couldn't compile other than 5.27? 2. What is the solution for halting after "ion_reserve..." line? 3. Is there a way to restore wlan0 on development kernel? Kind Regards, Selcuk >>>>>>> Log captured while running "Armbian_5.27_Orangepizero_Ubuntu_xenial_default_3.4.113.img" image on Orange Pi Zero: U-Boot SPL 2017.03-armbian (May 07 2017 - 19:31:16) DRAM: 256 MiB Trying to boot from MMC1 U-Boot 2017.03-armbian (May 07 2017 - 19:31:16 +0300) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi Zero DRAM: 256 MiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment Setting up a 720x576i composite-pal console (overscan 32x20) Error: no valid bmp image at 66000000 In: serial Out: vga Err: vga Net: phy interface0 eth0: ethernet@1c30000 Hit any key to stop autoboot: 0 38518 bytes read in 149 ms (252 KiB/s) switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3550 bytes read in 200 ms (16.6 KiB/s) ## Executing script at 43100000 U-boot loaded from SD Boot script loaded from mmc 115 bytes read in 160 ms (0 Bytes/s) 5158440 bytes read in 667 ms (7.4 MiB/s) 4756408 bytes read in 656 ms (6.9 MiB/s) Found legacy kernel configuration 35384 bytes read in 531 ms (64.5 KiB/s) ## Loading init Ramdisk from Legacy Image at 43300000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 5158376 Bytes = 4.9 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Ramdisk to 49a48000, end 49f335e8 ... OK Starting kernel ... [sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 256MB ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1 ion_reserve_select: ion chipid [0x2c00042! ion_reserve_common: ion reserve: [0x47e00000, 0x50000000]!
zador.blood.stained Posted May 8, 2017 Posted May 8, 2017 37 minutes ago, selcuk said: Then I cloned the project from github and cross compiled on an Ubuntu 16.04 computer (4.4.0-31-generic kernel) by using the "compile.sh" script. It created an image named as "Armbian_5.27_Orangepizero_Ubuntu_xenial_default_3.4.113.img". But this image halts after printing "ion_reserve_common: ion reserve: [0x47e00000, 0x50000000]!". You may find the log at the end of this post. There were no changes to the default kernel for a long time. You have to change logging settings in armbianEnv.txt (set console=serial and verbosity=7) to capture the full kernel log. 38 minutes ago, selcuk said: 3. Is there a way to restore wlan0 on development kernel? If you find and compile a driver for the onboard wireless chip it may work.
Igor Posted May 8, 2017 Posted May 8, 2017 Something is wrong, most likely with u-boot. For me it reboots at this point.
zador.blood.stained Posted May 8, 2017 Posted May 8, 2017 1 hour ago, Igor said: For me it reboots at this point. Can confirm, something is wrong. Will check again after u-boot 2017.05 is released
selcuk Posted May 9, 2017 Author Posted May 9, 2017 Hi, Thank you for the replies. I couldn't find armbianEnv.txt file in the project directory. I've made changes to sun8i-default.txt and sunxi-default.txt files and modify related lines to "verbosity=7" and "console=serial". But it printed the same text on the console. I couldn't get additional debug information. Compile script was using u-boot 2017.05 at first. I've updated the related line to "MAINLINE_UBOOT_BRANCH='tag:v2017.01'" in configuration.sh file. It downloaded it but couldn't compile. I've added necessary "orangepi_zero_defconfig" and "sun8i-h2-plus-orangepi-zero.dts" from 2017.05 directory. But it keeps generating new errors. Is there a straightforward way to build previous u-boot releases with the 5.27 project?
Igor Posted May 9, 2017 Posted May 9, 2017 7 minutes ago, selcuk said: Is there a straightforward way to build previous u-boot releases with the 5.27 project? No. Unfortunately we don't have resources to maintain more than one / or many older versions. The problem which we are facing now is extreme rear. In most cases build script doesn't have problems with building stable kernels. When you start switching to other u-boot branches, make sure you adjust patches ...
zador.blood.stained Posted May 9, 2017 Posted May 9, 2017 The easiest way would be grabbing a prebuilt u-boot from the apt repository. I hope this 5.25 version works: http://apt.armbian.com/pool/main/l/linux-u-boot-orangepizero-default/ Meanwhile I'll try to verify and bisect the problem if possible.
zador.blood.stained Posted May 9, 2017 Posted May 9, 2017 OK. This breaks it: ➜ u-boot git:(4943dc2) % git bisect bad 4943dc2f1977cf89297b87f93f96ad4d7f09d24d is the first bad commit commit 4943dc2f1977cf89297b87f93f96ad4d7f09d24d Author: Cédric Schieli <cschieli@gmail.com> Date: Mon Jan 23 16:51:45 2017 +0100 bootz/booti: relocate ramdisk if CONFIG_SYS_BOOT_RAMDISK_HIGH set In commit c2e7e72, the ramdisk relocation code was moved from image_setup_linux to do_bootm, leaving the bootz and booti cases broken. This patch fixes both by adding the BOOTM_STATE_RAMDISK state in their call to do_bootm_states if CONFIG_SYS_BOOT_RAMDISK_HIGH is set. Signed-off-by: Cédric Schieli <cschieli@gmail.com> Reviewed-by: Rick Altherr <raltherr@google.com> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com> 2
selcuk Posted May 9, 2017 Author Posted May 9, 2017 If I replace the u-boot deb file with "linux-u-boot-orangepizero_5.25_armhf.deb" file from above link, compile.sh script cannot write u-boot partition while creating the image. What is the correct way of using compiled u-boot binary?
zador.blood.stained Posted May 9, 2017 Posted May 9, 2017 I pushed the fix already, so newly compiled u-boot and full images should work. 3 minutes ago, selcuk said: What is the correct way of using compiled u-boot binary? extract u-boot binary from the package and write it to SD manually
selcuk Posted May 9, 2017 Author Posted May 9, 2017 Thank you very much. "do-not-relocate-initrd" patch fixed the issue.
Recommended Posts