commit | 9d341ba0999c88d20370912b3541be52c34c9d83 | [log] [tgz] |
---|---|---|
author | Henry Barnor <hbarnor@chromium.org> | Wed Jul 27 00:10:50 2022 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jul 29 19:09:58 2022 |
tree | a7296f70ca763f9518f2553f8eccc935450c5808 | |
parent | 2f2e4ea470a8e1da78609609b9463bbd2701c621 [diff] |
minios: Place including nvme executable behind a flag Not all devices use nvme therefore we only include the nvme executable in the rootfs if the INCLUDE_NVME_CLI flag is enabled. The INCLUDE_NVME_CLI flag is set from the ebuild based on the nvme use flag. BUG=b:238262325 TEST=USE="$USE minios_ramfs" emerge-$B chromeos-initramfs TEST=test_that -b ${B} ${H} nbr_EndToEndTest.basic --args="running_at_desk=True" Cq-Depend: chromium:3788647 Change-Id: I0fc7802a2410e2df2a8c6d6d0cfae421815da282 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/initramfs/+/3788613 Commit-Queue: Henry Barnor <hbarnor@chromium.org> Tested-by: Henry Barnor <hbarnor@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Build logic for creating standalone initramfs environments.
See the README files in the respective subdirs for more details.
Normally you wouldn't build in this directory directly. Instead, you would build the chromeos-initramfs package with the right USE flags. e.g.:
$ USE=recovery_ramfs emerge-$BOARD chromeos-initramfs
That will install the cpio initramfs files into the sysroot for you to build into a kernel directly. The various build scripts would then be used to make the right kernel/image using those (e.g. mod_image_for_recovery.sh).
You could build these by hand for quick testing. Inside the chroot:
$ make SYSROOT=/build/$BOARD BOARD=$BOARD <target>
That will create the cpio archives for you.
It is possible to debug few of the initramfs targets in QEMU. Read test/README.md for more information.
Also, here is a shortcut for developing/debugging graphical bits in initramfs, without having to create a full image for every iteration.
After emerge-$BOARD
, find your initramfs package from chroot /build/$BOARD/var/lib/initramfs
and copy to a running DUT, for example /tmp/recovery_ramfs.cpio
, then do followings on DUT over SSH:
mkdir /usr/local/test/; cd /usr/local/test
xzcat /tmp/XXXXXX_ramfs.cpio | toybox cpio -iv
(Here we assume that the kernel is configured to use xz compression for its initramfs.)stop ui; kill $(pidof frecon)
for d in dev proc sys tmp; do mount --bind /${d} /usr/local/test/${d} done
chroot /usr/local/test /init