Jump to content

Recommended Posts

Posted

Hi,

I have a nanopi neo SBC and my final goal is to get Sunxi-cedrus 2019.03_Release (patched kernel 5.0.0 release) installed on device to test cedrus driver.

Did a manual kernel build and tried to dpkg -i *.deb files on the board but the kernel hangs on boot.

I read also

but that didn't help me so much

 

So I tried same procedure to replace the armbian standard 4.19.20 kernel with an official mainline 4.19.36 version.

I found same exact issue so I think I'm missing something.

Please have a quick read at the procedure I followed and put any advice to help me going through.

 

1) touch default kernel .config to have:

- allwinner cpus enabled

- VFP enabled (to make armhf output)

- ealryprintk enabled

 

2) after kernel build up, copy  to a fresh new armbian install on SD 3  deb files

- linux-headers-4.19.36_4.19.36-1_armhf.deb

- linux-image-4.19.36_4.19.36-1_armhf.deb

- linux-libc-dev_4.19.36-1_armhf.deb

 

3) dpkg -i *.deb on target SBC

 

4) working directly on SD on native x86 host pc:

- did not modify dtb link wich still points to original dtb-4.19.20 release

- created new zImage link to vmlinuz-4.19.36 (it was still pointing to original vmlinuz-4.19.20-sunxi)

- modified boot.cmd to:

   - setenv load_addr "0x46000000"

   - added earlyprintk=serial,ttyS0,115200 to bootargs

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

 

5) finally booting nanopi neo sbc with updated SD I get kernel hang (both for 4.19.36 and 5.0.0)

U-Boot SPL 2018.11-armbian (Feb 08 2019 - 11:04:44 +0100)
DRAM: 512 MiB
Trying to boot from MMC1

U-Boot 2018.11-armbian (Feb 08 2019 - 11:04:44 +0100) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: FriendlyARM NanoPi NEO
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
Loading Environment from EXT4... ** File not found /boot/boot.env **

** Unable to read "/boot/boot.env" from mmc0:1 **
In:    serial
Out:   serial
Err:   serial
Net:   phy interface0

Error: ethernet@1c30000 address not set.
eth-1: ethernet@1c30000
230454 bytes read in 30 ms (7.3 MiB/s)
Unknown command 'bmp' - try 'help'
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
=>         printenv
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc_auto usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_mmc_auto=if test ${mmc_bootdev} -eq 1; then run bootcmd_mmc1; run bootcmd_mmc0; elif test ${mmc_bootdev} -eq 0; then run bootcmd_mmc0; run bootcmd_mmc1; fi
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=1
bootm_size=0xa000000
console=ttyS0,115200
cpu=armv7
dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x43000000
fdtcontroladdr=5bf513a0
fdtfile=sun8i-h3-nanopi-neo.dtb
fileaddr=66000000
filesize=38436
kernel_addr_r=0x42000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadsplash= for prefix in ${boot_prefixes}; do if test -e mmc 0 ${prefix}boot.bmp; then load mmc 0 ${splashimage} ${prefix}boot.bmp; bmp d ${splashimage}; fi; done
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
mmc_bootdev=0
partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system};
preboot=run loadsplash; usb start
pxefile_addr_r=0x43200000
ramdisk_addr_r=0x43300000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x43100000
serial#=02c00081786888cd
soc=sunxi
splashimage=66000000
splashpos=m,m
stderr=serial
stdin=serial,usbkbd
stdout=serial
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3

Environment size: 4811/131068 bytes
=> boot
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3830 bytes read in 12 ms (311.5 KiB/s)
## Executing script at 43100000
U-boot loaded from SD
Boot script loaded from mmc
230 bytes read in 10 ms (22.5 KiB/s)
28177527 bytes read in 2169 ms (12.4 MiB/s)
6824448 bytes read in 539 ms (12.1 MiB/s)
Found mainline kernel configuration
28450 bytes read in 46 ms (603.5 KiB/s)
504 bytes read in 55 ms (8.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost1.dtbo
504 bytes read in 56 ms (8.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo
4155 bytes read in 49 ms (82 KiB/s)
Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
## Executing script at 46000000
## Loading init Ramdisk from Legacy Image at 43300000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    28177463 Bytes = 26.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
EHCI failed to shut down host controller.
EHCI failed to shut down host controller.
   Loading Ramdisk to 48520000, end 49fff437 ... OK
   reserving fdt memory region: addr=43000000 size=6d000
   Loading Device Tree to 484b0000, end 4851ffff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.36 (filippo@filippo) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #1 SMP Mon Apr 22 09:24:25 CEST 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: FriendlyARM NanoPi NEO
[    0.000000] bootconsole [earlycon0] enabled

 

This is the point where boot hangs

Thanks

F

Posted
8 minutes ago, FGuerzoni said:

So I tried same procedure to replace the armbian standard 4.19.20 kernel with an official mainline 4.19.36 version.


Official mainline is missing a lot of things, but for successful booting you miss our packaging patch.

Posted

Thank you for quick reply.

I didn't want to build with armbian build system because my final goal is to have sunxi-cedrus 5.0.0 image working on nanopi neo.

So I downloaded latest 4.19.36 kernel release and build it to test the my build procedure.

I'm not aware of standard patches.

Regards

F

Posted
Just now, FGuerzoni said:

Thank you for quick reply.

I didn't want to build with armbian build system because my final goal is to have sunxi-cedrus 5.0.0 image working on nanopi neo.

So I downloaded latest 4.19.36 kernel release and build it to test the my build procedure.

I'm not aware of standard patches.

Regards

F


Armbian build system will save you a lot of problems and using our DEV branch (5.0.0.) will again save you a lot. Start from there and add Cedrus with a patch?

Posted

I managed to boot ARMBIAN 5.83 and kernel 5.0.9 patched with cedrus stuff.

It has been quite tricky because cedrus march release referred to kernel 5.0.1 and I didn't find any source related to latest kernel to diff and patch.

Then I flashed a SD card with full image Armbian_5.83_Nanopineo_Ubuntu_bionic_dev_5.0.9.img

I don't know if it's ok because I still have to move to userspace and build the test app.

 

Anyway: what sounds strange to me is that on the target device I still have linux header dev files that seem not patched.

For exampe videodev2.h does not contain V4L2_PIX_FMT_H264_SLICE, which clearly appears in the patch I applied.

I tried to manually copy on the target nanopi neo the linux-headers-dev-sunxi_5.83_armhf.deb and

sudo dpkg -i linux-headers-dev-sunxi_5.83_armhf.deb

with no results.

Extracting the archive the updated videodev2.h seems to be there.

Regards

F

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines