login as: alarm
alarm@10.0.0.103's password:
Last login: Sun Feb  7 00:08:33 2016 from 10.0.0.128
[alarm@alarm ~]$ blkid
[alarm@alarm ~]$ su
Password:
[root@alarm alarm]# blkid
/dev/sda1: LABEL="ROOTFS" UUID="29180940-aa4d-46da-844f-6f3f29e525c6" TYPE="ext3                              "
[root@alarm alarm]# fw_printenv | grep ethaddr
ethaddr=00:25:31:04:4B:E8
[root@alarm alarm]# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size      N                              umber of sectors
/dev/mtd0               0xc0000         0x20000         0x20000
[root@alarm alarm]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 05b00000 00020000 "data"
[root@alarm alarm]# fw_printenv ethaddr
ethaddr=00:25:31:04:4B:E8
[root@alarm alarm]# dmesg | grep -i 'bad'
[    7.611995] Scanning device for bad blocks
[root@alarm alarm]# dmesg | grep -i 'bad'
[    7.611995] Scanning device for bad blocks
[root@alarm alarm]# cd /tmp
[root@alarm tmp]# wget https://www.dropbox.com/s/883kcmxbq2y9bqe/uboot.2015.10-tld-1.pogo_e02.bodhi.tar
--2016-02-15 20:22:44--  https://www.dropbox.com/s/883kcmxbq2y9bqe/uboot.2015.10-tld-1.pogo_e02.bodhi.tar
Resolving www.dropbox.com (www.dropbox.com)... 108.160.172.206, 108.160.172.238
Connecting to www.dropbox.com (www.dropbox.com)|108.160.172.206|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://dl.dropboxusercontent.com/content_link/qS40DFO83teNGjoROUMamZVFix4zXwk5ZArQZVv1Q9jp9Vv2aFyhWeFsaOwMcKrf/file [following]
--2016-02-15 20:22:45--  https://dl.dropboxusercontent.com/content_link/qS40DFO83teNGjoROUMamZVFix4zXwk5ZArQZVv1Q9jp9Vv2aFyhWeFsaOwMcKrf/file
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 199.47.217.5
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|199.47.217.5|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 532480 (520K) [application/x-tar]
Saving to: 'uboot.2015.10-tld-1.pogo_e02.bodhi.tar'

uboot.2015.10-tld-1.pogo_e0 100%[===========================================>] 520.00K   376KB/s   in 1.4s

2016-02-15 20:22:48 (376 KB/s) - 'uboot.2015.10-tld-1.pogo_e02.bodhi.tar' saved [532480/532480]

[root@alarm tmp]# tar -xf uboot.2015-tld-1.pogo_e02.bodhi.tar
tar: uboot.2015-tld-1.pogo_e02.bodhi.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
[root@alarm tmp]# tar -xf uboot.2015.10-tld-1.pogo_e02.bodhi.tar
[root@alarm tmp]# ls
systemd-private-3738705a54a34187ac52cac574f6b240-ntpd.service-8gpXDr  uboot.2015.10-tld-1.pogo_e02.mtd0.kwb
uboot.2015.10-tld-1.pogo_e02.bodhi.tar
[root@alarm tmp]# ls -a
.           .X11-unix   systemd-private-3738705a54a34187ac52cac574f6b240-ntpd.service-8gpXDr
..          .XIM-unix   uboot.2015.10-tld-1.pogo_e02.bodhi.tar
.ICE-unix   .font-unix  uboot.2015.10-tld-1.pogo_e02.mtd0.kwb
.Test-unix  .webmin
[root@alarm tmp]# flash_erase /dev/mtd0 0 4
bash: flash_erase: command not found
[root@alarm tmp]# buzybox flash_erase /dev/mtd0 0 4
bash: buzybox: command not found
[root@alarm tmp]# cd /tmp
[root@alarm tmp]# wget http://download.doozan.com/uboot/nandwrite
--2016-02-15 20:27:13--  http://download.doozan.com/uboot/nandwrite
Resolving download.doozan.com (download.doozan.com)... 50.116.34.13
Connecting to download.doozan.com (download.doozan.com)|50.116.34.13|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11500 (11K) []
Saving to: 'nandwrite'

nandwrite                   100%[===========================================>]  11.23K  72.5KB/s   in 0.2s

2016-02-15 20:27:14 (72.5 KB/s) - 'nandwrite' saved [11500/11500]

[root@alarm tmp]# wget http://download.doozan.com/uboot/flash_erase
--2016-02-15 20:27:24--  http://download.doozan.com/uboot/flash_erase
Resolving download.doozan.com (download.doozan.com)... 50.116.34.13
Connecting to download.doozan.com (download.doozan.com)|50.116.34.13|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12819 (13K) []
Saving to: 'flash_erase'

flash_erase                 100%[===========================================>]  12.52K  79.9KB/s   in 0.2s

2016-02-15 20:27:24 (79.9 KB/s) - 'flash_erase' saved [12819/12819]

[root@alarm tmp]# wget http://download.doozan.com/uboot/fw_printenv
--2016-02-15 20:27:32--  http://download.doozan.com/uboot/fw_printenv
Resolving download.doozan.com (download.doozan.com)... 50.116.34.13
Connecting to download.doozan.com (download.doozan.com)|50.116.34.13|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 668497 (653K) []
Saving to: 'fw_printenv'

fw_printenv                 100%[===========================================>] 652.83K   137KB/s   in 4.4s

2016-02-15 20:27:37 (147 KB/s) - 'fw_printenv' saved [668497/668497]

[root@alarm tmp]# flash_erase /dev/mtd0 0 4
bash: flash_erase: command not found
[root@alarm tmp]# wget http://download.doozan.com/uboot/flash_erase
--2016-02-15 20:28:31--  http://download.doozan.com/uboot/flash_erase
Resolving download.doozan.com (download.doozan.com)... 50.116.34.13
Connecting to download.doozan.com (download.doozan.com)|50.116.34.13|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12819 (13K) []
Saving to: 'flash_erase.1'

flash_erase.1               100%[===========================================>]  12.52K  78.8KB/s   in 0.2s

2016-02-15 20:28:32 (78.8 KB/s) - 'flash_erase.1' saved [12819/12819]

[root@alarm tmp]# flash_erase /dev/mtd0 0 4
bash: flash_erase: command not found
[root@alarm tmp]# ls -a
.           .X11-unix   flash_erase    systemd-private-3738705a54a34187ac52cac574f6b240-ntpd.service-8gpXDr
..          .XIM-unix   flash_erase.1  uboot.2015.10-tld-1.pogo_e02.bodhi.tar
.ICE-unix   .font-unix  fw_printenv    uboot.2015.10-tld-1.pogo_e02.mtd0.kwb
.Test-unix  .webmin     nandwrite
[root@alarm tmp]# flash_erase
bash: flash_erase: command not found
[root@alarm tmp]# chmod +x flash_erase
[root@alarm tmp]# chmod +x nandwrite
[root@alarm tmp]# chmod +x fw_printenv
[root@alarm tmp]# flash_erase /dev/mtd0 0 4
bash: flash_erase: command not found
[root@alarm tmp]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 05b00000 00020000 "data"
[root@alarm tmp]# wget http://download.doozan.com/uboot/nanddump
--2016-02-15 20:31:45--  http://download.doozan.com/uboot/nanddump
Resolving download.doozan.com (download.doozan.com)... 50.116.34.13
Connecting to download.doozan.com (download.doozan.com)|50.116.34.13|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21286 (21K) []
Saving to: 'nanddump'

nanddump                    100%[===========================================>]  20.79K  70.7KB/s   in 0.3s

2016-02-15 20:31:46 (70.7 KB/s) - 'nanddump' saved [21286/21286]

[root@alarm tmp]# chmod +x nanddump
[root@alarm tmp]# nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
bash: nanddump: command not found
[root@alarm tmp]# fw_printenv > current_envs.txt
[root@alarm tmp]# ls -a
.           .font-unix        nanddump
..          .webmin           nandwrite
.ICE-unix   current_envs.txt  systemd-private-3738705a54a34187ac52cac574f6b240-ntpd.service-8gpXDr
.Test-unix  flash_erase       uboot.2015.10-tld-1.pogo_e02.bodhi.tar
.X11-unix   flash_erase.1     uboot.2015.10-tld-1.pogo_e02.mtd0.kwb
.XIM-unix   fw_printenv
[root@alarm tmp]# mc

[root@alarm tmp]# ./nanddump
Usage: nanddump [OPTIONS] MTD-device
Dumps the contents of a nand mtd partition.

           --help               Display this help and exit
           --version            Output version information and exit
-a         --forcebinary        Force printing of binary data to tty
-c         --canonicalprint     Print canonical Hex+ASCII dump
-f file    --file=file          Dump to file
-i         --ignoreerrors       Ignore errors
-l length  --length=length      Length
-n         --noecc              Read without error correction
-o         --omitoob            Omit oob data
-b         --omitbad            Omit bad blocks from the dump
-p         --prettyprint        Print nice (hexdump)
-q         --quiet              Don't display progress and status messages
-s addr    --startaddress=addr  Start address

[root@alarm tmp]#
[root@alarm tmp]# ./nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
[root@alarm tmp]# ./flash_erase /dev/mtd0 0 4
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done
[root@alarm tmp]# ./nandwrite /dev/mtd0 uboot.2015.10-tld-1.pogo_e02.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
[root@alarm tmp]# cd /tmp
[root@alarm tmp]# wget https://www.dropbox.com/s/ap3m1lrxe9tg8ev/uboot.2014.07-tld-3.environment.bodhi.tar
--2016-02-15 20:55:30--  https://www.dropbox.com/s/ap3m1lrxe9tg8ev/uboot.2014.07-tld-3.environment.bodhi.tar
Resolving www.dropbox.com (www.dropbox.com)... 108.160.172.206, 108.160.172.238
Connecting to www.dropbox.com (www.dropbox.com)|108.160.172.206|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://dl.dropboxusercontent.com/content_link/AvfdoTfiS00Nk99b5SBWWcRmgOLpSNqi0BDTXgQ3UDl2ES5qJH4bi6EfwYzxsyEJ/file [following]
--2016-02-15 20:55:31--  https://dl.dropboxusercontent.com/content_link/AvfdoTfiS00Nk99b5SBWWcRmgOLpSNqi0BDTXgQ3UDl2ES5qJH4bi6EfwYzxsyEJ/file
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 108.160.172.69
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|108.160.172.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 143360 (140K) [application/x-tar]
Saving to: 'uboot.2014.07-tld-3.environment.bodhi.tar'

uboot.2014.07-tld-3.environ 100%[===========================================>] 140.00K   301KB/s   in 0.5s

2016-02-15 20:55:33 (301 KB/s) - 'uboot.2014.07-tld-3.environment.bodhi.tar' saved [143360/143360]

[root@alarm tmp]# tar -xf uboot.2014.07-tld-3.environment.bodhi.tar
[root@alarm tmp]# fw_printenv > current_envs2.txt
[root@alarm tmp]# /usr/sbin/flash_erase /dev/mtd0 0xc0000 1
bash: /usr/sbin/flash_erase: No such file or directory
[root@alarm tmp]# ./flash_erase /dev/mtd0 0xc0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done
[root@alarm tmp]# ./nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-3.environment.img
Writing data to block 6 at offset 0xc0000
[root@alarm tmp]# fw_setenv arcNumber 3542
[root@alarm tmp]# fw_setenv machid dd6
[root@alarm tmp]# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0               0xc0000         0x20000         0x20000
[root@alarm tmp]#  blkid
/dev/sda1: LABEL="ROOTFS" UUID="29180940-aa4d-46da-844f-6f3f29e525c6" TYPE="ext3"
[root@alarm tmp]# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0               0xc0000         0x20000         0x20000
[root@alarm tmp]# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0               0xc0000         0x20000         0x20000
[root@alarm tmp]#  fw_printenv ethaddr
ethaddr=52:3b:20:9c:11:51
[root@alarm tmp]# fw_setenv ethaddr 00:25:31:04:4B:E8
[root@alarm tmp]#  fw_printenv ethaddr
ethaddr=00:25:31:04:4B:E8
[root@alarm tmp]# fw_printenv | grep ethaddr
ethaddr=00:25:31:04:4B:E8
[root@alarm tmp]# fw_printenv mtdparts
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[root@alarm tmp]# mc

[root@alarm tmp]#
[root@alarm tmp]# mc

[root@alarm tmp]# fw_printenv dtb_file
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
[root@alarm tmp]# fw_printenv
bootcmd_exec=mw 0x800000 0 1; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else bootm 0x800000; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
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
ethact=egiga0
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x1c00000 $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x1100000 /boot/uInitrd
load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x800000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
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 ext2load $dev $disknum:1 0x800000 /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
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_import=echo importing envs ...; env import -t 0x810000
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3542
machid=dd6
ethaddr=00:25:31:04:4B:E8
[root@alarm tmp]# cat /boot/uEnv.txt
cat: /boot/uEnv.txt: No such file or directory
[root@alarm tmp]# fw_printenv preboot
## Error: "preboot" not defined
[root@alarm tmp]# fw_setenv preboot 'run preboot_nc'
[root@alarm tmp]# 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'
[root@alarm tmp]# fw_setenv ipaddr    '10.0.0.103'
[root@alarm tmp]# fw_setenv serverip '10.0.0.1'
[root@alarm tmp]# blkid
/dev/sda1: LABEL="ROOTFS" UUID="29180940-aa4d-46da-844f-6f3f29e525c6" TYPE="ext3"
[root@alarm tmp]# fw_printenv | grep ethaddr
ethaddr=00:25:31:04:4B:E8
[root@alarm tmp]#
[root@alarm tmp]# [root@alarm tmp]# blkid
bash: [root@alarm: command not found
[root@alarm tmp]# /dev/sda1: LABEL="ROOTFS" UUID="29180940-aa4d-46da-844f-6f3f29e525c6" TYPE="ext3"
bash: /dev/sda1:: No such file or directory
[root@alarm tmp]# [root@alarm tmp]# fw_printenv | grep ethaddr
bash: [root@alarm: command not found
[root@alarm tmp]# fw_printenv
bootcmd_exec=mw 0x800000 0 1; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else bootm 0x800000; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
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
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x1c00000 $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x1100000 /boot/uInitrd
load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x800000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
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 ext2load $dev $disknum:1 0x800000 /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
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=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3542
machid=dd6
ethaddr=00:25:31:04:4B:E8
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
ipaddr=10.0.0.103
serverip=10.0.0.1
[root@alarm tmp]# [root@alarm tmp]# fw_printenv
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x1c00000 $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x1100000 /boot/uInitrd
load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x800000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
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 ext2load $dev $disknum:1 0x800000 /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
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=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3542
machid=dd6
ethaddr=00:25:31:04:4B:E8
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
ipaddr=10.0.0.103
serverip=10.0.0.1
bash: [root@alarm: command not found
[root@alarm tmp]# bootcmd_exec=mw 0x800000 0 1; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else bootm 0x800000; fi; fi
bash: 0x800000: command not found
bash: run: command not found
bash: run: command not found
bash: run: command not found
bash: bootm: command not found
[root@alarm tmp]# bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bash: bootcmd_uenv: command not found
bash: run: command not found
bash: run: command not found
bash: run: command not found
[root@alarm tmp]# bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bash: uenv_load: command not found
bash: test: -eq: unary operator expected
[root@alarm tmp]# bootdelay=10
[root@alarm tmp]# bootdev=usb
[root@alarm tmp]# device=0:1
[root@alarm tmp]# devices=usb ide mmc
bash: ide: command not found
[root@alarm tmp]# disks=0 1 2 3
bash: 1: command not found
[root@alarm tmp]# ethact=egiga0
[root@alarm tmp]# if_netconsole=ping $serverip
[root@alarm tmp]# led_error=orange blinking
bash: blinking: command not found
[root@alarm tmp]# led_exit=green off
bash: off: command not found
[root@alarm tmp]# led_init=green blinking
bash: blinking: command not found
[root@alarm tmp]# dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
[root@alarm tmp]# load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x1c00000 $dtb_file
bash: loading: command not found
bash: ext2load: command not found
[root@alarm tmp]# load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x1100000 /boot/uInitrd
bash: loading: command not found
bash: ext2load: command not found
[root@alarm tmp]# load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x800000 /boot/uImage
bash: loading: command not found
bash: ext2load: command not found
[root@alarm tmp]# mainlineLinux=yes
[root@alarm tmp]# mtdids=nand0=orion_nand
[root@alarm tmp]# mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bash: syntax error near unexpected token `('
[root@alarm tmp]# partition=nand0,2
[root@alarm tmp]# 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 ext2load $dev $disknum:1 0x800000 /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
bash: running: command not found
bash: setenv: command not found
bash: setenv: command not found
bash: setenv: command not found
[root@alarm tmp]# set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
bash: bootargs: command not found
[root@alarm tmp]# start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
bash: ncip: command not found
bash: setenv: command not found
bash: setenv: command not found
bash: setenv: command not found
bash: setenv: command not found
bash: version: command not found
[root@alarm tmp]# stderr=serial
[root@alarm tmp]# stdin=serial
[root@alarm tmp]# stdout=serial
[root@alarm tmp]# uenv_import=echo importing envs ...; env import -t 0x810000
bash: importing: command not found
env: import: No such file or directory
[root@alarm tmp]# 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;
bash: init_usb: command not found
bash: setenv: command not found
bash: setenv: command not found
[root@alarm tmp]# 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;
bash: uenv_init_devices: command not found
bash: setenv: command not found
[root@alarm tmp]# 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
bash: syntax error near unexpected token `then'
[root@alarm tmp]# uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
bash: loading: command not found
bash: load: command not found
[root@alarm tmp]# usb_ready_retry=15
[root@alarm tmp]# arcNumber=3542
[root@alarm tmp]# machid=dd6
[root@alarm tmp]# ethaddr=00:25:31:04:4B:E8
[root@alarm tmp]# preboot=run preboot_nc
bash: preboot_nc: command not found
[root@alarm tmp]# 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
bash: syntax error near unexpected token `;'
[root@alarm tmp]# ipaddr=10.0.0.103
[root@alarm tmp]# serverip=10.0.0.1
[root@alarm tmp]# fw_printenv
bootcmd_exec=mw 0x800000 0 1; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else bootm 0x800000; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
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
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x1c00000 $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x1100000 /boot/uInitrd
load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x800000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
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 ext2load $dev $disknum:1 0x800000 /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
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=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3542
machid=dd6
ethaddr=00:25:31:04:4B:E8
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
ipaddr=10.0.0.103
serverip=10.0.0.1
[root@alarm tmp]# reboot
