Failed to boot from SD Card using built module

Hi,

I built image from following procedure and burned SDcard with Phenix SDCard tool.


But boot stopped.

As console log, default boot may be set to EMMC, but my board has no EMMC.

Could you tell me how to modify build environment to set booting from SD Card?

Best Regards,

This is console log.

 [119]HELLO! BOOT0 is starting!
[122]BOOT0 commit : 33d8db429a
[126]periph0 has been enabled
[129]set pll end
[131]PL gpio voltage : 3.3V
[136]PMU: AXP2202
[140]PMU: AXP1530
[146]power mode:33, sys_vol:920
[150]vaild para:1  select dram para0
[154]dram_para[0]:0x4b0
[156]dram_para[1]:0x8
[159]dram_para[2]:0x7070707
[162]dram_para[3]:0xd0d0d0d
[165]dram_para[4]:0xe0e
[167]dram_para[5]:0x84848484
[171]dram_para[6]:0x310a
[173]dram_para[7]:0x10001000
[176]dram_para[8]:0x0
[179]dram_para[9]:0x34
[181]dram_para[10]:0x1b
[184]dram_para[11]:0x33
[186]dram_para[12]:0x3
[189]dram_para[13]:0x0
[191]dram_para[14]:0x0
[194]dram_para[15]:0x4
[196]dram_para[16]:0x72
[199]dram_para[17]:0x0
[201]dram_para[18]:0xe
[204]dram_para[19]:0x0
[206]dram_para[20]:0x0
[209]dram_para[21]:0x26
[211]dram_para[22]:0x80808080
[214]dram_para[23]:0x6060606
[217]dram_para[24]:0x1f0b0503
[221]dram_para[25]:0x0
[223]dram_para[26]:0x3a000000
[226]dram_para[27]:0x802f3333
[229]dram_para[28]:0xc0c0bbbf
[233]dram_para[29]:0x35352f31
[236]dram_para[30]:0xc60
[239]dram_para[31]:0x48484848
[242]board init ok
[265]enable_jtag
[267]card no is 0
[268]sdcard 0 line count 4
[271][mmc]: mmc driver ver 2023-03-24 16:23
[282][mmc]: Wrong media type 0x0
[285][mmc]: ***Try SD card 0***
[315][mmc]: HSSDR52/SDR25 4 bit
[319][mmc]: 50000000 Hz
[321][mmc]: 29512 MB
[324][mmc]: ***SD/MMC 0 init OK!!!***
[335]DRAM BOOT DRIVE INFO: V0.67
[340]DRAM_VCC set to 1100 mv
[343]DRAM CLK =1200 MHZ
[345]DRAM Type =8 (3:DDR3,4:DDR4,7:LPDDR3,8:LPDDR4)
[355]DRAM SIZE =1024 MBytes, para1 = 30fa, para2 = 4000000, tpr13 = 6461
[385]DRAM simple test OK.
[388]dram size =1024
[395]nsi init 2023-2-23
[523]Loading boot-pkg Succeed(index=0).
[527]Entry_name        = u-boot
[537]Entry_name        = monitor
[540]Entry_name        = scp
[544]Entry_name        = dtb
[548]mmc not para
[550]Jump to second Boot.
NOTICE:  BL31: v2.5(debug):55b180a27
NOTICE:  BL31: Built : 11:09:52, Sep 18 2023
NOTICE:  BL31: No DTB found.
nsi init ok 2022-11-08
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2018.07-g9592647 (Jun 25 2025 - 10:45:40 +0000) Allwinner Technology

