Welcome! Log In Create A New Profile

Advanced

/boot/uEnv.txt ignored

Posted by balanga 
/boot/uEnv.txt ignored
March 11, 2019 09:06PM
I have a FAT partition on a USB stick which is not being read using normal envs. Can't understand why...

envs:-

uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

If i stop autoboot and enter:-
setenv load_bsdenv 'usb start; load usb 0:1 0x810000 /boot/uEnv.txt; env import -t 0x810000 $filesize'
setenv boot_bsd 'run load_bsdenv; boot'

and then run:-
run boot_bsd

I get:-
reading /boot/uEnv.txt
287 bytes read in 64 ms (3.9 KiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
reading ubldr
295973 bytes read in 90 ms (3.1 MiB/s)
CACHE: Misaligned operation at range [01000098, 01030c04]
CACHE: Misaligned operation at range [01030c04, 01031707]
CACHE: Misaligned operation at range [01031708, 010330f0]
CACHE: Misaligned operation at range [010330f0, 0103558b]
CACHE: Misaligned operation at range [01035590, 01036c98]
CACHE: Misaligned operation at range [01036c98, 01036cf4]
CACHE: Misaligned operation at range [01036cf4, 01036d5c]
CACHE: Misaligned operation at range [01036d5c, 01036e30]
CACHE: Misaligned operation at range [01036e30, 01036e3c]
## Starting application at 0x01000098 ...
Consoles: U-Boot console  
Compatible U-Boot API signature found @0x7b12860

FreeBSD/arm U-Boot loader, Revision 1.2
(Thu Nov 30 14:06:37 GMT 2017 root@Test)

DRAM: 128MB
Number of U-Boot devices: 2
U-Boot env: loaderdev='usb 0:1'
Found U-Boot device: disk
  Checking unit=0 slice=1 partition=<auto>... good.
Booting from disk0s1:

uBoot clearly sees the disk:-
GoFlexHome> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
GoFlexHome> ls usb 0:1 /
            .tmp/
            boot/
   295973   ubldr 
            tmp/
    12784   typescript.007 
    12310   typescript.008 
   314989   ubldr.pie 
      287   uenv.txt 
    12005   typescript 
    12005   typescript.006 
7 file(s), 3 dir(s)

What should I change so that /boot/uEnv.txt on this USB stick is read automatically?
Re: /boot/uEnv.txt ignored
March 11, 2019 09:36PM
Quote

If i stop autoboot and enter:-
setenv load_bsdenv 'usb start; load usb 0:1 0x810000 /boot/uEnv.txt; env import -t 0x810000 $filesize'
setenv boot_bsd 'run load_bsdenv; boot'


You don't do this explicitly. It is in the bootcmd. So to test the uEnv.txt, you would do

run bootcmd_uenv

You would put all envs necessary for booting BSD inside uEnv.txt. And

boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 03/12/2019 04:12AM by bodhi.
Re: /boot/uEnv.txt ignored
March 12, 2019 11:59AM
bodhi,

Maybe I didn't explain properly, my current /boot/uEnv.txt on a FAT partition on my USB stick contains:-

ootfile=ubldr.bin
loadaddr=0x02000000
fdt_file=db88f6281.dtb
uenvcmd=echo Booting FreeBSD from SD Card: ; mmcinfo && fatload mmc 0 ${loadaddr} ${bootfile} && bootelf

but it looks like uBoot does not seem to take any input from this file.

Can you suggest a single line that I can put in to show the environment has effected a change as a result of reading this file as I must have missed something... Also does it matter that the file is on a FAT partition which is case insensitive, so uEnv.txt might not be found?
Re: /boot/uEnv.txt ignored
March 13, 2019 03:44AM
balanga,

> but it looks like uBoot does not seem to take any
> input from this file.
>
> Can you suggest a single line that I can put in to
> show the environment has effected a change as a
> result of reading this file as I must have missed
> something... Also does it matter that the file is
> on a FAT partition which is case insensitive, so
> uEnv.txt might not be found?

As I said, you'd want to test your uEnv.tx by executing this command in serial console

run bootcmd_uenv

This command will find the /boot/uEnv.txt in the 1st partition of any disk drive partition. After executing it, you would then check the envs
printenv

Post the log here if you can't figure out what's happened in the above commands.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 13, 2019 05:11AM
The problem may be due to my envs... If I install uboot.2016.05-tld-1.environment.bodhi.tar should I expect to boot OpenWrt?

ISTR that I needed to add/change something in the process of getting it working....

My current envs are:-
api_address=7b12860
arcNumber=3338
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_a
ddr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_lede=run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=00:10:75:28:cc:00
fileaddr=800000
filesize=3e0000
if_netconsole=ping $serverip
ipaddr=192.168.1.23
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtddevname=rootfs
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
nc_ready=1
ncip=192.168.1.99
partition=nand0,0
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_net
console; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if t
est $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disk
num:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; do
ne
serverip=192.168.1.2
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_lede=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=ncip
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Apologies for some of the above lines wrapping or getting truncated - problem with pasting....
Re: /boot/uEnv.txt ignored
March 13, 2019 05:56AM
As I asked above, list the content of your current uEnv.txt.

cat uEnv.txt

And then powerup, interrupt serial console and

run bootcmd_uenv
printenv

And post the entire log of the above session here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/13/2019 12:40PM by bodhi.
Re: /boot/uEnv.txt ignored
March 13, 2019 11:44AM
cat boot/uEnv.txt:-
printenv
fatdev=usb 0:1
loaderdev=usb 0:1
bootfile=ubldr
fdtfile=db88f6281.dtb
kernel_addr_r=0x01000000
loadaddr=0x02000000
pxefile_addr_r=0x00100000
ramdisk_addr_r=0x02100000
scriptaddr=0x00000000
bootcmd=usb start;fdt addr 0x100;fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf ${loadaddr}

uBoot log:-
Script started on Wed Mar 13 16:16:42 2019
Command: cu -l /dev/cuaU1 -s 115200
Connected
    
    
U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home
   
SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Unknown command 'ncip' - try 'help'
Hit any key to stop autoboot: 10 ... 0
GoFlexHome> usa. .b start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
GoFlexHome> ls usb 0:1 /
            boot/
            tmp/
    12005   typescript
    12005   typescript.006
    12784   typescript.007
    12310   typescript.008
      287   uenv.txt
   295973   ubldr
   314989   ubldr.pie

7 file(s), 2 dir(s)

GoFlexHome> ls usb 0:1 /boot
            ./
            ../
      287   uenv.txt

1 file(s), 2 dir(s)

GoFlexHome> printenv
api_address=7b12860
arcNumber=3338
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_a
ddr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_lede=run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=00:10:75:28:cc:00
fileaddr=800000
filesize=3e0000
if_netconsole=ping $serverip
ipaddr=192.168.1.23
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtddevname=rootfs
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
nc_ready=1
ncip=192.168.1.99
partition=nand0,0
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_net
console; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if t
est $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disk
num:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; do
ne
serverip=192.168.1.2
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_lede=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=ncip
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3214/131068 bytes
GoFlexHome> reset
resetting ...

After reset...
U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Using egiga0 device
host 192.168.1.2 is alive
Unknown command 'ncip' - try 'help'
Hit any key to stop autoboot: 10 ... 9 ... 8 ... 7 ... 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     32              65536           00000000-01     0b

## 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

## Unknown partition table type 0
loading envs from usb 0 ...
reading /boot/uEnv.txt
287 bytes read in 63 ms (3.9 KiB/s)

no IDE devices available
Unknown command 'mmc' - try 'help'
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
reading /boot/uImage
** Unable to read file /boot/uImage **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
reading /boot/uImage
** Unable to read file /boot/uImage **
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=1", size 255 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
ubi0: VID header offset: 512 (aligned 512), data offset: 2048
ubi0: good PEBs: 2040, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 797413225
ubi0: available PEBs: 0, total reserved PEBs: 2040, PEBs reserved for bad PEB handling: 40
Read 0 bytes from volume kernel to 800000
No size specified -> Using max size (2064384)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM OpenWrt Linux-4.14.95
   Image Name:   ARM OpenWrt Linux-4.14.95
   Created:      2019-01-30  12:21:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2044079 Bytes = 1.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.95 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7627-753531d)) #0 Mon Jan 28 08:54:32 2019
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Seagate GoFlex Home
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from 0xc0700994 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 122264K/131072K available (4692K kernel code, 166K rwdata, 724K rodata, 1024K init, 208K bss, 8808K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05952a0   (5685 kB)
[    0.000000]       .init : 0xc0700000 - 0xc0800000   (1024 kB)
[    0.000000]       .data : 0xc0800000 - 0xc0829840   ( 167 kB)
[    0.000000]        .bss : 0xc0829840 - 0xc085d88c   ( 209 kB)
[    0.000000]        .bss : 0xc0829840 - 0xc085d88c   ( 209 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000041] Switching to timer-based delay loop, resolution 5ns
[    0.000115] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000139] pid_max: default: 32768 minimum: 301
[    0.000287] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000308] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000868] CPU: Testing write buffer coherency: ok
[    0.001639] Setting up static identity map for 0x100000 - 0x10003c
[    0.001888] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.004871] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.004900] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.004990] pinctrl core: initialized pinctrl subsystem
[    0.006040] NET: Registered protocol family 16
[    0.006415] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.007336] cpuidle: using governor ladder
[    0.007694] Feroceon L2: Enabling L2
[    0.007738] Feroceon L2: Cache support initialised.
[    0.007991] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.011480] No ATAGs?
[    0.027561] SCSI subsystem initialized
[    0.028243] usbcore: registered new interface driver usbfs
[    0.028301] usbcore: registered new interface driver hub
[    0.028358] usbcore: registered new device driver usb
[    0.030288] clocksource: Switched to clocksource orion_clocksource
[    0.031067] NET: Registered protocol family 2
[    0.031665] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.031689] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.031707] TCP: Hash tables configured (established 1024 bind 1024)
[    0.031787] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.031809] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.031946] NET: Registered protocol family 1
[    0.033066] Crashlog allocated RAM at address 0x3f00000
[    0.034649] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.039002] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.039015] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.046779] io scheduler noop registered
[    0.046794] io scheduler deadline registered (default)
[    0.047960] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.071481] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.073532] console [ttyS0] disabled
[    0.073608] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    0.541311] console [ttyS0] enabled
[    0.545907] sata_mv f1080000.sata: slots 32 ports 2
[    0.557911] scsi host1: sata_mv
[    0.561238] ata1: SATA max UDMA/133 irq 32
[    0.565351] ata2: SATA max UDMA/133 irq 32
[    0.570055] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    0.576471] nand: Micron MT29F2G08AAD
[    0.580150] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.587832] Scanning device for bad blocks
[    0.808895] 2 cmdlinepart partitions found on MTD device orion_nand
[    0.815203] Creating 2 MTD partitions on "orion_nand":
[    0.820386] 0x000000000000-0x000000100000 : "u-boot"
[    0.825896] 0x000000100000-0x000010000000 : "ubi"
[    0.832518] libphy: Fixed MDIO Bus: probed
[    0.836863] libphy: orion_mdio_bus: probed
[    0.843432] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    0.852012] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:28:cc:00
[    0.860848] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.867401] ehci-pci: EHCI PCI platform driver
[    0.871925] ehci-orion: EHCI orion driver
[    0.876118] orion-ehci f1050000.ehci: EHCI Host Controller
[    0.881673] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    0.889489] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    0.920301] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    0.926870] hub 1-0:1.0: USB hub found
[    0.930857] hub 1-0:1.0: 1 port detected
[    0.935234] usbcore: registered new interface driver usb-storage
[    0.941648] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    0.941648] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    0.948619] i2c /dev entries driver
[    0.952730] orion_wdt: Initial timeout 21 sec
[    0.962000] marvell-cesa f1030000.crypto: CESA device successfully registered
[    0.970030] NET: Registered protocol family 10
[    0.976141] Segment Routing with IPv6
[    0.979883] NET: Registered protocol family 17
[    0.984412] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.997444] 8021q: 802.1Q VLAN Support v1.8
[    1.004391] UBI: auto-attach mtd1
[    1.007733] ubi0: attaching mtd1
[    1.173300] ata1: SATA link down (SStatus 0 SControl F300)
[    1.300352] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    1.396761] ubi0: scanning is finished
[    1.413548] ubi0: attached mtd1 (name "ubi", size 255 MiB)
[    1.419085] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.426016] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.432761] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.439574] ubi0: good PEBs: 2040, bad PEBs: 0, corrupted PEBs: 0
[    1.445709] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.452974] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 797413225
[    1.462069] ubi0: available PEBs: 0, total reserved PEBs: 2040, PEBs reserved for bad PEB handling: 40
[    1.472120] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.477629] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    1.484835] rtc-mv f1010300.rtc: setting system clock to 2019-03-13 16:18:41 UTC (1552493921)
[    1.493956] ubi0: background thread "ubi_bgt0d" started, PID 950
[    1.505129] ata2: SATA link down (SStatus 0 SControl F300)
[    1.514855] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.524935] Freeing unused kernel memory: 1024K
[    1.648254] usb-storage 1-1:1.0: USB Mass Storage device detected
[    1.654837] scsi host2: usb-storage 1-1:1.0
[    1.810312] random: fast init done
[    1.862313] init: Console is alive
[    1.865882] init: - watchdog -
[    1.966970] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.974263] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.984149] init: - preinit -
[    2.476545] random: jshn: uninitialized urandom read (4 bytes read)
[    2.549002] random: jshn: uninitialized urandom read (4 bytes read)
[    2.580885] random: jshn: uninitialized urandom read (4 bytes read)
[    2.659992] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    2.669920] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[    2.677052] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    2.751726] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 2
[    2.762037] sd 2:0:0:0: [sda] 1953663 512-byte logical blocks: (1.00 GB/954 MiB)
[    2.769894] sd 2:0:0:0: [sda] Write Protect is off
[    2.775143] sd 2:0:0:0: [sda] No Caching mode page found
[    2.780506] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    2.795804]  sda: sda1
[    2.800652] sd 2:0:0:0: [sda] Attached SCSI removable disk
[    5.319994] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    5.329929] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    5.874597] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 1036
[    5.908501] UBIFS (ubi0:2): recovery needed
[    6.092973] UBIFS (ubi0:2): recovery completed
[    6.097516] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    6.105413] UBIFS (ubi0:2): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    6.115390] UBIFS (ubi0:2): FS size: 252112896 bytes (240 MiB, 1954 LEBs), journal size 12644352 bytes (12 MiB, 98 LEBs)
[    6.126319] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[    6.132973] UBIFS (ubi0:2): media format: w4/r0 (latest is w5/r0), UUID 234AC211-8E54-4465-8622-CCD99B52B69A, small LPT model
[    6.147807] mount_root: switching to ubifs overlay
[    6.166072] urandom-seed: Seeding with /etc/urandom.seed
[    6.249935] procd: - early -
[    6.253390] procd: - watchdog -
[    7.067147] procd: - watchdog -
[    7.070543] procd: - ubus -
[    7.106998] urandom_read: 3 callbacks suppressed
[    7.107005] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.123604] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.130277] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.137578] procd: - init -
Please press Enter to activate this console.
[    7.321531] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.330786] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    7.344019] ip_tables: (C) 2000-2006 Netfilter Core Team
[    7.354070] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    7.388715] xt_time: kernel timezone is -0000
[    7.398976] PPP generic driver version 2.4.2
[    7.404906] NET: Registered protocol family 24
[    7.411704] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.047687] br-lan: port 1(eth0) entered blocking state
[   12.052983] br-lan: port 1(eth0) entered disabled state
[   12.058460] device eth0 entered promiscuous mode
[   12.110503] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   14.713303] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   14.723239] br-lan: port 1(eth0) entered blocking state
[   14.728490] br-lan: port 1(eth0) entered forwarding state
[   14.735090] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.28.4 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 18.06.2, r7676-cddd7b4c77
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# fw_printenv
api_address=7b12860
arcNumber=3338
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_a
ddr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_lede=run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=00:10:75:28:cc:00
fileaddr=800000
filesize=3e0000
if_netconsole=ping $serverip
ipaddr=192.168.1.23
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtddevname=rootfs
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
nc_ready=1
ncip=192.168.1.99
partition=nand0,0
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_net
console; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if t
est $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disk
num:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; do
ne
serverip=192.168.1.2
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_lede=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=ncip
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15
root@OpenWrt:/#
Re: /boot/uEnv.txt ignored
March 13, 2019 12:42PM
balanga,

I had a typo up there!

Power up, interrupt serial console. And run the bootcmd_uenv the first thing, there is no need to run anything else before that.
run bootcmd_uenv
printenv

And don't run anything else either.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/13/2019 12:43PM by bodhi.
Re: /boot/uEnv.txt ignored
March 13, 2019 02:57PM
GoFlexHome> run bootcmd_uenv

starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     32              65536           00000000-01     0b

## 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

## Unknown partition table type 0
loading envs from usb 0 ...
reading /boot/uEnv.txt
287 bytes read in 63 ms (3.9 KiB/s)

no IDE devices available
Unknown command 'mmc' - try 'help'
importing envs ...

GoFlexHome> printenv

api_address=7b12860
arcNumber=3338
bootcmd=usb start;fdt addr 0x100;fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf ${loadaddr}
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_a
ddr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_lede=run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
bootfile=ubldr
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=00:10:75:28:cc:00
fatdev=usb 0:1
fdtfile=db88f6281.dtb
fileaddr=810000
filesize=11f
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.1.23
kernel_addr_r=0x01000000
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
loadaddr=0x02000000
loaderdev=usb 0:1
mainlineLinux=yes
mtddevname=rootfs
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
nc_ready=1
ncip=192.168.1.99
partition=nand0,0
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_net
console; fi
pxefile_addr_r=0x00100000
ramdisk_addr_r=0x02100000
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if t
est $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disk
num:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
scriptaddr=0x00000000
serverip=192.168.1.2
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_lede=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=ncip
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_loaded=1
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3502/131068 bytes
GoFlexHome> reset

One day I will have to sit down and study what all these envs do. At the moment it seems like black magic :)

But I see from the above that

bootfile=ubldr

has been set so that the envs have been amended.
Re: /boot/uEnv.txt ignored
March 13, 2019 05:02PM
Yes. They were read in OK.

fatdev=usb 0:1
loaderdev=usb 0:1
bootfile=ubldr
fdtfile=db88f6281.dtb
kernel_addr_r=0x01000000
loadaddr=0x02000000
pxefile_addr_r=0x00100000
ramdisk_addr_r=0x02100000
scriptaddr=0x00000000
bootcmd=usb start;fdt addr 0x100;fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf ${loadaddr}

bootfile=ubldr
....
bootcmd=usb start;fdt addr 0x100;fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf ${loadaddr}

And so on.

However, that bootcmd in uEnv.txt will be ignored when you boot automatically. So you need something like this:

bootcmd_bsd=usb start;fdt addr 0x100;fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf ${loadaddr}

And set this permanently (similar to when you set up LEDE)

setenv bootcmd 'run bootcmd_uenv; run scan_disk; run bootcmd_bsd; run set_bootargs; run bootcmd_exec; run bootcmd_lede'

So BSD, Debian, and LEDE will be tried in that order. Whichever command is successful (i.e. completed) first, will be the running system.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 13, 2019 07:28PM
bodhi,

Many thanks for the help. I can now boot Debian, Arch Linux and OpenWrt on my GoFlex Home using the same uBoot.

I'll spend a bit of time trying to get FreeBSD booting as well.

Your help in flattening the learning curve of getting familiar with the system is much appreciated.
Re: /boot/uEnv.txt ignored
March 13, 2019 08:57PM
balanga,

> Many thanks for the help. I can now boot Debian,
> Arch Linux and OpenWrt on my GoFlex Home using the
> same uBoot.

Cool!

At one point, you should post your u-boot envs setup that boot these 3 distros here. Probably in a new thread, so that it will help others who are looking for clues how to set it up such an environment.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 14, 2019 04:57AM
bodhi,

bodhi Wrote:
-------------------------------------------------------
>
> Cool!
>
> At one point, you should post your u-boot envs
> setup that boot these 3 distros here. Probably in
> a new thread, so that it will help others who are
> looking for clues how to set it up such an
> environment.


I hope to do that at some point. I've made a lot of mistakes over the last 18 months since I started with this and maybe some of my posts have helped people avoid them but, I still have much to learn. I'd like to hone these u-boot envs, since I don't understand a number and would rather remove them if not required.
Re: /boot/uEnv.txt ignored
March 14, 2019 05:11AM
balanga,

> learn. I'd like to hone these u-boot envs, since I
> don't understand a number and would rather remove
> them if not required.

Right. For example, these envs are transient. They are created on the fly during booting. But when you list them after executing some commands, they appear on the list.

fileaddr=810000
filesize=11f
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start

So to get a real set of permananent envs, it should be listed in Linux with fw_printenv. And then you woud compare them with my env text file in the u-boot release tarball (uboot.2016.05-tld-1.environment) to see what are the differences. And envs that you did not purposely saved (i.e for LEDE, Arch) are not needed to be saved.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 20, 2019 07:27PM
bodhi,

I'm really struggling to get uboot to take any notice of my /boot/uEnv.txt.

If I enter the following at the following, (which is also the contents of my /boot/uEnv.txt) at the stop autoboot prompt:-

setenv bootfile ubldr
setenv kernel_addr_r 0x01000000
setenv loadaddr 0x02000000
setenv bootcmd 'usb start; fatload usb 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}'

FreeBSD actually starts booting:-

Script started on Wed Mar 20 22:01:06 2019
Command: cu -l /dev/cuaU0 -s 115200
Connected


U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot: 10  9  0 
GoFlexHome> setenv bootfile ubldr
GoFlexHome> setenv kernel_addr_r 0x01000000
GoFlexHome> setenv fdtfile db88f6281.dtb
GoFlexHome> setenv loadaddr 0x02000000
GoFlexHome> setenv bootcmd 'usb start; fatload usb 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}'
GoFlexHome> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
reading ubldr
295973 bytes read in 85 ms (3.3 MiB/s)
CACHE: Misaligned operation at range [01000098, 01030c04]
CACHE: Misaligned operation at range [01030c04, 01031707]
CACHE: Misaligned operation at range [01031708, 010330f0]
CACHE: Misaligned operation at range [010330f0, 0103558b]
CACHE: Misaligned operation at range [01035590, 01036c98]
CACHE: Misaligned operation at range [01036c98, 01036cf4]
CACHE: Misaligned operation at range [01036cf4, 01036d5c]
CACHE: Misaligned operation at range [01036d5c, 01036e30]
CACHE: Misaligned operation at range [01036e30, 01036e3c]
## Starting application at 0x01000098 ...
Consoles: U-Boot console  
Compatible U-Boot API signature found @0x7b12860

FreeBSD/arm U-Boot loader, Revision 1.2
(Thu Nov 30 14:06:37 GMT 2017 root@Test)

