Tool/software: Linux
Kindly share steps to create squashfs on Ubuntu 16.04 LTS filesystem using beagle bone board and bootup using Sd Card.
What should be the fstab contents for the same?
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.
Tool/software: Linux
Kindly share steps to create squashfs on Ubuntu 16.04 LTS filesystem using beagle bone board and bootup using Sd Card.
What should be the fstab contents for the same?
Hello Manali,
You can create squashfs with mksquashfs command:
cd <Processor SDK>/filesystem/
mkdir rootfs
sudo tar xvf tisdk-rootfs-image-am335x-evm.tar.xz -C rootfs/
sudo mkdir -p rootfs/media/ram
sudo mksquashfs rootfs/ filesystem.squashfs
sudo dd if=filesystem.squashfs of=/dev/sdX2
To create the squashfs image while building the OE SDK.
You need to add this to build/conf/local.conf
EXTRA_IMAGE_FEATURES += "read-only-rootfs"
IMAGE_FSTYPE += "squashfs"
And this to sources/meta-arago/meta-arago-distro/recipes-core/images/arago-base-tisdk-image.bb
do_install_append ( {
mkdir -p ${D}/media/ram
}
FILES_${PN} += " \
/media/ram \
"
Note: You know that the U-Boot has no SquashFS support and you need to load the device tree and the kernel from the SD card's fist partition right?
Best regards,
Kemal
Thank you Kemal!
I have downloaded TI SDK linux-am335x-evm-04.01.00.06 and created squashfs filesystem as you mentioned in above chain.
I copied squashfs to "/dev/sdd2" i.e second partition of sd card and first partition has u-boot.img, kernel zimage and MLO. Both partitions are of VFAT type and I created 3rd partition of Ext4 type.
I am trying to bootup with below bootargs:
setenv bootargs console=tty0 console=${console} ${optargs} ${cape_disable} ${cape_enable} root=/dev/mmcblk0p2 rootfstype=squashfs rootwait ${cmdline}
I am not able to boot-up with squash.
Kindly share your views on the same.
Hi Kemal,
I am using prbuilt zImage and created filesystem.squash fom ti-sdk and trying bootup
U-Boot 2013.04-dirty (Jul 10 2013 - 14:02:53)
I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
831 bytes read in 3 ms (270.5 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading /boot/uEnv.txt
231 bytes read in 5 ms (44.9 KiB/s)
reading /boot/vmlinuz-4.4.27-bone-rt-r14
3607512 bytes read in 413 ms (8.3 MiB/s)
reading /boot/dtbs/4.4.27-bone-rt-r14/am335x-boneblack.dtb
55834 bytes read in 19 ms (2.8 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Using Device Tree in place at 88000000, end 88010a19
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.41-ge3a80a1c5c (gtbldadm@ubuntu-16) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 PREEMPT Tue Sep 26 18:31:42 EDT 2017
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt:Machine model: TI AM335x BeagleBone Black
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0x9d000000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129920
[ 0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p2 rootfstype=squashfs rootwait cape_disable=bone_capemgr.disable_partno=BB-BONELT-HDMI, BB-BONELT-HDMIN, BB-BONE-HDMI bone_capemgr.enable_partno=BB-UART1,BB-AAIM-LCD7:00A1,BB-UART4,BB-UART2
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 457900K/524288K available (7168K kernel code, 281K rwdata, 2432K rodata, 1024K init, 280K bss, 17236K reserved, 49152K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0800000 (8160 kB)
[ 0.000000] .init : 0xc0b00000 - 0xc0c00000 (1024 kB)
[ 0.000000] .data : 0xc0c00000 - 0xc0c46410 ( 282 kB)
[ 0.000000] .bss : 0xc0c46410 - 0xc0c8c674 ( 281 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000018] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000045] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000059] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000407] clocksource_probe: no matching clocksources found
[ 0.000623] Console: colour dummy device 80x30
[ 0.001764] console [tty0] enabled
[ 0.001824] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.001865] This ensures that you still see kernel messages. Please
[ 0.001902] update your kernel commandline.
[ 0.001957] Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)
[ 0.048827] pid_max: default: 32768 minimum: 301
[ 0.049030] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.049079] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.050152] CPU: Testing write buffer coherency: ok
[ 0.050641] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.051834] EFI services will not be available.
[ 0.053803] devtmpfs: initialized
[ 0.077009] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.077590] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.077680] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.082327] pinctrl core: initialized pinctrl subsystem
[ 0.084075] NET: Registered protocol family 16
[ 0.086904] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.101376] omap_hwmod: tptc0 using broken dt data from edma
[ 0.101629] omap_hwmod: tptc1 using broken dt data from edma
[ 0.101840] omap_hwmod: tptc2 using broken dt data from edma
[ 0.107320] omap_hwmod: debugss: _wait_target_disable failed
[ 0.188787] cpuidle: using governor ladder
[ 0.218774] cpuidle: using governor menu
[ 0.225923] OMAP GPIO hardware version 0.1
[ 0.249196] No ATAGs?
[ 0.249248] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.291999] edma 49000000.edma: Legacy memcpy is enabled, things might not work
[ 0.300702] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.305676] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[ 0.305841] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[ 0.306086] media: Linux media interface: v0.10
[ 0.306192] Linux video capture interface: v2.00
[ 0.306281] pps_core: LinuxPPS API ver. 1 registered
[ 0.306320] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.306414] PTP clock support registered
[ 0.306495] EDAC MC: Ver: 3.0.0
[ 0.307735] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.308236] Advanced Linux Sound Architecture Driver Initialized.
[ 0.310145] clocksource: Switched to clocksource timer1
[ 0.325417] NET: Registered protocol family 2
[ 0.326498] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.326621] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.326718] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.326842] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.326913] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.327137] NET: Registered protocol family 1
[ 0.327713] RPC: Registered named UNIX socket transport module.
[ 0.327770] RPC: Registered udp transport module.
[ 0.327806] RPC: Registered tcp transport module.
[ 0.327841] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.329145] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.332674] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 0.344637] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.345972] NFS: Registering the id_resolver key type
[ 0.346068] Key type id_resolver registered
[ 0.346105] Key type id_legacy registered
[ 0.346193] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.348779] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.348867] io scheduler noop registered
[ 0.348902] io scheduler deadline registered
[ 0.349153] io scheduler cfq registered (default)
[ 0.350536] pinctrl-single 44e10800.pinmux: please update dts to use #pinctrl-cells = <1>
[ 0.351165] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.443735] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 0.449238] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 155, base_baud = 3000000) is a 8250
[ 1.095443] console [ttyS0] enabled
[ 1.101310] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[ 1.108182] [drm] Initialized
[ 1.130829] brd: module loaded
[ 1.143312] loop: module loaded
[ 1.151309] libphy: Fixed MDIO Bus: probed
[ 1.230249] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.236444] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[ 1.243847] libphy: 4a101000.mdio: probed
[ 1.247940] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[ 1.258147] cpsw 4a100000.ethernet: Detected MACID = b0:d5:cc:fe:b4:19
[ 1.265055] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.274743] mousedev: PS/2 mouse device common for all mice
[ 1.281028] i2c /dev entries driver
[ 1.286407] cpu cpu0: OPP-v2 not supported, cpufreq-dt will attempt to use legacy tables.
[ 1.296290] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 1.422097] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.434045] davinci-mcasp 48038000.mcasp: invalid tdm slots: 0
[ 1.440951] davinci-mcasp 4803c000.mcasp: invalid tdm slots: 0
[ 1.448695] NET: Registered protocol family 10
[ 1.456492] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.466071] NET: Registered protocol family 17
[ 1.471168] Key type dns_resolver registered
[ 1.476029] omap_voltage_late_init: Voltage driver support not added
[ 1.482560] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.490889] mmc0: new high speed SDHC card at address aaaa
[ 1.497476] mmcblk0: mmc0:aaaa SS04G 3.69 GiB
[ 1.503411] mmcblk0: p1 p2 p3
[ 1.523595] mmc1: new high speed MMC card at address 0001
[ 1.529972] mmcblk1: mmc1:0001 S10004 3.56 GiB
[ 1.535101] mmcblk1boot0: mmc1:0001 S10004 partition 1 4.00 MiB
[ 1.542329] mmcblk1boot1: mmc1:0001 S10004 partition 2 4.00 MiB
[ 1.550789] random: fast init done
[ 1.555743] mmcblk1: p1 p2
[ 1.565402] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[ 1.573150] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 1.722826] tda998x 0-0070: found TDA19988
[ 1.727958] tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops)
[ 1.734084] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.740784] [drm] No driver support for vblank timestamp query.
[ 1.747082] tilcdc 4830e000.lcdc: No connectors reported connected with modes
[ 1.754358] [drm] Cannot find any crtc or sizes - going 1024x768
[ 1.774789] Console: switching to colour frame buffer device 128x48
[ 1.790820] tilcdc 4830e000.lcdc: fb0: frame buffer device
[ 1.821181] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 1.940861] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[ 1.948259] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 550000 KHz
[ 1.956047] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 600000 KHz
[ 1.965644] hctosys: unable to open rtc device (rtc0)
[ 1.972871] ALSA device list:
[ 1.975932] No soundcards found.
[ 1.981723] List of all partitions:
[ 1.985328] 0100 65536 ram0 [ 1.988967] (driver?)
[ 1.991584] 0101 65536 ram1 [ 1.995230] (driver?)
[ 1.997641] 0102 65536 ram2 [ 2.001331] (driver?)
[ 2.003749] 0103 65536 ram3 [ 2.007383] (driver?)
[ 2.009791] 0104 65536 ram4 [ 2.013481] (driver?)
[ 2.015897] 0105 65536 ram5 [ 2.019532] (driver?)
[ 2.021958] 0106 65536 ram6 [ 2.025588] (driver?)
[ 2.027994] 0107 65536 ram7 [ 2.031637] (driver?)
[ 2.034048] 0108 65536 ram8 [ 2.037678] (driver?)
[ 2.042206] 0109 65536 ram9 [ 2.045840] (driver?)
[ 2.050272] 010a 65536 ram10 [ 2.053990] (driver?)
[ 2.058383] 010b 65536 ram11 [ 2.062113] (driver?)
[ 2.066479] 010c 65536 ram12 [ 2.070209] (driver?)
[ 2.074571] 010d 65536 ram13 [ 2.078287] (driver?)
[ 2.082629] 010e 65536 ram14 [ 2.086347] (driver?)
[ 2.090705] 010f 65536 ram15 [ 2.094426] (driver?)
[ 2.098698] b300 3872256 mmcblk0 [ 2.102610] driver: mmcblk
[ 2.107333] b301 2048000 mmcblk0p1 cfcbfb99-01[ 2.112564]
[ 2.115964] b302 1024000 mmcblk0p2 cfcbfb99-02[ 2.121191]
[ 2.124540] b303 102400 mmcblk0p3 cfcbfb99-03[ 2.129754]
[ 2.133069] b310 3735552 mmcblk1 [ 2.136964] driver: mmcblk
[ 2.141599] b311 72261 mmcblk1p1 00000000-01[ 2.146815]
[ 2.150125] b312 3662820 mmcblk1p2 00000000-02[ 2.155353]
[ 2.158656] b330 4096 mmcblk1boot1 [ 2.163002] (driver?)
[ 2.167192] b320 4096 mmcblk1boot0 [ 2.171538] (driver?)
[ 2.175685] No filesystem could mount root, tried: [ 2.180495] squashfs
[ 2.184579]
[ 2.187904] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[ 2.198327] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
Do not just copy the filesystem.squashfs to SD card, it is an image. Use dd command to reflect and write its raw content directly over the SD card's partition.
sudo dd if=filesystem.squashfs of=/dev/sdd2
when I used dd command I'm getting Input/Output error. Filesystem.squashfs is not getting copied completely.
When try to see content of /dev/sdd2 where squash is copied it gives Input/Output Error.
While executing dd it show below message as
909872+0 records in
909872+0 records out
Any Ideas on this?
Thanks,
Mrudula
Format the partition before flashing it with dd command, and make sure that this image can fit into this SD card.
sudo dd if=/dev/zero of=/dev/sdd2