Re: HowTo: openWrt on OXNAS boxes August 02, 2022 07:20PM |
Registered: 13 years ago Posts: 157 |
/dev/mtd1 0xc0000 0x20000 0x20000
/dev/mtd2 0x0 0x20000 0x20000
Re: HowTo: openWrt on OXNAS boxes August 03, 2022 01:56PM |
Registered: 13 years ago Posts: 157 |
Re: HowTo: openWrt on OXNAS boxes August 03, 2022 02:29PM |
Registered: 13 years ago Posts: 157 |
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 03, 2022 04:27PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: HowTo: openWrt on OXNAS boxes August 03, 2022 05:28PM |
Admin Registered: 13 years ago Posts: 18,898 |
Quote
A. How to use the uEnv.txt script (Optional)
This uEnv.txt script can be used to further customizing u-boot envs without saving to NAND or to boot with a completely different set of u-boot envs.
Create a text file in /boot directory with the content in the format that u-boot envs are listed.
mkdir -p /boot cd /boot
nano uEnv.txt
loaded_envs=See_uEnv.txt_from_rootfsExit and save the file.
printenv loaded_envs
Re: HowTo: openWrt on OXNAS boxes August 03, 2022 05:33PM |
Registered: 13 years ago Posts: 157 |
>Quote
A. How to use the uEnv.txt script
> (Optional)
>
> This uEnv.txt script can be used to further
> customizing u-boot envs without saving to NAND or
> to boot with a completely different set of u-boot
> envs.
>
> Create a text file in /boot directory with the
> content in the format that u-boot envs are
> listed.
> mkdir -p /boot > cd /boot >>
> nano uEnv.txt >>
> loaded_envs=See_uEnv.txt_from_rootfs >> Exit and save the file.
> printenv loaded_envs >
Re: HowTo: openWrt on OXNAS boxes August 03, 2022 06:49PM |
Admin Registered: 13 years ago Posts: 18,898 |
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' setenv partition 'nand0,0' ubi part ubi ubi infovolume name should be in the output.
ubifsmount <volume name>
ubifsls boot
Re: HowTo: openWrt on OXNAS boxes August 03, 2022 06:54PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: HowTo: openWrt on OXNAS boxes August 04, 2022 01:50PM |
Registered: 13 years ago Posts: 157 |
mkdir -p /boot cd /boot nano uEnv.txt # wrote loaded_envs=See_uEnv.txt_from_rootfs
# this should survive cp uEnv.txt /etc/config/
cd /tmp wget https://downloads.openwrt.org/releases/21.02.3/targets/oxnas/ox820/openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplug-series-3-squashfs-sysupgrade.tar sysupgrade -v openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplug-series-3-squashfs-sysupgrade.tar root@OpenWrt:/tmp# sysupgrade -v openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplug-series-3-squashfs-sysupgrade.tar Thu Aug 4 17:52:47 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/uEnv.txt etc/config/ubootenv etc/config/ubootenv_bodhi etc/config/ubootenv_owrt etc/config/ubootenv_test1 etc/config/ubootenv_test2 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/opkg/keys/4d017e6f1ed5d616 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 Thu Aug 4 17:52:47 UTC 2022 upgrade: Commencing upgrade. Closing all shell sessions. Command failed: Connection failed root@OpenWrt:/tmp# Connection to 192.168.XXX.YYY closed by remote host.
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:~# cd /boot -ash: cd: can't cd to /boot: No such file or directory root@OpenWrt:~# cat /etc/config/uEnv.txt loaded_envs=See_uEnv.txt_from_rootfs root@OpenWrt:~#
> setenv mtdparts > 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' > setenv partition 'nand0,0' > ubi part ubi > ubi info >> volume name should be in the output.
setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
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: 8 0 OX820> setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' OX820> setenv partition 'nand0,0' setenv partition 'nand0,0' OX820> ubi part ubi ubi part ubi UBI: attaching mtd1 to ubi0 UBI: scanning is finished UBI: attached mtd1 (name "mtd=1", size 127 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: 1016, bad PEBs: 0, corrupted PEBs: 0 UBI: user volume: 2, internal volumes: 1, max. volumes count: 128 UBI: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 834073264 UBI: available PEBs: 104, total reserved PEBs: 912, PEBs reserved for bad PEB handling: 20 OX820> ubi info ubi info UBI: MTD device name: "mtd=1" UBI: MTD device size: 127 MiB UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: number of good PEBs: 1016 UBI: number of bad PEBs: 0 UBI: smallest flash I/O unit: 2048 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 2 UBI: available PEBs: 104 UBI: total number of reserved PEBs: 912 UBI: number of PEBs reserved for bad PEB handling: 20 UBI: max/mean erase counter: 6/3 OX820> ubifsmount /dev/mtd1 ubifsmount /dev/mtd1 Error reading superblock on volume '/dev/mtd1' errno=-22! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> ubifsmount mtd=1 ubifsmount mtd=1 Error reading superblock on volume 'mtd=1' errno=-22! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> ubifsmount mtd1 ubifsmount mtd1 Error reading superblock on volume 'mtd1' errno=-22! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> ubifsmount ubi0 ubifsmount ubi0 Error reading superblock on volume 'ubi0' errno=-22! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> ubifsmount ubi0_0 ubifsmount ubi0_0 Error reading superblock on volume 'ubi0_0' errno=-22! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> ubifsmount ubi:mtd1 ubifsmount ubi:mtd1 Error reading superblock on volume 'ubi:mtd1' errno=-19! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> ubifsmount ubi:mtd=1 ubifsmount ubi:mtd=1 Error reading superblock on volume 'ubi:mtd=1' errno=-19! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> OX820>
Re: HowTo: openWrt on OXNAS boxes August 04, 2022 03:57PM |
Admin Registered: 13 years ago Posts: 18,898 |
Quote
Conclusion: The /boot-directory did not survive. Thus, if the file absolutely has to be in /boot, it should be symlinked. However, since the uBoot-env will have to be customized anyway, why not just read it from /etc/config right away for the OpenWrt boot?
ubifsmount ubi0:mdt1
Re: HowTo: openWrt on OXNAS boxes August 04, 2022 04:09PM |
Registered: 13 years ago Posts: 157 |
>Quote
Conclusion: The /boot-directory did not
> survive. Thus, if the file absolutely has to be in
> /boot, it should be symlinked. However, since the
> uBoot-env will have to be customized anyway, why
> not just read it from /etc/config right away for
> the OpenWrt boot?
> ubifsmount ubi0:mdt1 >
Re: HowTo: openWrt on OXNAS boxes August 07, 2022 05:13PM |
Registered: 13 years ago Posts: 157 |
> ubifsmount ubi0:mdt1 >
OX820> ubifsmount ubi0:mdt1 ubifsmount ubi0:mdt1 Error reading superblock on volume 'ubi0:mdt1' errno=-19! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820>
root@OpenWrt:~# blkid /dev/ubi0_1: UUID="eaa436ab-920d-454c-b47b-de15f9a5db60" TYPE="ubifs" /dev/ubi0_0: TYPE="squashfs" /dev/mtdblock4: UUID="834073264" TYPE="ubi" /dev/ubiblock0_0: TYPE="squashfs" root@OpenWrt:~#
OX820> ubifsmount ubi0_0:mdt1 ubifsmount ubi0_2:mdt1 Error reading superblock on volume 'ubi0_0:mdt1' errno=-22! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820> ubifsmount ubi0_1:mtd1 ubifsmount ubi0_1:mtd1 Error reading superblock on volume 'ubi0_1:mtd1' errno=-22! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume OX820>
Re: HowTo: openWrt on OXNAS boxes August 07, 2022 07:00PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: HowTo: openWrt on OXNAS boxes August 07, 2022 08:53PM |
Registered: 9 years ago Posts: 454 |
+ partition@3c0000 { + label = "u-boot-env"; + reg = <0x003c0000 0x00080000>; + };
Re: HowTo: openWrt on OXNAS boxes August 07, 2022 10:28PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: HowTo: openWrt on OXNAS boxes August 12, 2022 07:37PM |
Admin Registered: 13 years ago Posts: 18,898 |
ubi part ubi ubi info ubi info layout
ubifsmount ubi0:rootfs_data
mountIt should show the rootfs mounted with squashfs. And the /overlay is ubifs. The upper layer of the root file system is etc. (it's overlaid on top) So that's why /etc/config is sticky and not got overwritten by sysupgrade.
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 09:58AM |
Registered: 13 years ago Posts: 157 |
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),-@0x100000(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' OX820> setenv partition 'nand0,0' setenv partition 'nand0,0' OX820> ubi part ubi ubi part ubi UBI: attaching mtd1 to ubi0 UBI: scanning is finished UBI: attached mtd1 (name "mtd=1", size 127 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: 1016, bad PEBs: 0, corrupted PEBs: 0 UBI: user volume: 2, internal volumes: 1, max. volumes count: 128 UBI: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 834073264 UBI: available PEBs: 104, total reserved PEBs: 912, PEBs reserved for bad PEB handling: 20 OX820> ubi info ubi info UBI: MTD device name: "mtd=1" UBI: MTD device size: 127 MiB UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: number of good PEBs: 1016 UBI: number of bad PEBs: 0 UBI: smallest flash I/O unit: 2048 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 2 UBI: available PEBs: 104 UBI: total number of reserved PEBs: 912 UBI: number of PEBs reserved for bad PEB handling: 20 UBI: max/mean erase counter: 6/3 OX820> ubi info layout ubi info layout Volume information dump: vol_id 0 reserved_pebs 24 alignment 1 data_pad 0 vol_type 3 name_len 6 usable_leb_size 129024 used_ebs 24 used_bytes 3096576 last_eb_bytes 129024 corrupted 0 upd_marker 0 name rootfs Volume information dump: vol_id 1 reserved_pebs 864 alignment 1 data_pad 0 vol_type 3 name_len 11 usable_leb_size 129024 used_ebs 864 used_bytes 111476736 last_eb_bytes 129024 corrupted 0 upd_marker 0 name rootfs_data Volume information dump: vol_id 2147479551 reserved_pebs 2 alignment 1 data_pad 0 vol_type 3 name_len 13 usable_leb_size 129024 used_ebs 2 used_bytes 258048 last_eb_bytes 2 corrupted 0 upd_marker 0 name layout volume OX820> ubifsmount ubi0:rootfs_data ubifsmount ubi0:rootfs_data OX820> run bootcmd_owrt run bootcmd_owrt Loading from nand0, offset 0x440000 ** Unknown image type Wrong Image Format for bootm command ERROR: can't get kernel image! OX820>
OX820> usb reset; fatload usb 0 0x60500000 ox_classic-uImage; bootm 0x60500000 usb reset; fatload usb 0 0x60500000 ox_classic-uImage; bootm 0x60500000 resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found reading ox_classic-uImage 7188634 bytes read in 231 ms (29.7 MiB/s) ## 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: 7188570 Bytes = 6.9 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK Starting kernel ...
root@OpenWrt:~# 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:~# 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:~# cat /etc/fw_env.config
/dev/mtd2 0x0 0x2000 0x2000 1
root@OpenWrt:~# echo '/dev/mtd1 0xc0000 0x20000 0x20000' > /etc/fw_env.config
root@OpenWrt:~# fw_printenv bootcmd_owrt
Warning: Bad CRC, using default environment
## Error: "bootcmd_owrt" not defined
root@OpenWrt:~# mount
tmpfs on / type tmpfs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
root@OpenWrt:~#
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 01:22PM |
Admin Registered: 13 years ago Posts: 18,898 |
Quote
# bootenvs for Pogo E02 based on uboot.2016.05-tld-1.environment:
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
setenv partition 'nand0,0'
setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts'
setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede'
setenv bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi'
saveenv
nand erase.part ubi
# when you change/add a new partition layout you always need to erase the ubi nand first before new install:
nand erase.part ubi
ubifsmount ubi0:rootfs_data ubifsls etc ubifsls etc/config
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 02:01PM |
Registered: 13 years ago Posts: 157 |
nand erase.part data usb reset; fatload usb 0 0x60500000 uImage; bootm 0x60500000
fw_setenv mtdparts 'mtdparts=41000000.nand:14m(boot),-(data)')
setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 02:29PM |
Registered: 13 years ago Posts: 157 |
setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' setenv partition 'nand0,0' ubi part ubi ubi info ubi info layout
OX820> ubifsmount ubi0:rootfs_data OX820> ubifsls etc ** File not found etc ** OX820> printenv ubifsls etc/configprintenv ** File not found etc/configprintenv **
┌─[root@pogov3]─[~] └──> fw_printenv | head -n 5 Warning: Bad CRC, using default environment bootcmd=run distro_bootcmd bootdelay=2 baudrate=115200 stdin=serial,cros-ec-keyb,usbkbd stdout=serial,vidconsole
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 04:15PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 05:17PM |
Admin Registered: 13 years ago Posts: 18,898 |
> setenv mtdparts > 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' > setenv partition 'nand0,0' > ubi part ubi > ubi info > ubi info layout >>
> OX820> ubifsmount ubi0:rootfs_data > OX820> ubifsls etc > ** File not found etc ** > OX820> printenv > ubifsls etc/configprintenv > ** File not found etc/configprintenv ** >>
> ┌─[root@pogov3]─[~] > └──> fw_printenv | head -n 5 > Warning: Bad CRC, using default environment > bootcmd=run distro_bootcmd > bootdelay=2 > baudrate=115200 > stdin=serial,cros-ec-keyb,usbkbd > stdout=serial,vidconsole >>
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 05:24PM |
Registered: 13 years ago Posts: 157 |
OX820> printenv mtdparts printenv mtdparts mtdparts=mtdparts=41000000.nand:14m(boot),-(data) OX820> nand erase.part data usb reset; fatload usb 0 0x60500000 ox_classic-uImage; bootm 0x60500000nand erase.part data NAND erase.part: device 0 offset 0xe00000, size 0x7200000 Erasing at 0x7fe0000 -- 100% complete. OK OX820> usb reset; fatload usb 0 0x60500000 ox_classic-uImage; bootm 0x60500000 usb reset; fatload usb 0 0x60500000 ox_classic-uImage; bootm 0x60500000 resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found reading ox_classic-uImage 7188634 bytes read in 231 ms (29.7 MiB/s) ## 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: 7188570 Bytes = 6.9 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK Starting kernel ...
root@OpenWrt:/tmp# wget https://downloads.openwrt.org/releases/21.02.3/targets/oxnas/ox820/openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplug-series-3-ubifs-sysupgrade.tar Downloading 'https://downloads.openwrt.org/releases/21.02.3/targets/oxnas/ox820/openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplug-series-3-ubifs-sysupgrade.tar'; Connecting to 168.119.138.211:443 Writing to 'openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplug-series-3-ubifs-sysupgrade.tar' openwrt-21.02.3-oxna 100% |*******************************| 10180k 0:00:00 ETA Download completed (10424689 bytes) root@OpenWrt:/tmp# sysupgrade openwrt-21.02.3-oxnas-ox820-cloudengines_pogoplug-series-3-ubifs-sysupgrade.tar Cannot save config while running from ramdisk. Sat Aug 13 22:02:49 UTC 2022 upgrade: Commencing upgrade. Closing all shell sessions.
OX820> setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' OX820> setenv partition 'nand0,0' setenv partition 'nand0,0' OX820> ubi part ubi ubi part ubi UBI: attaching mtd1 to ubi0 UBI init error 22 OX820>
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 ...
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 05:26PM |
Registered: 13 years ago Posts: 157 |
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 05:35PM |
Registered: 13 years ago Posts: 157 |
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),-@0x100000(ubi)' setenv mtdparts 'mtdparts=41000000.nand:0x100000@0x0(u-boot),-@0x100000(ubi)' OX820> setenv partition 'nand0,0' setenv partition 'nand0,0' OX820> ubi part ubi ubi part ubi UBI: attaching mtd1 to ubi0 UBI init error 22 OX820>
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 07:06PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 07:24PM |
Registered: 13 years ago Posts: 157 |
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 07:57PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: HowTo: openWrt on OXNAS boxes August 13, 2022 08:08PM |
Registered: 13 years ago Posts: 157 |
Re: HowTo: openWrt on OXNAS boxes August 14, 2022 04:21PM |
Admin Registered: 13 years ago Posts: 18,898 |
Quote
5. Log in to OpenWrt
Find the IP address of your box and ssh into it (user root without password). The following step is absolutely crucial but does not yet quite work the way it should.
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"