When I'm trying to boot the beaglebone black manually from the uboot its not able to get the root file system from the emmc - embedded-linux

I'm a neewbie to embedded linux.
I was trying to compile the kernel(debian 10.3) manually from the uboot on beaglebone balck but even though i have passed the correct root file directory, it get stuck on "waiting for root device /dev/mmcblk1p1 .
When I was trying to boot the BBB from uboot with the following commands
setenv bootargs console tyyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait
load mmc 1:1 0x82000000 /boot/vmlinuz-4.19.94+ti-r42
load mmc 1:1 0x88000000 /boot/dtbs/4.19.94+ti-r42/am335x-boneblack-uboot-univ.dtb
Uboot commands(emmc)
I get this
result
But when i flash an sd card with the same image file
and execute the same commands( with different partitions and all) in the uboot uboot commands(sd card)
I'm able to compile the kernel
The partitions on the emmc-
partitions on eMMC

Related

Which linux device driver is responsible for formatting and writing root file system?

I'm getting started with imx6 processors and the procedure involved to bring up the board is to flash u-boot kernel dtb and rootfs which is taken care of by mfg tools provided by nxp.
For creating a rootfs partition the command run is
mkfs.ext3 -F -E nodiscard /dev/mmcblk1p2
and for untaring the rootfs into this partition it is.
pipe tar -jxv -C /mnt/mmcblk1p2
I'd like to know the working of this, which kernel driver is being called for executing these commands?
My kernel version is 4.9.88.
I did find a few driver files related to mmc in the path
/drivers/mmc/core
but there is nothing related to filesystem reading or writing here.
Can anyone explain which driver files are used to create filesystems?
Creating the filesystem is done by the userspace program mke2fs (of which mkfs.ext3 is an alias) which is part of the e2fsprogs package. The kernel and drivers have no way of creating filesystems. Therefore, only the block driver for accessing the MMC device is involved, but no file system driver.

Booting microzed 7010 board with NFS when initramfs is enabled in kernel

I am using petalinux and vivado 2016.04 and microzed 7010 board for my project.
I have followed the steps =>I have set board in QSPI mode by jumpers. I have TFTPed the imaged.ub on board (run netboot)and mounted the roofs from my PC by NFS.
For this, when NFS is configed in petalinux-config, I had to disable initramfs in kernel config manually.
If I don't disable initramfs in kernel(petalinux-config -c kernel ) but NFS is configured (petalinux-config), rootfs is being mounted from QSPI.
I am beginer to petalinux sdk and microzed board. What is the reson makes it mount rootfs from QSPI even if I configured nfs but did not disable initramfs in kernel and my bootargs is
INPUTS :
1 . "bootargs=console=ttyPS0,115200 earlyprintk root=/dev/nfs nfsroot=172.16.9.187:/tftpboot/nfsroot,tcp,v4 ip=172.16.9.25 rw"
manualy i cross-verified the mounting of rootfs by NFS from PC to board.
2 . "mount -o nolock -t nfs ip_addr:/tftpboot/nfsroot /home/root/"
Any help will be appreciated. Thanks in advance.
Regards,
Pritam
I have got an useful links for this.
https://landley.net/writing/rootfs-intro.html
https://landley.net/writing/rootfs-howto.html

How to emulate USB flash drive and read data simultaneous

I have a device that saves screenshots when you put a flash drive with exFAT/FAT32 and a specific directory tree in its USB socket. I want to livestream these screenshots to other devices as fast as possible via ethernet:
device -> flash drive -> ethernet
So I tried an ARM device (Orange Pi Zero) with OTG support and g_mass_storage kernel module which emulates an USB flash drive via USB OTG:
g_mass_storage - To have your Pi Zero appear as a mass storage device
(flash drive), first create a mini filesystem in a file on your Pi
with sudo dd if=/dev/zero of=/piusb.bin bs=512 count=2880 and set it
up as a fat32 filesystem with sudo mkdosfs /piusb.bin. Then, when
enabling it, add file=/piusb.bin stall=0 onto the end, for example
sudo modprobe g_mass_storage file=/piusb.bin stall=0.
(from https://gist.github.com/gbaman/50b6cca61dd1c3f88f41)
Next I mounted the emulated flash drive for testing purpose on a Laptop (Linux Mint 18) and the flash drive file via sudo mount /piusb.bin /mnt/ on the ARM device. But when I add new files/directories in one system it doesn't appear on the other. I have to remount the device/file first to refresh the files.
So is it even possible to read (and stream) the written data at the same time on my ARM device with g_mass_storage? Or is there a better way to solve my problem?
You should try to remount it.
sudo umount /mnt/
sudo mount /piusb.bin /mnt/

Booting from sdcard on beaglebone black uses the uboot from eMMC instead of the one on sdcard

I am following the below link to make a bootable sdcard for beaglebone black. The only change is I am trying to build a 3.14 version of the kernel instead of the 4.4 version.
When I push the boot button before powering on the BBB, I get "CCCCCCCCC..." output on the serial terminal suggesting something wrong with the bootloader on the sdcard. Without pushing the boot button, the uboot on the BBB eMMC gets invoked and then it successfully boots the kernel off of the sdcard.
What changes, if any, do I need to make to the uEnv.txt to make this work ?
https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-LinuxKernel
If you see 'C' characters on the terminal (while the button was pressed on power up) it means that the CPU ROM code didn't found valid loader (MLO) on microSD. ROM code searches for loader over several addresses (0x0, 0x20000, 0x40000 and 0x60000), you can read about it here. Try to write MLO copies at addresses 0x0 and 0x40000:
sudo dd if=./u-boot/MLO of=${DISK} count=1 bs=128k
sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=2 bs=128k
Check if your MLO is less than 128Kbytes.
You can also format microSD card as FAT and put MLO and u-boot.img there, it also works.

Yocto is not booting up

I get a new kernel(3.14) from kontron for my board after i compiled and try to run it on my board but i getting the following error any one can help me !
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
The kernel can't find its root filesystem.
Investigate why that is the case. Where is the kernel looking for it? Check the kernel config and/or the command line passed from the bootloader. Check that the kernel has all the drivers to actually access the hardware hosting the root filesystem. Has the kernel the needed filesystem support complied in?

Resources