uBoot do not read uEnv.txt

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

Hi Romain
Change
set_bootargs=setenv bootargs console=ttyO0,115200n8 root=/dev/${bootpartition} ro rootfstype=ext4 rootwait
to

set_bootargs=setenv bootargs console=ttyO0,115200n8 root=/dev/${bootpartition} rw rootfstype=ext4 rootwait

Hello,

I have a similar problem. Did find a solution yet?
I have changed the “ro” to “rw”…

I always see the next:
U-Boot 2018.09 (Mar 26 2019 - 16:04:43 +0100)

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
not set. Validating first E-fuse MAC
Net: cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
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
5554048 bytes read in 358 ms (14.8 MiB/s)
36793 bytes read in 11 ms (3.2 MiB/s)

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Device Tree to 8fff4000, end 8fffffb8 … OK

Starting kernel …


[ 2.108549] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)

So it looks like it ignores the uEnv.txt…

  1. november 21., szerda 9:24:51 UTC+1 időpontban Romain REIGNIER a következőt írta: