summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/meta-schulung-extended/recipes-core/images
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2017-12-19 11:16:28 +0100
committerJohn Ogness <john.ogness@linutronix.de>2017-12-19 11:16:28 +0100
commit6e7e1b7172813fc4ecb60597f903dd21a4616159 (patch)
treedbfe0b8f1a3d51c275722ba86d4ffe109ee88aef /distribution/yocto-advanced/meta-schulung-extended/recipes-core/images
parent270520b4a2eac8725c8575c3180964289722e191 (diff)
update yocto-advanced: sync to devel/manut/yocto
The devel/manut/yocto heavily diverted from master. Sync with latest version 8cd4956a9b48a316eab6dc6d1b1f6cd51362fecf. Signed-off-by: John Ogness <john.ogness@linutronix.de>
Diffstat (limited to 'distribution/yocto-advanced/meta-schulung-extended/recipes-core/images')
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-core/images/core-image-schulung.bb50
1 files changed, 50 insertions, 0 deletions
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-core/images/core-image-schulung.bb b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/images/core-image-schulung.bb
new file mode 100644
index 0000000..516bca3
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/images/core-image-schulung.bb
@@ -0,0 +1,50 @@
+# use the core-image class (poky/meta/core-image.bbclass)
+inherit core-image
+
+# add package management to the image
+# (the package management type depends on PACKAGE_CLASSES)
+IMAGE_FEATURES += "package-management"
+
+# do not install any particular locales
+# (they are big and we don't need them)
+IMAGE_LINUGUAS = " "
+
+# set the size of the partition for the image
+# (see image.bbclass for related limits)
+IMAGE_ROOTFS_SIZE ?= "32768"
+
+# specify packages for the root filesystem
+# (IMAGE_INSTALL is defined in and used by core-image.bbclass
+# for a list of packages to be installed, use = to ignore the
+# packages added by 'packagegroup-core-boot')
+# IMAGE_INSTALL += "hello schulung-rootfs openssh"
+IMAGE_INSTALL = "hello schulung-rootfs"
+
+# set a root password
+# inherit extrausers
+# EXTRA_USERS_PARAMS = "usermod -P foo root;"
+
+# busybox must be installed so we have access to busybox.links
+# (for DEPENDS packages, the -dev variant of the package
+# is also installed in the sysroot)
+DEPENDS += "busybox"
+
+# create a function to create the busybox links
+# - anything copied to ${IMAGE_ROOTFS} will also appear in the root filesystem
+# (this is set in bitbake.conf to ${WORKDIR}/rootfs)
+setup_busybox_links () {
+ for lnfile in `cat ${PKG_CONFIG_SYSROOT_DIR}${datadir}/busybox/busybox.links`; do
+ # do not create /linuxrc link, we do not need it
+ test $lnfile = /linuxrc && continue
+
+ # create parent directory if necessary
+ install -d ${IMAGE_ROOTFS}`dirname $lnfile`
+
+ # link creation is allowed to fail if a file is already there
+ ln -s ${base_bindir}/busybox ${IMAGE_ROOTFS}$lnfile || true
+ done
+}
+# ...and have it called after the rootfs task is finished
+do_rootfs[postfuncs] += "setup_busybox_links"
+
+# using "do_rootfs_append ()" as function would have the same effect