Welcome! Log In Create A New Profile

Advanced

2017.07- 2024.10 U-Boot Kirkwood

Posted by bodhi 
Dannii Wrote:
-------------------------------------------------------
> Spent hours trying all different combinations
> found in the forum and elsewhere... via mac, alarm
> on the other pogo, no firewall on mac so it wasn't
> that, when I install netcat via brew, it installed
> the gnu one, still everything I try doesn't work.
> Theres two things I can try... restart my router
> and use ubuntu in parallels - didn't really want
> to do this, but I can.
>
> The final thing I can try is my usb to ttl, once I
> got the cd to sound card cable/plug - believe it
> or not, there's not many places online in the uk
> that sell these, although my dad might have some
> somewhere.
>
> I usually always find a way to do something...
> when it comes to pi's (got two) and pogos
> (excluding my last problem that you helped me fix
> lol). I've tried so many different combinations. I
> just cannot believe that nothing works.
>
> Thank you for your help bodhi :)

:) try 2 pogo E02s like I suggested above. I'm very positive that will work. If this combo works then you'd know it's because of your Mac side or the router. If this combo did not work then it is likely that the router needs reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tried pogo to pogo and restarted router :(

this was on the other post but think you replied before I finished typing it....
*edit* tried and failed. Can't get netconsole working! Only choice now is the usb to ttl. Unless reinstalling on my flash drive that isn't working, somehow helps.

Does it matter what order I install the rescue, kernel and debian rootfs (should I change to this rather than alarm)?

This pogo is mean to be a basic nas for accessing storage in my home network, backing up to, time machine - usually install netatalk and have my hfs+ drives mounting fine as rw, I also install webmin on here to use very basically. Do you think this will be fine on debian or shall I just stick to what I've documented? Very interested in using the updated debian rootfs... :)



Edited 1 time(s). Last edit at 07/25/2015 07:55PM by Dannii.
Dannii,

> Only choice now is the usb to ttl.

I think you definitely should have this. Sometime a problem is so subtle that it is the only way to figure out. So I would use serial console to get netconsole working and so that you can have netconsole for all plugs.

> Does it matter what order I install the rescue,
> kernel and debian rootfs (should I change to this
> rather than alarm)?

Install rootfs first, and update kernel when needed. If netconsole is working then you will rarely need rescue system.

> Do you think
> this will be fine on debian or shall I just stick
> to what I've documented? Very interested in using
> the updated debian rootfs... :)

It will be fine on Debian. If you don't have a preference between the 2, then use Debian. It is perfect for NAS (a little older but very stable). But if you are more familiar with Arch then continue using Arch (just don't update it too often :).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> > anyone point me to 2014.07-tld-3 for Pogo E02,
> > please?
>
> Use 2014.07-tld-2 for Pogo E02.

As I remember it, there was a problem with 2014.07-tld-2 for Pogo E02 involving some missing code that made the fsload command fail. Bodhi, you fixed it in tld-3, which is what I have running on my test Pogo E02 today. (This problem didn't affect the boot of Debian loads, but did prevent booting the original OS from the internal NAND filesystem.)

I still have the uboot.2014.07-tld-3.pogo_e02.mtd0.kwb file you sent me to test if anyone would like it.
@restamp, that's why I was considering the rescue system, although I have read some amazing things... I miss not being able to boot into something when I can't boot a usb! If the rescue system is too much of a challenge, yes, I would love that file please. I don't mind looking but will the instructions on the 1st page help with that file? Quite new to all this :P

Also restamp, you've been my knight in shining armour with my current netconsole problem that bodhi has been helping me with!

@bodhi, I've actually got it working from mac :D Really over the moon! As I said it was restamp's post, not sure how much this differs from Jeff's, as I was originally using that, then I saw that your's (bodhi's) looked a bit different (on the main page of this thread) and assumed that it would work better (this was a few days ago). Not even sure how this compares to your's bodhi... I'm just over the moon I have it working!

My Pogo E02 now works after using this:
fw_setenv ipaddr    '192.168.0.15'
fw_setenv serverip '192.168.0.16'
fw_setenv 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'
fw_setenv preboot 'run preboot_nc'

192.168.0.15 - Pogo E02
192.168.0.16 - Mac


Combined with this for pure laziness :D

On my mac (Yosemite 10.10.4), I thought, nothing is working, I may as well give up, then I saw this post from SvOlli, for his wonderful app (ascu) that sealed the deal for netconsole for me! I may as well be lazy, I've spent too many hours on this as it is :) The app is so simple 6666 for ports on either side and in the middle, the ip for your Pogo. Reboot pogo and it all appears!

Thank you bodhi for being so patient with me! And thank you both for your help with this, now I can move forward :D

Just a thought.... shall I post this in the netconsole thread?

Output from ascu app:
U-Boot 2014.07-tld-2 (Sep 20 2014 - 00:52:18)
Pogo E02
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot:   0 
PogoE02>  p r i n t e n v 
arcNumber=3542
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
bootdelay=10
console=ttyS0,115200
ethact=egiga0
ethaddr=XX
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
if_netconsole=ping $serverip
ipaddr=192.168.0.15
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=dd6
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
ncip=192.168.0.16
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
preboot=run if_netconsole start_netconsole
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
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
serverip=192.168.0.16
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext3
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Environment size: 2794/131068 bytes
PogoE02>

PogoE02>  b o o t 
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 2 Storage Device(s) found
** File not found /rescueme **
** Unrecognized filesystem type **
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            91 MiB
UBI: number of good PEBs:        728
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             717
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
1 bytes read in 242 ms (0 Bytes/s)
Found bootable drive on usb 0:1
2756040 bytes read in 372 ms (7.1 MiB/s)
6032465 bytes read in 464 ms (12.4 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.16.0-kirkwood-tld-2
   Created:      2014-09-01  23:18:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2755976 Bytes = 2.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.16.0-kirkwood-tld-2
   Created:      2014-09-01  23:18:48 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6032401 Bytes = 5.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK


Starting kernel ...

The rootfs error is the old usb I'm going to reinstall on, not formatted it yet.

Is everything ok with this to proceed with the rootfs, kernel and perhaps rescue system, bodhi? Or shall I input something else? Guess I better start looking up things I can do with this in case I need them down the line - typing help, of course gave me a nice long list.



Edited 4 time(s). Last edit at 07/29/2015 01:53PM by Dannii.
Hi restamp,

> As I remember it, there was a problem with
> 2014.07-tld-2 for Pogo E02 involving some missing
> code that made the fsload command fail. Bodhi,
> you fixed it in tld-3, which is what I have
> running on my test Pogo E02 today. (This problem
> didn't affect the boot of Debian loads, but did
> prevent booting the original OS from the internal
> NAND filesystem.)

Thanks for reminding me! as you probably can tell, my ToDo list has gotten pretty long! I forgot all about this :) I do remember everything about the JFFS2 debugging session, except this new Pogo E02 version!

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

> My Pogo E02 now works after using this:
>
> fw_setenv ipaddr    '192.168.0.15'
> fw_setenv serverip '192.168.0.16'
> fw_setenv 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'
> fw_setenv preboot 'run preboot_nc'
>
>

Yes, this 5-ping logic was from me. I thought I posted it in the instruction in the first post? the default value after you installed u-boot was simpler (like Jeff's). But I've changed to this 5-ping logic after some experiment. When the network is noisy, this will eliminate false-positive and false negatives.

> Is everything ok with this to proceed with the
> rootfs, kernel and perhaps rescue system, bodhi?

Yes, everything looks good!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Green led doesn’t turn off at shutdown/halt.

I upgraded my goflexhome to jessie with the following:
uboot.2014.07-tld-2.goflexhome.bodhi.tar
linux-4.1.0-kirkwood-tld-1-bodhi.tar.bz2 (30 June 2015)
Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Feb 2015)

The led turns solid green when I boot but when I issue the “shutdown -h now” command the green led does not turn-off when the machine halts? How do I get the green led to turn off to indicate the machine is in a HALT state? Or, for that matter, the orange led to turn on at HALT? Do I need to add something in the env variables? These 3 led variables are already there.

root@GoflexHome:~# fw_printenv | grep led_
led_error=orange blinking
led_init=green blinking
led_exit=green off
root@GoflexHome:~#


I’m running rootfs from sda1 HDD boot partition. Everything appears to be working otherwise so far.
maihoaomv,

Sometime apt-get upgrade will replace your halt script with new version. Take a look at /etc/init.d/halt. Does it still have the echo line that turns off the green LED? similar to the following:
if [ -d /sys/class/leds/status:green:health ]; then
   echo none  > /sys/class/leds/status:green:health/trigger
fi

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi
yes it's there in /etc/init.d/halt. funny thing was I tried cutting and pasting
echo none  > /sys/class/leds/status:green:health/trigger
into the terminal and it refused to turn off the led until I issued this command
echo timer  > /sys/class/leds/status:green:health/trigger
After that it seemed to work fine. Maybe I've got a hardware problem developing with a register that's getting stuck in the on position. I'll see what happens tomorrow morning after it's set for a while in a powered down state.
thanks for getting back to me so soon.
bodhi
it looks like in order to get the green led to turn off with any consistency i have to execute echo timer > /sys/class/leds/status:green:health/trigger in the init.d/ halt file prior to to executing echo none > /sys/class/leds/status:green:health/trigger . once I added that to the file it seems to work. I also get that 'hardware click' which indicates, i think, power (dc) has been removed from device.
so i guess this problem is solved if it continues to work consistently.

thanks for your help
maihoaomv,

> it looks like in order to get the green led to
> turn off with any consistency i have to execute
> echo timer >
> /sys/class/leds/status:green:health/trigger in
> the init.d/ halt file prior to to executing echo
> none >
> /sys/class/leds/status:green:health/trigger . once
> I added that to the file it seems to work.

This is interesting! This could be the same problem that TEN reported about his Pogo E02. His LED also has probem turning off with "echo none".

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi
Do you think it might have something to do with either the kernel or mtd? I ran tld 1 and wheezy for a year or so and never had a problem with getting the green led to turn off and setting the orange led on at shutdown.

I can't swear to it but it seems that the green led turned off when I first installed jessie but after updating to tld 2 was when I noticed the problem with the led not turning off. just a thought.

I don't run this server full time and usually shut it down when I'm done using it or it turns off automatically at midnight with a cron job. It's nice having some sort of known indication that shutdown has completed and it's safe to remove ac power from it. Currently it's setting on my desktop so I can use the console to monitor shutdown but once I move it back to it's normal place-of-business it'll be headless.



Edited 2 time(s). Last edit at 07/27/2015 05:29PM by maihoaomv.
maihoaomv,

> Do you think it might have something to do with
> either the kernel or mtd? I ran tld 1 and wheezy
> for a year or so and never had a problem with
> getting the green led to turn off and setting the
> orange led on at shutdown.

Not with the kernel or mtd, since it works fine for other GoFlex Home.

> I can't swear to it but it seems that the green
> led turned off when I first installed jessie but
> after updating to tld 2 was when I noticed the
> problem with the led not turning off. just a
> thought.

I thought it might be the upgraded system that has a race condition during shutdown . And the fact was the "echo timer" seems to clear up the condition, I think it might be the cause. Could you try other things (instead of "echo timer") to slow dow the halt process a bit (doing things like echoing a whole bunch of text output to the console). See if it wil have the same effect.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi
I tried the following
Inserting these prior to turning off the led didn't work

echo <text (940 chars)> -didn't work
sleep 10 -didn't work

echo 100 > /sys/class/leds/status:green:health/delay_on -by itself didn't work
echo default-on > /sys/class/leds/status:orange:fault/trigger -didn't work
echo timer > /sys/class/leds/status:orange:fault/trigger -didn't work
echo none > /sys/class/leds/status:green:health/trigger -didn't work (2 identical statements)

The only thing that worked were these when executed prior to turning off the led
echo heartbeat > /sys/class/leds/status:green:health/trigger -works
echo default-on > /sys/class/leds/status:green:health/trigger -works
echo timer > /sys/class/leds/status:green:health/trigger -works

The way I'm seeing it at present is apparently the dc power is not being turned off that's why the green led stays on. Inserting a statement to set the green to some state other than "none" seems to get it's attention or resets it and it works the way it should. As I said before, I may have a register that is flaky or getting stuck and by toggling it's state makes it work as advertised. Until the GFH itself fails and becomes garbage I can live with the work around, it's simple.

Thanks for all your help
m
I have brand new Pogoplug v4.3.1 and trying to follow your guidelines as suggested I checked for bad sectors and found following:

/bin/dmesg | grep -i 'bad'

[ 1.010000 ] scanning device for bad blocks
[ 1.050000 ] Bad eraseblock 786 at 0x000006240000
[ 1.370000 ] UBI: number of bad PEBs: 1
[ 1.410000 ] UBI: number pf PEBs reserved for bad PEB handling: 8

how do I proceed now? help will be appreciated
slb Wrote:
-------------------------------------------------------
> I have brand new Pogoplug v4.3.1 and trying to
> follow your guidelines as suggested I checked for
> bad sectors and found following:
>
> /bin/dmesg | grep -i 'bad'
>
> [ 1.010000 ] scanning device for
> bad blocks
> [ 1.050000 ] Bad eraseblock 786 at
> 0x000006240000
> [ 1.370000 ] UBI: number of bad
> PEBs: 1
> [ 1.410000 ] UBI: number pf PEBs
> reserved for bad PEB handling: 8
>
> how do I proceed now? help will be appreciated

That's OK. The bad block is way out in other area. You can proceed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you for a quick reply well appreciated
I’ve uploaded the NSA325 u-boot 2014.07-tld-4 image. Please see 1st post for download link.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hello,
about two weeks ago i wrote about the missing/nonfunctional sensors stuff on zyxel NSA320 (sudo sensors-detect finds no sensors).
I did not understand all of pbg4's and bodhis messages about this Topic, regarding the complexity of making this work in a current kernel.
So is there a chance of having this working in the foreseeable future?
Is there any way in which i can contribute to the work to be done?

Dirk



Edited 1 time(s). Last edit at 08/04/2015 08:32PM by bodhi.
Re: NSA320: hwmon / status
August 03, 2015 08:23PM
shivahoj Wrote:
-------------------------------------------------------
> Hello,
> about two weeks ago i wrote about the
> missing/nonfunctional sensors stuff on zyxel
> NSA320 (sudo sensors-detect finds no sensors).
> I did not understand all of pbg4's and bodhis
> messages about this Topic, regarding the
> complexity of making this work in a current
> kernel.
> So is there a chance of having this working in the
> foreseeable future?
> Is there any way in which i can contribute to the
> work to be done?
>
> Dirk

I have not looked into this since I'm preoccupied with u-boot, and pbg4 is working on this.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA320: hwmon / status
August 03, 2015 10:06PM
I've uploaded a test u-boot for the NSA320. Please see:
http://forum.doozan.com/read.php?3,23039

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA320: hwmon / status
August 04, 2015 08:57AM
bodhi Wrote:
-------------------------------------------------------
> shivahoj Wrote:
> --------------------------------------------------
> -----
> > Hello,
> > about two weeks ago i wrote about the
> > missing/nonfunctional sensors stuff on zyxel
> > NSA320 (sudo sensors-detect finds no sensors).
> > I did not understand all of pbg4's and bodhis
> > messages about this Topic, regarding the
> > complexity of making this work in a current
> > kernel.
> > So is there a chance of having this working in
> the
> > foreseeable future?
> > Is there any way in which i can contribute to
> the
> > work to be done?
> >
> > Dirk
>
> I have not looked into this since I'm preoccupied
> with u-boot, and pbg4 is working on this.

Hi Dirk,

to get nsa3xx-hwmon going, the changes to the nsa320 dts file will definitely look
similar to what I had posted here already

http://forum.doozan.com/read.php?3,12381,22621#msg-22621

since this solution is rather zyxel specific, a generic gpio-hwmon approach is perhaps not appropriate, so
compatible = "zyxel,nsa3xx-hwmon" would be better,

and in the nsa3xx-hwmon.c driver source code than the relevant changes for DT-adaptation of the driver (e.g. driver/compatible-mapping, getting GPIO's names via DT node descriptions etc.,.. ) have to be implemented, than tests are needed,..

one of the linux-arm kernel devs answered my email and he also thinks it is doable with limited amount of
effort, to get this upstream will be much more a hassle, because than the whole nsa3xx-hwmon.c has
to get upstream together with the changes for the nsa320 dts,..

a similar driver from lacie gpio-fan.c which can serve as a model for the driver implementation can be
found in drivers/hwmon, so it is a limited amount of work to do, it is just the question of having the time to do the coding and the testing, so this is the only problem for a quick solution,

best wishes pbg4
I've uploaded the Zyxel NSA320 u-boot-2014.07-tld-4 image. Please see 1st post for download link.

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

i found an old goflex net (stock fw, stock uboot) and wanted to install your newest uboot.
went fine, but...

if i install your default env:
stock fw dont start. usb stick (wheezy) starts fine.
so i installed davygravys rescue 282. but that doesnt start too.
it seems that you use another rescue with other partition scheme?

if i install jeffs default env:
the stick boots fine.
the rescue boots fine.
netconsole doesnt run.
and it naturally lacks the env to start from sata etc.

what set of env should i use?

tia
jay
jay,

> if i install your default env:
> stock fw dont start. usb stick (wheezy) starts
> fine.

This is expected. My default u-boot envs don't care about stock FW!

> what set of env should i use?

Use my default envs. And then adjust the envs to boot stock. You can merge what Jeff's env has that related to booting stock FW to the current bootcmd. For example
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
bootcmd=usb start; run usb_bootcmd; usb stop; run pogo_bootcmd; reset

So if you have install Jeff's u-boot on this before, the stock u-boot was saved as uboot-original-mtd0.kwb on NAND rootfs. And piggy back that to the end of the current bootcmd will start old u-boot and that will load the OS from NAND.

Note that if you have installed my u-boot directly from stock, then you'll need the mtd0 backup. That's your uboot-original-mtd0.kwb. Now things wil get complicated. You have to put that on NAND rootfs, and you can't do it safely without booting into stock :) catch-22 ! You can mount the NAND rootfs in Debian and then copy it. But there is some potential problem with different compression scheme that Debian uses and stock FW uses (i.e. doing this in Debian could make your NAND rootfs unreadable using stock u-boot).

So please think about this a bit and let me know!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
hi bhodi,
well, i dont want to start stock firmware (it isnt there anyway, because i installed davygravys rescue282).
i just want a way to boot that rescue, or to install the rescue _you_ use and for whom your env fits.
jay
@Jay,

Let me check what are the correct envs. In the mean time, you could list your current envs here. I'll be back.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
hi,
the 2 (3) env i used:

yours (actual):

arcNumber=3089
ethaddr=00:10:75:26:8D:05
ipaddr=192.168.0.231
serverip=192.168.0.220
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $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
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; 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 0x810000 /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

bodhi-env
--------------------------

with davy rescue:

ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:26:8D:05
arcNumber=3089
preboot=run preboot_nc
ipaddr=172.19.42.98
serverip=172.19.42.99
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
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_pogo=run bootcmd_rescue
rescue_installed=1

davy-rescue-env

------------------------

jeffs without rescue:

ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:26:8D:05
arcNumber=3089
preboot=run preboot_nc
ipaddr=172.19.42.98
serverip=172.19.42.99
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

jeff-uboot-env
Hi Jay,

Sorry I forgot about this :)

Yes, the idea is to flash my u-boot image and default envs image, and then merge only what is needed from davygravy's rescue system envs. Do you need help doing that?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Sorry, you can't reply to this topic. It has been closed.