]> git.baikalelectronics.ru Git - openembedded-baikal.git/commitdiff
Change default initramfs image
authorBaikal Electronics <support@baikalelectronics.ru>
Tue, 20 Sep 2022 16:21:53 +0000 (19:21 +0300)
committerBaikal Electronics <support@baikalelectronics.ru>
Tue, 20 Sep 2022 16:21:53 +0000 (19:21 +0300)
Also deploy output of a generated images into ${BAIKAL_IMAGES} directory.

meta-baikal/conf/templates/default/local.conf.sample
meta-baikal/recipes-core/images/core-image-minimal.bbappend [new file with mode: 0644]
meta-baikal/recipes-core/images/core-image-tiny-initramfs.bbappend [deleted file]

index c568c65205c26078bb223afbb3c4c6b1c384b22f..de1dc321f45380643dbb82651d79db1fee03b779 100644 (file)
@@ -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 (file)
index 0000000..55efb8c
--- /dev/null
@@ -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 (file)
index b054323..0000000
+++ /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.*)'