Welcome! Log In Create A New Profile

Advanced

uEnv.txt not read from boot device

Posted by chessplayer 
uEnv.txt not read from boot device
August 09, 2022 04:25AM
Hi,

I just wanted to report an issue I just had on a Pogo E02 concerning uEnv.txt. I wanted to use the file to use systemd and it worked about three or four times. However, since what I am testing is to have the box act as a file server in the Windows network with automount of the non-boot attached devices, I have more than one USB drive attached. It now looks that the attempt of reading uEnv.txt only happens on the first detected device and not necessarily on the boot device:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)
2 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

Partition Map for USB device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	995967    	0005dc76-01	0b Boot


Partition Map for USB device 1  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	14172160  	311f3e43-01	83
  2	14174208  	962560    	311f3e43-02	82

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
reading /boot/uEnv.txt
** Unable to read file /boot/uEnv.txt **
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
reading /boot/uImage
** Unable to read file /boot/uImage **
device usb 1:1
1 bytes read in 723 ms (0 Bytes/s)
Found bootable drive on usb 1
loading uImage ...
5435888 bytes read in 911 ms (5.7 MiB/s)
loading uInitrd ...
9671091 bytes read in 849 ms (10.9 MiB/s)
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
10114 bytes read in 3782 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...

I am basically still using the standard environment by bodhi augmented by the parts allowing to boot OpenWrt from NAND. So, now I changed the environment permanently to

root@kirkwood256-debian ~ $ fw_printenv set_bootargs
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd $custom_params

since this is what I need anyway to start the devmon and wsdd services I created, but still, I believe the issue should be addressed in the standard environment. If I find the time, I can make a suggestion. In principle, one must make sure that the file is read from the device identified as the boot device.

Cheers,

chessplayer

---
Standart ist der Standardfehler
Re: uEnv.txt not read from boot device
August 09, 2022 06:40PM
chessplayer,

> I just wanted to report an issue I just had on a
> Pogo E02 concerning uEnv.txt. I wanted to use the
> file to use systemd and it worked about three or
> four times. However, since what I am testing is to
> have the box act as a file server in the Windows
> network with automount of the non-boot attached
> devices, I have more than one USB drive attached.
> It now looks that the attempt of reading uEnv.txt
> only happens on the first detected device
> and not necessarily on the boot device:

Yes, I'm aware of this problem and have fixed it somewhere in the forum. I forgot to update the installation Notes, and lost that link :) I'll have to search my notes for this.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: uEnv.txt not read from boot device
August 09, 2022 06:59PM
BTW,

The work around is you can do this on your USB drives that don't have uEnv.txt.

Assuming ithe other USB drive is mounted at /media/sdb1

mkdir media/sdb1/boot
cd /media/sdb1/boot

And then copy the uEnv.xt over to this drive.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: uEnv.txt not read from boot device
August 10, 2022 09:57AM
Hi bodhi,

yes, I am aware of this. The problem is, however, that this is somewhat arbitrary and I wanted to be able to set up some kind of fileserver with hotplug capabilities, which I can also easily reboot, so that solution would not be practical. But putting the command into the standard bootcmd solved the issue for me, so all is well.

Cheers,

chessplayer

---
Standart ist der Standardfehler
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: