Adding OpenWrt support for Promise ns4600 nas

I have recently come into possession of an old nas that I would like to turn into a dumping ground for random files. The problem is it runs an old outdated version of embedded Linux that is hard to work with and has a lack of features.

I'm very new to this world of compiling your own firmware, and really want to learn. Below is the information I have gathered about this device.

CPU: Intel EP80579 32-bit
RAM: 256MB
FLASH:128MB
BOOTLOADER: Very stripped down version of U-BOOT 1.3.3

Images of the board:

https://imgur.com/a/4cpzbKx

Boot sequence from UART output:

U-Boot 1.3.3 (NS4600 - 022) (Jun 19 2010 - 14:00:04)

U-Boot code: FFF90000 -> FFFC8E7B  data: 00070000 -> 00072993
        BSS: 00072994 -> 00088CDB stack: 00088CDC -> 00098CDB
     malloc: 00098CDC -> 000DCCDC
CPU Freq: 600 Mhz
FSB Freq: 400 Mhz
DRAM size: 256 MB
DRAM Configuration:
Bank #0: 00000000 256 MB
Bank #1: 10000000  0 kB
        00  01  8086  5023  0880  0b
        00  02  8086  5024  0604  0b
        02  00  105a  3f20  0104  0b
        00  03  8086  5025  0604  0b
        03  00  8086  5040  0200  0b
        03  01  8086  5044  0200  0f
        03  03  8086  503e  ff00  00
        03  07  8086  503c  1110  0b
        03  08  8086  503d  0680  0b
        03  09  8086  502c  0b40  0b
        03  0a  8086  503f  0880  0b
        03  0c  8086  5030  1101  0b
        00  04  8086  5037  0604  00
        00  0a  8086  5038  ff00  00
        00  1d  8086  5033  0c03  0b
        00  1d  8086  5035  0c03  0b
        00  1f  8086  5031  0601  00
        00  1f  8086  502b  0104  0f
        00  1f  8086  5032  0c05  0f
        00  1f  8086  5036  1101  07
In:    serial
Out:   serial
Err:   serial
I2C:   Ready
NAND:  128 MiB
Net:   e1000: 00:01:55:11:9f:20
1000 Mbs, Full Duplex
Valid link established!!!
GbE#0
Hit Ctrl + C to stop autoboot:  0

NAND read: device 0 offset 0xa00000, size 0x200000

Reading data from 0xbff800 -- 100% complete.
 2097152 bytes read: OK

NAND read: device 0 offset 0xc00000, size 0x800000

Reading data from 0x13ff800 -- 100% complete.
 8388608 bytes read: OK
## Booting kernel from Legacy Image at 01100000 ...
   Image Name:   linux
   Created:      2011-01-20   2:56:16 UTC
   Image Type:   Intel x86 Linux Kernel Image (uncompressed)
   Data Size:    2035664 Bytes =  1.9 MB
   Load Address: 00500000
   Entry Point:  00500040
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
## Loading init Ramdisk from Legacy Image at 01600000 ...
   Image Name:   02.01.0000.22
   Created:      2011-11-03   9:11:16 UTC
   Image Type:   Intel x86 Linux RAMDisk Image (gzip compressed)
   Data Size:    4832337 Bytes =  4.6 MB
   Load Address: 00900000
   Entry Point:  00900040
   Verifying Checksum ... OK
Using boot protocol version 2.0a
Linux kernel version 2.6.32.14 (root@ptk-229) #5 Thu Jan 20 10:56:01 CST 2011
Initial RAM disk at linear address 0x01600040, size 4832337 bytes
Kernel command line: "root=/dev/ram rw mtdparts=nand0:2048K(safe-k),8192K(safe-r                                                                                                                                                             ),2048K(kernel),8192K(rootfs),16384K(usr),2048K(data),91904K(app) console=ttyS0,                                                                                                                                                             115200"
Loading bzImage at address 0x00100000 (2023888 bytes)

Starting kernel ...

Linux version 2.6.32.14 (root@ptk-229) (gcc version 4.4.2 20091027 (Red Hat 4.4.                                                                                                                                                             2-7) (GCC) ) #5 Thu Jan 20 10:56:01 CST 2011
KERNEL supported cpus:
  Intel GenuineIntel