DRAM: 128MB
Number of U-Boot devices: 2
U-Boot env: loaderdev not set, will probe all devices.
Found U-Boot device: disk
  Probing all disk devices...
  Checking unit=0 slice=<auto> partition=<auto>... good.
Booting from disk0s2:
|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-Warning: unable to open file /boot/loader.conf.local
\|/-\|/-\|/-\|/-\|/-\|/-\|/-\/boot/kernel/kernel data=0x443064+0x30f9c |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\syms=[0x4+0x932d0|/-\+0x4+0x667c5|/-\]
fuse...|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-can't find 'fuse'
failed!
umodem...\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-can't find 'umodem'
failed!
u3g...\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|can't find 'u3g'
failed!

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 4 seconds... Booting [/boot/kernel/kernel] in 3 seconds... Booting [/boot/kernel/kernel] in 2 seconds... Booting [/boot/kernel/kernel] in 1 second... Booting [/boot/kernel/kernel]...               
/-\|/-\|/-\|/-\Using DTB compiled into kernel.
|/-\Kernel entry at 0x1200100...
Kernel args: (null)
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #0: Thu Nov 30 14:22:01 GMT 2017
    root@Test:/usr/obj/arm.arm/usr/src/sys/DB-88F6XXX arm
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
module mvs already present!
CPU: Feroceon 88FR131 rev 1 (**unknown 4** core)
  Little-endian DC enabled IC disabled WA disabled DC streaming enabled
  BTB disabled L2 enabled L2 prefetch enabled
  WB enabled LABT branch prediction disabled
  16KB/32B 4-way instruction cache
  16KB/32B 4-way write-back-locking-C data cache
real memory  = 134213632 (127 MB)
avail memory = 123895808 (118 MB)
SOC: Marvell 88F6281 rev A1, TClock 200MHz
  Instruction cache prefetch disabled, data cache prefetch disabled
  256KB 4-way set-associative write-through unified L2 cache
random: entropy device external interface
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
localbus0: <Marvell device bus> on ofwbus0
nand0: <Marvell NAND controller> mem 0xf9300000-0xf93fffff on localbus0
nandbus0: <NAND bus> on nand0
onand0: <ONFI compliant NAND> on nandbus0
onand0: No BBT found. Prescan chip...
#####################
ic0: <Marvell Integrated Interrupt Controller> mem 0x20200-0x2023b on simplebus0
timer0: <Marvell CPU Timer> mem 0x20300-0x2032f irq 1 on simplebus0
Event timer "CPUTimer0" frequency 200000000 Hz quality 1000
Timecounter "CPUTimer1" frequency 200000000 Hz quality 1000
gpio0: <Marvell Integrated GPIO Controller> mem 0x10100-0x1011f irq 35,36,37,38,39,40,41 on simplebus0
rtc0: <Marvell Integrated RTC> mem 0x10300-0x10307 on simplebus0
twsi0: <Marvell Integrated I2C Bus Controller> mem 0x11000-0x1101f irq 43 on simplebus0
iicbus0: <Philips I2C bus> on twsi0
iic0: <I2C generic I/O> on iicbus0
mge0: <Marvell Gigabit Ethernet controller> mem 0x72000-0x73fff irq 12,13,14,11,46 on simplebus0
mge0: PHY8 attached, phy_sc points to mge0
mge0: Ethernet address: 52:3b:20:9c:11:51
mge0: MII failed to find PHY
device_attach: mge0 attach returned 6
uart0: <16550 or compatible> mem 0x12000-0x1201f irq 33 on simplebus0
uart0: console (1056,n,8,1)
uart1: <16550 or compatible> mem 0x12100-0x1211f irq 34 on simplebus0
cesa0: <Marvell Cryptographic Engine and Security Accelerator> mem 0x30000-0x30fff,0x3d000-0x3dfff irq 22 on simplebus0
ehci0: <Marvell Integrated USB 2.0 controller> mem 0x50000-0x50fff irq 48,19 on simplebus0
usbus0: EHCI version 1.0
usbus0 on ehci0
mvs0: <Marvell 88F6281 SATA controller> mem 0x80000-0x85fff irq 21 on simplebus0
mvs0: Gen-IIe, 2 3Gbps ports, Port Multiplier supported with FBS
mvsch0: <Marvell SATA channel> at channel 0 on mvs0
mvsch1: <Marvell SATA channel> at channel 1 on mvs0
pcib0: <Marvell Integrated PCI/PCI-E Controller> mem 0xf1040000-0xf1041fff irq 44 on ofwbus0
pci0: <PCI bus> on pcib0
cryptosoft0: <software crypto>
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0


U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot: 10  0 
GoFlexHome> setenv bootfile ubldr
GoFlexHome> setenv kernel_addr_r 0x01000000
GoFlexHome> setenv loadaddr 0x02000000
GoFlexHome> setenv bootcmd 'usb start; fatload usb 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}'
GoFlexHome> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
reading ubldr
295973 bytes read in 85 ms (3.3 MiB/s)
CACHE: Misaligned operation at range [01000098, 01030c04]
CACHE: Misaligned operation at range [01030c04, 01031707]
CACHE: Misaligned operation at range [01031708, 010330f0]
CACHE: Misaligned operation at range [010330f0, 0103558b]
CACHE: Misaligned operation at range [01035590, 01036c98]
CACHE: Misaligned operation at range [01036c98, 01036cf4]
CACHE: Misaligned operation at range [01036cf4, 01036d5c]
CACHE: Misaligned operation at range [01036d5c, 01036e30]
CACHE: Misaligned operation at range [01036e30, 01036e3c]
## Starting application at 0x01000098 ...
Consoles: U-Boot console  
Compatible U-Boot API signature found @0x7b12860

FreeBSD/arm U-Boot loader, Revision 1.2
(Thu Nov 30 14:06:37 GMT 2017 root@Test)

DRAM: 128MB
Number of U-Boot devices: 2
U-Boot env: loaderdev not set, will probe all devices.
Found U-Boot device: disk
  Probing all disk devices...
  Checking unit=0 slice=<auto> partition=<auto>... good.
Booting from disk0s2:
|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-Warning: unable to open file /boot/loader.conf.local
\|/-\|/-\|/-\|/-\|/-\|/-\|/-\/boot/kernel/kernel data=0x443064+0x30f9c |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\syms=[0x4+0x932d0|/-\+0x4+0x667c5|/-\]
fuse...|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-can't find 'fuse'
failed!
umodem...\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-can't find 'umodem'
failed!
u3g...\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|can't find 'u3g'
failed!

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 4 seconds... Booting [/boot/kernel/kernel] in 3 seconds... Booting [/boot/kernel/kernel] in 2 seconds... Booting [/boot/kernel/kernel] in 1 second... Booting [/boot/kernel/kernel]...               
Using DTB compiled into kernel.
/-\|/Kernel entry at 0x1200100...
Kernel args: (null)
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #0: Thu Nov 30 14:22:01 GMT 2017
    root@Test:/usr/obj/arm.arm/usr/src/sys/DB-88F6XXX arm
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
module mvs already present!
CPU: Feroceon 88FR131 rev 1 (**unknown 4** core)
  Little-endian DC enabled IC disabled WA disabled DC streaming enabled
  BTB disabled L2 enabled L2 prefetch enabled
  WB enabled LABT branch prediction disabled
  16KB/32B 4-way instruction cache
  16KB/32B 4-way write-back-locking-C data cache
real memory  = 134213632 (127 MB)
avail memory = 123895808 (118 MB)
SOC: Marvell 88F6281 rev A1, TClock 200MHz
  Instruction cache prefetch disabled, data cache prefetch disabled
  256KB 4-way set-associative write-through unified L2 cache
random: entropy device external interface
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
localbus0: <Marvell device bus> on ofwbus0
nand0: <Marvell NAND controller> mem 0xf9300000-0xf93fffff on localbus0
nandbus0: <NAND bus> on nand0
onand0: <ONFI compliant NAND> on nandbus0
onand0: No BBT found. Prescan chip...
#####################
ic0: <Marvell Integrated Interrupt Controller> mem 0x20200-0x2023b on simplebus0
timer0: <Marvell CPU Timer> mem 0x20300-0x2032f irq 1 on simplebus0
Event timer "CPUTimer0" frequency 200000000 Hz quality 1000
Timecounter "CPUTimer1" frequency 200000000 Hz quality 1000
gpio0: <Marvell Integrated GPIO Controller> mem 0x10100-0x1011f irq 35,36,37,38,39,40,41 on simplebus0
rtc0: <Marvell Integrated RTC> mem 0x10300-0x10307 on simplebus0
twsi0: <Marvell Integrated I2C Bus Controller> mem 0x11000-0x1101f irq 43 on simplebus0
iicbus0: <Philips I2C bus> on twsi0
iic0: <I2C generic I/O> on iicbus0
mge0: <Marvell Gigabit Ethernet controller> mem 0x72000-0x73fff irq 12,13,14,11,46 on simplebus0
mge0: PHY8 attached, phy_sc points to mge0
mge0: Ethernet address: 52:3b:20:9c:11:51
mge0: MII failed to find PHY
device_attach: mge0 attach returned 6
uart0: <16550 or compatible> mem 0x12000-0x1201f irq 33 on simplebus0
uart0: console (1056,n,8,1)
uart1: <16550 or compatible> mem 0x12100-0x1211f irq 34 on simplebus0
cesa0: <Marvell Cryptographic Engine and Security Accelerator> mem 0x30000-0x30fff,0x3d000-0x3dfff irq 22 on simplebus0
ehci0: <Marvell Integrated USB 2.0 controller> mem 0x50000-0x50fff irq 48,19 on simplebus0
usbus0: EHCI version 1.0
usbus0 on ehci0
mvs0: <Marvell 88F6281 SATA controller> mem 0x80000-0x85fff irq 21 on simplebus0
mvs0: Gen-IIe, 2 3Gbps ports, Port Multiplier supported with FBS
mvsch0: <Marvell SATA channel> at channel 0 on mvs0
mvsch1: <Marvell SATA channel> at channel 1 on mvs0
pcib0: <Marvell Integrated PCI/PCI-E Controller> mem 0xf1040000-0xf1041fff irq 44 on ofwbus0
pci0: <PCI bus> on pcib0
cryptosoft0: <software crypto>
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0
~
[EOT]

Command exit status: 0
Script done on Wed Mar 20 22:08:57 2019

What should I do to make uBoot set the above variables from the file?

Is there any way to include 'printenv' in uEnv.txt so that envars are displayed during the boot process?
Re: /boot/uEnv.txt ignored
March 20, 2019 09:39PM
balanga,

I have answered this question before:

https://forum.doozan.com/read.php?3,80444,80539#msg-80539

Basically, you can not redefine bootcmd and bootcmd_uenv using uEnv.txt. So define a bootcmd_bsd that piggy back to the default bootcmd like I suggested above.

Actually you could, but I purposely exclude them in the current default envs (to ensure that users mistakes in setting envs wont lock them out of the box).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 25, 2019 08:42PM
I'm trying to boot from a 350GB HD in the SATA slot on a GoFlex Home unit and I can get uboot to read /boot/uEnv.txt.

Do I need to make any changes to my envars?

Script started on Tue Mar 26 01:30:10 2019
Command: cu -l /dev/cuaU0 -s 115200
Connected


U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  3  2  0 
GoFlexHome> printenv
api_address=7b12860
arcNumber=3338
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run bootcmd_bsd; run set_bootargs; run bootcmd_exec; run bootcmd_openwrt
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_openwrt=run set_bootargs_openwrt; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
partition=nand0,0
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_openwrt=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3124/131068 bytes
GoFlexHome> ide start
ide - IDE sub-system

Usage:
ide reset - reset IDE controller
ide info  - show available IDE devices
ide device [dev] - show or set current device
ide part [dev] - print partition table of one or all IDE devices
ide read  addr blk# cnt
ide write addr blk# cnt - read/write `cnt' blocks starting at block `blk#'
    to/from memory address `addr'
GoFlexHome> ide start     reset

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
GoFlexHome> ls ide 0:1 /boot
<DIR>       4096 .
<DIR>       4096 ..
         4600064 uImage
         5553261 initramfs-linux.img
             161 uEnv.txt
GoFlexHome> run bootcmd_uenv
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
## 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

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
GoFlexHome> printenv
api_address=7b12860
arcNumber=3338
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run bootcmd_bsd; run set_bootargs; run bootcmd_exec; run bootcmd_openwrt
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_openwrt=run set_bootargs_openwrt; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
partition=nand0,0
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_openwrt=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_loaded=0
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3204/131068 bytes
GoFlexHome> run bootmd
## Error: "bootmd" not defined
GoFlexHome> run bootmdcmd

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
## 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

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
device ide 0:1
1 bytes read in 21 ms (0 Bytes/s)
Found bootable drive on ide 0
## Error: "bootcmd_bsd" not defined
loading uImage ...
4600064 bytes read in 1638 ms (2.7 MiB/s)
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-goflexhome.dtb ...
** File not found /boot/dts/kirkwood-goflexhome.dtb **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.97-1-ARCH
   Created:      2017-11-11   4:51:55 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4600000 Bytes = 4.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.97-1-ARCH (builduser@leming) (gcc version 7.2.0 (GCC) ) #1 PREEMPT Sat Nov 11 04:51:38 UTC 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Seagate GoFlex Home
Re: /boot/uEnv.txt ignored
March 25, 2019 11:27PM
Just before running 'run bootcmd_uenv', try setting the devices to ide only:

setenv devices ide
run bootcmd_uenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 26, 2019 03:29AM
bodhi Wrote:
-------------------------------------------------------
> Just before running 'run bootcmd_uenv', try
> setting the devices to ide only:
>
>
> setenv devices ide
> run bootcmd_uenv
>


Script started on Tue Mar 26 07:25:04 2019
Command: cu -l /dev/cuaU0 -s 115200
Connected


U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  3  0 
GoFlexHome> setenv devices ide
GoFlexHome> printenv
api_address=7b12860
arcNumber=3338
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run bootcmd_bsd; run set_bootargs; run bootcmd_exec; run bootcmd_openwrt
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_openwrt=run set_bootargs_openwrt; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=ide
disks=0 1
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
partition=nand0,0
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_openwrt=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3120/131068 bytes
GoFlexHome> printenv devices
devices=ide
GoFlexHome> run bootcmd_uenv

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
GoFlexHome> run bootcmd           reset ide
reset - Perform RESET of the CPU

Usage:
reset 
GoFlexHome> ls is de 0:1 /boot
<DIR>       4096 .
<DIR>       4096 ..
         4600064 uImage
         5553261 initramfs-linux.img
             161 uEnv.txt
GoFlexHome> run bootcmd

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
device ide 0:1
1 bytes read in 20 ms (0 Bytes/s)
Found bootable drive on ide 0
## Error: "bootcmd_bsd" not defined
loading uImage ...

Now after booting Debian from USB showing the contents of /boot/uEnv.txt on the hard disk:

Debian GNU/Linux 9 debian ttyS0

debian login: root

Password: 
Last login: Mon Mar 25 18:28:40 PDT 2019 on ttyS0
Linux debian 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda         8:0    0 298.1G  0 disk 
|-sda1      8:1    0  18.7G  0 part 
`-sda2      8:2    0 279.5G  0 part 
sdb         8:16   1   7.3G  0 disk 
`-sdb1      8:17   1   7.3G  0 part /
mtdblock0  31:0    0     1M  0 disk 
mtdblock1  31:1    0   255M  0 disk 
root@debian:~# ls -al /mnt
total 16
drwxr-xr-x  4 root root 4096 Mar 24 00:10 .
drwxr-xr-x 21 root root 4096 Mar  6 21:11 ..
drwxr-xr-x  2 root root 4096 Mar 24 00:10 sda1
drwxr-xr-x  2 root root 4096 Mar 13 19:19 ubifs
root@debian:~# mount /dev/sda1 /mnt/sda1
[   97.536141] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   97.563509] EXT4-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended
[   97.596706] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
root@debian:~# cat /mnt/sda1/boot/uEnv.txt
bootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=usb start; ext2load usb 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}
printenv
boot
root@debian:~# ~
[EOT]

Command exit status: 0
Script done on Tue Mar 26 07:32:08 2019

I realise that bootcmd_bsd includes usb start which would be in error, but uBoot does not even seem to find bootcmd_bsd, so to me it looks like uEnv.txt has not been found/read.
Re: /boot/uEnv.txt ignored
March 26, 2019 05:15AM
Change uEnv.xt to have this content:
bootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=ext2load ide 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}

Power up interrupt serial console and

setenv devices ide
setenv bootdev ide
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 26, 2019 06:05AM
Still not picking up /boot/uEnv.txt ...


U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  3  0 
GoFlexHome> setenv devices ide
GoFlexHome> setenv bootdev ide
GoFlexHome> printenv
api_address=7b12860
arcNumber=3338
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run bootcmd_bsd; run set_bootargs; run bootcmd_exec; run bootcmd_openwrt
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_openwrt=run set_bootargs_openwrt; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=ide
console=console=ttyS0,115200
device=0:1
devices=ide
disks=0 1
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
partition=nand0,0
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_openwrt=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3120/131068 bytes
GoFlexHome> boot

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
device ide 0:1
1 bytes read in 21 ms (0 Bytes/s)
Found bootable drive on ide 0
## Error: "bootcmd_bsd" not defined
loading uImage ...
4600064 bytes read in 1638 ms (2.7 MiB/s)
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-goflexhome.dtb ...
** File not found /boot/dts/kirkwood-goflexhome.dtb **
Re: /boot/uEnv.txt ignored
March 26, 2019 06:36AM
Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83



Make sure the /boot/uEnv.txt file is on partition 1 of the HDD.

IOW, on partition 1, there must be a /boot folder and the uEnv.txt is in that folder.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 26, 2019 07:05AM
I've booted up Debian from USB and mounted the hard disk as you can see and shown some of the files on the first partition:-

Debian GNU/Linux 9 debian ttyS0

debian login: root

Password: 
Last login: Tue Mar 26 03:32:56 PDT 2019 on ttyS0
Linux debian 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda         8:0    0 298.1G  0 disk 
|-sda1      8:1    0  18.7G  0 part 
`-sda2      8:2    0 279.5G  0 part 
sdb         8:16   1   7.3G  0 disk 
`-sdb1      8:17   1   7.3G  0 part /
mtdblock0  31:0    0     1M  0 disk 
mtdblock1  31:1    0   255M  0 disk 
root@debian:~# cfdisk /dev/sda
)0[?7h[?25l[?1cDisk: /dev/sdaSize: 298.1 GiB, 320072933376 bytes, 625142448 sectorsLabel: dos, identifier: 0x00000000Device       Boot         Start         End     Sectors    Size  Id Type
>>  /dev/sda1                    63    39086144    39086082   18.7G  83 Linux   /dev/sda239086145   625137344   586051200  279.5G  83 Linux
    Free space            625137664   625142447        4784    2.3M[Bootable]  [ Delete ]  [  Quit  ]  [  Type  ]  [  Help  ]  [  Write ][  Dump  ]Quit program without writing changes
 lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
 x Partition type: Linux (83)x
 xFilesystem UUID: 1cf5fde9-1d9e-4eac-85bb-61e0818b08b9x
 x     Filesystem: ext3x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj[?25h[?0c


[   88.357363]  sda: sda1 sda2
root@debian:~# mout   nt /dev/sda1 /mnt/sda1
[  125.264606] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[  125.387596] EXT4-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended
[  125.427534] EXT4-fs (sda1): recovery complete
[  125.456837] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
root@debian:~# cd /mnt/sda1
root@debian:/mnt/sda1# ls -al
total 463368
drwxr-xr-x 17 root root      4096 Aug 10  2018 .
drwxr-xr-x  4 root root      4096 Mar 24 00:10 ..
-rw-r--r--  1 root root 131072000 Aug 10  2018 .swapfile
-rw-r--r--  1 root root 339729650 May  1  2018 ArchLinuxARM-kirkwood-latest.tar.gz
lrwxrwxrwx  1 root root         7 Mar 11  2018 bin -> usr/bin
drwxr-xr-x  2 root root      4096 Mar 26 03:35 boot
-rwxr-xr-x  1 root root   3127874 Sep  6  2014 bsdtar
drwxr-xr-x  2 root root      4096 May  1  2018 dev
drwxr-xr-x 39 root root      4096 Aug 12  2018 etc
drwxr-xr-x  3 root root      4096 May  1  2018 home
lrwxrwxrwx  1 root root         7 Mar 11  2018 lib -> usr/lib
drwx------  2 root root     16384 May 12  2018 lost+found
drwxr-xr-x  4 root root      4096 Aug 12  2018 mnt
drwxr-xr-x  2 root root      4096 Mar 11  2018 opt
dr-xr-xr-x  2 root root      4096 May  1  2018 proc
drwxr-x---  8 root root      4096 Jun  9  2018 root
drwxr-xr-x  2 root root      4096 May  1  2018 run
lrwxrwxrwx  1 root root         7 Mar 11  2018 sbin -> usr/bin
drwxr-xr-x  4 root root      4096 May  1  2018 srv
dr-xr-xr-x  2 root root      4096 May  1  2018 sys
drwxrwxrwt  2 root root      4096 May  1  2018 tmp
drwxr-xr-x  8 root root      4096 Aug 12  2018 usr
drwxr-xr-x 12 root root      4096 Aug 11  2018 var
root@debian:/mnt/sda1# ls -al /boot
total 36268
drwxr-xr-x  3 root root    4096 Feb 28 03:20 .
drwxr-xr-x 21 root root    4096 Mar  6 21:11 ..
-rw-------  1 root root 2504031 Jul 16  2017 System.map-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root  153501 Jul 15  2017 config-4.12.1-kirkwood-tld-1
drwxr-xr-x  2 root root    4096 Jul 15  2017 dts
-rw-r--r--  1 root root 7245632 Jul 23  2017 initrd.img-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root 8435004 Jul 16  2017 linux-headers-4.12.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root      85 Feb 28 03:20 uEnv.txt
-rw-r--r--  1 root root 3821592 Jul 20  2017 uImage
-rw-r--r--  1 root root 7245696 Jul 23  2017 uInitrd
-rwxr-xr-x  1 root  998    3232 Feb 28 01:50 uboot.2016.05-tld-1.environment.scr
-rw-------  1 root root 3821528 Jul 16  2017 vmlinuz-4.12.1-kirkwood-tld-1
-rwxr-xr-x  1 root root 3821528 Jul 15  2017 zImage-4.12.1-kirkwood-tld-1
root@debian:/mnt/sda1# date
Tue Mar 26 04:55:06 PDT 2019
root@debian:/mnt/sda1# cd /mnt/sda1/boot
root@debian:/mnt/sda1/boot# cat uEnv.txt
bootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=ext2load ide 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}
printenv
boot
root@debian:/mnt/sda1/boot# vi uEnv.txt
[?25h[?8c[?25h[?0c[?25l[?1c"uEnv.txt" 6 lines, 150 charactersbootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=ext2load ide 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}
printenv
boot



booboo[?25l[?1c:[?25h[?0cwq
[?25l[?1c"uEnv.txt" 6 lines, 150 characters written
[?25h[?0c

root@debian:/mnt/sda1/boot# vi uEnv.txt[1@cat uEnv.txt[5@d /mnt/sda1/bootdatels -al /boot
total 36268
drwxr-xr-x  3 root root    4096 Feb 28 03:20 .
drwxr-xr-x 21 root root    4096 Mar  6 21:11 ..
-rw-------  1 root root 2504031 Jul 16  2017 System.map-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root  153501 Jul 15  2017 config-4.12.1-kirkwood-tld-1
drwxr-xr-x  2 root root    4096 Jul 15  2017 dts
-rw-r--r--  1 root root 7245632 Jul 23  2017 initrd.img-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root 8435004 Jul 16  2017 linux-headers-4.12.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root      85 Feb 28 03:20 uEnv.txt
-rw-r--r--  1 root root 3821592 Jul 20  2017 uImage
-rw-r--r--  1 root root 7245696 Jul 23  2017 uInitrd
-rwxr-xr-x  1 root  998    3232 Feb 28 01:50 uboot.2016.05-tld-1.environment.scr
-rw-------  1 root root 3821528 Jul 16  2017 vmlinuz-4.12.1-kirkwood-tld-1
-rwxr-xr-x  1 root root 3821528 Jul 15  2017 zImage-4.12.1-kirkwood-tld-1
root@debian:/mnt/sda1/boot# touch blob
root@debian:/mnt/sda1/boot# touch blobls -al /boot
total 36268
drwxr-xr-x  3 root root    4096 Feb 28 03:20 .
drwxr-xr-x 21 root root    4096 Mar  6 21:11 ..
-rw-------  1 root root 2504031 Jul 16  2017 System.map-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root  153501 Jul 15  2017 config-4.12.1-kirkwood-tld-1
drwxr-xr-x  2 root root    4096 Jul 15  2017 dts
-rw-r--r--  1 root root 7245632 Jul 23  2017 initrd.img-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root 8435004 Jul 16  2017 linux-headers-4.12.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root      85 Feb 28 03:20 uEnv.txt
-rw-r--r--  1 root root 3821592 Jul 20  2017 uImage
-rw-r--r--  1 root root 7245696 Jul 23  2017 uInitrd
-rwxr-xr-x  1 root  998    3232 Feb 28 01:50 uboot.2016.05-tld-1.environment.scr
-rw-------  1 root root 3821528 Jul 16  2017 vmlinuz-4.12.1-kirkwood-tld-1
-rwxr-xr-x  1 root root 3821528 Jul 15  2017 zImage-4.12.1-kirkwood-tld-1
root@debian:/mnt/sda1/boot# ls -al /boottouch blobls -al /boottouch blob          pwd
/mnt/sda1/boot
root@debian:/mnt/sda1/boot# vi blob
[?0cwq
[?25l[?1c"blob" 2 lines, 14 characters written
[?25h[?0c

root@debian:/mnt/sda1/boot# vi blobpwdls -al /boot
total 36268
drwxr-xr-x  3 root root    4096 Feb 28 03:20 .
drwxr-xr-x 21 root root    4096 Mar  6 21:11 ..
-rw-------  1 root root 2504031 Jul 16  2017 System.map-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root  153501 Jul 15  2017 config-4.12.1-kirkwood-tld-1
drwxr-xr-x  2 root root    4096 Jul 15  2017 dts
-rw-r--r--  1 root root 7245632 Jul 23  2017 initrd.img-4.12.1-kirkwood-tld-1
-rw-r--r--  1 root root 8435004 Jul 16  2017 linux-headers-4.12.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root      85 Feb 28 03:20 uEnv.txt
-rw-r--r--  1 root root 3821592 Jul 20  2017 uImage
-rw-r--r--  1 root root 7245696 Jul 23  2017 uInitrd
-rwxr-xr-x  1 root  998    3232 Feb 28 01:50 uboot.2016.05-tld-1.environment.scr
-rw-------  1 root root 3821528 Jul 16  2017 vmlinuz-4.12.1-kirkwood-tld-1
-rwxr-xr-x  1 root root 3821528 Jul 15  2017 zImage-4.12.1-kirkwood-tld-1
root@debian:/mnt/sda1/boot# ls -al /bootvi blob
[?25h[?8c[?25h[?0c[?25l[?1c"blob" 2 lines, 14 charactershello, world


25h[?0cq
[?25l[?1c[?25h[?0croot@debian:/mnt/sda1/boot# ls
.  ..  blob  initramfs-linux.img  uEnv.txt  uImage
root@debian:/mnt/sda1/boot# lsvi blobls -al /boot     
total 9960
drwxr-xr-x  2 root root    4096 Mar 26 04:59 .
drwxr-xr-x 17 root root    4096 Aug 10  2018 ..
-rw-r--r--  1 root root      14 Mar 26 04:58 blob
-rw-r--r--  1 root root 5553261 May  1  2018 initramfs-linux.img
-rwxr-xr-x  1 root root     150 Mar 26 04:56 uEnv.txt
-rw-r--r--  1 root root 4600064 Nov 10  2017 uImage
root@debian:/mnt/sda1/boot# ~
[EOT]

Command exit status: 0
Script done on Tue Mar 26 11:59:11 2019
Re: /boot/uEnv.txt ignored
March 26, 2019 04:43PM
balanga,

I could not read the log, please repost the log without all the control characters.

And make sure the content of the uEnv.tx is exactly (no more no less):

bootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=ext2load ide 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 27, 2019 09:31AM
bodhi,

I don't think /boot/uEnv.txt is being read when booting from hard disk, irrespective of the contents. Here's is an edited boot log when booting up Debian from a USB stick, showing the contents of the hard disk:-

Debian GNU/Linux 9 debian ttyS0

debian login: root
Password:
Last login: Tue Mar 26 04:53:05 PDT 2019 on ttyS0
Linux debian 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda         8:0    0 298.1G  0 disk
|-sda1      8:1    0  18.7G  0 part
`-sda2      8:2    0 279.5G  0 part
sdb         8:16   1   7.3G  0 disk
`-sdb1      8:17   1   7.3G  0 part /
mtdblock0  31:0    0     1M  0 disk
mtdblock1  31:1    0   255M  0 disk


root@debian:~# ls /mnt
sda1 ubifs

root@debian:~# mount /dev/sda1 /mnt/sda1
[  143.137642] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[  143.248127] EXT4-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended
[  143.288027] EXT4-fs (sda1): recovery complete
[  143.317347] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

root@debian:~# ls -al /mnt/sda1
total 463368
drwxr-xr-x 17 root root      4096 Aug 10  2018 .
drwxr-xr-x  4 root root      4096 Mar 24 00:10 ..
-rw-r--r--  1 root root 131072000 Aug 10  2018 .swapfile
-rw-r--r--  1 root root 339729650 May  1  2018 ArchLinuxARM-kirkwood-latest.tar.gz
lrwxrwxrwx  1 root root         7 Mar 11  2018 bin -> usr/bin
drwxr-xr-x  2 root root      4096 Mar 26 04:59 boot
-rwxr-xr-x  1 root root   3127874 Sep  6  2014 bsdtar
drwxr-xr-x  2 root root      4096 May  1  2018 dev
drwxr-xr-x 39 root root      4096 Aug 12  2018 etc
drwxr-xr-x  3 root root      4096 May  1  2018 home
lrwxrwxrwx  1 root root         7 Mar 11  2018 lib -> usr/lib
drwx------  2 root root     16384 May 12  2018 lost+found
drwxr-xr-x  4 root root      4096 Aug 12  2018 mnt
drwxr-xr-x  2 root root      4096 Mar 11  2018 opt
dr-xr-xr-x  2 root root      4096 May  1  2018 proc
drwxr-x---  8 root root      4096 Jun  9  2018 root
drwxr-xr-x  2 root root      4096 May  1  2018 run
lrwxrwxrwx  1 root root         7 Mar 11  2018 sbin -> usr/bin
drwxr-xr-x  4 root root      4096 May  1  2018 srv
dr-xr-xr-x  2 root root      4096 May  1  2018 sys
drwxrwxrwt  2 root root      4096 May  1  2018 tmp
drwxr-xr-x  8 root root      4096 Aug 12  2018 usr
drwxr-xr-x 12 root root      4096 Aug 11  2018 var

root@debian:~# ls -al /mnt/sda1/boot
total 9960
drwxr-xr-x  2 root root    4096 Mar 26 04:59 .
drwxr-xr-x 17 root root    4096 Aug 10  2018 ..
-rw-r--r--  1 root root      14 Mar 26 04:58 blob
-rw-r--r--  1 root root 5553261 May  1  2018 initramfs-linux.img
-rwxr-xr-x  1 root root     150 Mar 26 04:56 uEnv.txt
-rw-r--r--  1 root root 4600064 Nov 10  2017 uImage

root@debian:~# cat /mnt/sda1/boot/uEnv.txt
bootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=ext2load ide 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}
printenv
boot

root@debian:~# ls -al /mnt/sda1/boot
total 9960
drwxr-xr-x  2 root root    4096 Mar 26 04:59 .
drwxr-xr-x 17 root root    4096 Aug 10  2018 ..
-rw-r--r--  1 root root      14 Mar 26 04:58 blob
-rw-r--r--  1 root root 5553261 May  1  2018 initramfs-linux.img
-rwxr-xr-x  1 root root     150 Mar 27 05:30 uEnv.txt
-rw-r--r--  1 root root 4600064 Nov 10  2017 uImage

root@debian:~# echo 'hello, bodhi' > /mnt/sda1/boot/blob
root@debian:~# cat /mnt/sda1/boot/blob
hello, bodhi
root@debian:~#

The log of the failed boot when booting up from hard disk is shown here:-

https://forum.doozan.com/read.php?3,80444,81744#msg-81744
Re: /boot/uEnv.txt ignored
March 27, 2019 01:36PM
Change uEnv.xt to have this content (no more no less than these 4 lines)
bootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=ext2load ide 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}

Power up interrupt serial console and

setenv devices ide
setenv bootdev ide
setenv disks '0 1 2 3 4 5 6 7 8 9'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 27, 2019 07:53PM
bodhi,

I think there is a problem in the logic flow. Here is a log which ended up launching FreeBSD's loader:-

Script started on Thu Mar 28 00:41:00 2019
Command: cu -l /dev/cuaU0 -s 115200
Connected

U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  3  0 
GoFlexHome> setenv devices ide
GoFlexHome> run bootcmd_uenv

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
GoFlexHome> run uenv_load

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
GoFlexHome> run uenv_read_disk

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
GoFlexHome> run uenv_read
loading envs from ide 0 ...
136 bytes read in 28 ms (3.9 KiB/s)
GoFlexHome> run uenv_import
importing envs ...
GoFlexHome> printenv bootfile
bootfile=ubldr
GoFlexHome> boot

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
device ide 0:1
1 bytes read in 21 ms (0 Bytes/s)
Found bootable drive on ide 0
295973 bytes read in 153 ms (1.8 MiB/s)
CACHE: Misaligned operation at range [01000098, 01030c04]
CACHE: Misaligned operation at range [01030c04, 01031707]
CACHE: Misaligned operation at range [01031708, 010330f0]
CACHE: Misaligned operation at range [010330f0, 0103558b]
CACHE: Misaligned operation at range [01035590, 01036c98]
CACHE: Misaligned operation at range [01036c98, 01036cf4]
CACHE: Misaligned operation at range [01036cf4, 01036d5c]
CACHE: Misaligned operation at range [01036d5c, 01036e30]
CACHE: Misaligned operation at range [01036e30, 01036e3c]
## Starting application at 0x01000098 ...
Consoles: U-Boot console  


Compatible U-Boot API signature found @0x7b12860

FreeBSD/arm U-Boot loader, Revision 1.2

(Thu Nov 30 14:06:37 GMT 2017 root@Test)

DRAM: 128MB

Number of U-Boot devices: 1

U-Boot env: loaderdev not set, will probe all devices.

Found U-Boot device: net

Booting from net0:

can't load 'kernel'

Type '?' for a list of commands, 'help' for more detailed help.


loader> reboot


Resetting...


resetting ...
[EOT]

Command exit status: 0
Script done on Thu Mar 28 00:43:24 2019
Re: /boot/uEnv.txt ignored
March 27, 2019 09:02PM
balanga,

I know some improvement is needed in SATA part of the default envs.

That’s what I tried to find out in your particular system configuration.

But you have a really bad habit of not doing what I asked you to do :) I can’t help you if you dont provide the info I ask for.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: /boot/uEnv.txt ignored
March 28, 2019 04:28AM
bodhi,

I did exactly as what you suggested but the outcome was the same so didn't see any sense in posting the same log as before and wanted to see if I could get uBoot to read uEnv.txt which I did by running the various functions in logical order separately, but I will post the output from the changes you suggested, although I don't know what you will glean from it.

Script started on Wed Mar 27 19:21:12 2019
Command: cu -l /dev/cuaU0 -s 115200
Connected


U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  3  2  0 
GoFlexHome> setenv devices ide
GoFlexHome> setenv bootdev ide
GoFlexHome> setenv disks '0 1 1 2 3 4 5 6 7 8 9'
GoFlexHome> printenv
api_address=7b12860
arcNumber=3338
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run bootcmd_bsd; run set_bootargs; run bootcmd_exec; run bootcmd_openwrt
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_openwrt=run set_bootargs_openwrt; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=ide
console=console=ttyS0,115200
device=0:1
devices=ide
disks=0 1 2 3 4 5 6 7 8 9
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
partition=nand0,0
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_openwrt=setenv bootargs console=ttyS0,115200 $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3136/131068 bytes
GoFlexHome> printenv disks
disks=0 1 2 3 4 5 6 7 8 9
GoFlexHome> printenv bootdev
bootdev=ide
GoFlexHome> printenv devices
devices=ide
GoFlexHome> boot

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	39086082  	00000000-01	83
  2	39086145  	586051200 	00000000-02	83
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD3200AAJS-00L7A0  Firm: 01.03E01 Ser#:  WD-WMAV2HZ97868
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
device ide 0:1
1 bytes read in 20 ms (0 Bytes/s)
Found bootable drive on ide 0
## Error: "bootcmd_bsd" not defined
loading uImage ...
4600064 bytes read in 1637 ms (2.7 MiB/s)
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-goflexhome.dtb ...
** File not found /boot/dts/kirkwood-goflexhome.dtb **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.97-1-ARCH
   Created:      2017-11-11   4:51:55 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4600000 Bytes = 4.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

It continues trying to boot Linux and I can post that if you want.

My previous posting was to show that I could get FreeBSD's loader loaded just setting

setenv devices ide

and running the different functions in logical order, thereby bypassing some of the conditions which determine if a function should run or not.



Edited 1 time(s). Last edit at 03/28/2019 04:30AM by balanga.
Re: /boot/uEnv.txt ignored
March 28, 2019 06:48PM
balanga,

> I did exactly as what you suggested but the
> outcome was the same so didn't see any sense in
> posting the same log as before

That's not how we troubleshoot some problems. Ask and answer :) if there is no answer, I have no way to know what was the result. Even the answer is: "no, it did not work and the result is the same" would be helpful.

> but I will post the output from the
> changes you suggested, although I don't know what
> you will glean from it.

A lot info from the log with the changed envs (what the log did not show were what I wanted to see).

I'll run some test in one of my Kirkwood boxes to see what I can tell.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: