Welcome! Log In Create A New Profile

Advanced

broken uboot?

Posted by gigaguy 
broken uboot?
February 10, 2018 03:27PM
I have a GoFlex home. I had everything working including rescue boot. After upgrading via this: https://forum.doozan.com/read.php?3,12381 I can no longer completely boot to disk, usb, or rescue. Usb or rescue wont boot at all and hdd boots to kernel panic

I think I broke something.

This is archlinux on HDD

U-Boot via serial
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -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:  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: Bus 0: OK Bus 1: not available
  Device 0: Model: ST3000DM001-9YN166 Firm: CC9F Ser#: W1F13E9D
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30029202        00000000-01     83

## 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 ...
** File not found /boot/uEnv.txt **

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

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x028007ff      "Linux filesystem"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   41ba78b9-cb08-419e-9383-738a750e24ad
  2     0x02800800      0x15d50a38e     "Linux filesystem"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   f9185ed6-b463-4fc5-bd8b-2be47709f6ce
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 323 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4600064 bytes read in 574 ms (7.6 MiB/s)
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** File not found /boot/dts/kirkwood-pogo_e02.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 ...


[   22.274945] VFS: Cannot open root device "LABEL=rootfs" or unknown-block(0,0): error -6
[   22.282986] Please append a correct "root=" boot option; here are the available partitions:
[   22.291466] 0100            8192 ram0  (driver?)
[   22.296151] 0101            8192 ram1  (driver?)
[   22.300795] 0102            8192 ram2  (driver?)
[   22.305484] 0103            8192 ram3  (driver?)
[   22.310126] 0104            8192 ram4  (driver?)
[   22.314810] 0105            8192 ram5  (driver?)
[   22.319456] 0106            8192 ram6  (driver?)
[   22.324104] 0107            8192 ram7  (driver?)
[   22.328771] 0108            8192 ram8  (driver?)
[   22.333417] 0109            8192 ram9  (driver?)
[   22.338084] 010a            8192 ram10  (driver?)
[   22.342817] 010b            8192 ram11  (driver?)
[   22.347571] 010c            8192 ram12  (driver?)
[   22.352304] 010d            8192 ram13  (driver?)
[   22.357058] 010e            8192 ram14  (driver?)
[   22.361791] 010f            8192 ram15  (driver?)
[   22.366549] 0800      2930266584 sda  driver: sd
[   22.371193]   0801        20971520 sda1 41ba78b9-cb08-419e-9383-738a750e24ad
[   22.378300]   0802      2909294023 sda2 f9185ed6-b463-4fc5-bd8b-2be47709f6ce
[   22.385406] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   22.393707] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.97-1-ARCH #1
[   22.400086] Hardware name: Seagate GoFlex Home
[   22.404568] [<c001047c>] (unwind_backtrace) from [<c000d978>] (show_stack+0x10/0x14)
[   22.412348] [<c000d978>] (show_stack) from [<c00cd690>] (panic+0x88/0x208)
[   22.419264] [<c00cd690>] (panic) from [<c08512c0>] (mount_block_root+0x1b8/0x278)
[   22.426787] [<c08512c0>] (mount_block_root) from [<c0851570>] (mount_root+0xf4/0x120)
[   22.434650] [<c0851570>] (mount_root) from [<c08516f4>] (prepare_namespace+0x158/0x1b8)
[   22.442690] [<c08516f4>] (prepare_namespace) from [<c0850e98>] (kernel_init_freeable+0x1f8/0x24c)
[   22.451610] [<c0850e98>] (kernel_init_freeable) from [<c0646e40>] (kernel_init+0x8/0xe8)
[   22.459739] [<c0646e40>] (kernel_init) from [<c000a4b0>] (ret_from_fork+0x14/0x24)
[   22.467343] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

