Welcome, Guest

Author Topic: A64 Mainline - Trouble booting Debian arm64 kernel version 4.13.13  (Read 436 times)


  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Hi guys, I've tried my best to get a working Debian image with the mainline kernel, but I don't know how to proceed.

Uboot won't go beyond the message "Starting kernel ..."

Code: [Select]
U-Boot 2018.01-rc1-00149-g659208da47-dirty (Dec 18 2017 - 22:10:00 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Olimex A64-Olinuxino
DRAM:  1 GiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
272 bytes read in 14 ms (18.6 KiB/s)
## Executing script at 4fc00000
reading allwinner/sun50i-a64-olinuxino.dtb
7958 bytes read in 34 ms (228.5 KiB/s)
reading allwinner/Image
12472832 bytes read in 649 ms (18.3 MiB/s)
reading uInitrd
3694605 bytes read in 204 ms (17.3 MiB/s)
## Loading init Ramdisk from Legacy Image at 50000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    3694541 Bytes = 3.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Ramdisk to 49c7a000, end 49ffffcd ... OK
   Loading Device Tree to 0000000049c75000, end 0000000049c79f15 ... OK

Starting kernel ...

1. Built the Debian kernel and rootfs following the instructions in links below
 [a.] https://wiki.debian.org/Arm64Port
 [b.] https://debian-handbook.info/browse/stable/sect.kernel-compilation.html
     Compiled with make -j6 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-

2. Built u-boot & installed using instructions below
 [a.] https://linux-sunxi.org/Olimex_A64-OLinuXino
       Used files a64-olinuxino_defconfig, sun50i-a64-olinuxino.dtb
 [b.] https://linux-sunxi.org/Mainline_U-Boot#Boot
     Compiled with make CROSS_COMPILE=aarch64-linux-gnu-
 [c.] https://linux-sunxi.org/Initial_Ramdisk

Code: [Select]
allwinner  boot.cmd  boot.scr  config-4.13.13  initrd.img-4.13.13  System.map-4.13.13  u-boot-sunxi-with-spl.bin  uInitrd  vmlinuz-4.13.13
Code: [Select]
Image  sun50i-a64-olinuxino.dtb
  Created boot.src with mkimage -C none -A arm64 -T script -d boot.cmd boot.scr
Code: [Select]
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk1p2 rootwait panic=10
load mmc 0:1 0x43000000 ${fdtfile}
load mmc 0:1 0x41000000 allwinner/Image
load mmc 0:1 0x50000000 uInitrd
booti 0x41000000 0x50000000 0x43000000

u-boot env variables
Code: [Select]
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/bootaa64.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_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 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}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;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_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
dfu_alt_info_ram=kernel ram 0x40080000 0x1000000;fdt ram 0x4FA00000 0x100000;ramdisk ram 0x4FE00000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
preboot=usb start
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}; 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/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.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
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

Environment size: 3972/131068 bytes

1. I plan to try the vanilla kernel and or linux-sunxi kernel next

Can anyone point me in the right direction to get this working?


  • Hero Member
  • *****
  • Posts: 1651
  • Karma: +33/-45
Re: A64 Mainline - Trouble booting Debian arm64 kernel version 4.13.13
« Reply #1 on: December 20, 2017, 04:10:59 PM »
You look to be relying on Debian source(s) and/or linux-sunxi source(s) so did you try asking each of them?

(Probably Olimex supply working uboot+linux and quite possibly those are all they support.)

I expect others will - over time - be interested in this so good luck and please post how you get on.

At a guess (!) maybe your uboot is incompatible with the kernel or the other way around.



  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: A64 Mainline - Trouble booting Debian arm64 kernel version 4.13.13
« Reply #2 on: December 29, 2017, 05:01:09 PM »
I was able to get it to boot Debian successfully, however I get the following kernel errors. 

Does anyone have any clues as to how to resolve these problems?

Code: [Select]
[    1.186363] Freeing unused kernel memory: 448K
[    1.892064] systemd[1]: System time before build time, advancing clock.
[    1.973534] x_tables: version magic '4.13.13 SMP preempt mod_unload modversions aarch64' should be '4.13.13 SMP mod_unload aarch64'
[    1.985513] systemd[1]: Failed to insert module 'ip_tables': Exec format error
[    2.031000] systemd[1]: systemd 236 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN default-hierarchy=hybrid)
[    2.052054] systemd[1]: Detected architecture arm64.

Welcome to Debian GNU/Linux buster/sid!

[    2.069222] systemd[1]: Set hostname to <olimex>.
[    2.274027] BUG: Bad page state in process systemd-cryptse  pfn:7dd29
[    2.280474] page:ffffffbf00f74a40 count:1 mapcount:0 mapping:          (null) index:0x1
[    2.288468] flags: 0x0()
[    2.291003] raw: 0000000000000000 0000000000000000 0000000000000001 00000001ffffffff
[    2.298735] raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000
[    2.306463] page dumped because: nonzero _refcount
[    2.311244] Modules linked in:
[    2.314300] CPU: 0 PID: 119 Comm: systemd-cryptse Not tainted 4.13.13 #13
[    2.321076] Hardware name: Olimex A64-Olinuxino (DT)
[    2.326031] Call trace:
[    2.328485] [<ffffff8008086f68>] dump_backtrace+0x0/0x210
[    2.333879] [<ffffff8008087254>] show_stack+0x14/0x20
[    2.338926] [<ffffff80085c4360>] dump_stack+0x98/0xb8
[    2.343972] [<ffffff800813fc30>] bad_page+0xe0/0x140
[    2.348931] [<ffffff800813fce4>] free_pages_check_bad+0x54/0xb8
[    2.354842] [<ffffff8008140008>] free_pcppages_bulk+0x218/0x2f0
[    2.360754] [<ffffff8008141bf0>] free_hot_cold_page+0x1a8/0x1f0
[    2.366665] [<ffffff8008141f54>] free_hot_cold_page_list+0x34/0x60
[    2.372837] [<ffffff800814939c>] release_pages+0x27c/0x338
[    2.378319] [<ffffff800817ab18>] free_pages_and_swap_cache+0xb0/0xc8
[    2.384666] [<ffffff8008164c00>] tlb_flush_mmu_free+0x40/0x60
[    2.390404] [<ffffff8008165a98>] arch_tlb_finish_mmu+0x48/0x78
[    2.396229] [<ffffff8008165cb4>] tlb_finish_mmu+0x24/0x50
[    2.401622] [<ffffff800816dbf0>] exit_mmap+0xb0/0xf8
[    2.406582] [<ffffff800809f2ec>] mmput+0x44/0xf8
[    2.411194] [<ffffff80080a522c>] do_exit+0x26c/0x990
[    2.416152] [<ffffff80080a59b4>] do_group_exit+0x34/0xa0
[    2.421456] [<ffffff80080a5a30>] __wake_up_parent+0x0/0x28
[    2.426934] [<ffffff8008082ca0>] __sys_trace_return+0x0/0x4
[    2.432496] Disabling lock debugging due to kernel taint


  • Hero Member
  • *****
  • Posts: 1651
  • Karma: +33/-45
Re: A64 Mainline - Trouble booting Debian arm64 kernel version 4.13.13
« Reply #3 on: December 29, 2017, 07:26:10 PM »
I hope you've taken my previous post to heart.

Good luck and season's greetings,



  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: A64 Mainline - Trouble booting Debian arm64 kernel version 4.13.13
« Reply #4 on: December 30, 2017, 04:11:48 AM »
Sure, I'll post step by step instructions once I get it figured it out.