[LINUX] I made an image for qemu with Yocto, but I failed and started over

What I did (image creation, qemu execution)

We carried out the following things.

$ git clone -b dunfell git://git.yoctoproject.org/poky.git
$ cd poky
$ source oe-init-build-env build001
$ bitbake core-image-minimal
 #It's running, but CTRL+Forced termination with C
$ bitbake core-image-minimal #Run again at a later date
$ runqemu tmp/deploy/images/qemux86-64/

The result of the execution is as follows. When I try to log in, I get "getty: tty1: can't execute'/ bin / login'".

image.png

Cause (guess)

Probably the cause is that "bitbake core-image-minimal" was forcibly terminated in the middle.

$ git clone -b dunfell git://git.yoctoproject.org/poky.git
$ cd poky
$ source oe-init-build-env build001
$ bitbake core-image-minimal
 #It's running, but CTRL+Forced termination with C
$ bitbake core-image-minimal #Run again at a later date
$ runqemu tmp/deploy/images/qemux86-64/

Start over. But I want to make it a little easier.

At first, I thought about doing the following. However, this will take as long as the first time. I hate it.

$ source oe-init-build-env build002 #Create a new build002
$ bitbake core-image-minimal
$ runqemu tmp/deploy/images/qemux86-64/

Divert the code downloaded the first time

The set of code downloaded when the first bitbake command was executed is I thought that it could be used as it is (I guess it wouldn't be strange here), so I decided to divert it.

Set the path to the DL_DIR variable in conf / local.conf as follows

conf/local.conf


#
# Where to place downloads
#
# During a first build the system will download many different source code tarballs
# from various upstream projects. This can take a while, particularly if your network
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
# can preserve this directory to speed up this part of subsequent builds. This directory
# is safe to share between multiple builds on the same machine too.
#
# The default is a downloads directory under TOPDIR which is the build directory.
#
DL_DIR ?= "/home/username/yocto/poky/build001/downloads"

Reference: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-DL_DIR

Execute again (use the downloaded code)

So, the procedure that was carried out at the time of re-execution is as follows.

$ source oe-init-build-env build002 #Create a new build002
$ vim conf/local.conf # DL_Set the path to DIR
$ bitbake core-image-minimal
$ runqemu tmp/deploy/images/qemux86-64/

The result of the execution is as follows. I was able to log in successfully.

image.png

Recommended Posts

I made an image for qemu with Yocto, but I failed and started over
[Python] I made an image viewer with a simple sorting function.
I made an alternative module for japandas.DataReader
I made an app for foreign visitors to Japan with a hackathon and won a prize, but when I thought about it carefully, it was useless.
I made an image classification model and tried to move it on mobile
[For beginners] I made a motion sensor with Raspberry Pi and notified LINE!
I made a QR code image with CuteR
I want to convert an image to WebP with lollipop
I made a window for Log output with Tkinter
I made a LINE BOT with Python and Heroku
Getting Started with Yocto Project with Raspberry Pi 4 and WSL2
I made a method to automatically select and visualize an appropriate graph for pandas DataFrame
I made an Ansible-installer
I made an N-dimensional matrix operation library Matft with Swift
I made a resource monitor for Raspberry Pi with a spreadsheet
I made an animation to return Othello stones with POV-Ray
I made an automated program for pasting screenshots in Excel
I made a Line bot that guesses the gender and age of a person from an image