printenv
arcNumber=3338
bootargs=console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts}
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $loa
d_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
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:10:75:xx:xx:xx
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
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
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
setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${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

I have a feeling I am missing the label on the HDD SDA1 partition, but thats just a guess. Im not sure how to confirm or fix. The GFH seems to ignore booting from usb (but does recognize its there).

This is a fresh OS install, so I dont mind wiping it. But how do I get back to either rescue or some linux cli to do that?

Thanks



Edited 2 time(s). Last edit at 02/10/2018 03:46PM by gigaguy.
Re: broken uboot?
February 10, 2018 03:54PM
gigaguy,

> After upgrading via this:
> https://forum.doozan.com/read.php?3,12381 I can no
> longer completely boot to disk, usb, or rescue.
> Usb or rescue wont boot at all and hdd boots to
> kernel panic
>
> I think I broke something.

Yes, kind of. U-Boot 2017.07-tld-1 envs will not boot Arch Linux out of the box. You need to modify some envs.

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

Notice that it only loads uImage. This is how Arch Linux ARM kernel runs.


> [ 16.476175] Kernel panic - not syncing: VFS:
> Unable to mount root fs on unknown-block(0,0)

This error was because the rootfs was loaded the Debian way (with a rootfs label that uInitrd will handle correctly). The label rootfs tells the kernel how to find the rootfs partition.


> I have a feeling I am missing the label on the HDD
> SDA1 partition, but thats just a guess. Im not
> sure how to confirm or fix. The GFH seems to
> ignore booting from usb (but does recognize its
> there).
>
> This is a fresh OS install, so I dont mind wiping
> it. But how do I get back to either rescue or
> some linux cli to do that?


With the HDD contains a single partition (sda1) that has Arch Linux rootfs on it. Power up, interrupt serial console, and

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'
boot

After you booted in to Arch again, you can either:

1. set this permanently. But it will limit your option later to have multiple drives plugged in during boot.
or
2. find the uInitrd for Arch (at Arch site), put it inside the /boot folder, label the rootfs partition, and will be able keep the env set_bootargs unchanged. This is the recommended approach. It will allow yoy to have multiple drives plugged in during boot (as many as you want).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
February 10, 2018 04:08PM
Thanks that did it!!!!!

My ultimate goal is to get to debian on the GFH. Now that I can boot, should I just wipe sda1 partition, create a new one, and unzip Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 to sda1?

Also, do you have a recommendation on getting the rescue boot back? It was handy, but not super important if it will cause an issue with installing debian (since its archlinux).
Re: broken uboot?
February 10, 2018 05:01PM
gigaguy,

> My ultimate goal is to get to debian on the GFH.
> Now that I can boot, should I just wipe sda1
> partition, create a new one, and unzip
> Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> to sda1?
>

Yes. But I would either use a different drive, or backup this. It is much easier if you have a rootfs that you can boot with when something went wrong.


> Also, do you have a recommendation on getting the
> rescue boot back? It was handy, but not super
> important if it will cause an issue with
> installing debian (since its archlinux).

This is a little bit more works, because it is ALARM rescue system. I have not looked into how to make that coexist with the current envs for this 2017.07-tld-1 u-boot. Of course if there are many requests then I could do that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
February 10, 2018 05:14PM
Great, thanks! I'll give the debian usb another shot then so I can install to hdd from there.

Any tricks to get the usb to boot? I've tried ext 2,3,4 all formatted from ubuntu and then labelled patition rootfs. The usb just get ignored.

Out of curiosity, can I dual boot, with debian as default?



Edited 1 time(s). Last edit at 02/10/2018 05:21PM by gigaguy.
Re: broken uboot?
February 10, 2018 05:24PM
gigaguy,


> Any tricks to get the usb to boot? I've tried ext
> 2,3,4 all formatted from ubuntu and then labelled
> patition rootfs. The usb just get ignored.

No tricks! you need to follow the instruction verbatim. If you have do something different on Ubuntu to substitue for anything in the instruction then most likely it will not work. In that case, you can post question here to see if it is actually equivalent. And keep the entire log of how you create the USB rootfs and post here if needed, too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
February 10, 2018 05:27PM
Last quesrion, if I stick with arch, how do I fix the env string? I assume rescue is still there but has the same issue as hdd. How can I fix both so I can boot arch rescue or arch hdd?
Re: broken uboot?
February 10, 2018 05:34PM
gigaguy,

As I posted above, there are 2 different options:



Quote

With the HDD contains a single partition (sda1) that has Arch Linux rootfs on it. Power up, interrupt serial console, and

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'
boot

After you booted in to Arch again, you can either:

1. set this permanently. But it will limit your option later to have multiple drives plugged in during boot.
or
2. find the uInitrd for Arch (at Arch site), put it inside the /boot folder, label the rootfs partition, and will be able keep the env set_bootargs unchanged. This is the recommended approach. It will allow yoy to have multiple drives plugged in during boot (as many as you want).


- If you go with number 1, then set it permanently inside Arch:

fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'

- If you go with number 2, then no need to change the envs. With uInitrd in /boot, this u-boot will boot it correctly, and find the partition with rootfs label.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
February 13, 2018 09:18AM
Follow-up question - can I put almost any (most) of the setenv vars in uEnv.txt?



Edited 3 time(s). Last edit at 02/13/2018 10:29AM by gigaguy.
Re: broken uboot?
February 13, 2018 02:48PM
gigaguy Wrote:
-------------------------------------------------------
> Follow-up question - can I put almost any (most)
> of the setenv vars in uEnv.txt?

Yes. Most of the envs will work when specifying in uEnv.txt. Envs such as bootcmd and bootcmd_uenv cannot be redefined in uEnv.txt.

For example, to redefine bootargs, put this in uEnv.txt:

set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
yeehaa
Re: broken uboot?
February 24, 2018 05:12PM
bodhi Wrote:
-------------------------------------------------------
> gigaguy,
>
> > My ultimate goal is to get to debian on the
> GFH.
> > Now that I can boot, should I just wipe sda1
> > partition, create a new one, and unzip
> >
> Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> > to sda1?
> >
>
> Yes. But I would either use a different drive, or
> backup this. It is much easier if you have a
> rootfs that you can boot with when something went
> wrong.
>
>
> > Also, do you have a recommendation on getting
> the
> > rescue boot back? It was handy, but not super
> > important if it will cause an issue with
> > installing debian (since its archlinux).
>
> This is a little bit more works, because it is
> ALARM rescue system. I have not looked into how to
> make that coexist with the current envs for this
> 2017.07-tld-1 u-boot. Of course if there are many
> requests then I could do that.


thanks for all that you do, bodhi!

i would like to +1 on that arch uboot + arch rescue + debian rootfs... this would be great to have as the arch rescue is pretty noob friendly (for people like myself :) )..
yeehaa
Re: broken uboot?
February 24, 2018 05:49PM
yeehaa Wrote:
-------------------------------------------------------
> bodhi Wrote:
> -------------------------------------------------------
> > gigaguy,
> >
> > > My ultimate goal is to get to debian on the
> > GFH.
> > > Now that I can boot, should I just wipe sda1
> > > partition, create a new one, and unzip
> > >
> >
> Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> > > to sda1?
> > >
> >
> > Yes. But I would either use a different drive,
> or
> > backup this. It is much easier if you have a
> > rootfs that you can boot with when something
> went
> > wrong.
> >
> >
> > > Also, do you have a recommendation on getting
> > the
> > > rescue boot back? It was handy, but not
> super
> > > important if it will cause an issue with
> > > installing debian (since its archlinux).
> >
> > This is a little bit more works, because it is
> > ALARM rescue system. I have not looked into how
> to
> > make that coexist with the current envs for
> this
> > 2017.07-tld-1 u-boot. Of course if there are
> many
> > requests then I could do that.
>
>
> thanks for all that you do, bodhi!
>
> i would like to +1 on that arch uboot + arch
> rescue + debian rootfs... this would be great to
> have as the arch rescue is pretty noob friendly
> (for people like myself :) )..

