U-Boot ignoring uEnv.txt-settings

Hi,

I took the u-boot.img and MLO from the angström distribution
and tried to do some setting with the uEnv.txt file.

None of the setting were available neither when u-boot is interrupted
and printenv was used to proof the environment setting nor show
cat /proc/cmdline any changes of the kernels commandline.
"Reading uEnv.txt" (or similiar...dont remember exactly) was shown
though.

How can I make u-boot accept, read and use the setting in my uEnv.txt?

Best regards,
mcc

A copy of your uEnv.txt and serial boot log would be awfully helpful,
here.

-Andrew

Andrew Bradford <andrew@bradfordembedded.com> [12-10-29 16:23]:

Andrew Bradford <andrew@bradfordembedded.com> [12-10-29 16:23]:
>
> > I took the u-boot.img and MLO from the angström distribution
> > and tried to do some setting with the uEnv.txt file.
> >
> > None of the setting were available neither when u-boot is
> > interrupted and printenv was used to proof the environment
> > setting nor show cat /proc/cmdline any changes of the kernels
> > commandline. "Reading uEnv.txt" (or similiar...dont remember
> > exactly) was shown though.
> >
> > How can I make u-boot accept, read and use the setting in my
> > uEnv.txt?
>
> A copy of your uEnv.txt and serial boot log would be awfully
> helpful, here.

uEnv.txt

ip_method=none
i2c_bus=2,400
server_ip=192.168.178.21

What is the goal of these settings?
Where do you expect to find them used and for what purposes?

ip_method seems to be set to 'none' by the u-boot tree you're using as
the default. The other two, 'i2c_bus' and 'server_ip' don't seem to
appear to be useful in u-boot.

serial bootsequence:

U-Boot SPL 2011.09-00043-gdc52533-dirty (Aug 18 2012 - 20:55:11)
Texas Instruments Revision detection unimplemented
No daughter card present
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img

U-Boot 2011.09-00043-gdc52533-dirty (Aug 18 2012 - 20:55:11)

I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
No daughter card present
NAND: HW ECC Hamming Code selected
No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net: cpsw
Hit any key to stop autoboot: 1 0
SD/MMC found on device 0
reading uEnv.txt

56 bytes read
Loaded environment from uEnv.txt
Importing environment from mmc ...
Loading file "/boot/uImage" from mmc device 0:2 xxa2
3417664 bytes read
## Booting kernel from Legacy Image at 80007fc0 ...
   Image Name: Linux
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 3417600 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.32-psp25 (root@solfire) (gcc version
4.7.2 (Gentoo 4.7.2 p1.1, pie-0.5.5) ) #8 Thu Oct 25 18:34:45 CEST
2012 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2
(ARMv7), cr=50c53c7d [ 0.000000] CPU: PIPT / VIPT nonaliasing data
cache, VIPT aliasing instruction cache [ 0.000000] Machine:
am335xevm [ 0.000000] Memory policy: ECC disabled, Data cache
writeback [ 0.000000] AM335X ES1.0 (sgx neon ) [ 0.000000]
Built 1 zonelists in Zone order, mobility grouping on. Total pages:
65024 [ 0.000000] Kernel command line: console=ttyO0,115200n8
root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait ip=none

<snip>

Andrew Bradford <andrew@bradfordembedded.com> [12-10-29 18:16]:

> Andrew Bradford <andrew@bradfordembedded.com> [12-10-29 16:23]:
> >
> > > I took the u-boot.img and MLO from the angström distribution
> > > and tried to do some setting with the uEnv.txt file.
> > >
> > > None of the setting were available neither when u-boot is
> > > interrupted and printenv was used to proof the environment
> > > setting nor show cat /proc/cmdline any changes of the kernels
> > > commandline. "Reading uEnv.txt" (or similiar...dont remember
> > > exactly) was shown though.
> > >
> > > How can I make u-boot accept, read and use the setting in my
> > > uEnv.txt?
> >
> > A copy of your uEnv.txt and serial boot log would be awfully
> > helpful, here.
>
> uEnv.txt
> =========
>
> ip_method=none
> i2c_bus=2,400
> server_ip=192.168.178.21

What is the goal of these settings?
Where do you expect to find them used and for what purposes?

  These are environmental variable from the point of view of u-boot,
  Andrew.

  I expect to see them after a printenv command from the "u-boot
  shell".

  The purpose and goal are irrelevant for u-boot.

Are you typing "printenv" before or after u-boot loads "uEnv.txt"...
As the one should expect, new variables introduced by "uEnv.txt"
shouldn't exist prior to loading "uEnv.txt"..

Regards,

Robert Nelson <robertcnelson@gmail.com> [12-10-29 18:36]:

