This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SquashFs with Beaglebone

We are trying to bring up Beaglebone board using squashfs filesystem through SD card. We get following error during kernel booting:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

   Data Size:    2880644 Bytes = 2.7 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.066713] omap_l3_smx omap_l3_smx.0: couldn't find resource
[    0.128617] Could not set LED4 to fully on
[    0.220443] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.280993] omap2_set_init_voltage: unable to get clk dpll1_ck
[    0.287153] omap2_set_init_voltage: unable to set vdd_mpu_iva
[    0.293258] omap2_set_init_voltage: unable to get clk l3_ick
[    0.299225] omap2_set_init_voltage: unable to set vdd_core
[    0.311040]
[    0.311048] CPSW phy found : id is : 0x7c0f1
[    0.317867] PHY 0:01 not found
INIT: version 2.86 booting
[    5.520926] SQUASHFS error: zlib_inflate error, data probably corrupt
[    5.527750] SQUASHFS error: squashfs_read_data failed to read block 0x60
[    5.534860] SQUASHFS error: Unable to read data cache entry [60]
[    5.541210] SQUASHFS error: Unable to read page, block 60, size 120cf
[    5.548031] SQUASHFS error: Unable to read data cache entry [60]
[    5.554380] SQUASHFS error: Unable to read page, block 60, size 120cf
[    5.561192] SQUASHFS error: Unable to read data cache entry [60]
[    5.567528] SQUASHFS error: Unable to read page, block 60, size 120cf
[    5.574337] SQUASHFS error: Unable to read data cache entry [60]
[    5.580681] SQUASHFS error: Unable to read page, block 60, size 120cf
[    5.587484] SQUASHFS error: Unable to read data cache entry [60]
[    5.593830] SQUASHFS error: Unable to read page, block 60, size 120cf
INIT: Entering runlevel: 5
[    5.682593] SQUASHFS error: Unable to read data cache entry [60]
[    5.688945] SQUASHFS error: Unable to read page, block 60, size 120cf
INIT: cannot execute "/etc/init.d/rc"
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes
INIT: Id "S" respawning too fast: disabled for 5 minutes

This is the sequence we followed:

1. Build u-boot and MLO image

2. Build uImage after enabling squashfs filesystem through menuconfig

3. Create squash.sqfs (Filesystem) using command mksquashfs

4. Copy the file system to SD card (/dev/sdd2 in Ubuntu) using command sudo dd if=squash.sqfs of=/dev/sdd2

5. Copied u-boot,MLO,uImage and uEnv.txt in the SD card first partition /dev/sdd1

 

My uEnv.txt contents:

optargs=run_hardware_tests quiet

 

6. Boot to the hardware

7. Stop booting process at the U-Boot in serial console

8. Change environment variable as follows:   setenv mmc_root=/dev/mmcblk0p2

9. setenv mmc_root_fs_type =squashfs

10. boot the kernel

  • Hi

    We enabled Zlib compression option in the kernel through menuconfig and have proceeded to the next error. This is latest issue we are facing:

          bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
    [    5.829740] List of all partitions:
    [    5.833534] b300         3872256 mmcblk0  driver: mmcblk
    [    5.839090]   b301           72261 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
    [    5.847472]   b302          923737 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
    [    5.855842]   b303         2859570 mmcblk0p3 00000000-0000-0000-0000-000000000mmcblk0p3
    [    5.864202] No filesystem could mount root, tried:  squashfs
    [    5.870123] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

    Can someone help us in guiding on what could be the issue in mounting the file system?

  • Hi,

    We have a custom board using AM335x. We are using v6.0 of the TI SDK for u-boot and kernel

    Before finding your post, I performed the same steps as you describe and have the same results.

    Kernel panic when trying to get rootfs from mmcblk0p2.

    Were you ever able to resolve this issue?

    Thanks in advance.

    Dave

  • Hi Dave 

    I am really sorry that I dont remember exactly what was the resolution but we solved it and delivered. Some checkpoints on the issue of fs mounting are (which you might already know but still .... )

    --> the proper partitioning of the mmc sd card,  

    --> creating and writing the fs as root, 

    --> enabling the required modules in kernel configuration etc., 

    Good luck,

    Rajam 

  • Thanks Rajam.

    I resolved it as well. In my case it was an incorrect destination for the 'of' parameter of the dd command.

    Now I need to clean up the rootfs drop to deal with the read-only partition.