sorry.. i meant your uboot+ arch rescue + debian rootfs..
Re: broken uboot?
February 24, 2018 06:16PM
yeehaa,

> i meant your uboot+ arch rescue + debian
> rootfs..

OK. I will look into this, but I don't know the ETA :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
yeehaa
Re: broken uboot?
February 24, 2018 06:30PM
bodhi Wrote:
-------------------------------------------------------
> yeehaa,
>
> > i meant your uboot+ arch rescue + debian
> > rootfs..
>
> OK. I will look into this, but I don't know the
> ETA :)


whenever you are able to.. thanks! i just tried with the latest arch uboot + https://forum.doozan.com/read.php?3,23727 and was not able to boot the latest debian ext3 rootfs.. since i do not have serial and the netconsole is showing only the uboot messages (once kernel loads, no more messages on the default 10.10.10.4 ip even when booting from the arch rescue.. but thats for another day), i cant troubleshoot! so i will wait until you've had a chance to adjust uboot/uenv..
Re: broken uboot?
February 24, 2018 06:48PM
yeehaa,

Please post your current Arch u-boot envs information here:
cat /etc/fw_env.config
fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
February 25, 2018 06:21PM
U-Boot 2016.09.01-1 (Oct 10 2016 - 23:13:37 -0600) Arch Linux ARM
Pogoplug V4


