So I'm stuck again...
$this->bbcode_second_pass_code('', 'NSA310> printenv
bootcmd=run startboot;run bootubi
bootfilem=uImage
bootfilez=zImage
bootpart=0:1
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
devnum=1
ethact=egiga0
ethaddr=CC:5D:4E:C9:F5:4A
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-nsa310.dtb
if_netconsole=ping $serverip
ipaddr=192.168.1.5
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=192.168.1.5
ncipk=192.168.1.77
netconsole=off
partition=nand0,0
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
serverip=192.168.1.74
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
Environment size: 3039/131068 bytes')
I suspect bootpart 0:1 value since I have only one big /dev/sda1 partition, there's also this: $this->bbcode_second_pass_code('', 'setenv bootpart ${devnum}:1')
However when I have changed it:
$this->bbcode_second_pass_code('', 'NSA310> setenv bootpart ${devnum}:0
NSA310> setenv bootpart=0:0')
$this->bbcode_second_pass_code('', 'NSA310> setenv bootdir
NSA310> run startboot
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: Bus 0: OK Bus 1: not available
Device 0: Model: WDC WD40PURX-64GVNY0 Firm: 80.00A80 Ser#: WD-WCC4E0SERLJD
Type: Hard Disk
Supports 48-bit addressing
Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)
USB device 0: unknown device
Device 0: Model: WDC WD40PURX-64GVNY0 Firm: 80.00A80 Ser#: WD-WCC4E0SERLJD
Type: Hard Disk
Supports 48-bit addressing
Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)
... is now current device
ide found on device 0
Checking for: /uEnv.txt ...
** File not found /zImage **
** File not found /uImage **
No kernel found
Device 1: not available')
Still 'Device 1: not available'
EDIT: Solved by Bodhi with this:
$this->bbcode_second_pass_code('', 'setenv bootdir /boot
boot')
$this->bbcode_second_pass_code('', 'uname -r
4.16.8-1-ARCH')