Hi everyone,
I am facing an issue with uBoot.
I have built a small system with buildroot 2018.05 and mainline uBoot 2018.03.
The whole sdcard.img image has been dd to /dev/mmcblk1.
I have tried both am335x_evm_defconfig and am335x_boneblack_defconfig.
But on uBoot start, it seems that it does not read the uEnv.txt file.
But if I put the zImage in mmcblk1p2 in /boot, it manages to find the image and start the kernel but with default bootargs.
I have the following log:
`
U-Boot SPL 2018.03 (Nov 20 2018 - 19:28:32 +0100)
Trying to boot from MMC2
Loading Environment from FAT… Card did not respond to voltage select!
** Bad device mmc 0 **
Failed (-5)
U-Boot 2018.03 (Nov 20 2018 - 19:28:32 +0100)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT… MMC: no card present
** Bad device mmc 0 **
Failed (-5)
No USB device found
not set. Validating first E-fuse MAC
Net: eth0: ethernet@4a100000
Hit any key to stop autoboot: 0
MMC: no card present
MMC: no card present
MMC: no card present
MMC: no card present
MMC: no card present
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
4517040 bytes read in 309 ms (13.9 MiB/s)
38181 bytes read in 20 ms (1.8 MiB/s)
Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8fff3000, end 8ffff524 … OK
Starting kernel …
`
I have copied the uEnv.txt file to :
- mmcblk1p1 → /uEnv.txt
- mmcblk1p1 → /boot/uEnv.txt
- mmcblk1p2 → /uEnv.txt
- mmcblk1p2 → /boot/uEnv.txt
My goal was to put it in mmcblk1p1 as /uEnv.txt, so my uEnv.txt content is :
`
bootpart=1:1
devtype=mmc
bootdir=
bootfile=zImage
bootpartition=mmcblk1p2
set_bootargs=setenv bootargs console=ttyO0,115200n8 root=/dev/${bootpartition} ro rootfstype=ext4 rootwait
uenvcmd=run set_bootargs;run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${fdtaddr}
`
So the fallback could be OK, but I want my rootfs to be mounted as read-only and the default cmdline is set to rw.
Does anyone have already encounter this issue?
Romain