eMMC booting ignores the uEnv.txt with customized Buildroot image

725 views
Skip to first unread message

rol...@gmail.com

unread,
Mar 26, 2019, 5:07:33 PM3/26/19
to BeagleBoard
Hello,

I have created a custom image with Buildroot (Buildroot 2019.02-dirty). Version of kernel is v4.14 (ti-linux), u-boot is 2018.09 (Buildroot repo), I have tried kernel v4.14 BR repo too.... 
I have made partitions on eMMC (mmcblk1):

 +-----------------------------+
 | p0: Boot partition (FAT32)  |
 | MLO                         |
 | u-boot.img                  |
 | uEnv.txt                    |
 +-----------------------------+
 | p1: Rootfs A (EXT4)         |
 +-----------------------------+
 | p2: Rootfs B (EXT4)         |
 +-----------------------------+
 | p3: Application data (EXT4) |
 +-----------------------------+

The MLO, u-boot.img are in fat partition and zimage and am335x-boneblack.dtb are in /boot on p1 and/or on p2 partition.
BBB is able to boot on p1 partition. It works fine.
I would like to change uEnv.txt to use p2 partition, but does not work. If I change anything in uEnv.txt, it won't have effect. I have changed the contain of txt file to meaningless text, it haven't got any effect.
I have copied uEnv.txt to /boot folder, it haven't got any effect. If I delete uEnv.txt, same... It always use default environment.
It looks like BBB does not read uEnv at all.

booting:
U-Boot SPL 2018.09 (Mar 26 2019 - 16:04:43 +0100)
Trying to boot from MMC2


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
<ethaddr> 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 10 ms (3.5 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 ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.40

....

The same image, when I try to boot from SD card, it is able to use uEnv.txt, if I do wrong anything it won't boot.

What should I do? How to force u-boot to use uEnv.txt during booting from eMMC? 

Thank you in advance.

Roland Dobák

unread,
Mar 27, 2019, 5:30:14 AM3/27/19
to BeagleBoard
I tried to use uEnv.txt content of a similar issue:

bootpart=1:1
devtype
=mmc
bootdir
=
bootfile
=zImage
bootpartition
=mmcblk1p2
set_bootargs
=setenv bootargs console=ttyO0,115200n8 root=/dev/${bootpartition} rw rootfstype=ext4 rootwait
uenvcmd
=run set_bootargs;run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${fdtaddr}

It has no effect.
Could anybody help me?

Robert Nelson

unread,
Mar 27, 2019, 10:05:09 AM3/27/19
to Beagle Board
On Wed, Mar 27, 2019 at 4:30 AM Roland Dobák <rol...@gmail.com> wrote:
>
> I tried to use uEnv.txt content of a similar issue:
>
> bootpart=1:1
> devtype=mmc
> bootdir=
> bootfile=zImage
> bootpartition=mmcblk1p2
> set_bootargs=setenv bootargs console=ttyO0,115200n8 root=/dev/${bootpartition} rw rootfstype=ext4 rootwait
> uenvcmd=run set_bootargs;run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${fdtaddr}
>
> It has no effect.
> Could anybody help me?

"uEnv.txt" is not the default in mainline u-boot..

Regards,

--
Robert Nelson
https://rcn-ee.com/

droland

unread,
Mar 27, 2019, 10:42:01 AM3/27/19
to BeagleBoard
Thank you for your reply.

What is the default? uboot.env?

There is a "(uboot.env) Name of the FAT file to use for the environment" in Buildroot uboot-menuconfig....

I have renamed "uEnv.txt" to "uboot.env" and it has no effect with content above.

Best regards.
Roland Dobak



droland

unread,
Apr 12, 2019, 12:55:41 PM4/12/19
to BeagleBoard
Now the environment is stored in eMMC, so BBB can read/write it....

Renee Cousins

unread,
Jul 6, 2020, 2:27:21 PM7/6/20
to BeagleBoard
This doesn't answer the question.
Reply all
Reply to author
Forward
0 new messages