From 6b37f5cbd7ae1f2e44cc41e17fc6681a76aed71e Mon Sep 17 00:00:00 2001 From: EricLee Date: Sat, 11 Oct 2014 00:38:40 +0800 Subject: [PATCH] add initramfs image --- recipes-core/images/smarct335x-initramfs-image.bb | 14 ++++++ .../packagegroups/packagegroup-initramfs-boot.bb | 52 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 recipes-core/images/smarct335x-initramfs-image.bb create mode 100644 recipes-core/packagegroups/packagegroup-initramfs-boot.bb diff --git a/recipes-core/images/smarct335x-initramfs-image.bb b/recipes-core/images/smarct335x-initramfs-image.bb new file mode 100644 index 0000000..0d2613e --- /dev/null +++ b/recipes-core/images/smarct335x-initramfs-image.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "A small image just capable of allowing a device to boot." + +IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}" + +IMAGE_LINGUAS = " " + +LICENSE = "MIT" + +inherit core-image + +IMAGE_ROOTFS_SIZE = "8192" + +# remove not needed ipkg informations +ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " diff --git a/recipes-core/packagegroups/packagegroup-initramfs-boot.bb b/recipes-core/packagegroups/packagegroup-initramfs-boot.bb new file mode 100644 index 0000000..db03af3 --- /dev/null +++ b/recipes-core/packagegroups/packagegroup-initramfs-boot.bb @@ -0,0 +1,52 @@ +# +# Copyright (C) 2007 OpenedHand Ltd. +# + +SUMMARY = "Minimal boot requirements" +DESCRIPTION = "The minimal set of packages required to boot the system" +LICENSE = "MIT" +DEPENDS = "virtual/kernel" +PR = "r10" + +inherit packagegroup + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# +# Set by the machine configuration with packages essential for device bootup +# +MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= "" +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" + +# For backwards compatibility after rename +RPROVIDES_${PN} = "task-core-boot" +RREPLACES_${PN} = "task-core-boot" +RCONFLICTS_${PN} = "task-core-boot" + +# Distro can override the following VIRTUAL-RUNTIME providers: +VIRTUAL-RUNTIME_dev_manager ?= "udev" +VIRTUAL-RUNTIME_login_manager ?= "tinylogin" +VIRTUAL-RUNTIME_init_manager ?= "sysvinit" +VIRTUAL-RUNTIME_initscripts ?= "initscripts" +VIRTUAL-RUNTIME_keymaps ?= "keymaps" + +RDEPENDS_${PN} = "\ + base-files \ + base-passwd \ + busybox \ + util-linux-blkid \ + util-linux-mkfs \ + util-linux-sfdisk \ + ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \ + ${VIRTUAL-RUNTIME_initscripts} \ + ${@base_contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \ + modutils-initscripts \ + netbase \ + ${VIRTUAL-RUNTIME_login_manager} \ + ${VIRTUAL-RUNTIME_init_manager} \ + ${VIRTUAL-RUNTIME_dev_manager} \ + ${VIRTUAL-RUNTIME_update-alternatives} \ + ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}" + +RRECOMMENDS_${PN} = "\ + ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}" -- 1.9.1