From alarm rescue:

cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# MTD device name       Device offset   Env. size       Flash sector size
#/dev/mtd2               0x0000          0x20000         0x20000

# segate dockstar:
/dev/mtd0               0xc0000         0x20000         0x20000

# iomega iconnect
# /dev/mtd0               0xa0000         0x20000         0x20000

# CuBox
# /dev/mtd0               0xc0000         0x10000         0x10000

# CuBox-i/Hummingboard
# /dev/mmcblk0              0x60000         0x2000         0x2000

# Utilite 1
# /dev/mtd1               0x0000          0x2000          0x2000

fw_printenv
bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/kirkwood-pogoplugv4.dtb; ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
ethact=egiga0
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-pogoplug-series-4.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in mmc usb ide; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
ethaddr=XX:XX:XX:XX:XX:XX
arcNumber=3960
machid=f78

Note that i fixed the ethaddr after alarm uboot flash and redacted here.. and added arcNumber and machid from your thread to be safe
Re: broken uboot?
February 25, 2018 06:22PM
bodhi Wrote:
-------------------------------------------------------
> yeehaa,
>
> Please post your current Arch u-boot envs
> information here:
>
> cat /etc/fw_env.config
> fw_printenv
>

posted! thanks
Booting Arch rescue system
February 27, 2018 03:30PM
yeehaa,

Try this test.

With the USB unplugged, power up and interrupt serial console, copy/paste and execute each command at the prompt:

setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; run arch_rescue'
setenv 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'
setenv arch_rescue 'echo Trying to boot from NAND ...; setenv arch_dtb_file "/boot/dtbs/kirkwood-pogoplugv4.dtb"; setenv arch_mountubi "ubi part rootfs; ubifsmount ubi0:rootfs"; setenv arch_loadaddr "0x810000"; setenv arch_fdtaddr "0x800000"; setenv arch_console "ttyS0,115200"; setenv arch_mtdparts "mtdparts=orion_nand:1M(u-boot),-(rootfs)"; if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi'


and then try booting

boot

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



Edited 4 time(s). Last edit at 02/27/2018 03:39PM by bodhi.
Re: broken uboot?
February 27, 2018 08:46PM
thanks bodhi.. please see "since i do not have serial and the netconsole is showing only the uboot messages (once kernel loads, no more messages on the default 10.10.10.4 ip even when booting from the arch rescue"..
i've ordered a serial cable.. hopefully will be here in a couple of weeks..