BIOS-provided physical RAM map:
 BIOS-e801: 0000000000000000 - 000000000009f000 (usable)
 BIOS-e801: 0000000000100000 - 0000000010000000 (usable)
last_pfn = 0x10000 max_arch_pfn = 0x100000
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
init_memory_mapping: 0000000000000000-0000000010000000
RAMDISK: 01600040 - 01a9bc91
0MB HIGHMEM available.
256MB LOWMEM available.
  mapped low ram: 0 - 10000000
  low ram: 0 - 10000000
  node 0 low ram: 00000000 - 10000000
  node 0 bootmap 00001000 - 00003000
(6 early reservations) ==> bootmem [0000000000 - 0010000000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0001000000 - 00013bcc78]    TEXT DATA BSS ==> [0001000000 - 00013bcc78]
  #2 [0001600040 - 0001a9bc91]          RAMDISK ==> [0001600040 - 0001a9bc91]
  #3 [000009f000 - 0000100000]    BIOS reserved ==> [000009f000 - 0000100000]
  #4 [00013bd000 - 00013c3000]              BRK ==> [00013bd000 - 00013c3000]
  #5 [0000001000 - 0000003000]          BOOTMAP ==> [0000001000 - 0000003000]
Zone PFN ranges:
  DMA      0x00000000 -> 0x00001000
  Normal   0x00001000 -> 0x00010000
  HighMem  0x00010000 -> 0x00010000
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000000 -> 0x0000009f
    0: 0x00000100 -> 0x00010000
Using APIC driver default
Found and enabled local APIC!
Allocating PCI resources starting at 10000000 (gap: 10000000:f0000000)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64927
Kernel command line: root=/dev/ram rw mtdparts=nand0:2048K(safe-k),8192K(safe-r)                                                                                                                                                             ,2048K(kernel),8192K(rootfs),16384K(usr),2048K(data),91904K(app) console=ttyS0,1                                                                                                                                                             15200
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Initializing HighMem for node 0 (00000000:00000000)
Memory: 250744k/262144k available (2510k kernel code, 10824k reserved, 948k data                                                                                                                                                             , 184k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfffa5000 - 0xfffff000   ( 360 kB)
    pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
    vmalloc : 0xd0800000 - 0xff7fe000   ( 751 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
      .init : 0xc1361000 - 0xc138f000   ( 184 kB)
      .data : 0xc127391a - 0xc1360acc   ( 948 kB)
      .text : 0xc1000000 - 0xc127391a   (2510 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:288
Uhhuh. NMI received for unknown reason a0 on CPU 0.
You have some hardware problem, likely on the PCI bus.
Dazed and confused, but trying to continue
Console: colour dummy device 80x25
console [ttyS0] enabled
Fast TSC calibration using PIT
Detected 598.411 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 1196.                                                                                                                                                             82 BogoMIPS (lpj=2393644)
Mount-cache hash table entries: 512
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 256K
CPU: Genuine Intel(R) processor               600MHz stepping 00
Checking 'hlt' instruction... OK.
Enabling APIC mode:  Flat.  Using 0 I/O APICs
NET: Registered protocol family 16
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Probing PCI hardware
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:02.0: PME# disabled
pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
pci 0000:00:03.0: PME# disabled
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.2: PME# supported from D3hot
pci 0000:00:1f.2: PME# disabled
Switching to clocksource tsc
pci 0000:00:02.0: PCI bridge, secondary bus 0000:01
pci 0000:00:02.0:   IO window: disabled
pci 0000:00:02.0:   MEM window: disabled
pci 0000:00:02.0:   PREFETCH window: disabled
pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
pci 0000:00:03.0:   IO window: 0x1000-0x1fff
pci 0000:00:03.0:   MEM window: 0x40100000-0x401fffff
pci 0000:00:03.0:   PREFETCH window: disabled
pci 0000:00:04.0: PCI bridge, secondary bus 0000:03
pci 0000:00:04.0:   IO window: 0x2000-0x2fff
pci 0000:00:04.0:   MEM window: 0x40200000-0x500fffff
pci 0000:00:04.0:   PREFETCH window: disabled
pci 0000:00:04.0: can't find IRQ for PCI INT A; please try using pci=biosirq
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
------------[ cut here ]------------
WARNING: at arch/x86/mm/pageattr.c:839 change_page_attr_set_clr+0xba/0x325()
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.32.14 #5
Call Trace:
 [<c10170e0>] ? warn_slowpath_common+0x42/0x55
 [<c10170fe>] ? warn_slowpath_null+0xb/0xd
 [<c1010801>] ? change_page_attr_set_clr+0xba/0x325
 [<c105f2a4>] ? dput+0x19/0xe2
 [<c10543c0>] ? __fput+0x144/0x16b
 [<c1010c51>] ? set_memory_rw+0x1a/0x1e
 [<c100f24a>] ? free_init_pages+0x1e/0x89
 [<c13633f0>] ? populate_rootfs+0x1e4/0x202
 [<c136320c>] ? populate_rootfs+0x0/0x202
 [<c1001043>] ? do_one_initcall+0x43/0x11f
 [<c1361204>] ? kernel_init+0x81/0xcc
 [<c1361183>] ? kernel_init+0x0/0xcc
 [<c1002efb>] ? kernel_thread_helper+0x7/0x10
---[ end trace 6d450e935ee1897c ]---
Freeing initrd memory: 4719k freed
platform rtc_cmos: registered platform RTC device (no PNP device found)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
fuse init (API version 7.13)
SGI XFS with ACLs, security attributes, large block/inode numbers, no debug enab                                                                                                                                                             led
SGI XFS Quota Management subsystem
msgmni has been set to 499
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered (default)
Real Time Clock Driver v1.12b
**********************************
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
brd: module loaded
loop: module loaded
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 368 at 0x000002e00000
Bad eraseblock 948 at 0x000007680000
7 cmdlinepart partitions found on MTD device nand0
Using command line partition definition
Creating 7 MTD partitions on "nand0":
0x000000000000-0x000000200000 : "safe-k"
0x000000200000-0x000000a00000 : "safe-r"
0x000000a00000-0x000000c00000 : "kernel"
0x000000c00000-0x000001400000 : "rootfs"
0x000001400000-0x000002400000 : "usr"
0x000002400000-0x000002600000 : "data"
0x000002600000-0x000007fc0000 : "app"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: debug port 1
ehci_hcd 0000:00:1d.7: irq 11, io mem 0x50105000
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.32.14 ehci_hcd
usb usb1: SerialNumber: 0000:00:1d.7
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
uhci_hcd: USB Universal Host Controller Interface driver
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.0: irq 11, io base 0x00003000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.32.14 uhci_hcd
usb usb2: SerialNumber: 0000:00:1d.0
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver usblp
i2c /dev entries driver
W83L786: Load fan configurations from VPD
usb 1-2: new high speed USB device using ehci_hcd and address 2
iwdt: Intel WDT init done.
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 5
Using IPI Shortcut mode
RAMDISK: gzip image found at block 0
usb 1-2: New USB device found, idVendor=0781, idProduct=5597
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: Cruzer Glide 3.0
usb 1-2: Manufacturer: SanDisk
usb 1-2: SerialNumber: 4C530001020617117321
usb 1-2: configuration #1 chosen from 1 choice
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing unused kernel memory: 184k freed
INIT: version 2.86 booting
Mount MNT
Mount Usr
Mount Promise
Mount Data
Mount nfsd
Loading modules:
t3sas - t3sas 0000:02:00.0: Found PDC42819 Controller 105a:3f20 with IRQ: 11
t3sas 0000:02:00.0: Driver version of PDC42819 : 1.3.0.14-NAS-14
scsi0 : t3sas
scsi 0:0:0:0: Direct-Access     Promise  4+0 Stripe/RAID0 1.10 PQ: 0 ANSI: 4
sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 0:0:8:0: Processor         Promise  RAID Console     1.00 PQ: 0 ANSI: 3
sd 0:0:0:0: [sda] 7812499968 512-byte logical blocks: (3.99 TB/3.63 TiB)
sd 0:0:0:0: [sda] Write Protect is off
scsi 0:0:8:0: Attached scsi generic sg1 type 3
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
 sda: unknown partition table
sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
sd 0:0:0:0: [sda] Attached SCSI disk
usb-storage - Initializing USB Mass Storage driver...
scsi1 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
gcu - Global Configuration Unit Driver - version 1.0.0
Copyright (c) 1999-2007 Intel Corporation.
gcu: 0000:03:03.0: gcu_probe: Intel(R) GCU Initialized
iegbe - Gigabit Ethernet Controller Driver - version 1.0.0-NAPI-02
Copyright (c) 1999-2009 Intel Corporation.
iegbe 0000:03:00.0: enabling device (0006 -> 0007)
iegbe: eth0: iegbe_probe: Intel(R) PRO/1000 Network Connection
tx ring size:256, rx ring size:128
gcu: Unable to retrieve data from MDIO_STATUS_REG
iegbe: 0000:03:01.0: iegbe_reset: Hardware Error
gcu: Unable to retrieve data from MDIO_STATUS_REG
iegbe: eth1: iegbe_probe: Intel(R) PRO/1000 Network Connection
tx ring size:256, rx ring size:128
libata - ahci - ahci 0000:00:1f.2: forcing PORTS_IMPL to 0x3
ahci: SSS flag set, parallel bus scan disabled
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 2 ports 1.5 Gbps 0x3 impl RAID mode
ahci 0000:00:1f.2: flags: 64bit ncq sntf ilck stag pm led clo pmp pio slum part
scsi2 : ahci
scsi3 : ahci
ata1: SATA max UDMA/133 abar m1024@0x50105400 port 0x50105500 irq 16
ata2: SATA max UDMA/133 abar m1024@0x50105400 port 0x50105580 irq 16
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link down (SStatus 0 SControl 300)
iscsi_trgt - iSCSI Enterprise Target Software - version 1.4.20.2
iscsi_trgt: Registered io type fileio
iscsi_trgt: Registered io type blockio
iscsi_trgt: Registered io type nullio

scsi 1:0:0:0: Direct-Access     SanDisk  Cruzer Glide 3.0 1.00 PQ: 0 ANSI: 6
sd 1:0:0:0: Attached scsi generic sg2 type 0
sd 1:0:0:0: [sdb] 30464000 512-byte logical blocks: (15.5 GB/14.5 GiB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Assuming drive cache: write through
sd 1:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1 sdb2
sd 1:0:0:0: [sdb] Assuming drive cache: write through
sd 1:0:0:0: [sdb] Attached SCSI removable disk
Copying config files to root fs
cp: `/usr/local/atalk/etc' is not a directory
cp: unable to preserve times of `/usr/local/atalk': Read-only file system
cp: unable to preserve ownership of `/usr/local/atalk': Read-only file system
cp: unable to preserve permissions of `/usr/local/atalk': Read-only file system
cp: `/usr/local/samba/lib' is not a directory
cp: `/usr/local/samba/private' is not a directory
cp: unable to preserve times of `/usr/local/samba': Read-only file system
cp: unable to preserve ownership of `/usr/local/samba': Read-only file system
cp: unable to preserve permissions of `/usr/local/samba': Read-only file system
cp: `/usr/local/proftp/etc' is not a directory
cp: unable to preserve times of `/usr/local/proftp': Read-only file system
cp: unable to preserve ownership of `/usr/local/proftp': Read-only file system
cp: unable to preserve permissions of `/usr/local/proftp': Read-only file system
cp: unable to preserve times of `/usr/local': Read-only file system
cp: unable to preserve ownership of `/usr/local': Read-only file system
cp: unable to preserve permissions of `/usr/local': Read-only file system
cp: `/usr/local/atalk/etc' is not a directory
/usr/sbin/lvchange -a y /dev/vg001/lv001
No vg needs to be restored.
XFS mounting filesystem dm-0
Starting XFS recovery on filesystem: dm-0 (logdev: internal)
Ending XFS recovery on filesystem: dm-0 (logdev: internal)

Local time (GMT+12): Mon Oct 11 07:14:44 GMT+12 2021

0, 0, 0, 0, 0,
0, 0
1633893284
44,14,7,11,9,121,1,283,0
INIT: Entering runlevel: 2.Cannot autoconfigure port: Device or resource bu
Starting syslogd...syslogd: Already running.
klogd: Already running.

Starting base networking daemons: portmap inetd.
Starting periodic command scheduler: cron.
Starting loopback...
Starting network...
iegbe: eth0: iegbe_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
iegbe: eth0: iegbe_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Starting httpd...
Swap Memory On...Adding 524280k swap on /dev/vg001/nsswap.  Priority:-1 extents:1 across:524280k
LED => 1
0, 0, 0, 0, 0,
0, 0
1633893299
59,14,7,11,9,121,1,283,0
Disable RTC alarm
Starting NFS...NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period

Starting ISCSI...
Disable WOL...Enable Auto Power ON...Starting quota...
Starting Domain Integrate...
Starting alert agent...
I2 Event Daemon, Ver 1.0.0.0
Checking last shutdown...
Check Data Partition : OK

NS4600 (Version 02.01.0000.22) - Promise Technology, INC.
dump login: USB Disk PLUG IN
                            FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdb2.
EXT2-fs: sdb2: couldn't mount because of unsupported optional features (40).
ESATA Disk PLUG OUT
                   USB Printer PLUG OUT

How do I go about compiling OpenWRT for this device, and should I update U-BOOT while im at it?

Websites that helped me along:

https://saturn.ffzg.hr/rot13/index.cgi?action=display_html;page_name=promise_smartstor#serial_port
https://scratchpad.fandom.com/wiki/NS4600#The_Hardware

what capabilities are still in the uboot, post the response to the help command.

Thanks for the reply, I have tried to boot openwrt off of a usb with the x86 version flashed to it without luck because commands that are needed for this are missing.

U-BOOT help:

U-Boot 1.3.3 (NS4600 - 022) (Jun 19 2010 - 14:00:04)

U-Boot code: FFF90000 -> FFFC8E7B  data: 00070000 -> 00072993
        BSS: 00072994 -> 00088CDB stack: 00088CDC -> 00098CDB
     malloc: 00098CDC -> 000DCCDC
CPU Freq: 600 Mhz
FSB Freq: 400 Mhz
DRAM size: 256 MB
DRAM Configuration:
Bank #0: 00000000 256 MB
Bank #1: 10000000  0 kB
        00  01  8086  5023  0880  0b
        00  02  8086  5024  0604  0b
        02  00  105a  3f20  0104  0b
        00  03  8086  5025  0604  0b
        03  00  8086  5040  0200  0b
        03  01  8086  5044  0200  0f
        03  03  8086  503e  ff00  00
        03  07  8086  503c  1110  0b
        03  08  8086  503d  0680  0b
        03  09  8086  502c  0b40  0b
        03  0a  8086  503f  0880  0b
        03  0c  8086  5030  1101  0b
        00  04  8086  5037  0604  00
        00  0a  8086  5038  ff00  00
        00  1d  8086  5033  0c03  0b
        00  1d  8086  5035  0c03  0b
        00  1f  8086  5031  0601  00
        00  1f  8086  502b  0104  0f
        00  1f  8086  5032  0c05  0f
        00  1f  8086  5036  1101  07
In:    serial
Out:   serial
Err:   serial
I2C:   Ready
NAND:  128 MiB
Net:   e1000: 00:01:55:11:9f:20
GbE#0
Hit Ctrl + C to stop autoboot:  0
=> ?
?       - alias for 'help'
autoscr - run script from memory
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
burnin     - burnin
chkdisk - Check back plate connetcion
chkloopback - Check loop back plane connection
chpart  - change active partition
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
date    - get/set/reset date & time
diagnostic  - diagnostic sub-system
echo    - echo args to console
eeprom  - EEPROM sub-system
erase   - erase FLASH memory
esata   - eSATA port detect
flinfo  - print FLASH memory information
fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
go      - start application at address 'addr'
help    - print online help
icrc32  - checksum calculation
iloop   - infinite loop on address range
imd     - i2c memory display
iminfo  - print header information for application image
imls    - list all images found in flash
imm     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
imxtract- extract a part of a multi-image
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
ls      - list files in a directory (default /)
md      - memory display
mm      - memory modify (auto-incrementing)
mtdparts- define flash/nand partitions
mtest   - simple RAM test
mtest   - simple RAM test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
s3      - power management
sata    - SATA sub system
saveenv - save environment variables to persistent storage
scsi    - SCSI sub-system
scsiboot- boot from SCSI device
setenv  - set environment variables
shutdown- shutdown system
sleep   - delay execution for some time
testmode- PHY test mode utility commands
tftpboot- boot image via network using TFTP protocol
USB sub-systemversion - print monitor version
vpd     - vpd sub-system
vpdr     - read vpd content
vpdw     - write vpd content
=>

seems there's esata en TFTP support .... it'll get you pretty far.

Could you please give me a hint as to how I should begin to get this working, as I said im very new to this and don't have a clue where to even start.

write the openwrt image to an external drive, hook it up to the eSata, remove the internal drives, and start playing around with uboot :wink:

Ok, ill try the TFTP boot first since I don't have a esata cable and cant be assed to hook up a power supply yet. Do I load the image as a gzip or extract the .img? Also I noticed in the boot it mentions booting the kernel and then the Ramdisk. Im going to assume I write the kernel by itself to 01100000 and the rootfs at 01600000 where it says the Ramdisk is. Is a Ramdisk just the rootfs uncompressed? Again thanks for the reply.

I selected the img as x86 generic am I right about this?

https://downloads.openwrt.org/releases/21.02.0-rc4/targets/x86/generic/

if you're doing that, make sure to use a clean drive, so you won't destroy the current OS in the process.
or a drive with a copy of your original drive.

It just seems to freeze at loading and even though I specified a load address it just goes with 0x0. Any ideas here?

=> setenv serverip 10.0.0.110
=> tftpboot $loadaddr kernel.bin
Using GbE#0 device
TFTP from server 10.0.0.110; our IP address is 10.0.0.7
Filename 'kernel.bin'.
Load address: 0x0
Loading: ##################

if you're going to do a TFTP boot, you probably need an all in one image, like an initramfs.
the kernel.bin is just the kernel part, it's no good without the root FS.

This is technically a x86 target but it is custom, for embedded devices, not like normal PC x86 with a BIOS.

OpenWrt had a target for this CPU in the past
https://archive.openwrt.org/backfire/10.03.1/x86_ep80579/

but it was unmaintained for many years and has been removed many releases ago https://github.com/openwrt/openwrt/search?q=ep80579&type=commits

Your best bet is to look at the old code and see if you can port it to modern OpenWrt.

This is a tough job even for a developer. It's probably better if you just let it go and find another device.

2 Likes

Thank you so much I thought I was going crazy, I knew it was completely different from any x86 hardware I had touched before. For now I am not to concerned about getting that latest version of openwrt on this because it will be running behind the firewall of my fileserver, I just want something that will allow me to setup a ZFS pool and hook it up to my main fileserver for dumping files since I have alot of old HDDs, It was supposed to be a little side project since the original firmware is terrible. If I were to just put that old version of openwrt on what would I have to do. After researching it seems I have to make a uImage because uboot only accepts this image type, is this true otherwise is there a tutorial out there I can follow, I keep getting cryptic answers from people lol I don't expect anyone to do it for me but Its hard when I have never done this before.

Many thanks for the help.

Forget it, the efforts and/ or security issues aside - zfs with 256 MB RAM...

Would RAID be better? That's what the original OS uses, I'm only setting up a 4tb pool not anything that big plus its mirrored no redundancy, the only thing I noticed was after copying say 100gb it would go from 100mb/s start then at about 20gb it would go down to 50mb/s and then down to 10mb/s until the 100gb was done. I don't mind as it would just be an archive for crap I don't want on my good file server running proper hardware/a secondary backup. Before I was using it as a dump for a nextcloud instance so I could share files to the internet that diddnt matter, eg games for friends.

There is no ZFS package for OpenWrt. So much for "a little side project" eh?

convert the vmlinuz file into a uimage (google this)
try loading it with tftp and see if it's at least starting up the kernel and not stopping just after loading.
find out your onboard flash chip specifications to see if it's using 64k blocks or 128k blocks
Find the partition list of the onboard flash (should be in uboot's "printenv", you can also see something in the boot log in the OP)

7 cmdlinepart partitions found on MTD device nand0
Using command line partition definition
Creating 7 MTD partitions on "nand0":
0x000000000000-0x000000200000 : "safe-k"
0x000000200000-0x000000a00000 : "safe-r"
0x000000a00000-0x000000c00000 : "kernel"
0x000000c00000-0x000001400000 : "rootfs"
0x000001400000-0x000002400000 : "usr"
0x000002400000-0x000002600000 : "data"
0x000002600000-0x000007fc0000 : "app"

since you don't want to touch sources, you probably need to edit the bootcommand in uboot to have a rootfs= variable that points to the /dev/mtd2 or something. Hoping that the pre-compiled kernel is actually receiving the partition table fro the uboot.
If it is not, you need to find where in the source code the partition table is defined, and then edit it to be correct for this device. Yes partition table in embedded devices is usually hard-coded in the kernel, this requires recompile, especially in old stuff like that that is not using dtb (which can be at least compiled separately and bundled with the kernel later).
Then use tftp to send to uboot the root-jffs2-xxxx file with the right block size and write it to the right partition, also send the uimage and write it to kernel partition.

The mere explanation of the steps to follow requires a lot of time and skill. What I told you above may or may not work for you and it's still very generic. You are not installing Ubuntu in a old PC where everything is following standards and the sequence of steps is defined and easy to follow.
You are reverse-engineering how a specific embedded device is built and trying to take over with a different firmware (that also has not been maintained for over 10 years). A lot of what you must do requires trial and error to find out the right combination, and also understanding of how uboot and devices work to guess what COULD work in the first place.

2 Likes

Thanks man ill give it ago, yeh haha not that small after all, I am used to everything just working like that to be honest, I didn't think about it that way. I really do appreciate the help im just way to fast with things, this cant be rushed I see now. Ill make it my goal to get openwrt running on this annoying thing and get back to you with updates if you want.

A 2 MB kernel partition is also a recipe for plenty of grey hairs (especially on x86).

I diddnt even look at that :sob:. I saw this while doing a little bit of research https://github.com/alexeicolin/javelin but I dont think hes using the same nas as me and has powerpc version of my nas. It would be nice to boot from a usb and not worry about openwrt.

Just curios, maybe this is not the place to ask but how did you start out learning things like this, did you go to uni, was it self taught or something else. I'm still in high school and they only introduced digital tech 3 years ago and it just goes over basic programing nothing more, its a shame most schools don't teach or introduce electronics and embedded devices like this, its all around us everyday. I think at one point they did have raspberry pi's but they just sat there or got stolen.

I don't think school or uni can go so much in depth of this topic, in any topic really. They always stay very generic. This is something you learn at work, in your free time or with videos and books and google.
There is some useful information to start in OpenWrt's techref section of the wiki https://openwrt.org/docs/techref/start but then you will have to google around on your own to find articles and blogs and documentation if you want to go deeper.

The way I learned (I'm not a real programmer/developer or hacker but I know the basics to add a device, I added some devices to OpenWrt) is trying to integrate support of some kirkwood-based devices (Zyxel NSA310 and NSA325, also Pogoplugv4) from someone else's work, on Jeff Doozan's forum https://forum.doozan.com/list.php?2 and OpenWrt already had some kirkwood devices supported.

So my task was more like study, copy and adapt something that was already more or less working and up-to-date in Debian. This is a strong point of open source. You can always look at someone else's work and learn from it.
You can see here some of the commits I made to add support for the Zyxel NSA325 https://github.com/openwrt/openwrt/search?q=kirkwood+nsa325&type=commits (most of the code in uboot commits is copied from the other project)

And I also had to read documentation especially for uboot bootloader, to learn how it works. http://www.denx.de/wiki/U-Boot

In general yes your approach is good, but you should try with something easier first, something where you can copy and learn (and ask) from someone else that knows the device well already. Your current device is probably a lost cause. With embedded devices it's common to encounter such "dead end" devices that are either too old, unknown or unsupported by modern Linux, so you need to know when it's probably better to just let go. It is hard enough when everything is good and supported.

Imho you can try with one of the devices that are supported by the custom Debian from the forum I linked above.

boards like raspberry pi are good to learn programming, how to program small embedded devices to make them do actions.
But it provides you a pre-built PC-like system with many GUI tools that automate everything so you don't need to know or learn bootloader, flash partitions and so on. You don't know how an embedded device is built.