[00.694]CPU:   Allwinner Family
[00.697]Model: sun55iw3
I2C:   ready
[00.707]DRAM:  1 GiB
[00.712]Relocation Offset is: 35e60000
[00.775]secure enable bit: 0
[00.778]PMU: AXP2202
[00.807][AXP2202] comm status : 0x0 = 0x20, 0x1 = 0x90
[00.812][AXP2202] onoff status: 0x20 = 0x4, 0x21 = 0x0
[00.817][AXP2202] reboot/charge status: 0xf0 = 0x0
[00.822]PMU: AXP1530
[00.825]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=600Mhz
[00.831]gic: sec monitor mode
SPI ALL:   ready
[00.836]flash init start
[00.838]workmode = 0,storage type = 1
[00.842][mmc]: mmc driver ver uboot2018:2024-10-18 9:01:00 -- uboot2018:2025-03-28 10:03:00
[00.850][mmc]: get sdc_type fail and use default host:tm1.
[00.856][mmc]: can't find node "mmc0",will add new node
[00.861][mmc]: fdt err returned <no error>
[00.864][mmc]: Using default timing para
[00.868][mmc]: SUNXI SDMMC Controller Version:0x50500
[00.975][mmc]: card_caps:0x3000000a
[00.978][mmc]: host_caps:0x3000003f
[00.982]sunxi flash init ok
get value error
[00.988]Loading Environment from SUNXI_FLASH... OK
[00.994]No ethernet found.
[01.003]Fail to get de's irq!
[01.037][PHY] Unset hs_clk_rate.
dsi1@5508000:  detailed mode clock 70000 kHz, flags[0]
    H: 0800 0818 0836 0854
    V: 1280 1300 1304 1314
bus_format: 0
partno erro : can't find partition bootloader
[01.064]bootloader is not found!
[01.222][PHY] phy_config:0 Unset the lvl,Use the default cfg.
[01.693]the secure storage item0 copy0 magic is bad
[01.697]the secure storage item0 copy1 magic is bad
[01.702]usb burn from boot
delay time 0
weak:otg_phy_config
[01.712]usb prepare ok
[02.015]overtime
[02.020]do_burn_from_boot usb : no usb exist
skip update boot_param
cann't get the boot_base from the env
[02.029]update part info
[02.032]update bootcmd
[02.035]change working_fdt 0x7be0fe18 to 0x7bddfe18
get value error
[02.046]The storage not support sample function
ret 0
[02.158]chip id : 0x0000ff10 0x00004824 0x00008920 0x0000221a
[02.164]chip id : 0x0000ff10 0x00004824 0x00008920 0x0000221a
[02.177]update dts
curr_device:0
Device: SUNXI SD/MMC
Manufacturer ID: 2
OEM: 544d
Name: SE032
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
Hit any key to stop autoboot:  0
[04.211][mmc]: MMC Device 1 not found
no mmc device at slot 1
mmc0 is current device
Scanning mmc 0:1...
starting USB...
USB0:   start sunxi  USB-DRD...
config usb clk ok
sunxi USB-DRD init ok...
USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1:   start sunxi  USB1-Host...
config usb clk ok
sunxi USB1-Host init ok...
USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: device type unknown
... is now current device
** Bad device usb 0 **
** Bad device usb 0 **
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No such bus

Device 0: unknown device
=>

I changed u-boot version to old version.

$ cd brandy/brandy-2.0/u-boot-2018/
$ git checkout 188d46e7

Then, boot succeeded, but kernel panic occurred.
Could you tell me which version is stable?

Best Regards

