i downloaded stock firmware of eap1200h and ews350ap
there are two files in that package "*uImage-lzma.bin" and "*root.squashfs"
I only can boot the uImage-lzma.bin - it ends with kernel panic because of the rootfs
the "*root.squashfs" is not bootable because of the "Bad Magic Number" error that I don't understand
I don't understand, where is the failsafe partition? in the stock firmware file of eap1200h or ews350ap?
what are the commands in uboot to do that?
Boot (PRI)-> tftp 0x89000000 openwrt-ar71xx-generic-ews350ap-root.squashfs
dup 1 speed 1000
Using eth0 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'openwrt-ar71xx-generic-ews350ap-root.squashfs'.
Load address: 0x89000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#############################################################
done
Bytes transferred = 9961472 (980000 hex)
Boot (PRI)-> bootm
## Booting image at 89000000 ...
Bad Magic Number
Boot (PRI)->
Boot (PRI)->
Boot (PRI)-> tftp 0x89000000 openwrt-ar71xx-generic-ews350ap-uImage-lzma.bin
dup 1 speed 1000
Using eth0 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'openwrt-ar71xx-generic-ews350ap-uImage-lzma.bin'.
Load address: 0x89000000
Loading: *#################################################################
e[8C #################################################################
e[8C #################################################################
e[8C ##########
done
Bytes transferred = 1048576 (100000 hex)
Boot (PRI)-> bootm
## Booting image at 89000000 ...
Image Name: MIPS OpenWrt Linux-3.3.8
Created: 2018-09-19 8:39:59 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1047115 Bytes = 1022.6 kB
Load Address: 80060000
Entry Point: 80060000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
[ 0.000000] Linux version 3.3.8 (root@marine-ubuntu1604) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Wed Sep 19 16:38:59 CST 2018
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019750 (MIPS 74Kc)
[ 0.000000] SoC: Qualcomm Atheros QCA9558 rev 0
[ 0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00008000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00008000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: board=EWS350AP console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom),1536k(kernel),11584k(rootfs),2560k(failsafe),64k(ART),13120k@0xa0000(firmware) rootfstype=squashfs,yaffs,jffs2 noinitrd
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 126272k/131072k available (2233k kernel code, 4800k reserved, 589k data, 212k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[ 0.060000] pid_max: default: 32768 minimum: 301
[ 0.060000] Mount-cache hash table entries: 512
[ 0.070000] Initialized recycle list for cpu 0.
[ 0.070000] NET: Registered protocol family 16
[ 0.080000] gpiochip_add: registered GPIOs 0 to 23 on device: ath79
[ 0.080000] MIPS: machine is Senao EWS350AP
[ 0.090000] registering PCI controller with io_map_base unset
[ 0.090000] ar724x-pci ar724x-pci.1: PCIe link is down
[ 0.100000] registering PCI controller with io_map_base unset
[ 0.310000] bio: create slab <bio-0> at 0
[ 0.310000] PCI host bridge to bus 0000:00
[ 0.320000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[ 0.320000] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.330000] pci 0000:00:00.0: invalid calibration data
[ 0.330000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]
[ 0.340000] pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref]
[ 0.340000] PCI host bridge to bus 0000:01
[ 0.350000] pci_bus 0000:01: root bus resource [mem 0x12000000-0x13ffffff]
[ 0.350000] pci_bus 0000:01: root bus resource [io 0x0001]
[ 0.360000] pci 0000:00:00.0: using irq 40 for pin 1
[ 0.360000] Switching to clocksource MIPS
[ 0.370000] NET: Registered protocol family 2
[ 0.370000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.370000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.380000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.380000] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.390000] TCP reno registered
[ 0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400000] NET: Registered protocol family 1
[ 0.420000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.420000] JFFS2 version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.430000] msgmni has been set to 246
[ 0.440000] io scheduler noop registered
[ 0.440000] io scheduler deadline registered (default)
[ 0.450000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.470000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[ 0.480000] console [ttyS0] enabled, bootconsole disabled
[ 0.480000] console [ttyS0] enabled, bootconsole disabled
[ 0.490000] m25p80 spi0.0: found s25fl512s, expected m25p80
[ 0.500000] m25p80 spi0.0: s25fl512s (65536 Kbytes)
[ 0.500000] 8 cmdlinepart partitions found on MTD device spi0.0
[ 0.510000] Creating 8 MTD partitions on "spi0.0":
[ 0.520000] 0x000000000000-0x000000040000 : "u-boot"
[ 0.520000] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.530000] 0x000000050000-0x0000000a0000 : "custom"
[ 0.530000] mtd: partition "custom" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.550000] 0x0000000a0000-0x000000220000 : "kernel"
[ 0.550000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.570000] 0x000000220000-0x000000d70000 : "rootfs"
[ 0.570000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.590000] mtd: partition "rootfs" set to be root filesystem
[ 0.590000] split_squashfs: no squashfs found in "spi0.0"
[ 0.600000] 0x000000d70000-0x000000ff0000 : "failsafe"
[ 0.600000] mtd: partition "failsafe" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.620000] 0x000000ff0000-0x000001000000 : "ART"
[ 0.620000] 0x0000000a0000-0x000000d70000 : "firmware"
[ 0.630000] mtd: partition "firmware" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.640000] /proc/Lan_Led created
[ 0.660000] ag71xx_mdio: probed
[ 0.660000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[ 1.220000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:05 [uid=004dd072, driver=Generic PHY]
[ 1.230000] GACT probability on
[ 1.230000] Mirror/redirect action on
[ 1.230000] u32 classifier
[ 1.240000] Performance counters on
[ 1.240000] input device check on
[ 1.250000] Actions configured
[ 1.250000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.250000] TCP bic registered
[ 1.260000] TCP cubic registered
[ 1.260000] TCP westwood registered
[ 1.260000] TCP highspeed registered
[ 1.270000] TCP hybla registered
[ 1.270000] TCP htcp registered
[ 1.270000] TCP vegas registered
[ 1.280000] TCP veno registered
[ 1.280000] TCP scalable registered
[ 1.280000] TCP lp registered
[ 1.290000] TCP yeah registered
[ 1.290000] TCP illinois registered
[ 1.290000] NET: Registered protocol family 17
[ 1.300000] Bridge firewalling registered
[ 1.300000] 8021q: 802.1Q VLAN Support v1.8
[ 1.310000] VFS: Cannot open root device "(null)" or unknown-block(31,4)
[ 1.320000] Please append a correct "root=" boot option; here are the available partitions:
[ 1.320000] 1f00 256 mtdblock0 (driver?)
[ 1.330000] 1f01 64 mtdblock1 (driver?)
[ 1.330000] 1f02 320 mtdblock2 (driver?)
[ 1.340000] 1f03 1536 mtdblock3 (driver?)
[ 1.340000] 1f04 11584 mtdblock4 (driver?)
[ 1.350000] 1f05 2560 mtdblock5 (driver?)
[ 1.350000] 1f06 64 mtdblock6 (driver?)
[ 1.360000] 1f07 13120 mtdblock7 (driver?)
[ 1.360000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4)
Boot (PRI)-> bootm tftp 0x89000000 openwrt-ar71xx-generic-eap1200h-root.squashfs openwrt-ar71xx-generic-eap1200h-uImage-lzma.bin
Using eth0 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'openwrt-ar71xx-generic-eap1200h-uImage-lzma.bin'.
Load address: 0x89000000
Loading: *#################################################################
e[8C #################################################################
e[8C #################################################################
e[8C ##########
done
Bytes transferred = 1048576 (100000 hex)
Boot (PRI)-> tftp 0x89000000 openwrt-ar71xx-generic-eap1200h-uImage-lzma.bin bootm
## Booting image at 89000000 ...
Image Name: MIPS OpenWrt Linux-3.3.8
Created: 2018-07-16 9:40:27 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1047504 Bytes = 1023 kB
Load Address: 80060000
Entry Point: 80060000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
[ 0.000000] Linux version 3.3.8 (root@Derek.Linux) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Mon Jul 16 17:38:45 CST 2018
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019750 (MIPS 74Kc)
[ 0.000000] SoC: Qualcomm Atheros QCA9558 rev 0
[ 0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00008000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00008000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: board=EAP1200H console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom),1536k(kernel),11584k(rootfs),2560k(failsafe),64k(ART),13120k@0xa0000(firmware) rootfstype=squashfs,yaffs,jffs2 noinitrd
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 126272k/131072k available (2232k kernel code, 4800k reserved, 589k data, 212k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[ 0.060000] pid_max: default: 32768 minimum: 301
[ 0.060000] Mount-cache hash table entries: 512
[ 0.070000] Initialized recycle list for cpu 0.
[ 0.070000] NET: Registered protocol family 16
[ 0.080000] gpiochip_add: registered GPIOs 0 to 23 on device: ath79
[ 0.080000] MIPS: machine is Senao EAP1200H
[ 0.090000] registering PCI controller with io_map_base unset
[ 0.090000] ar724x-pci ar724x-pci.1: PCIe link is down
[ 0.100000] registering PCI controller with io_map_base unset
[ 0.310000] bio: create slab <bio-0> at 0
[ 0.310000] PCI host bridge to bus 0000:00
[ 0.320000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[ 0.320000] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.330000] pci 0000:00:00.0: invalid calibration data
[ 0.330000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]
[ 0.340000] pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref]
[ 0.340000] PCI host bridge to bus 0000:01
[ 0.350000] pci_bus 0000:01: root bus resource [mem 0x12000000-0x13ffffff]
[ 0.350000] pci_bus 0000:01: root bus resource [io 0x0001]
[ 0.360000] pci 0000:00:00.0: using irq 40 for pin 1
[ 0.360000] Switching to clocksource MIPS
[ 0.370000] NET: Registered protocol family 2
[ 0.370000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.370000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.380000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.380000] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.390000] TCP reno registered
[ 0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400000] NET: Registered protocol family 1
[ 0.420000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.420000] JFFS2 version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.430000] msgmni has been set to 246
[ 0.440000] io scheduler noop registered
[ 0.440000] io scheduler deadline registered (default)
[ 0.450000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.470000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[ 0.480000] console [ttyS0] enabled, bootconsole disabled
[ 0.480000] console [ttyS0] enabled, bootconsole disabled
[ 0.490000] m25p80 spi0.0: found s25fl512s, expected m25p80
[ 0.500000] m25p80 spi0.0: s25fl512s (65536 Kbytes)
[ 0.500000] 8 cmdlinepart partitions found on MTD device spi0.0
[ 0.510000] Creating 8 MTD partitions on "spi0.0":
[ 0.520000] 0x000000000000-0x000000040000 : "u-boot"
[ 0.520000] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.530000] 0x000000050000-0x0000000a0000 : "custom"
[ 0.530000] mtd: partition "custom" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.550000] 0x0000000a0000-0x000000220000 : "kernel"
[ 0.550000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.570000] 0x000000220000-0x000000d70000 : "rootfs"
[ 0.570000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.590000] mtd: partition "rootfs" set to be root filesystem
[ 0.590000] split_squashfs: no squashfs found in "spi0.0"
[ 0.600000] 0x000000d70000-0x000000ff0000 : "failsafe"
[ 0.600000] mtd: partition "failsafe" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.620000] 0x000000ff0000-0x000001000000 : "ART"
[ 0.620000] 0x0000000a0000-0x000000d70000 : "firmware"
[ 0.630000] mtd: partition "firmware" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.650000] /proc/Lan_Led created
[ 0.660000] ag71xx_mdio: probed
[ 0.660000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[ 1.220000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:05 [uid=004dd072, driver=Generic PHY]
[ 1.230000] GACT probability on
[ 1.230000] Mirror/redirect action on
[ 1.240000] u32 classifier
[ 1.240000] Performance counters on
[ 1.240000] input device check on
[ 1.250000] Actions configured
[ 1.250000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.250000] TCP bic registered
[ 1.260000] TCP cubic registered
[ 1.260000] TCP westwood registered
[ 1.260000] TCP highspeed registered
[ 1.270000] TCP hybla registered
[ 1.270000] TCP htcp registered
[ 1.270000] TCP vegas registered
[ 1.280000] TCP veno registered
[ 1.280000] TCP scalable registered
[ 1.280000] TCP lp registered
[ 1.290000] TCP yeah registered
[ 1.290000] TCP illinois registered
[ 1.290000] NET: Registered protocol family 17
[ 1.300000] Bridge firewalling registered
[ 1.300000] 8021q: 802.1Q VLAN Support v1.8
[ 1.310000] VFS: Cannot open root device "(null)" or unknown-block(31,4)
[ 1.320000] Please append a correct "root=" boot option; here are the available partitions:
[ 1.320000] 1f00 256 mtdblock0 (driver?)
[ 1.330000] 1f01 64 mtdblock1 (driver?)
[ 1.330000] 1f02 320 mtdblock2 (driver?)
[ 1.340000] 1f03 1536 mtdblock3 (driver?)
[ 1.340000] 1f04 11584 mtdblock4 (driver?)
[ 1.350000] 1f05 2560 mtdblock5 (driver?)
[ 1.350000] 1f06 64 mtdblock6 (driver?)
[ 1.360000] 1f07 13120 mtdblock7 (driver?)
[ 1.370000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4)