Dynalink DL-WRX36 Askey RT5010W IPQ8072A technical discussion

I tested it now.
Both approaches do work.
If a properly named initramfs image is found from an attached USB stick then it is booted, but if no USB stick is found then the normal image from flash is booted.

Adding the USB detection step adds maybe 5-7 seconds to the boot process, so a bit longer boot time but no major problem.

1) combined boot command:

bootcmd=usb start && fatload usb 0:1 0x44000000 openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb && bootm 0x44000000; setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs rootfstype=squashfs rootwait; ubi part fs; ubi read 0x44000000 kernel; bootm 0x44000000#config@rt5010w-d350-rev0

Setting the u-boot variable from SSH console:

fw_setenv bootcmd 'usb start && fatload usb 0:1 0x44000000 openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb && bootm 0x44000000; setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs rootfstype=squashfs rootwait; ubi part fs; ubi read 0x44000000 kernel; bootm 0x44000000#config@rt5010w-d350-rev0'

2) split into two separate commands for clarity:
(note that each alternative can also be run manually from the u-boot console)

bootcmd=run openwrtusb; run openwrtboot
openwrtboot=setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs rootfstype=squashfs rootwait; ubi part fs; ubi read 0x44000000 kernel; bootm 0x44000000#config@rt5010w-d350-rev0
openwrtusb=usb start && fatload usb 0:1 0x44000000 openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb && bootm 0x44000000

Setting the u-boot variables from SSH console:

fw_setenv bootcmd 'run openwrtusb; run openwrtboot'
fw_setenv openwrtboot 'setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs rootfstype=squashfs rootwait; ubi part fs; ubi read 0x44000000 kernel; bootm 0x44000000#config@rt5010w-d350-rev0'
fw_setenv openwrtusb 'usb start && fatload usb 0:1 0x44000000 openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb && bootm 0x44000000'

.
(Verify set values with fw_printenv)


USB stick detected, initramfs image loaded:

Hit any key to stop autoboot:  0
starting USB...
USB0:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
USB1:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 1 for devices... 1 USB Device(s) found
reading openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb
11531400 bytes read in 6174 ms (1.8 MiB/s)
## Loading kernel from FIT Image at 44000000 ...
   Using 'config@rt5010w-d350-rev0' configuration

USB not found, mount flash normally

Hit any key to stop autoboot:  0
starting USB...
USB0:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 0 for devices... 1 USB Device(s) found
USB1:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 1 for devices... 1 USB Device(s) found
** Bad device usb 0 **
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=0", size 97 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
10 Likes