> Andrew Bradford <andrew@bradfordembedded.com> [12-10-29 18:16]:
>>
>> > Andrew Bradford <andrew@bradfordembedded.com> [12-10-29 16:23]:
>> > >
>> > > > I took the u-boot.img and MLO from the angström distribution
>> > > > and tried to do some setting with the uEnv.txt file.
>> > > >
>> > > > None of the setting were available neither when u-boot is
>> > > > interrupted and printenv was used to proof the environment
>> > > > setting nor show cat /proc/cmdline any changes of the kernels
>> > > > commandline. "Reading uEnv.txt" (or similiar...dont remember
>> > > > exactly) was shown though.
>> > > >
>> > > > How can I make u-boot accept, read and use the setting in my
>> > > > uEnv.txt?
>> > >
>> > > A copy of your uEnv.txt and serial boot log would be awfully
>> > > helpful, here.
>> >
>> > uEnv.txt
>> > =========
>> >
>> > ip_method=none
>> > i2c_bus=2,400
>> > server_ip=192.168.178.21
>>
>> What is the goal of these settings?
>> Where do you expect to find them used and for what purposes?
>
> These are environmental variable from the point of view of u-boot,
> Andrew.
>
> I expect to see them after a printenv command from the "u-boot
> shell".

Are you typing "printenv" before or after u-boot loads "uEnv.txt"...
As the one should expect, new variables introduced by "uEnv.txt"
shouldn't exist prior to loading "uEnv.txt"..

Regards,

Hi Robert,

I redone the experiment several times and you are right: It is before
uEnv.txt is read.
Is there any chance to proof that uEnv.txt is read from the later
userland?
May be cat /proc/cmdline?

Best regards,
mcc

Hi Robert,

I redone the experiment several times and you are right: It is before
uEnv.txt is read.
Is there any chance to proof that uEnv.txt is read from the later
userland?
May be cat /proc/cmdline?

Yeah, look at your "uEnv.txt" and put a "printenv; " right before the
bootm/bootz call..

Regards,

Robert Nelson <robertcnelson@gmail.com> [12-10-29 19:08]:

> Hi Robert,
>
> I redone the experiment several times and you are right: It is before
> uEnv.txt is read.
> Is there any chance to proof that uEnv.txt is read from the later
> userland?
> May be cat /proc/cmdline?

Yeah, look at your "uEnv.txt" and put a "printenv; " right before the
bootm/bootz call..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--

Hi Robert,

before I brick my bone ... (I am no boot-guru...)

Where Do I have to do that?

Is this correct:
Reboot bone
Hit <SPACE> when U-Boot asks for it
Modify commands as described via setenv
run bootcmd

Is this correct?

Thank you very much for your help in advance!
Best regards,
mcc

before I brick my bone ... (I am no boot-guru...)

Where Do I have to do that?

Is this correct:
Reboot bone
Hit <SPACE> when U-Boot asks for it
Modify commands as described via setenv
run bootcmd

Is this correct?

Nope it is not... You need to actually look in your "uEnv.txt" file...

Using (for reference only): BeagleBoardUbuntu - eLinux.org

I have set:

loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x80300000
0x81600000:${initrd_size}

so i would change it to:

loaduimage=run xyz_mmcboot; run mmcargs; printenv; bootz 0x80300000
0x81600000:${initrd_size}

**Warning, if your uEnv.txt does not have something similar, then you
need to hit "printenv" first and actually figure out what variable
(probably loaduimage) you need to add to "uEnv.txt" and properly
modify with "printenv;"

Regards,

Robert Nelson <robertcnelson@gmail.com> [12-10-29 20:16]:

> before I brick my bone ... (I am no boot-guru...)
>
> Where Do I have to do that?
>
> Is this correct:
> Reboot bone
> Hit <SPACE> when U-Boot asks for it
> Modify commands as described via setenv
> run bootcmd
>
> Is this correct?

Nope it is not... You need to actually look in your "uEnv.txt" file...

Using (for reference only): BeagleBoardUbuntu - eLinux.org

I have set:

loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x80300000
0x81600000:${initrd_size}

so i would change it to:

loaduimage=run xyz_mmcboot; run mmcargs; printenv; bootz 0x80300000
0x81600000:${initrd_size}

**Warning, if your uEnv.txt does not have something similar, then you
need to hit "printenv" first and actually figure out what variable
(probably loaduimage) you need to add to "uEnv.txt" and properly
modify with "printenv;"

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--

Hi Robert,

...got it!

Thanks a lot for your help! Will try it tommorrow morning...

Best regards,
mcc

Robert Nelson <robertcnelson@gmail.com> [12-10-29 20:16]:

> before I brick my bone ... (I am no boot-guru...)
>
> Where Do I have to do that?
>
> Is this correct:
> Reboot bone
> Hit <SPACE> when U-Boot asks for it
> Modify commands as described via setenv
> run bootcmd
>
> Is this correct?

Nope it is not... You need to actually look in your "uEnv.txt" file...

Using (for reference only): BeagleBoardUbuntu - eLinux.org

I have set:

loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x80300000
0x81600000:${initrd_size}

so i would change it to:

loaduimage=run xyz_mmcboot; run mmcargs; printenv; bootz 0x80300000
0x81600000:${initrd_size}

**Warning, if your uEnv.txt does not have something similar, then you
need to hit "printenv" first and actually figure out what variable
(probably loaduimage) you need to add to "uEnv.txt" and properly
modify with "printenv;"

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--

Hi Robert,

with your help and infos I could verify that uEnv.txt gets loaded and
"executed". Thats good news.

Thank you very much for help and support! :slight_smile:

Best regards,
mcc