in the mean time, i will try this from the netconsole and report back
Re: broken uboot?
February 27, 2018 11:19PM
yeehaa Wrote:
-------------------------------------------------------
> thanks bodhi.. please see "since i do not have
> serial and the netconsole is showing only the
> uboot messages (once kernel loads, no more
> messages on the default 10.10.10.4 ip even when
> booting from the arch rescue"..

Right. You need to set it up further to see anything more on netconsole after the kernel started. See:
https://forum.doozan.com/read.php?2,9522


> i've ordered a serial cable.. hopefully will be
> here in a couple of weeks..
>
> in the mean time, i will try this from the
> netconsole and report back

Yes, netconsole is enough to test this rescue boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
February 28, 2018 05:59PM
seems like the third command doesnt execute fully.. some setenv restriction?

the first two executed correctly..

Pogoplugv4> setenv arch_rescue 'echo Trying to boot from NAND ...; setenv arch_dtb_file "/boot/dtbs/kirkwood-pogoplugv4.dtb"; setenv arch_mountubi "ubi part rootfs; ubifsmount ubi0:rootfs"; setenv arch_loadaddr "0x810000"; setenv arch_fdtaddr "0x800000"; setenv arch_console "ttyS0,115200"; setenv arch_mtdparts "mtdparts=orion_nand:1M(u-boot),-(rootfs)"; if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi'
setenv arch_rescue 'echo Trying to boot from NAND ...; setenv arch_dtb_file "/boot/dtbs/kirkwood-pogoplugv4.dtb"; setenv arch_mountubi "ubi part rootfs; ubifsmount ubi0:rootfs"; setenv arch_loadaddr "0x810000"; setenv arch_fdtaddr "0x800000"; setenv arch_console "ttyS0,115200"; setenv arch_mtdparts "mtdparts=orion_nand:1M(u-boot),-(rootfs)"; if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.

> boot
boot


btw.. my environment now looks a bit different from the one that i posted a couple days back.. dont know how/why because this pogoplug was unplugged and sitting in a box these 2 days..

Pogoplugv4> printenv
printenv
arcNumber=3960
bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/kirkwood-pogoplugv4.dtb; ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
ethact=egiga0
ethaddr=00:XX:XX:XX:XX:XX
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-pogoplug-series-4.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
machid=f78
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncargs=ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in mmc usb ide; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
stderr=nc
stdin=nc
stdout=nc

Environment size: 2958/131068 bytes

still boots to arch nand rescue btw..
Re: broken uboot?
March 01, 2018 02:18AM
yeehaa,

> seems like the third command doesnt execute
> fully.. some setenv restriction?

Please post the full boot log.

> btw.. my environment now looks a bit different
> from the one that i posted a couple days back..
> dont know how/why because this pogoplug was
> unplugged and sitting in a box these 2 days..

That might be because you add envs and did not save it. It is normal.

However, the full boot log would show if the Arch rescue system has set some of your envs or not.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
March 01, 2018 09:37AM
bodhi Wrote:
-------------------------------------------------------
> yeehaa,
>
> > seems like the third command doesnt execute
> > fully.. some setenv restriction?
>
> Please post the full boot log.
>
> > btw.. my environment now looks a bit different
> > from the one that i posted a couple days back..
> > dont know how/why because this pogoplug was
> > unplugged and sitting in a box these 2 days..
>
> That might be because you add envs and did not
> save it. It is normal.
>
> However, the full boot log would show if the Arch
> rescue system has set some of your envs or not.

sorry for not being detailed in my previous message.. please note that after i execute the 3rd command, i lose the "Pogoplugv4>" prompt..it drops me down to a ">" prompt which just echoes the commands that i run afterwords without executing them.. so the pogoplug would not take the boot command.. it sits there with the blinking green light until i reset power..

U-Boot 2016.09.01-1 (Oct 10 2016 - 23:13:37 -0600) Arch Linux ARM
Pogoplug V4
gcc (GCC) 6.2.1 20160830
GNU ld (GNU Binutils) 2.27
Hit any key to stop autoboot:  2 
 0 
Pogoplugv4> setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; run arch_rescue'
setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; run arch_rescue'
Pogoplugv4> setenv 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'
setenv 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'
Pogoplugv4> setenv arch_rescue 'echo Trying to boot from NAND ...; setenv arch_dtb_file "/boot/dtbs/kirkwood-pogoplugv4.dtb"; setenv arch_mountubi "ubi part rootfs; ubifsmount ubi0:rootfs"; setenv arch_loadaddr "0x810000"; setenv arch_fdtaddr "0x800000"; setenv arch_console "ttyS0,115200"; setenv arch_mtdparts "mtdparts=orion_nand:1M(u-boot),-(rootfs)"; if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi'
setenv arch_rescue 'echo Trying to boot from NAND ...; setenv arch_dtb_file "/boot/dtbs/kirkwood-pogoplugv4.dtb"; setenv arch_mountubi "ubi part rootfs; ubifsmount ubi0:rootfs"; setenv arch_loadaddr "0x810000"; setenv arch_fdtaddr "0x800000"; setenv arch_console "ttyS0,115200"; setenv arch_mtdparts "mtdparts=orion_nand:1M(u-boot),-(rootfs)"; if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.

> boot
boot
> 

> printenv
printenv
>

you mentioned that i need to save the env somehow? how do i do that? i assumed, the setenv commands "Sets" the environment.. similar to fw_setenv from within the OS.. would it help if i boot into the rescue system, apply these three commands using fw_setenv and then reboot?


after a reset, i interrupted the boot again and ran just the first two commands.. which shows that the first and second commands are executing correctly.. the third one is the problem..

Pogoplugv4> setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; run arch_rescue'
setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; run arch_rescue'
Pogoplugv4> setenv 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'
setenv 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'
Pogoplugv4> printenv
printenv
arcNumber=3960
bootcmd=run scan_disk; run set_bootargs; run bootcmd_exec; run arch_rescue
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
--snip



Edited 1 time(s). Last edit at 03/01/2018 09:43AM by yeehaa.
Re: broken uboot?
March 01, 2018 03:11PM
Well, it is too long for setenv command in uboot. Just try to boot into debian and use fw_setenv instead. Problem solved. :P

Similar things happened to me before.
Re: broken uboot?
March 01, 2018 06:56PM
@yeehaa,

Let me rewrite it for you.

Do not use saveenv or fw_setenv until it has been tested to work in all cases! you'll risk locking yourself out until you can install serial console!

@david, bad advice :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
March 01, 2018 08:48PM
yep.. will hold till you've had a chance to rewrite the commands.. thanks!

does this help btw? -> https://archlinuxarm.org/forum/viewtopic.php?f=30&t=8383#p46069



Edited 1 time(s). Last edit at 03/01/2018 08:49PM by yeehaa.
Re: broken uboot?
March 02, 2018 01:41AM
yeehaa,

Here you go, give it a try.

With the USB unplugged, power up and interrupt netconsole, copy/paste and execute each command at the prompt:

setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; printenv; printenv bootargs; run arch_rescue'
setenv 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_adr; 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'
setenv arch_dtb_file '/boot/dtbs/kirkwood-pogoplugv4.dtb'
setenv arch_mountubi 'ubi part rootfs; ubifsmount ubi0:rootfs'
setenv arch_loadaddr '0x810000'
setenv arch_fdtaddr '0x800000'
setenv arch_console 'ttyS0,115200'
setenv arch_mtdparts 'mtdparts=orion_nand:1M(u-boot),-(rootfs)'
setenv arch_rescue 'echo Trying to boot from NAND ...;  if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi'

and then try booting

boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
March 02, 2018 05:10PM
bodhi Wrote:
-------------------------------------------------------
> yeehaa,
>
> Here you go, give it a try.
>
> With the USB unplugged, power up and interrupt
> netconsole, copy/paste and execute each command at
> the prompt:
>
>
> setenv bootcmd 'run scan_disk; run set_bootargs;
> run bootcmd_exec; printenv; printenv bootargs; run
> arch_rescue'
> setenv 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_adr;
> 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'
> setenv arch_dtb_file
> '/boot/dtbs/kirkwood-pogoplugv4.dtb'
> setenv arch_mountubi 'ubi part rootfs; ubifsmount
> ubi0:rootfs'
> setenv arch_loadaddr '0x810000'
> setenv arch_fdtaddr '0x800000'
> setenv arch_console 'ttyS0,115200'
> setenv arch_mtdparts
> 'mtdparts=orion_nand:1M(u-boot),-(rootfs)'
> setenv arch_rescue 'echo Trying to boot from NAND
> ...;  if run arch_mountubi; then ubifsload
> ${arch_loadaddr} /boot/zImage;ubifsload
> ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount;
> setenv bootargs console=${arch_console} ubi.mtd=1
> root=ubi0:rootfs ro rootfstype=ubifs  rootwait
> ${arch_mtdparts};bootz ${arch_loadaddr} -
> ${arch_fdtaddr};fi'
>
>
> and then try booting
>
>
> boot
>

hi bodhi.. here is the boot log.. i ran the commands, confirmed the env had changed and then hit boot.. it does indeed boot into the nand rescue..

Pogoplugv4> boot
boot
## Error: "scan_disk" not defined
## Error: "set_bootargs" not defined
## Error: "load_uimage" not defined
arcNumber=3960
arch_console=ttyS0,115200
arch_dtb_file=/boot/dtbs/kirkwood-pogoplugv4.dtb
arch_fdtaddr=0x800000
arch_loadaddr=0x810000
arch_mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
arch_mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
arch_rescue=echo Trying to boot from NAND ...;  if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi
bootcmd=run scan_disk; run set_bootargs; run bootcmd_exec; printenv; printenv bootargs; run arch_rescue
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_adr; 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
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/kirkwood-pogoplugv4.dtb; ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
ethact=egiga0
ethaddr=00:XX:XX:XX:XX:XX
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-pogoplug-series-4.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
machid=f78
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncargs=ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in mmc usb ide; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
stderr=nc
stdin=nc
stdout=nc

Environment size: 3908/131068 bytes
## Error: "bootargs" not defined
Trying to boot from NAND ...
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=1", size 127 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: 1015, bad PEBs: 1, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 1118974802
ubi0: available PEBs: 0, total reserved PEBs: 1015, PEBs reserved for bad PEB handling: 19
Loading file '/boot/zImage' to addr 0x00810000...
Done
Loading file '/boot/dtbs/kirkwood-pogoplugv4.dtb' to addr 0x00800000...
Done
Unmounting UBIFS volume rootfs!
Kernel image @ 0x810000 [ 0x000000 - 0x3f05c8 ]
## Flattened Device Tree blob at 00800000
   Booting using the fdt blob at 0x800000

also.. do you happen to know why i'm not getting the kernel boot log? the ip is set correctly in the uboot env, but i dont get any messages in the terminal window for kernel log..



Edited 2 time(s). Last edit at 03/02/2018 05:12PM by yeehaa.
Re: broken uboot?
March 02, 2018 06:42PM
yeehaa,

I am assuming you're running my released u-boot, but apparently you are running Arch u-boot :) That's why there were some envs error.

What you should do is booting into Debian, and install u-boot

Quote

Last Updated 28 Oct 2017
Updated 06 Dec 2017 (replace Sheevaplug with newer version 2017.07-tld-2)

I've uploaded 2017.07-tld-1 U-Boot images for Pogo E02, GoFlexNet, GoFlex Home, Dockstar, Pogo V4/Mobile, iConnect, Netgear Stora, Sheevaplug, NSA320, NSA325, NSA310S/320S, NSA310, HP-T5325, and Dreamplug.

And then test the envs that I've posted above.

As of right now, even though it is booting into NAND rescue, the envs setting I wrote is not a final adjustment that you should use for Arch u-boot.

If you prefer to use Arch u-boot, then the envs setup to boot Arch rescue should already have been set up with Arch installation procedure. So you should check at Arch site how to rerun the installation for Arch rescue.


> also.. do you happen to know why i'm not getting
> the kernel boot log? the ip is set correctly in
> the uboot env, but i dont get any messages in the
> terminal window for kernel log..

Netconsole needs further set up so you can see the kernel log. It is normal that it stopped outputs after "Starting kernel...".

See here for how to set it up in Debian:
https://forum.doozan.com/read.php?2,9522

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: broken uboot?
March 02, 2018 10:30PM
bodhi Wrote:
-------------------------------------------------------
> yeehaa,
>
> I am assuming you're running my released u-boot,
> but apparently you are running Arch u-boot :)
> That's why there were some envs error.
>
> What you should do is booting into Debian, and
>
> install u-boot

