From c229c44e8ea2978f491a5fd22aa8f055703cb9d4 Mon Sep 17 00:00:00 2001 From: Baikal Electronics Date: Tue, 20 Sep 2022 19:21:53 +0300 Subject: [PATCH] Change default initramfs image Also deploy output of a generated images into ${BAIKAL_IMAGES} directory. --- .../conf/templates/default/local.conf.sample | 2 +- .../images/core-image-minimal.bbappend | 22 +++++++++++++++++++ .../images/core-image-tiny-initramfs.bbappend | 9 -------- 3 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 meta-baikal/recipes-core/images/core-image-minimal.bbappend delete mode 100644 meta-baikal/recipes-core/images/core-image-tiny-initramfs.bbappend diff --git a/meta-baikal/conf/templates/default/local.conf.sample b/meta-baikal/conf/templates/default/local.conf.sample index c568c65..de1dc32 100644 --- a/meta-baikal/conf/templates/default/local.conf.sample +++ b/meta-baikal/conf/templates/default/local.conf.sample @@ -229,7 +229,7 @@ BB_DISKMON_DIRS ??= "\ # this doesn't mean anything to you. CONF_VERSION = "2" -INITRAMFS_IMAGE = "core-image-tiny-initramfs" +INITRAMFS_IMAGE = "core-image-minimal" INITRAMFS_FSTYPES = "cpio cpio.gz cpio.lzma" IMAGE_FSTYPES = "ext2 ext2.gz ext2.lzma cpio cpio.gz cpio.lzma" diff --git a/meta-baikal/recipes-core/images/core-image-minimal.bbappend b/meta-baikal/recipes-core/images/core-image-minimal.bbappend new file mode 100644 index 0000000..55efb8c --- /dev/null +++ b/meta-baikal/recipes-core/images/core-image-minimal.bbappend @@ -0,0 +1,22 @@ +IMAGE_ROOTFS_SIZE = "16384" +IMAGE_NAME = "${PN}-baikal" + +RDEPENDS:append = " kernel-modules" +IMAGE_INSTALL:append = " kernel-modules" +IMAGE_INSTALL:append = " dropbear" +IMAGE_INSTALL:append = " e2fsprogs" +IMAGE_INSTALL:append = " strace" +IMAGE_INSTALL:append = " kexec-tools" +EXTRA_IMAGE_FEATURES += "debug-tweaks" + +baikal_deploy () { + if [ ! -d ${BAIKAL_IMAGES} ]; then + mkdir -p ${BAIKAL_IMAGES} + fi + cp -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ext2.gz ${BAIKAL_IMAGES}/initrd.gz + cp -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ext2.lzma ${BAIKAL_IMAGES}/initrd.lzma + cp -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.gz ${BAIKAL_IMAGES}/initramfs.gz + cp -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.lzma ${BAIKAL_IMAGES}/initramfs.lzma +} + +IMAGE_POSTPROCESS_COMMAND += "baikal_deploy;" diff --git a/meta-baikal/recipes-core/images/core-image-tiny-initramfs.bbappend b/meta-baikal/recipes-core/images/core-image-tiny-initramfs.bbappend deleted file mode 100644 index b054323..0000000 --- a/meta-baikal/recipes-core/images/core-image-tiny-initramfs.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -VIRTUAL-RUNTIME_dev_manager = "udev" - -PACKAGE_INSTALL = "initramfs-live-boot packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}" - -IMAGE_NAME = "initramfs-bfk3" - -PACKAGE_INSTALL:append = " kernel-modules" - -COMPATIBLE_HOST += '|(mips.*)' -- 2.39.5