loading kernel
[112]HELLO! BOOT0 is starting!
[115]BOOT0 commit : 33d8db429a
[119]periph0 has been enabled
[122]set pll end
[124]PL gpio voltage : 3.3V
[128]PMU: AXP2202
[133]PMU: AXP1530
[139]power mode:33, sys_vol:920
[143]vaild para:1 select dram para0
[147]dram_para[0]:0x4b0
[149]dram_para[1]:0x8
[151]dram_para[2]:0x7070707
[154]dram_para[3]:0xd0d0d0d
[158]dram_para[4]:0xe0e
[160]dram_para[5]:0x84848484
[163]dram_para[6]:0x310a
[166]dram_para[7]:0x10001000
[169]dram_para[8]:0x0
[171]dram_para[9]:0x34
[174]dram_para[10]:0x1b
[176]dram_para[11]:0x33
[179]dram_para[12]:0x3
[181]dram_para[13]:0x0
[184]dram_para[14]:0x0
[186]dram_para[15]:0x4
[189]dram_para[16]:0x72
[191]dram_para[17]:0x0
[194]dram_para[18]:0xe
[196]dram_para[19]:0x0
[199]dram_para[20]:0x0
[201]dram_para[21]:0x26
[204]dram_para[22]:0x80808080
[207]dram_para[23]:0x6060606
[210]dram_para[24]:0x1f0b0503
[213]dram_para[25]:0x0
[216]dram_para[26]:0x3a000000
[219]dram_para[27]:0x802f3333
[222]dram_para[28]:0xc0c0bbbf
[226]dram_para[29]:0x35352f31
[229]dram_para[30]:0xc60
[231]dram_para[31]:0x48484848
[235]board init ok
[257]enable_jtag
[259]card no is 0
[261]sdcard 0 line count 4
[264][mmc]: mmc driver ver 2023-03-24 16:23
[274][mmc]: Wrong media type 0x0
[278][mmc]: Try SD card 0
[326][mmc]: HSSDR52/SDR25 4 bit
[330][mmc]: 50000000 Hz
[332][mmc]: 29512 MB
[335][mmc]: SD/MMC 0 init OK!!!
[346]DRAM BOOT DRIVE INFO: V0.67
[351]DRAM_VCC set to 1100 mv
[354]DRAM CLK =1200 MHZ
[356]DRAM Type =8 (3:DDR3,4:DDR4,7:LPDDR3,8:LPDDR4)
[366]DRAM SIZE =1024 MBytes, para1 = 30fa, para2 = 4000000, tpr13 = 6461
[397]DRAM simple test OK.
[399]dram size =1024
[406]nsi init 2023-2-23
[529]Loading boot-pkg Succeed(index=0).
[533]Entry_name = u-boot
[542]Entry_name = monitor
[545]Entry_name = scp
[549]Entry_name = dtb
[553]mmc not para
[555]Jump to second Boot.
NOTICE: BL31: v2.5(debug):55b180a27
NOTICE: BL31: Built : 11:09:52, Sep 18 2023
NOTICE: BL31: No DTB found.
nsi init ok 2022-11-08
ERROR: Error initializing runtime service opteed_fast

U-Boot 2018.07-g188d46e7 (Jun 25 2025 - 10:45:39 +0000) Allwinner Technology

[00.699]CPU:   Allwinner Family
[00.702]Model: sun55iw3
I2C:   ready
[00.712]DRAM:  1 GiB
[00.716]Relocation Offset is: 35e8b000
[00.767]secure enable bit: 0
[00.770]PMU: AXP2202
[00.799][AXP2202] comm status : 0x0 = 0x20, 0x1 = 0x90
[00.804][AXP2202] onoff status: 0x20 = 0x4, 0x21 = 0x0
[00.809][AXP2202] reboot/charge status: 0xf0 = 0x0
[00.813]PMU: AXP1530
[00.816]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=600Mhz
[00.823]gic: sec monitor mode
SPI ALL:   ready
[00.828]flash init start
[00.830]workmode = 0,storage type = 1
[00.833][mmc]: mmc driver ver uboot2018:2024-10-18 9:01:00 -- uboot2018:2025-03-28 10:03:00
[00.842][mmc]: get sdc_type fail and use default host:tm1.
[00.848][mmc]: can't find node "mmc0",will add new node
[00.852][mmc]: fdt err returned <no error>
[00.856][mmc]: Using default timing para
[00.860][mmc]: SUNXI SDMMC Controller Version:0x50500
[00.960][mmc]: card_caps:0x3000000a
[00.963][mmc]: host_caps:0x3000003f
[00.967]sunxi flash init ok
get value error
[00.973]Loading Environment from SUNXI_FLASH... OK
[00.991]Fail to get de's irq!
[01.024][PHY] Unset hs_clk_rate.
dsi1@5508000:  detailed mode clock 70000 kHz, flags[0]
    H: 0800 0818 0836 0854
    V: 1280 1300 1304 1314