>
>
Quote

Last Updated 28 Oct 2017
> Updated 06 Dec 2017 (replace Sheevaplug with newer
> version 2017.07-tld-2)
>
> I've uploaded 2017.07-tld-1 U-Boot images for Pogo
> E02, GoFlexNet, GoFlex Home, Dockstar, Pogo
> V4/Mobile, iConnect, Netgear Stora, Sheevaplug,
> NSA320, NSA325, NSA310S/320S, NSA310, HP-T5325,
> and Dreamplug.
>
> And then test the envs that I've posted above.
>
> As of right now, even though it is booting into
> NAND rescue, the envs setting I wrote is not a
> final adjustment that you should use for Arch
> u-boot.
>
> If you prefer to use Arch u-boot, then the envs
> setup to boot Arch rescue should already have been
> set up with Arch installation procedure. So you
> should check at Arch site how to rerun the
> installation for Arch rescue.
>
>
> > also.. do you happen to know why i'm not
> getting
> > the kernel boot log? the ip is set correctly in
> > the uboot env, but i dont get any messages in
> the
> > terminal window for kernel log..
>
> Netconsole needs further set up so you can see the
> kernel log. It is normal that it stopped outputs
> after "Starting kernel...".
>
> See here for how to set it up in Debian:
> https://forum.doozan.com/read.php?2,9522

