root@192.168.100.145's password:
Linux debian 3.18.5-oxnas-tld-1 #2 SMP PREEMPT Thu Feb 12 11:17:40 PST 2015 armv6l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Apr 25 09:41:41 2015 from xps8700
root@debian:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"
root@debian:~# cd /tmp
root@debian:/tmp# wget http://download.qnology.com/pogoplug/v4/fw_printenv
--2015-04-25 09:42:39-- http://download.qnology.com/pogoplug/v4/fw_printenv
Resolving download.qnology.com (download.qnology.com)... 162.252.240.221
Connecting to download.qnology.com (download.qnology.com)|162.252.240.221|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 668497 (653K) [text/plain]
Saving to: `fw_printenv'
100%[======================================>] 668,497 507K/s in 1.3s
2015-04-25 09:42:40 (507 KB/s) - `fw_printenv' saved [668497/668497]
root@debian:/tmp# wget http://download.qnology.com/pogoplug/v4/fw_setenv
--2015-04-25 09:42:40-- http://download.qnology.com/pogoplug/v4/fw_setenv
Resolving download.qnology.com (download.qnology.com)... 162.252.240.221
Connecting to download.qnology.com (download.qnology.com)|162.252.240.221|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 668497 (653K) [text/plain]
Saving to: `fw_setenv'
100%[======================================>] 668,497 439K/s in 1.5s
2015-04-25 09:42:42 (439 KB/s) - `fw_setenv' saved [668497/668497]
root@debian:/tmp# wget http://download.qnology.com/pogoplug/v4/ubiattach
--2015-04-25 09:42:42-- http://download.qnology.com/pogoplug/v4/ubiattach
Resolving download.qnology.com (download.qnology.com)... 162.252.240.221
Connecting to download.qnology.com (download.qnology.com)|162.252.240.221|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18192 (18K) [text/plain]
Saving to: `ubiattach'
100%[======================================>] 18,192 --.-K/s in 0.09s
2015-04-25 09:42:42 (191 KB/s) - `ubiattach' saved [18192/18192]
root@debian:/tmp# wget http://download.qnology.com/pogoplug/v4/ubimkvol
--2015-04-25 09:42:42-- http://download.qnology.com/pogoplug/v4/ubimkvol
Resolving download.qnology.com (download.qnology.com)... 162.252.240.221
Connecting to download.qnology.com (download.qnology.com)|162.252.240.221|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21652 (21K) [text/plain]
Saving to: `ubimkvol'
100%[======================================>] 21,652 --.-K/s in 0.09s
2015-04-25 09:42:43 (223 KB/s) - `ubimkvol' saved [21652/21652]
root@debian:/tmp# wget http://download.qnology.com/pogoplug/v4/ubiformat
--2015-04-25 09:42:43-- http://download.qnology.com/pogoplug/v4/ubiformat
Resolving download.qnology.com (download.qnology.com)... 162.252.240.221
Connecting to download.qnology.com (download.qnology.com)|162.252.240.221|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 54332 (53K) [text/plain]
Saving to: `ubiformat'
100%[======================================>] 54,332 275K/s in 0.2s
2015-04-25 09:42:43 (275 KB/s) - `ubiformat' saved [54332/54332]
root@debian:/tmp# chmod +x fw_printenv fw_setenv ubiattach ubimkvol ubiformat
root@debian:/tmp# /tmp/ubiformat /dev/mtd1
ubiformat: mtd1 (nand), size 119537664 bytes (114.0 MiB), 912 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 911 -- 100 % complete
ubiformat: 911 eraseblocks have valid erase counter, mean value is 7
ubiformat: 1 bad eraseblocks found, numbers: 471
ubiformat: formatting eraseblock 911 -- 100 % complete
root@debian:/tmp# /tmp/ubiattach /dev/ubi_ctrl -m 1
UBI device number 0, total 911 LEBs (117540864 bytes, 112.1 MiB), available 888 LEBs (114573312 bytes, 109.3 MiB), LEB size 129024 bytes (126.0 KiB)
root@debian:/tmp# /tmp/ubimkvol /dev/ubi0 -m -N rootfs
Set volume size to 114573312
Volume ID 0, size 888 LEBs (114573312 bytes, 109.3 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs", alignment 1
root@debian:/tmp# mkdir /tmp/ubi
root@debian:/tmp# mount -t ubifs ubi0:rootfs /tmp/ubi
root@debian:/tmp# cd /tmp
root@debian:/tmp# wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar
--2015-04-25 09:43:28-- http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar
Resolving downloads.openwrt.org (downloads.openwrt.org)... 78.24.191.177
Connecting to downloads.openwrt.org (downloads.openwrt.org)|78.24.191.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3624960 (3.5M) [application/octet-stream]
Saving to: `openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar'
100%[======================================>] 3,624,960 601K/s in 6.2s
2015-04-25 09:43:35 (567 KB/s) - `openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar' saved [3624960/3624960]
root@debian:/tmp# tar -xvf openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar
sysupgrade-pogoplug-pro/
sysupgrade-pogoplug-pro/CONTROL
sysupgrade-pogoplug-pro/kernel
sysupgrade-pogoplug-pro/root
root@debian:/tmp# apt-get install squashfs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
squashfs-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@debian:/tmp# unsquashfs sysupgrade-pogoplug-pro/root
Parallel unsquashfs: Using 2 processors
584 inodes (583 blocks) to write
[===============================================================\] 583/583 100%
created 346 files
created 58 directories
created 237 symlinks
created 1 devices
created 0 fifos
root@debian:/tmp# mv squashfs-root/* /tmp/ubi
root@debian:/tmp# mkdir -p /tmp/ubi/boot
root@debian:/tmp# cd /tmp/ubi/boot
root@debian:/tmp/ubi/boot# wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-zImage
--2015-04-25 09:44:16-- http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-zImage
Resolving downloads.openwrt.org (downloads.openwrt.org)... 78.24.191.177
Connecting to downloads.openwrt.org (downloads.openwrt.org)|78.24.191.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1694408 (1.6M) [application/octet-stream]
Saving to: `openwrt-oxnas-zImage'
100%[======================================>] 1,694,408 572K/s in 2.9s
2015-04-25 09:44:20 (572 KB/s) - `openwrt-oxnas-zImage' saved [1694408/1694408]
root@debian:/tmp/ubi/boot# mv openwrt-oxnas-zImage zImage
root@debian:/tmp/ubi/boot# wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro.dtb
--2015-04-25 09:44:26-- http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro.dtb
Resolving downloads.openwrt.org (downloads.openwrt.org)... 78.24.191.177
Connecting to downloads.openwrt.org (downloads.openwrt.org)|78.24.191.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6993 (6.8K) [application/octet-stream]
Saving to: `openwrt-oxnas-pogoplug-pro.dtb'
100%[======================================>] 6,993 --.-K/s in 0.003s
2015-04-25 09:44:27 (1.97 MB/s) - `openwrt-oxnas-pogoplug-pro.dtb' saved [6993/6993]
root@debian:/tmp/ubi/boot# wget http://download.qnology.com/pogoplug/oxnas/ox820-pogoplug-classic.dtb
--2015-04-25 09:44:30-- http://download.qnology.com/pogoplug/oxnas/ox820-pogoplug-classic.dtb
Resolving download.qnology.com (download.qnology.com)... 162.252.240.221
Connecting to download.qnology.com (download.qnology.com)|162.252.240.221|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7033 (6.9K) [text/plain]
Saving to: `ox820-pogoplug-classic.dtb'
100%[======================================>] 7,033 --.-K/s in 0.003s
2015-04-25 09:44:31 (2.35 MB/s) - `ox820-pogoplug-classic.dtb' saved [7033/7033]
root@debian:/tmp/ubi/boot# ls
. .. openwrt-oxnas-pogoplug-pro.dtb ox820-pogoplug-classic.dtb zImage
root@debian:/tmp/ubi/boot# cd ..
root@debian:/tmp/ubi# ls -ls
total 4
0 drwxr-xr-x 17 root root 1248 Apr 25 09:44 .
0 drwxrwxrwt 7 root root 260 Apr 25 09:43 ..
0 drwxr-xr-x 2 root root 3712 Apr 23 05:16 bin
0 drwxr-xr-x 2 root root 400 Apr 25 09:44 boot
0 drwxr-xr-x 2 root root 224 Apr 22 18:49 dev
0 drwxr-xr-x 14 root root 2832 Apr 23 05:16 etc
4 -rwxrwxr-x 1 root root 78 Dec 13 10:56 init
0 drwxrwxr-x 10 root root 2648 Apr 23 05:16 lib
0 drwxr-xr-x 2 root root 160 Apr 22 18:49 mnt
0 drwxr-xr-x 2 root root 160 Apr 22 18:49 overlay
0 drwxr-xr-x 2 root root 160 Apr 22 18:49 proc
0 drwxrwxr-x 2 root root 224 Apr 23 05:16 rom
0 drwxr-xr-x 2 root root 160 Apr 22 18:49 root
0 drwxr-xr-x 2 root root 6136 Apr 23 05:16 sbin
0 drwxr-xr-x 2 root root 160 Apr 22 18:49 sys
0 drwxrwxrwt 2 root root 160 Apr 23 05:16 tmp
0 drwxr-xr-x 6 root root 416 Apr 22 21:57 usr
0 lrwxrwxrwx 1 root root 4 Apr 25 09:43 var -> /tmp
0 drwxr-xr-x 2 root root 160 Apr 22 18:49 www
root@debian:/tmp/ubi# sync
root@debian:/tmp/ubi# cd /
root@debian:/# umount /tmp/ubi
root@debian:/# #Setup uBoot Environment
root@debian:/# #Cut and Paste this whole section
root@debian:/# /tmp/fw_setenv zimage '/boot/zImage'
root@debian:/# /tmp/fw_setenv loadaddr '0x60500000'
root@debian:/# /tmp/fw_setenv fdt_addr '0x62c00000'
root@debian:/# /tmp/fw_setenv loadubi 'echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi'
root@debian:/# /tmp/fw_setenv mountubi 'ubi part data; ubifsmount ubi0:rootfs'
root@debian:/# /tmp/fw_setenv loadubizimage 'ubifsload ${loadaddr} ${zimage}'
root@debian:/# /tmp/fw_setenv loadubifdt 'ubifsload ${fdt_addr} ${fdt_file_ubi}'
root@debian:/# /tmp/fw_setenv bootzubi 'echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};'
root@debian:/# /tmp/fw_setenv setargsubi 'setenv bootargs console=ttyS0,115200n8 ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}'
root@debian:/# /tmp/fw_setenv fdt_file_ubi '/boot/openwrt-oxnas-pogoplug-pro.dtb'
root@debian:/# /tmp/fw_setenv dt_bootcmd_usb 'usb start; run dt_usb_bootcmd; usb stop'
root@debian:/# /tmp/fw_setenv bootcmd 'run dt_bootcmd_usb; run loadubi; reset'
root@debian:/#
root@debian:/#
root@debian:/# /tmp/fw_printenv
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dtb_addr=0x62c00000
ethact=mii0
ethaddr=00:25:31:01:b7:44
fdt_file=/boot/dts/ox820-pogoplug-pro.dtb
if_netconsole=ping $serverip
ipaddr=192.168.100.10
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot=run preboot_nc
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.1.100
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
stderr=serial
stdin=serial
stdout=serial
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_device=0:1
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
zimage=/boot/zImage
loadaddr=0x60500000
fdt_addr=0x62c00000
loadubi=echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi
mountubi=ubi part data; ubifsmount ubi0:rootfs
loadubizimage=ubifsload ${loadaddr} ${zimage}
loadubifdt=ubifsload ${fdt_addr} ${fdt_file_ubi}
bootzubi=echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};
setargsubi=setenv bootargs console=ttyS0,115200n8 ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}
fdt_file_ubi=/boot/openwrt-oxnas-pogoplug-pro.dtb
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop
bootcmd=run dt_bootcmd_usb; run loadubi; reset
root@debian:/#
root@debian:/# poweroff
Broadcast message from root@debian (pts/0) (Sat Apr 25 09:45:52 2015):
The system is going down for system halt NOW!
root@debian:/#
It is really great that we are able to do this technical stuff. This will indeed is very useful.
ReplyDeleteJonathan Dradford (kitchen remodeling)