bus_format: 0
partno erro : can't find partition bootloader
[01.052]bootloader is not found!
[01.210][PHY] phy_config:0 Unset the lvl,Use the default cfg.
[01.686]the secure storage item0 copy0 magic is bad
[01.696]the secure storage item0 copy1 magic is bad
[01.700]usb burn from boot
delay time 0
weak:otg_phy_config
[01.711]usb prepare ok
[02.013]overtime
[02.018]do_burn_from_boot usb : no usb exist
skip update boot_param
partno erro : can't find partition private
partno erro : can't find partition private
partno erro : can't find partition private
partno erro : can't find partition private
partno erro : can't find partition private
partno erro : can't find partition private
[02.047]update part info
[02.049]update bootcmd
[02.059]change working_fdt 0x7be3ae28 to 0x7be0ae28
get value error
[02.069]The storage not support sample function
ret 0
[02.200]chip id : 0x0000ff10 0x00004824 0x00008920 0x0000221a
[02.205]chip id : 0x0000ff10 0x00004824 0x00008920 0x0000221a
[02.219]update dts
Hit any key to stop autoboot:  0
avb_footer.c:22: ERROR: Footer magic is incorrect.
[03.366]no vendor_boot partition is found
Android's image name: sun55i_arm64
ERROR: reserving fdt memory region failed (addr=7bf10000 size=3e8000)
[03.414]Starting kernel ...

[03.416]total: 3416 ms

