|
HowTo: openWrt on OXNAS boxes August 01, 2022 07:54AM |
Registered: 14 years ago Posts: 159 |
fw_setenv mtdparts 'mtdparts=41000000.nand:14m(boot),-(data)' fw_setenv partition 'nand0,0' fw_setenv set_bootargs_owrt 'setenv bootargs console=ttyS0,115200 $mtdparts' fw_setenv bootcmd_owrt 'run set_bootargs_owrt; nboot 60500000 0 440000; bootm'
fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt'
/targets/oxnas/ox820/Then, download the uImage appropriate for your box. Rename it to uImage and place it in the root of a FAT32 formatted USD device.
nc -l -u -p 6666Wait until after a few error messages you see the prompt, e.g.
OX820>in the console window (alternatively, you can force this via a keystroke during the bootdelay, if you configured one).
nand erase.part data
usb reset; fatload usb 0 0x60500000 uImage; bootm 0x60500000This should end with
Starting kernel ...in the console output, meaning that OpenWrt is now running in RAM.
root@OpenWrt:# cat /proc/mtd dev: size erasesize name mtd0: 00e00000 00020000 "boot" mtd1: 07200000 00020000 "data"
root@OpenWrt:~# cat /proc/mtd dev: size erasesize name mtd0: 00040000 00020000 "stage1" mtd1: 00380000 00020000 "u-boot" mtd2: 00080000 00020000 "u-boot-env" mtd3: 009c0000 00020000 "kernel" mtd4: 07200000 00020000 "ubi"
/dev/mtd1 0xc0000 0x20000 0x20000If not or if the file does not exist at all, the easiest way to modify/generate it is
echo '/dev/mtd1 0xc0000 0x20000 0x20000' > /etc/fw_env.config
fw_printenv
opkg update && opkg install nano
opkg update opkg install ca-certificates cd /tmp wget <URL of our desired sysupgrade file> sysupgrade <name of our desired sysupgrade file>The desired upgrade file may be found the same way as we found the image in step 2 above starting from the release page (but, ideally, you kept the browser tab open in step 2). There you can just copy the link address to the sysupgrade file (tar or bin depending on the release) and paste it into the ssh window.
root@OpenWrt:~# fw_setenv testvar 'something' Can't open /dev/mtd1: Permission denied Error: can't write fw_env to flashSo, (as of August 15th, 2022) some additional work will be needed to make OpenWrt a viable option as a rescue system in connection with bodhi's uBoot.
opkg update opkg install nanoThen you can use nano for the upcoming modifications (and opkg to install a bunch of additional packages, if you so desire).
nano /etc/config/networkModify this by specifying the MAC-address (option macaddr) of your box at the appropriate locations. This should look like:
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'xxxx:yyyy:zzzz::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
# add option here
option macaddr '00:25:31:xx:yy:zz'
config interface 'lan'
option device 'br-lan'
option proto 'dhcp'
config interface 'lan6'
option device 'br-lan'
option proto 'dhcpv6'
config device
option name 'eth0'
# add option here
option macaddr '00:25:31:xx:yy:zz'
Option2: using LUCI WIF
config ubootenv
option dev '/dev/mtd1'
option offset '0xc0000'
option envsize '0x2000'
option secsize '0x2000'
option numsec '1'
Unfortunately, this also does not yield a writeable uBoot-environment ...
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 10:15AM |
Registered: 14 years ago Posts: 159 |
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
hwaddress ether 00:25:31:XX:YY:ZZ
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 10:17AM |
Registered: 8 years ago Posts: 378 |
nand@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
nand-ecc-mode = "soft";
nand-ecc-algo = "hamming";
partition@0 {
label = "boot";
reg = <0x00000000 0xe00000>;
};
partition@e00000 {
label = "data";
reg = <0x00e00000 0x07200000>;
};
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 11:21AM |
Registered: 8 years ago Posts: 378 |
...
partition@0 {
label = "stage1";
reg = <0x00000000 0x00040000>;
read-only;
};
partition@40000 {
label = "u-boot";
reg = <0x00040000 0x00380000>;
read-only;
};
partition@3c0000 {
label = "u-boot-env";
reg = <0x003c0000 0x00080000>;
};
...
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 03:15PM |
Admin Registered: 14 years ago Posts: 19,911 |
Check whether the file /etc/fw_env.config has the following contents (which is easily calculated from the above MTD layout in comparison to bodhi's): /dev/mtd1 0xc0000 0x20000 0x20000
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 04:37PM |
Admin Registered: 14 years ago Posts: 19,911 |
setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)'
cat /proc/cmdlineExpected output would include the mtdparts above.
cat /proc/mtdExpected output would be the new mtd layout (but match most of original owrt definition for the last 3 mtds)
config ubootenv
option dev '/dev/mtd2'
option offset '0x0'
option envsize '0x2000'
option secsize '0x2000'
option numsec '1'
echo '/dev/mtd2 0x0 0x20000 0x20000' > /etc/fw_env.config
fw_printenvor
blparam
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 04:43PM |
Admin Registered: 14 years ago Posts: 19,911 |
setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)'
cat /proc/cmdlineExpected output would include the mtdparts above.
cat /proc/mtdExpected output would be the new mtd layout (but match most of original owrt definition for the last 3 mtds)
config ubootenv
option dev '/dev/mtd1'
option offset '0x0'
option envsize '0x2000'
option secsize '0x2000'
option numsec '1'
echo '/dev/mtd1 0x0 0x20000 0x20000' > /etc/fw_env.config
fw_printenv
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 04:45PM |
Admin Registered: 14 years ago Posts: 19,911 |
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 05:13PM |
Registered: 14 years ago Posts: 159 |
OX820> setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' OX820> run bootcmd_owrt run bootcmd_owrt Loading from nand0, offset 0x440000 Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574642 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 Skipping bad block 0x004e0000 ## Booting kernel from Legacy Image at 60500000 ... Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574642 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK Starting kernel ...
BusyBox v1.33.2 (2022-04-16 12:59:34 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.3, r16554-1d4dea6d4f
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# cat /proc/cmdline
earlyprintk console=ttyS0,115200
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "stage1"
mtd1: 00380000 00020000 "u-boot"
mtd2: 00080000 00020000 "u-boot-env"
mtd3: 009c0000 00020000 "kernel"
mtd4: 07200000 00020000 "ubi"
root@OpenWrt:~#
root@OpenWrt:~# cd /etc/config/
root@OpenWrt:/etc/config# cp ubootenv ubootenv_bodhi
root@OpenWrt:/etc/config# nano ubootenv
root@OpenWrt:/etc/config# cp ubootenv ubootenv_owrt
root@OpenWrt:/etc/config# cd ..
root@OpenWrt:/etc# cp fw_env.config fw_env.config_bodhi
root@OpenWrt:/etc# nano fw_env.config
root@OpenWrt:/etc# cp fw_env.config fw_env.config_owrt
root@OpenWrt:/etc# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
root@OpenWrt:/etc# blparam
-ash: blparam: not found
root@OpenWrt:/etc#
OX820> setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' OX820> run bootcmd_lede run bootcmd_lede Loading from nand0, offset 0x440000 Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574642 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 Skipping bad block 0x004e0000 ## Booting kernel from Legacy Image at 60500000 ... Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574642 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK Starting kernel ...
BusyBox v1.33.2 (2022-04-16 12:59:34 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.3, r16554-1d4dea6d4f
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# cat /proc/cmdline
earlyprintk console=ttyS0,115200
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "stage1"
mtd1: 00380000 00020000 "u-boot"
mtd2: 00080000 00020000 "u-boot-env"
mtd3: 009c0000 00020000 "kernel"
mtd4: 07200000 00020000 "ubi"
root@OpenWrt:~#
root@OpenWrt:~# cd /etc
root@OpenWrt:/etc# nano fw_env.config
root@OpenWrt:/etc# cd config/
root@OpenWrt:/etc/config# nano ubootenv
root@OpenWrt:/etc/config# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
root@OpenWrt:/etc/config#
root@OpenWrt:/etc# cp fw_env.config_bodhi fw_env.config root@OpenWrt:/etc# fw_printenv bootcmd_exec bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi; fi
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 05:31PM |
Admin Registered: 14 years ago Posts: 19,911 |
root@OpenWrt:~# cat /proc/cmdline earlyprintk console=ttyS0,115200
setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' printenv bootcmd_ledeor just print the whole envs set so I can see why it was missing:
printenv
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 07:02PM |
Registered: 8 years ago Posts: 378 |
BusyBox v1.33.1 (2021-10-24 09:01:35 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.1, r16325-88151b8303
-----------------------------------------------------
root@OpenWrt:~# cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
# pogoplug pro
/dev/mtd0 0x00100000 0x20000 0x20000
root@OpenWrt:~# fw_setenv joe doe
root@OpenWrt:~# fw_printenv joe
joe=doe
root@OpenWrt:~# fw_setenv joe
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"
root@OpenWrt:~#
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 07:21PM |
Registered: 14 years ago Posts: 159 |
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 07:26PM |
Registered: 8 years ago Posts: 378 |
Linux pogopronfs 5.4.101-oxnas-tld-1 #1.0 SMP PREEMPT Sat Feb 27 20:19:53 PST 2021 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: Thu Feb 3 18:03:10 2022 from 192.168.7.87 root@pogopronfs:~# cat /etc/fw_env.config # MTD device name Device offset Env. size Flash sector size Number of sectors # pogoplug pro /dev/mtd0 0x00100000 0x20000 0x20000 root@pogopronfs:~# fw_setenv joe doe root@pogopronfs:~# fw_printenv joe joe=doe root@pogopronfs:~# fw_setenv joe root@pogopronfs:~# cat /proc/mtd dev: size erasesize name mtd0: 00e00000 00020000 "boot" mtd1: 07200000 00020000 "data" root@pogopronfs:~#
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 07:30PM |
Registered: 8 years ago Posts: 378 |
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 07:45PM |
Registered: 14 years ago Posts: 159 |
> root@OpenWrt:~# cat /proc/cmdline > earlyprintk console=ttyS0,115200 >>
> setenv mtdparts > 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' > printenv bootcmd_lede >> or just print the whole envs set so I can see why
> printenv >
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 07:57PM |
Admin Registered: 14 years ago Posts: 19,911 |
|
Re: HowTo: openWrt on OXNAS boxes August 01, 2022 10:47PM |
Registered: 8 years ago Posts: 378 |
BusyBox v1.33.1 (2021-10-24 09:01:35 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.1, r16325-88151b8303
-----------------------------------------------------
root@OpenWrt:~# free
total used free shared buff/cache available
Mem: 120516 12324 102700 48 5492 80848
Swap: 0 0 0
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 103220 10516 92704 10% /
tmpfs 60256 48 60208 0% /tmp
tmpfs 512 0 512 0% /dev
root@OpenWrt:~# uname -a
Linux OpenWrt 5.10.82 #0 SMP Sat Dec 4 00:39:11 2021 armv6l GNU/Linux
root@OpenWrt:~# ls
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 103220 10516 92704 10% /
tmpfs 60256 48 60208 0% /tmp
tmpfs 512 0 512 0% /dev
root@OpenWrt:~# ls
root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# s
-ash: s: not found
root@OpenWrt:/tmp# ls
TZ extroot resolv.conf shm tmp
board.json lock resolv.conf.d state
etc log run sysinfo
root@OpenWrt:/tmp# cd /boot
root@OpenWrt:/boot# ls -l
-rw-r--r-- 1 root root 3868064 Feb 3 01:11 kernel
root@OpenWrt:/boot# cat /proc/mtd
dev: size erasesize name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"
root@OpenWrt:/boot# df
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 103220 10516 92704 10% /
tmpfs 60256 48 60208 0% /tmp
tmpfs 512 0 512 0% /dev
root@OpenWrt:/boot# cd /tmp
root@OpenWrt:/tmp# wget -c https://downloads.openwrt.org/releases/21.02.3/target
s/oxnas/ox820/openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplugpro-ubifs-sysupgr
ade.tar
Downloading 'https://downloads.openwrt.org/releases/21.02.3/targets/oxnas/ox820/openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplugpro-ubifs-sysupgrade.tar';
Connecting to 168.119.138.211:443
Writing to 'openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplugpro-ubifs-sysupgrade.tar'
openwrt-21.02.3-oxna 100% |*******************************| 11310k 0:00:00 ETA
Download completed (11581772 bytes)
root@OpenWrt:/tmp# sysupgrade -v openwrt-21.02.3-oxnas-ox820-cloudengines_pogopl
ugpro-ubifs-sysupgrade.tar
Tue Aug 2 03:29:35 UTC 2022 upgrade: Saving config files...
etc/config/dropbear
etc/config/firewall
etc/config/fstab
etc/config/luci
etc/config/mdadm
etc/config/network
etc/config/rpcd
etc/config/system
etc/config/ubootenv
etc/config/ucitrack
etc/config/uhttpd
etc/dropbear/dropbear_ed25519_host_key
etc/dropbear/dropbear_rsa_host_key
etc/fw_env.config
etc/group
etc/hosts
etc/inittab
etc/luci-uploads/.placeholder
etc/opkg/keys/2f8b0b98e08306bf
etc/passwd
etc/profile
etc/rc.local
etc/shadow
etc/shells
etc/shinit
etc/sysctl.conf
etc/uhttpd.crt
etc/uhttpd.key
etc/uhttpd.key
etc/uhttpd.crt
Tue Aug 2 03:29:35 UTC 2022 upgrade: Commencing upgrade. Closing all shell sessions.
Connection to 192.168.7.148 closed by remote host.
Connection to 192.168.7.148 closed.
pi@DreamNFS:~$ ssh root@192.168.7.216
The authenticity of host '192.168.7.216 (192.168.7.216)' can't be established.
ED25519 key fingerprint is SHA256:R8zNsCUzQwWhOzKPikBdekZKJXBLfHiTIjmJfrBPfZE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.7.216' (ED25519) to the list of known hosts.
root@192.168.7.216's password:
BusyBox v1.33.1 (2021-10-24 09:01:35 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.1, r16325-88151b8303
-----------------------------------------------------
root@OpenWrt:~# uname -a
Linux OpenWrt 5.10.82 #0 SMP Sat Dec 4 00:39:11 2021 armv6l GNU/Linux
root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# ls
TZ extroot resolv.conf shm tmp
board.json lock resolv.conf.d state
etc log run sysinfo
root@OpenWrt:/tmp# wget -c https://downloads.openwrt.org/releases/21.02.3/target
s/oxnas/ox820/openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplugpro-ubifs-ubinize
d.bin
Downloading 'https://downloads.openwrt.org/releases/21.02.3/targets/oxnas/ox820/openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplugpro-ubifs-ubinized.bin';
Connecting to 168.119.138.211:443
Writing to 'openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplugpro-ubifs-ubinized.bin'
openwrt-21.02.3-oxna 100% |*******************************| 8192k 0:00:00 ETA
Download completed (8388608 bytes)
root@OpenWrt:/tmp# sysupgrade -v openwrt-21.02.3-oxnas-ox820-cloudengines_pogopl
ugpro-ubifs-ubinized.bin
Tue Aug 2 03:34:23 UTC 2022 upgrade: Image metadata not present
Tue Aug 2 03:34:23 UTC 2022 upgrade: Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware
Image check failed.
root@OpenWrt:/tmp# sysupgrade -v -F openwrt-21.02.3-oxnas-ox820-cloudengines_pog
oplugpro-ubifs-ubinized.bin
Tue Aug 2 03:35:09 UTC 2022 upgrade: Image metadata not present
Image check failed but --force given - will update anyway!
Tue Aug 2 03:35:09 UTC 2022 upgrade: Saving config files...
etc/config/dropbear
etc/config/firewall
etc/config/fstab
etc/config/luci
etc/config/mdadm
etc/config/network
etc/config/rpcd
etc/config/system
etc/config/ubootenv
etc/config/ucitrack
etc/config/uhttpd
etc/dropbear/dropbear_ed25519_host_key
etc/dropbear/dropbear_rsa_host_key
etc/fw_env.config
etc/group
etc/hosts
etc/inittab
etc/luci-uploads/.placeholder
etc/opkg/keys/2f8b0b98e08306bf
etc/passwd
etc/profile
etc/rc.local
etc/shadow
etc/shells
etc/shinit
etc/sysctl.conf
etc/uhttpd.crt
etc/uhttpd.key
etc/uhttpd.key
etc/uhttpd.crt
Tue Aug 2 03:35:09 UTC 2022 upgrade: Commencing upgrade. Closing all shell sessions.
Connection to 192.168.7.216 closed by remote host.
Connection to 192.168.7.216 closed.
pi@DreamNFS:~$ ssh root@192.168.7.172
The authenticity of host '192.168.7.172 (192.168.7.172)' can't be established.
ED25519 key fingerprint is SHA256:R8zNsCUzQwWhOzKPikBdekZKJXBLfHiTIjmJfrBPfZE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.7.172' (ED25519) to the list of known hosts.
root@192.168.7.172's password:
BusyBox v1.33.1 (2021-10-24 09:01:35 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.1, r16325-88151b8303
-----------------------------------------------------
root@OpenWrt:~#
root@m300:~# ncat -l -u -p 6666
U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820
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... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Reset IDE: SATA PHY not ready for device 0
ide_preinit failed
no USB devices available
no IDE devices available
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: SATA PHY not ready for device 0
ide_preinit failed
device ide 0:1
** Bad device size - 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 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/ox820-pogoplug-pro.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI: attached mtd1 (name "mtd=1", size 114 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
UBI: VID header offset: 512 (aligned 512), data offset: 2048
UBI: good PEBs: 911, bad PEBs: 1, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 1508376787
UBI: available PEBs: 0, total reserved PEBs: 911, PEBs reserved for bad PEB handling: 19
Loading file '/boot/kernel' to addr 0x60500000 with size 3868064 (0x003b05a0)...
Done
## Booting kernel from Legacy Image at 60500000 ...
Image Name: ARM OpenWrt Linux-5.10.82
Created: 2021-12-04 0:39:11 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3868000 Bytes = 3.7 MiB
Load Address: 60008000
Entry Point: 60008000
Verifying Checksum ... OK
Starting kernel ...
U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820
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... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Reset IDE: SATA PHY not ready for device 0
ide_preinit failed
no USB devices available
no IDE devices available
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: SATA PHY not ready for device 0
ide_preinit failed
device ide 0:1
** Bad device size - 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 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/ox820-pogoplug-pro.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI: attached mtd1 (name "mtd=1", size 114 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
UBI: VID header offset: 512 (aligned 512), data offset: 2048
UBI: good PEBs: 911, bad PEBs: 1, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 1508376787
UBI: available PEBs: 0, total reserved PEBs: 911, PEBs reserved for bad PEB handling: 19
Loading file '/boot/kernel' to addr 0x60500000 with size 3868064 (0x003b05a0)...
Done
## Booting kernel from Legacy Image at 60500000 ...
Image Name: ARM OpenWrt Linux-5.10.82
Created: 2021-12-04 0:39:11 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3868000 Bytes = 3.7 MiB
Load Address: 60008000
Entry Point: 60008000
Verifying Checksum ... OK
Starting kernel ...
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 06:42AM |
Registered: 14 years ago Posts: 159 |
fw_setenv mtdparts 'mtdparts=41000000.nand:14m(boot),-(data)' fw_setenv partition 'nand0,0' fw_setenv set_bootargs_owrt 'setenv bootargs console=ttyS0,115200 $mtdparts' fw_setenv bootcmd_owrt 'run set_bootargs_owrt; nboot 60500000 0 440000; bootm' fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt'
root@OpenWrt:~# fw_printenv | tail -n 5 mtdparts=mtdparts=41000000.nand:14m(boot),-(data) partition=nand0,0 set_bootargs_owrt=setenv bootargs console=ttyS0,115200 $mtdparts bootcmd_owrt=run set_bootargs_owrt; nboot 60500000 0 440000; bootm bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt root@OpenWrt:~# cat /etc/fw_env.config /dev/mtd1 0xc0000 0x20000 0x20000 root@OpenWrt:~# cat /etc/config/ubootenv config ubootenv option dev '/dev/mtd1' option offset '0xc0000' option envsize '0x2000' option secsize '0x2000' option numsec '1' root@OpenWrt:~# cat /proc/cmdline earlyprintk console=ttyS0,115200 root@OpenWrt:~# cat /proc/mtd dev: size erasesize name mtd0: 00040000 00020000 "stage1" mtd1: 00380000 00020000 "u-boot" mtd2: 00080000 00020000 "u-boot-env" mtd3: 009c0000 00020000 "kernel" mtd4: 07200000 00020000 "ubi" root@OpenWrt:~#
OX820> setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' OX820> run bootcmd_owrt run bootcmd_owrt Loading from nand0, offset 0x440000 Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574642 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 Skipping bad block 0x004e0000 ## Booting kernel from Legacy Image at 60500000 ... Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574642 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK Starting kernel ...
root@OpenWrt:~# fw_printenv | tail -n 5
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
partition=nand0,0
set_bootargs_owrt=setenv bootargs console=ttyS0,115200 $mtdparts
bootcmd_owrt=run set_bootargs_owrt; nboot 60500000 0 440000; bootm
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt
root@OpenWrt:~# cp /etc/fw_env.config_test1 /etc/fw_env.config && cp /etc/config/ubootenv_test1 /etc/config/ubootenv
root@OpenWrt:~# cat /etc/fw_env.config
/dev/mtd2 0x0 0x20000 0x20000
root@OpenWrt:~# cat /etc/config/ubootenv
config ubootenv
option dev '/dev/mtd2'
option offset '0x0'
option envsize '0x2000'
option secsize '0x2000'
option numsec '1'
root@OpenWrt:~# cat /proc/cmdline
earlyprintk console=ttyS0,115200
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "stage1"
mtd1: 00380000 00020000 "u-boot"
mtd2: 00080000 00020000 "u-boot-env"
mtd3: 009c0000 00020000 "kernel"
mtd4: 07200000 00020000 "ubi"
root@OpenWrt:~# fw_printenv | tail -n 5
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
root@OpenWrt:~#
root@OpenWrt:~# fw_printenv | tail -n 5
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
partition=nand0,0
set_bootargs_owrt=setenv bootargs console=ttyS0,115200 $mtdparts
bootcmd_owrt=run set_bootargs_owrt; nboot 60500000 0 440000; bootm
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt
root@OpenWrt:~# cp /etc/fw_env.config_test2 /etc/fw_env.config && cp /etc/config/ubootenv_test2 /etc/config/ubootenv
root@OpenWrt:~# cat /etc/fw_env.config
/dev/mtd1 0x0 0x20000 0x20000
root@OpenWrt:~# cat /etc/config/ubootenv
config ubootenv
option dev '/dev/mtd1'
option offset '0x0'
option envsize '0x2000'
option secsize '0x2000'
option numsec '1'
root@OpenWrt:~# cat /proc/cmdline
earlyprintk console=ttyS0,115200
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "stage1"
mtd1: 00380000 00020000 "u-boot"
mtd2: 00080000 00020000 "u-boot-env"
mtd3: 009c0000 00020000 "kernel"
mtd4: 07200000 00020000 "ubi"
root@OpenWrt:~# fw_printenv | tail -n 5
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
root@OpenWrt:~#
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 03:41PM |
Admin Registered: 14 years ago Posts: 19,911 |
dev: size erasesize name mtd0: 00040000 00020000 "stage1" mtd1: 00380000 00020000 "u-boot" mtd2: 00080000 00020000 "u-boot-env" mtd3: 009c0000 00020000 "kernel" mtd4: 07200000 00020000 "ubi"
printenvAnd then in OpenWrt command line shell,
uname -a cat /proc/cmdline cat /proc/mtd dmesg | grep -2 0x0 # or just entire dmesg log
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 05:23PM |
Registered: 14 years ago Posts: 159 |
U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700) OXNAS OX820 gcc (Debian 6.3.0-18) 6.3.0 20170516 GNU ld (GNU Binutils for Debian) 2.28 Hit any key to stop autoboot: 10 0 OX820> setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)' OX820> printenv printenv bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi; fi bootcmd_lede=nboot 60500000 0 440000; bootm bootcmd_owrt=run set_bootargs_owrt; nboot 60500000 0 440000; bootm 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 disks=0 1 2 3 dtb_file=/boot/dts/ox820-pogoplug-classic.dtb ethact=dwmac.40400000 ethaddr=00:25:31:XX:YY:ZZ if_netconsole=ping $serverip ipaddr=192.168.YYY.ZZZ load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device 0x62c00000 $dtb_file load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage mainlineLinux=yes mtdids=nand0=41000000.nand mtdparts=mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi) nc_ready=1 ncip=192.168.YYY.ZZZ partition=nand0,0 preboot=run preboot_nc preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_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 0x60500000 /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.YYY.ZZZ set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params set_bootargs_lede=setenv bootargs console=ttyS0,115200 $mtdparts set_bootargs_owrt=setenv bootargs console=ttyS0,115200 $mtdparts start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version; stderr=nc stdin=nc stdout=nc uenv_import=echo importing envs ...; env import -t 0x60510000 $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 0x60500000 /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_custom_params=zswap.enabled=1 usb_ready_retry=15 Environment size: 3150/131068 bytes OX820> run bootcmd_owrt run bootcmd_owrt Loading from nand0, offset 0x440000 Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574682 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 ## Booting kernel from Legacy Image at 60500000 ... Image Name: ARM OpenWrt Linux-5.4.188 Created: 2022-04-16 12:59:34 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3574682 Bytes = 3.4 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK Starting kernel ...
BusyBox v1.33.2 (2022-04-16 12:59:34 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.3, r16554-1d4dea6d4f
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# fw_printenv | tail -n 5
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
partition=nand0,0
set_bootargs_owrt=setenv bootargs console=ttyS0,115200 $mtdparts
bootcmd_owrt=run set_bootargs_owrt; nboot 60500000 0 440000; bootm
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt
root@OpenWrt:~# cp /etc/fw_env.config_test1 /etc/fw_env.config && cp /etc/config/ubootenv_test1 /etc/config/ubootenv
root@OpenWrt:~# cat /etc/fw_env.config
/dev/mtd2 0x0 0x20000 0x20000
root@OpenWrt:~# cat /etc/config/ubootenv
config ubootenv
option dev '/dev/mtd2'
option offset '0x0'
option envsize '0x2000'
option secsize '0x2000'
option numsec '1'
root@OpenWrt:~# uname -a
Linux OpenWrt 5.4.188 #0 SMP Sat Apr 16 12:59:34 2022 armv6l GNU/Linux
root@OpenWrt:~# cat /proc/cmdline
earlyprintk console=ttyS0,115200
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "stage1"
mtd1: 00380000 00020000 "u-boot"
mtd2: 00080000 00020000 "u-boot-env"
mtd3: 009c0000 00020000 "kernel"
mtd4: 07200000 00020000 "ubi"
root@OpenWrt:~# dmesg | grep -i 0x0
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Bootloader command line (ignored): console=ttyS0,115200 mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi)
[ 0.858752] 0x000000000000-0x000000040000 : "stage1"
[ 0.865351] 0x000000040000-0x0000003c0000 : "u-boot"
[ 0.872015] 0x0000003c0000-0x000000440000 : "u-boot-env"
[ 0.878963] 0x000000440000-0x000000e00000 : "kernel"
[ 0.885488] 0x000000e00000-0x000008000000 : "ubi"
[ 7.585502] blk_update_request: I/O error, dev mtdblock1, sector 2048 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[ 7.607247] blk_update_request: I/O error, dev mtdblock1, sector 2048 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 12.999470] blk_update_request: I/O error, dev mtdblock1, sector 2048 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[ 13.021309] blk_update_request: I/O error, dev mtdblock1, sector 2048 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
root@OpenWrt:~# fw_printenv | tail -n 5
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
root@OpenWrt:~#
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 05:42PM |
Registered: 14 years ago Posts: 159 |
root@debian ~ $ uname -a Linux debian 5.4.179-oxnas-tld-1 #1.0 SMP PREEMPT Mon Feb 14 21:50:21 PST 2022 armv6l GNU/Linux root@debian ~ $ cat /proc/cmdline console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi) root@debian ~ $ cat /proc/mtd dev: size erasesize name mtd0: 00e00000 00020000 "boot" mtd1: 07200000 00020000 "data" root@debian ~ $ dmesg | grep -i 0x0 [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi) [ 8.477432] 0x000000000000-0x000000e00000 : "boot" [ 8.485373] 0x000000e00000-0x000008000000 : "data" root@debian ~ $ fw_printenv | tail -n 5 partition=nand0,0 set_bootargs_owrt=setenv bootargs console=ttyS0,115200 $mtdparts bootcmd_owrt=run set_bootargs_owrt; nboot 60500000 0 440000; bootm bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_owrt mtdparts=mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi) root@debian ~ $
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 05:51PM |
Admin Registered: 14 years ago Posts: 19,911 |
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Bootloader command line (ignored): console=ttyS0,115200 mtdparts=41000000.nand:0x100000@0x0(u-boot),0x20000@0x100000(u-boot-env-main),0x80000@0x3c0000(u-boot-env),0x440000@0x9C0000(kernel),-(ubi) [ 0.858752] 0x000000000000-0x000000040000 : "stage1" [ 0.865351] 0x000000040000-0x0000003c0000 : "u-boot" [ 0.872015] 0x0000003c0000-0x000000440000 : "u-boot-env" [ 0.878963] 0x000000440000-0x000000e00000 : "kernel" [ 0.885488] 0x000000e00000-0x000008000000 : "ubi"
[ 0.872015] 0x0000003c0000-0x000000440000 : "u-boot-env"
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 05:59PM |
Admin Registered: 14 years ago Posts: 19,911 |
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 06:26PM |
Registered: 14 years ago Posts: 159 |
echo '/dev/mtd0 0x3c0000 0x20000 0x20000' > /etc/fw_env.config_owrt
root@debian ~ $ cp /etc/fw_env.config_owrt /etc/fw_env.config
root@debian ~ $ fw_printenv
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
root@debian ~ $
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 06:44PM |
Admin Registered: 14 years ago Posts: 19,911 |
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 06:49PM |
Registered: 14 years ago Posts: 159 |
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 07:10PM |
Registered: 14 years ago Posts: 159 |
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 07:10PM |
Admin Registered: 14 years ago Posts: 19,911 |
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 07:11PM |
Admin Registered: 14 years ago Posts: 19,911 |
|
Re: HowTo: openWrt on OXNAS boxes August 02, 2022 07:13PM |
Admin Registered: 14 years ago Posts: 19,911 |