bigtreetech / bigtreetech/CB1

Can't boot with last u-boot.

Open
#212 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
496
Forks
86
PR merge metrics
No merged PRs in 30d

Description

I see a "new" branch for u-boot ("bpi-v2025.01-rc4") and old branch, used for CB1 builds, are removed ("v2023.07-cb1").
U-boot, builded with old branch - fully stable, working without issues. And system started correctly.
New u-boot - working correctly, but can't boot a OS after it. Main issue - kernel don't recognize a uSD card. BTW, u-boot started from this card and load Linux kernel from it...
My image have a custom initialization script, to find a boot partions with compressed image (based on LiveUSB) and stable work on last two years.

New u-boot and OS startup (with cuts, to minimize output):
```U-Boot 2025.01-rc4-g272cd1ca1e11-dirty (May 25 2025 - 23:27:29 +0200) Allwinner Technology
CPU: Allwinner H616 (SUN50I)
Model: BigTreeTech CB1
DRAM: 1 GiB
Core: 59 devices, 22 uclasses, devicetree: separate
WDT: Not starting watchdog@30090a0
MMC: mmc@4020000: 0, mmc@4021000: 2, mmc@4022000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
Autoboot in 2 seconds, press to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
CB1 Boot Options.
1: CB1_stable
Enter choice: 1: CB1_stable
Retrieving file: /Image
Retrieving file: /uInitrd
Retrieving file: /dtb/allwinner/allwinner/sun50i-h616-bigtreetech-cb1-manta.dtb
Skipping fdtdir /dtb/ for failure retrieving dts
Moving Image from 0x40080000 to 0x40200000, end=0x41220000
## Loading init Ramdisk from Legacy Image at 4ff00000 ...
Image Name: uInitrd
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 9475269 Bytes = 9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 7bf392c0
Booting using the fdt blob at 0x7bf392c0
Working FDT set to 7bf392c0
Loading Ramdisk to 496f6000, end 49fff4c5 ... OK
Loading Device Tree to 00000000496ec000, end 00000000496f5b26 ... OK
Working FDT set to 496ec000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.16.17 (root@HomePC) (gcc (Gentoo 13.2.1_p20240503 p15) 13.2.1 20240503, GNU ld (Gentoo 2.42 p3) 2.42.0) #15 SMP Sat May 11 20:40:44 CEST 2024
[ 0.000000] Machine model: BigTreeTech CB1
[ 0.000000] OF: reserved mem: OVERLAP DETECTED!
[ 0.000000] secmon@40000000 (0x0000000040000000--0x0000000040040000) overlaps with tf-a@40000000 (0x0000000040000000--0x0000000040040000)
[ 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-0x000000004003ffff]
[ 0.000000] node 0: [mem 0x0000000040040000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
....
[ 1.226872] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq
[ 1.237260] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.243609] SMCCC: SOC_ID: ID = jep106:091e:1823 Revision = 0x00000000
[ 1.250197] hid: raw HID events driver (C) Jiri Kosina
[ 1.255732] usbcore: registered new interface driver usbhid
[ 1.261333] usbhid: USB HID core driver
[ 1.274092] Initializing XFRM netlink socket
[ 1.278706] NET: Registered PF_INET6 protocol family
[ 1.284531] Segment Routing with IPv6
[ 1.288270] In-situ OAM (IOAM) with IPv6
[ 1.292259] NET: Registered PF_PACKET protocol family
[ 1.297345] NET: Registered PF_KEY protocol family
[ 1.302146] can: controller area network core
[ 1.306597] NET: Registered PF_CAN protocol family
[ 1.311397] can: raw protocol
[ 1.314376] can: broadcast manager protocol
[ 1.318571] can: netlink gateway - max_hops=1
[ 1.325411] zswap: loaded using pool zstd/z3fold
[ 1.342690] of_cfs_init
[ 1.345251] of_cfs_init: OK
[ 1.348296] ALSA device list:
[ 1.351286] No soundcards found.
[ 1.466696] sunxi-mmc 4021000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
[ 1.476362] Freeing unused kernel memory: 1664K
[ 1.481988] sunxi-mmc 4021000.mmc: card claims to support voltages below defined range
[ 1.498191] Run /init as init process
>> Initial ramdisk script. Linux kernel 5.16.17
[ 1.620475] udevd[173]: starting version 3.2.14
[ 1.625926] random: udevd: uninitialized urandom read (16 bytes read)
[ 1.632536] random: udevd: uninitialized urandom read (16 bytes read)
[ 1.639028] random: udevd: uninitialized urandom read (16 bytes read)
[ 1.650848] udevd[174]: starting eudev-3.2.14
>> Looking for the cdrom
>> Attempting to mount media: /dev/ram0
[ 1.924619] exFAT-fs (ram0): invalid boot record signature
[ 1.930196] exFAT-fs (ram0): failed to read boot sector
[ 1.935440] exFAT-fs (ram0): failed to recognize exfat type
....
mount: can't find /mnt/cdrom in /etc/mtab
mount: can't find /mnt/rw_part in /etc/mtab
e2fsck 1.47.0 (5-Feb-2023)
e2fsck: No such file or directory while trying to open
Possibly non-existent device?
mount: can't find /mnt/rw_part in /etc/mtab
>> Mounting squashfs filesystem
[ 2.500772] /mnt/cdrom//root.sqh: Can't open blockdev
mount: mounting /mnt/cdrom//root.sqh on /mnt/livecd failed: No such file or directory
/init: line 162: can't create /newroot/etc/fstab: nonexistent directory
mount: mounting /mnt/cdrom on /newroot/mnt/cdrom failed: Invalid argument
mount: mounting /mnt/rw_part on /newroot/mnt/rw_part failed: Invalid argument
insmod: can't open '/newroot/media/rtl8189ES_linux/8189fs.ko': No such file or directory
!! init (/sbin/init) not found in mounted root device (UNKNOWN)!
Generating "/run/initramfs/gksosreport.txt" ...
>> You might want to save "/run/initramfs/gksosreport.txt" to a USB stick or /boot
>> after mounting them and attach it to a bug report.
>> Welcome to Genkernel 4.3.16 (2024-12-03 18:33:33 UTC) rescue shell!
>> ...running Linux kernel 5.16.17
....
rescueshell /newroot # ls /dev/mmc*
ls: /dev/mmc*: No such file or directory`

Old u-boot:
U-Boot 2023.07-rc2-g272cd1ca1e (Feb 10 2024 - 14:34:19 +0100) Allwinner Technology
CPU: Allwinner H616 (SUN50I)
Model: BigTreeTech CB1
DRAM: 1 GiB
Core: 50 devices, 18 uclasses, devicetree: separate
WDT: Not starting watchdog@30090a0
MMC: mmc@4020000: 0, mmc@4021000: 2, mmc@4022000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
Autoboot in 2 seconds, press to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
CB1 Boot Options.
1: CB1_stable
Enter choice: 1: CB1_stable
Retrieving file: /Image
Retrieving file: /uInitrd
Retrieving file: /dtb/allwinner/sun50i-h616-bigtreetech-cb1.dtb
Moving Image from 0x40080000 to 0x40200000, end=41220000
## Loading init Ramdisk from Legacy Image at 4ff00000 ...
Image Name: uInitrd
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 9475269 Bytes = 9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
Booting using the fdt blob at 0x4fa00000
Working FDT set to 4fa00000
Loading Ramdisk to 496f6000, end 49fff4c5 ... OK
Loading Device Tree to 00000000496e9000, end 00000000496f5e7b ... OK
Working FDT set to 496e9000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.16.17 (root@HomePC) (gcc (Gentoo 13.2.1_p20240503 p15) 13.2.1 20240503, GNU ld (Gentoo 2.42 p3) 2.42.0) #15 SMP Sat May 11 20:40:44 CEST 2024
[ 0.000000] Machine model: BigTreeTech CB1
....
[ 1.940325] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq
[ 1.945540] sun50i-h616-pinctrl 300b000.pinctrl: supply vcc-pf not found, using dummy regulator
[ 1.968844] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.975393] SMCCC: SOC_ID: ID = jep106:091e:1823 Revision = 0x00000000
[ 1.980792] sunxi-mmc 4020000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
[ 1.982006] hid: raw HID events driver (C) Jiri Kosina
[ 1.996645] usbcore: registered new interface driver usbhid
[ 2.002278] usbhid: USB HID core driver
[ 2.015244] debugfs: Directory '5096000.codec' with parent 'H616 Audio Codec' already present!
[ 2.034528] random: fast init done
[ 2.044792] mmc1: host does not support reading read-only switch, assuming write-enable
[ 2.054581] mmc1: Problem switching card into high-speed mode!
[ 2.060582] mmc1: new SDHC card at address 0001
[ 2.066022] mmcblk1: mmc1:0001 SD32G 28.9 GiB
[ 2.073777] mmcblk1: p1 p2
....

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the old and new U-Boot logs, especially the loaded DTB paths, with the Linux 5.16.17 boot output. Review extlinux/extlinux.conf and the CB1 device-tree files referenced in the logs, then trace where the kernel should register the uSD card. Done means the new U-Boot branch boots the existing OS image and exposes the card as an mmc device.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.