[03.418][mmc]: MMC Device 2 not found
[03.422][mmc]: mmc 2 not find, so not exit
NOTICE:  [SCP] :wait arisc ready....
NOTICE:  [SCP] :arisc version: [toianil-v-xu]
NOTICE:  [SCP] :arisc startup ready
NOTICE:  [SCP] :arisc startup notify message feedback
NOTICE:  [SCP] :sunxi-arisc driver is starting
BL3-1: Next image address = 0x40080000
BL3-1: Next image spsr = 0x3c5
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    0.000000] Linux version 5.15.147 (kkitazono@kkvm1) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #5 SMP PREEMPT Mon Aug 4 14:00:00 UTC 2025
[    0.000000] Machine model: sun55iw3
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000002500000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] cma: Reserved 64 MiB at 0x0000000077c00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 18 pages/cpu s35672 r8192 d29864 u73728
[    0.000000] pcpu-alloc: s35672 r8192 d29864 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: Qualcomm erratum 1009, or ARM erratum 1286807, 2441009
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: earlycon=uart8250,mmio32,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyAS0,115200 loglevel=8 root=/dev/mmcblk0p4 init=/usr/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:boot@mmcblk0p3:rootfs@mmcblk0p4:UDISK@mmcblk0p5 cma=64M snum=90c740689204872221a mac_addr=08:ef:6c:a9:38:3c mac1_addr=08:ef:6c:a9:38:3d wifi_mac= bt_mac= selinux=0 specialstr= gpt=1 pd_ignore_unused=1 slub_debug=UFPZ androidboot.mode=normal androidboot.serialno=90c740689204872221a androidboot.hardware=sun55iw3p1 boot_type=1 androidboot.boot_type=1 androidboot.secure_os_exist=0 androidboot.trustchain=false androidboot.drmkey=false gpt=1 uboot_message=2018.07-g188d46e7(06/25/2025-10:45:39) mbr_offset=1032192 bootreason=unknow androidboot.dramfreq=1200 androidboot.dramsize=1024 uboot_backup=ubootA
[    0.000000] Unknown kernel command line parameters "partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:boot@mmcblk0p3:rootfs@mmcblk0p4:UDISK@mmcblk0p5 snum=90c740689204872221a mac_addr=08:ef:6c:a9:38:3c mac1_addr=08:ef:6c:a9:38:3d wifi_mac= bt_mac= selinux=0 specialstr= slub_debug=UFPZ boot_type=1 uboot_message=2018.07-g188d46e7(06/25/2025-10:45:39) bootreason=unknow uboot_backup=ubootA", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 914576K/1048576K available (12928K kernel code, 2516K rwdata, 3768K rodata, 1984K init, 428K bss, 68464K reserved, 65536K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.

kernel panic
[ 13.543013] Internal error: SP/PC alignment exception: 000000008a000000 [#1] PREEMPT SMP
[ 13.552072] Modules linked in: vipcore deinterlace aic8800_fdrv(+) aic8800_bsp spi_sunxi_ng sunxi_ve sun55iw3_devfreq ip_tables
[ 13.564930] CPU: 6 PID: 105 Comm: kworker/6:3 Not tainted 5.15.147 #5
[ 13.564935] Hardware name: sun55iw3 (DT)
[ 13.564940] Workqueue: events output_poll_execute
[ 13.576523] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 13.576529] pc : 0x1d
[ 13.434183] rc.local[421]: De[ 13.592118] lr : drm_client_dev_hotplug+0x84/0xdc
vice setup complete
St[ 13.600157] sp : ffffffc009ac3ce0
arting OpenBSD Secure S[ 13.600159] x29: ffffffc009ac3ce0 x28: 0000000000000000 x27: 0000000000000000
hell server…
[ 13.600167] x26: ffffffc00955a680 x25: ffffff803fd0d005 x24: ffffff8002fb5b38
[ 13.627110] x23: ffffff8002fb5900 x22: ffffffc008f76810 x21: ffffff8002fb5920
[ 13.635093] x20: ffffff8002fb5800 x19: ffffff803fddf810 x18: 0000000000000020
[ 13.643052] x17: 0000000000000000 x16: 0000000000000000 x15: 00303d524f4e494d
[ 13.651022] x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000040
[ 13.651029] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[ 13.471578] rc.local[422]: us[ 13.666959] x8 : 0000000000000000 x7 : ffffff8004b63128 x6 : 00000000000017f6
eradd: user ‘radxa’ already exis[ 13.677715] x5 : ffffff80072e3000 x4 : 0000000000000000 x3 : ffffff8002fb5900
ts
Starting H[ 13.688460] x2 : ffffff8002e527c0 x1 : 000000000000001d x0 : ffffff803fddf810
ostname Service…
[ 13.699215] Call trace:
[ 13.704033] 0x1d
[ 13.706182] output_poll_execute+0xec/0x250
[ 13.710864] process_one_work+0x1d0/0x374
[ 13.715330] worker_thread+0x13c/0x490
[ 13.715334] kthread+0x150/0x160
[ Starting Permit User Sessions…
13.715340] ret_from_fork+0x10/0x20
[ 13.731973] Code: bad PC value
[ 13.735383] —[ end trace c90a615db72df591 ]—
[ 13.740554] Kernel panic - not syncing: SP/PC alignment exception: Fatal exception
NOTICE: sunxi_usb_dev_register
NOTICE: sunxi_usb_main_loop
weak:otg_phy_config
NOTICE: usb init ok

I succeeded to boot using the built firmware.

I modified following point:

  • u-boot
    git clone --depth 10 --branch allwinner-aiot-v2018.07 git@github.com:radxa/u-boot.git u-boot-2018
    git checkout 04a6e48a

  • kernel
    ./build.sh menuconfig
    Allwinner BSP —>
    Device Drivers —>
    DRM Drivers —>
    uncheck DRM Support for Allwinner SoCs

./build.sh
./build pack

Burn Image with Phenix Card to SD Card.