ok.. i may have confused the hell out of you.. here is what i did on this pogo plug mobile.. i have the arch rescue on the mtd1 partition.. i went ahead and flashed your uboot and uboot envs to mtd0 as per the thread you linked.. then....

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed
Card did not respond to voltage select!
mmc_init: -95, time 73
## 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 **

no IDE devices available
Card did not respond to voltage select!
mmc_init: -95, time 96
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
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

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
Card did not respond to voltage select!
mmc_init: -95, time 11
device mmc 0:1
Card did not respond to voltage select!
mmc_init: -95, time 10
Card did not respond to voltage select!
mmc_init: -95, time 11
** Bad device mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Pogov4> setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; printenv; printenv bootargs; run arch_rescue'
setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; printenv; printenv bootargs; run arch_rescue'
Pogov4> setenv 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_adr; 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'
setenv 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_adr; 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'
Pogov4> setenv arch_dtb_file '/boot/dtbs/kirkwood-pogoplugv4.dtb'
setenv arch_dtb_file '/boot/dtbs/kirkwood-pogoplugv4.dtb'
Pogov4> setenv arch_mountubi 'ubi part rootfs; ubifsmount ubi0:rootfs'
setenv arch_mountubi 'ubi part rootfs; ubifsmount ubi0:rootfs'
Pogov4> setenv arch_loadaddr '0x810000'
setenv arch_loadaddr '0x810000'
Pogov4> setenv arch_fdtaddr '0x800000'
setenv arch_fdtaddr '0x800000'
Pogov4> setenv arch_console 'ttyS0,115200'
setenv arch_console 'ttyS0,115200'
Pogov4> setenv arch_mtdparts 'mtdparts=orion_nand:1M(u-boot),-(rootfs)'
setenv arch_mtdparts 'mtdparts=orion_nand:1M(u-boot),-(rootfs)'
Pogov4> setenv arch_rescue 'echo Trying to boot from NAND ...;  if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi'
setenv arch_rescue 'echo Trying to boot from NAND ...;  if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi'
Pogov4> boot
boot
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
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

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
Card did not respond to voltage select!
mmc_init: -95, time 10
device mmc 0:1
Card did not respond to voltage select!
mmc_init: -95, time 11
Card did not respond to voltage select!
mmc_init: -95, time 11
** Bad device mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
arcNumber=3960
arch_console=ttyS0,115200
arch_dtb_file=/boot/dtbs/kirkwood-pogoplugv4.dtb
arch_fdtaddr=0x800000
arch_loadaddr=0x810000
arch_mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
arch_mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
arch_rescue=echo Trying to boot from NAND ...;  if run arch_mountubi; then ubifsload ${arch_loadaddr} /boot/zImage;ubifsload ${arch_fdtaddr} ${arch_dtb_file}; ubifsumount; setenv bootargs console=${arch_console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${arch_mtdparts};bootz ${arch_loadaddr} - ${arch_fdtaddr};fi
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),-(rootfs)
bootcmd=run scan_disk; run set_bootargs; run bootcmd_exec; printenv; printenv bootargs; run arch_rescue
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_adr; 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_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-pogoplug_v4.dtb
ethact=egiga0
ethaddr=00:XX:XX:XX:XX:XX
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.10.140
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
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
nc_ready=1
ncip=192.168.10.120
partition=nand0,2
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_netconsole; 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 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
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=192.168.10.120
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
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: 3886/131068 bytes
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),-(rootfs)
Trying to boot from NAND ...
invalid partition number 2 for device nand0 (orion_nand)
no such partition
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=1", size 127 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: 1015, bad PEBs: 1, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 1118974802
ubi0: available PEBs: 0, total reserved PEBs: 1015, PEBs reserved for bad PEB handling: 19
Loading file '/boot/zImage' to addr 0x00810000...
Done
Loading file '/boot/dtbs/kirkwood-pogoplugv4.dtb' to addr 0x00800000...
Done
Unmounting UBIFS volume rootfs!
Kernel image @ 0x810000 [ 0x000000 - 0x3f05c8 ]
## Flattened Device Tree blob at 00800000
   Booting using the fdt blob at 0x800000


Starting kernel ...

so the commands you wrote seemed to have worked to boot arch rescue from your uboot.. now how do i make this permanent? once made permanent, i would like to boot to debian on usb and fall back to arch rescue in case no usb is attached.. also just so that there is no confusion, this will all be on a pogo mobile with your uboot on it..

thanks again for all your help!



Edited 1 time(s). Last edit at 03/02/2018 10:31PM by yeehaa.
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: