Add new device appears kernel panic error

Hi all:
I add a new AR9344 device for openwrt. But I compile and get a xx-sysupgrade.bin ,I burn in
xx-sysupgrade.bin.
error log :

     [    0.843792] m25p80 spi0.0: found m25p128, expected m25p80
     [    0.849336] m25p80 spi0.0: m25p128 (16384 Kbytes)
     [    0.854138] 7 cmdlinepart partitions found on MTD device spi0.0
     [    0.860156] Creating 7 MTD partitions on "spi0.0":
     [    0.865036] 0x000000000000-0x000000040000 : "u-boot"
     [    0.871983] 0x000000040000-0x000000080000 : "u-boot-env"
     [    0.879063] 0x000000080000-0x000000280000 : "kernel"
     [    0.885726] 0x000000280000-0x000000f80000 : "rootfs"
     [    0.892310] mtd: device 3 (rootfs) set to be root filesystem
     [    0.898143] mtdsplit: no squashfs found in "rootfs"
     [    0.903113] 0x000000f80000-0x000000fc0000 : "mib0"
     [    0.909593] 0x000000fc0000-0x000001000000 : "ART"
     [    0.916025] 0x000000080000-0x000000f80000 : "firmware"
     [    0.923820] libphy: Fixed MDIO Bus: probed
     [    0.944635] libphy: ag71xx_mdio: probed
     [    0.952901] libphy: ag71xx_mdio: probed
     [    1.684533] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:1a [uid=01410cc2, driver=Marvell 88E1111]
    [    1.694919] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
    [    2.325937] ag71xx-mdio.1: Found an AR934X built-in switch
    [    2.378384] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
    [    2.386179] NET: Registered protocol family 10
    [    2.393960] NET: Registered protocol family 17
    [    2.398694] 8021q: 802.1Q VLAN Support v1.8
    [    2.405784] List of all partitions:
    [    2.409349] 1f00             256 mtdblock0 [    2.413408]  (driver?)
    [    2.415856] 1f01             256 mtdblock1 [    2.419921]  (driver?)
    [    2.422321] 1f02            2048 mtdblock2 [    2.426393]  (driver?)
    [    2.428790] 1f03           13312 mtdblock3 [    2.432847]  (driver?)
    [    2.435261] 1f04             256 mtdblock4 [    2.439325]  (driver?)
    [    2.441725] 1f05             256 mtdblock5 [    2.445795]  (driver?)
    [    2.448194] 1f06           15360 mtdblock6 [    2.452251]  (driver?)
    [    2.454658] No filesystem could mount root, tried: [    2.459424]  squashfs
    [    2.461728] 
    [    2.463242] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
    [    2.472755] Rebooting in 1 seconds..

thanks.

Why you post only a smal part of the bootlog?

You error will be related to the bootargs/cmdline that are handed over from your bootloader.

I think you should set the bootargs in your device tree to override the one from your bootloader if you port to ath79...

If you port to ar71xx you will need patch-cmdline in you image build process...

Hi juppin ,

bootargs=board=WPJ344 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,2048k(kernel),13312k(rootfs),256k(mib0),256k(ART),15360k@0x80000(firmware) rootfstype=squashfs noinitrd

I can promise bootargs and partitions is ok.

I am modifying here openwrt/target/linux/ar71xx/image/generic.mk ,The kernel painc error has disappeared.

Original:

  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
	append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)

change into
IMAGE/sysupgrade.bin = append-kernel $$$$(BLOCKSIZE)| pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)

why?

thanks.