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.

Linux/AM3351: SquashFS support

Part Number: AM3351


Tool/software: Linux

Hi,

Please share the detailed steps to craete squashfs for beagle bone black and boot settings to mount squashfs using u-boot.

Thanks,

Mrudula

  • Hi,

    What Linux version are you using?
  • We are using linux 4.4.27 version.

  • This is not a TI Processor SDK release. If you are using a community Debian (or any other) release, please ask your questions on www.beagleboard.org This forum supports only the Processor SDK released by TI.
  • We are currently using linux 4.4.27. If required we can switch to TI SDK if it supports read only filesystem like squashfs on beagle bone black.
    I have explored TI SDK for squash support it seems like there is no prebuilt squashfs image which we can use or there is no document which explains the squashfs booting procedure. So could you please help me getting details which can be used to boot squashfs on beagle bone black from SD card using TI SDk?
  • Manali,

    This post has a pretty solid list of the steps required:

    e2e.ti.com/.../203311

    This post also probably has some useful information:

    e2e.ti.com/.../240026

    Along with this one:

    e2e.ti.com/.../638304

    Also, it seems that you originally posted on this issue a while back here:

    e2e.ti.com/.../641008

    Have you followed those steps?

    We don't provide a squashfs as part of the SDK and it is not officially supported. However, it is a pretty generic Linux feature and I can't think of any reasons why it should not work. It seems that many others in the threads above have made great progress.

    I hope this is helpful.
  • Thank you RonB for sharing links. I have followed steps mentioned in above links still i could not make it.

    Below link explains the steps in details:
    e2e.ti.com/.../203311
    But in one of the reply it is mentioned that he does not know/remember what is the exact solution so i am also stuck with the below errors:

    [ 5.870123] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

    Could you please help us on resolving this error?


    Thanks,
    Mrudula
  • Mrudula,

    The last user reports success and his problem was:

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

    What are you using for this?

    Could you please attach a full boot log with the failure to this thread for us to try to help?
  • Hi,

    I have downloaded ti-sdk (ti-processor-sdk-linux-am335x-evm-04.03.00.05-Linux-x86-Install.bin). I flashed sd card using create-sdcard.sh script. I could not boot up from sd card. My board is booting from sd card even though boot pin is set sd condition.

    Please guide me in building sd card from prebuilt images of ti.

    Thanks,

    Mrudula

  • Hi,

    I created squash filesystem using mksquash command as mentioned by kemal

    sudo tar xvf tisdk-rootfs-image-am335x-evm.tar.xz -C rootfs/
    sudo mksquashfs rootfs/ filesystem.squashfs
    sudo mkdir -p rootfs/media/ram

    and created sd card using create_sdcard.sh script available in bin directory of TI SDK.

    Copied filesystem.squashfs using dd command as below

    sudo dd if=filesystem.squashfs of=/dev/sdc2

    Created uEnv.txt file under boot directory of sd card. boot directory contains prebuilt MLO, u-boot.img from TI SDK.

    When tried to boot up with this sd card I get below log:

    U-Boot SPL 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11)
    Trying to boot from MMC1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img


    U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11 -0400)

    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net:   Could not get PHY for cpsw: addr 0
    cpsw, usb_ether
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    33 bytes read in 3 ms (10.7 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    Failed to mount ext2 filesystem...
    ** Unrecognized filesystem type **
    SD/MMC found on device 1
    ** Invalid partition 2 **
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0:   Port not available.
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC a8:1b:6a:1c:3b:a3
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    ERROR: The remote end did not respond in time.
    at /oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/u-boot-ti-staging/2017.01+gitAUTOINC+c68ed086bd-r21/git/drivers/usb/gadget/ether.c:2426/_usb_eth_init()
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-a8-1b-6a-1c-3b-a3
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC a8:1b:6a:1c:3b:a3
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    ERROR: The remote

    From above log it seems like it could not fine correct partition/ filesystem type and looks like trying to boot from USB.

    Could you please help on setting bootargs or mmc_args and how to boot from mmc.

    Thanks,

    Mrudula

  • Hi,

    The person who is handling this thread is currently out of the office and will return next week and wil look into this thread then.

    Best Regards,
    Schuyler
  • Mrudula,

    I'm not sure U-Boot can read the kernel and DTS from a squashfs. Can you move them to the boot partition and have U-Boot read them from there?
  • I can copy zImage and dtb's from squash to boot partition. Do I need to copy DTS in specific path/ directory for loading from u-boot?
    Please let me know the correct path/directory name in boot partition.
    Thanks,

    Mrudula

  • No specific path required as long as you can read the file from U-Boot. I usually just put them in the root directory of the partition with MLO, U-Boot, and uEnv.txt.
  • Mrudula,

    Are you still facing this issue or did you come up with a solution? Thanks.
  • I am still having a problem. When I copied squashed filesystem using dd command to SD card, u-boot is not able to recognize this partition and not able to read uEnv.txt file. I created separate boot partition having MLO, u-boot.img and uEnv.txt file. But with this changes also not able to boot.

  • Can you please provide a log?
  • Mrudula,

    We haven't heard back from you in a while. I hope this means you've overcome this issue. Thanks.