flashing yocto image to raspberrypi cm3 eMMC - raspberry-pi

I have build a yocto image for raspberrypi cm3 and i want to flash it to the eMMC.
In the deploy/images/raspberrypi-cm3 directory a don't have a .img file that would be flashed and also how can i knew if my image will boot directly when starting.
actually this is the first time i work with yocto and the first time i flash an image to a board.
THis is my deploy/image directory content.
I will be greatful if someone explains it to me.
thank you.
enter image description here
Thank youf or the answer.
As i understanded, the mount command line is to create a disk image and makes it readable by the system. So after copying all image directory to it and unmounted it, what would i have in the 'if' option when i will flash my image with 'dd if=/home/user/deploy/images/raspberry-cm3 of=/dev/mmcblk1 '.
Also when a tried to mount the disk image 'sudo mount -o loop raspberry-cm3.img /media/raspberry-cm3/'.
error:mount: mount point /media/raspberry-cm3/ does not exist.
Could you please help me with that ?

This question should be on Super User.
You can flash a image using Linux's dd command-line tool.
For example:
dd if=/home/user/deploy/images/raspberry-cm3 of=/dev/mmcblk1
Make sure you're using the correct device in the output (ie, make sure /dev/mmcblk1 is your eMMC card)
Edit: in order to flash, you'll need to generate an image. You can do it by creating an empty image, then mounting it as loop, then copying all the directory tree into the disk, and unmount it:
dd bs=512 count=2880 if=/dev/zero of=raspberry-cm3.img
mkfs.msdos raspberry-cm3.img
sudo mount -o loop raspberry-cm3.img /media/raspberry-cm3/
cp -r /deploy/images/raspberry-cm3/* /media/raspberry-cm3/
sudo umount /media/raspberry-cm3/

As i understanded, the mount command line is to create a disk image and makes it readable by the system. So after copying all image directory to it and unmounted it, what would i have in the 'if' option when i will flash my image with 'dd if=/home/user/deploy/images/raspberry-cm3 of=/dev/mmcblk1 '. would it be 'dd if=/media/raspberry-cm3/ of=/dev/mmcblk1 ' ?

Related

How to delete all index file in once

please tell me how to delete these files at one time, it's making unwanted files on the server and the server has been out of space.
enter image description here
Go the folder and run the command
rm index.html.*

Error: no space left on device Ubuntu 16.04

I am getting an error on ubunto while openning the terminal saying the following:
Bash: cannot create temp file for here-document: No space left ok device
Although there exists space already..
This error has encountered suddenly when i was working on sublime text
you may want to check your inode usage as well:
df -i
it's possible to get "no space left on device" when you have space available, but you're out of inodes.
http://web.archive.org/web/20210514092503/https://scoutapm.com/blog/understanding-disk-inodes
I faced a similar problem. In my case after login in, the screen would not show icons and only the cursor. Even auto completion in bash-terminal threw an error of out-of-memory.
I tried unmounting /tmp, apt-get autoclean, apt-get clean nothing worked.
In my case deleting large files in ~/.cache worked.
cd ~/.cache
du -sh *
rm -fr <large files/folders>
Generally, deleting files in .cache is not harmful but still be careful.
In my case thumbnails and pip folders were the culprit taking 1G and 3.6G respectively.
Run df -h and see if there are any folders that are 100% full. Looks like /tmp may be full.

(Yocto Raspberrypi) How to write the file with estension .tar.xz into micro sdCard?

I'm building a custom image-qt5 using yocto tools. Once the build terminates, there is a file named qt5-image-raspberrypi2.tar.xz in the folder ...build/tmp/deploy/images/raspberrepy2/.
How can we write to sdcard for the raspberrypi?
Your question is a bit vague.
If you were just looking at writing the qt5-image-raspberrypi2.tar.xz file to your SD card; you can use the command: dd to achieve this. Given that it is a tar ball you will need to first handle this before writing it to the sd card.
Example (where /dev/sdX is your mounted SD card on your computer):
tar -xzOf qt5-image-raspberrypi2.tar.xz | dd of=/dev/sdX bs=1M
If you already have an sdcard image that has been generated within Yocto and you wish to include the qt5-image-raspberrypi2.tar.xz tar ball to the sdcard image, then you will need to modify your recipe to add the file to your SRC_URI list.
Example:
SRC_URI += '$(DEPLOY_DIR}/qt5-image-raspberrypi2.tar.xz'
Replace the tar ball file name with appropriate variables which are used when generating the name, or you could hard code it, as above.

How to create dmg file in Centos through command line

I want to create a dmg file of three files in centos . i am using hfsutils commands, but it is showing errors like "No known volumes; use `hmount' to introduce new volumes". I googled a lot to get clear steps for creating dmg. some one who knows these steps please post here
Say if you want to create dmg of three files named file1,file2,file3.keep these three in one directory
Should run this command in the directory where we kept our three files
dd if=/dev/zero of="example.dmg" bs=1M count=10
hformat -l "example" ./"example.dmg"
A dmg file will be formed in our directory. next go to /usr/sbin from there run and then
1)hmount /directorypath/example.dmg
2)hcopy /directorypath/file1 example:
3)hcopy /directorypath/file2 example:
4)hcopy /directorypath/file3 example:
5)humount and then copy this file in to your mac system and open the dmg file,you will find all your three files in it.
You can use this command:
genisoimage -D -V "Volume Label" -no-pad -r -apple -o <dest.dmg> <src>
Here is more.

Installing bootloaders

I am creating a toy os and cannot find a good way to install the bootloader onto the first sector of a drive.
I use PARTCOPY but that only works on xp with floppy disks.
Does anyone know a program or method to install a 512 byte bin file onto the first sector of a drive. Preferably the program can also read the first sector of a drive.
I am running windows
dd in Linux can do that:
http://www.cyberciti.biz/faq/howto-copy-mbr/
For example (http://en.wikipedia.org/wiki/Dd_%28Unix%29#Master_boot_record_backup_and_restore),
to backup the first sector of a harddrive:
dd if=/dev/sda of=MBR.img bs=512 count=1
to restore the first sector:
dd if=MBR.image of=/dev/sda
You can change /dev/sda to /dev/sda1 if you want to target the first partition instead of the entire disk.