From ed25acc3ca987f4c57d1e518293bd59a01e79a7e Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Thu, 30 Jan 2020 22:03:37 +0100 Subject: [PATCH] docker image: reorder recipes to prevent influence on console-images --- .../openssh/openssh_%.bbappend | 9 ++ .../docker/docker-ce_git.bbappend | 15 +--- recipes-core/busybox/busybox-initcfg.bb | 28 ++++++ recipes-core/busybox/busybox_%.bbappend | 17 +--- .../busybox}/files/S49cgroups_mount.sh | 0 recipes-core/images/console-image-base.inc | 1 - recipes-core/images/docker-image.bb | 4 + recipes-core/images/tiny-image-base.inc | 34 +++---- .../interfaces | 0 .../init-ifupdown_1.0.bbappend | 6 -- tatus | 89 +++++++++++++++++++ 11 files changed, 149 insertions(+), 54 deletions(-) create mode 100644 recipes-connectivity/openssh/openssh_%.bbappend create mode 100644 recipes-core/busybox/busybox-initcfg.bb rename {recipes-containers/docker => recipes-core/busybox}/files/S49cgroups_mount.sh (100%) rename recipes-core/init-ifupdown-1.0/files/{raspberrypi3_64 => raspberrypi3-64}/interfaces (100%) create mode 100644 tatus diff --git a/recipes-connectivity/openssh/openssh_%.bbappend b/recipes-connectivity/openssh/openssh_%.bbappend new file mode 100644 index 0000000..d5a9e23 --- /dev/null +++ b/recipes-connectivity/openssh/openssh_%.bbappend @@ -0,0 +1,9 @@ +do_install_append () { + install -d ${D}${sysconfdir}/ + install -d ${D}${sysconfdir}/rcS.d/ + + cd ${D}${sysconfdir}/rcS.d/ + ln -s ../init.d/sshd S47sshd.sh + +} + diff --git a/recipes-containers/docker/docker-ce_git.bbappend b/recipes-containers/docker/docker-ce_git.bbappend index c51fc66..fe6fae9 100644 --- a/recipes-containers/docker/docker-ce_git.bbappend +++ b/recipes-containers/docker/docker-ce_git.bbappend @@ -1,18 +1,5 @@ LICENSE = "GPLv2" FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI += " \ - file://docker.init \ - file://S49cgroups_mount.sh \ -" - -do_install_append () { - install -d ${D}${sysconfdir}/ - install -d ${D}${sysconfdir}/rcS.d/ - install -m 0755 ${WORKDIR}/S49cgroups_mount.sh ${D}${sysconfdir}/rcS.d/ - - cd ${D}${sysconfdir}/rcS.d/ - ln -s ../init.d/docker.init S50docker.sh - -} +SRC_URI += " file://docker.init" diff --git a/recipes-core/busybox/busybox-initcfg.bb b/recipes-core/busybox/busybox-initcfg.bb new file mode 100644 index 0000000..36d28ca --- /dev/null +++ b/recipes-core/busybox/busybox-initcfg.bb @@ -0,0 +1,28 @@ +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" +#file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " \ + file://S20load_modules.sh \ + file://S49cgroups_mount.sh \ + file://ntp.conf \ + file://ntpd \ +" + +do_install_append () { + install -d ${D}${sysconfdir}/ + install -d ${D}${sysconfdir}/rcS.d/ + install -d ${D}${sysconfdir}/init.d/ + install -m 0644 ${WORKDIR}/ntp.conf ${D}${sysconfdir} + install -m 0755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/S20load_modules.sh ${D}${sysconfdir}/rcS.d/ + install -m 0755 ${WORKDIR}/S49cgroups_mount.sh ${D}${sysconfdir}/rcS.d/ + + cd ${D}${sysconfdir}/rcS.d/ + ln -s ../init.d/networking S40networking.sh + ln -s ../init.d/ntpd S48ntpd.sh + ln -s ../init.d/docker.init S50docker.sh +} + diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend index 9ab7197..672e5f8 100644 --- a/recipes-core/busybox/busybox_%.bbappend +++ b/recipes-core/busybox/busybox_%.bbappend @@ -1,19 +1,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI += " \ - file://S20load_modules.sh \ - file://fragments.cfg \ - file://ntp.conf \ - file://ntpd \ -" - -do_install_append () { - install -d ${D}${sysconfdir}/rcS.d/ - install -m 0644 ${WORKDIR}/ntp.conf ${D}${sysconfdir} - install -m 0755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/S20load_modules.sh ${D}${sysconfdir}/rcS.d/ - - cd ${D}${sysconfdir}/rcS.d/ - ln -s ../init.d/ntpd S48ntpd.sh -} +SRC_URI += " file://fragments.cfg" diff --git a/recipes-containers/docker/files/S49cgroups_mount.sh b/recipes-core/busybox/files/S49cgroups_mount.sh similarity index 100% rename from recipes-containers/docker/files/S49cgroups_mount.sh rename to recipes-core/busybox/files/S49cgroups_mount.sh diff --git a/recipes-core/images/console-image-base.inc b/recipes-core/images/console-image-base.inc index a363ba9..d2ec6c4 100644 --- a/recipes-core/images/console-image-base.inc +++ b/recipes-core/images/console-image-base.inc @@ -40,7 +40,6 @@ EXTRA_TOOLS_INSTALL = " \ e2fsprogs-mke2fs \ ethtool \ findutils \ - htop \ i2c-tools \ less \ mc \ diff --git a/recipes-core/images/docker-image.bb b/recipes-core/images/docker-image.bb index bcec382..5e8977a 100644 --- a/recipes-core/images/docker-image.bb +++ b/recipes-core/images/docker-image.bb @@ -6,5 +6,9 @@ require tiny-image-base.inc IMAGE_INSTALL_append = " initscripts init-ifupdown docker-ce" +EXTRA_USERS_PARAMS += " \ + usermod -a -G docker tkl \ +" + export IMAGE_BASENAME = "docker-image" diff --git a/recipes-core/images/tiny-image-base.inc b/recipes-core/images/tiny-image-base.inc index 12d35dc..601dd73 100644 --- a/recipes-core/images/tiny-image-base.inc +++ b/recipes-core/images/tiny-image-base.inc @@ -5,45 +5,45 @@ require users.inc IMAGE_FEATURES += "package-management" CORE_OS = " \ - openssh \ - openssh-keygen \ - openssh-sftp-server \ - psplash \ - tzdata \ + busybox-initcfg \ + openssh \ + openssh-keygen \ + openssh-sftp-server \ + psplash \ + tzdata \ " KERNEL_EXTRA_INSTALL = " \ - kernel-modules \ + kernel-modules \ " WIFI_SUPPORT = " \ - wpa-supplicant \ + wpa-supplicant \ " EXTRA_TOOLS_INSTALL = " \ " IMAGE_INSTALL += " \ - ${CORE_OS} \ - ${EXTRA_TOOLS_INSTALL} \ - ${KERNEL_EXTRA_INSTALL} \ - ${WIFI_SUPPORT} \ + ${CORE_OS} \ + ${EXTRA_TOOLS_INSTALL} \ + ${KERNEL_EXTRA_INSTALL} \ + ${WIFI_SUPPORT} \ " IMAGE_INSTALL_append_beaglebone-yocto = " linux-firmware-rtl8192cu" -#IMAGE_INSTALL_append_raspberrypi3_64 += " linux-firmware-bcm43430" IMAGE_INSTALL_append_bananapi-m3 += " linux-firmware-bcm43430" set_local_timezone() { - ln -sf /usr/share/zoneinfo/Europe/Berlin ${IMAGE_ROOTFS}/etc/localtime + ln -sf /usr/share/zoneinfo/Europe/Berlin ${IMAGE_ROOTFS}/etc/localtime } disable_bootlogd() { - echo BOOTLOGD_ENABLE=no > ${IMAGE_ROOTFS}/etc/default/bootlogd + echo BOOTLOGD_ENABLE=no > ${IMAGE_ROOTFS}/etc/default/bootlogd } ROOTFS_POSTPROCESS_COMMAND += " \ - set_local_timezone ; \ - disable_bootlogd ; \ - " + set_local_timezone ; \ + disable_bootlogd ; \ +" diff --git a/recipes-core/init-ifupdown-1.0/files/raspberrypi3_64/interfaces b/recipes-core/init-ifupdown-1.0/files/raspberrypi3-64/interfaces similarity index 100% rename from recipes-core/init-ifupdown-1.0/files/raspberrypi3_64/interfaces rename to recipes-core/init-ifupdown-1.0/files/raspberrypi3-64/interfaces diff --git a/recipes-core/init-ifupdown-1.0/init-ifupdown_1.0.bbappend b/recipes-core/init-ifupdown-1.0/init-ifupdown_1.0.bbappend index 88ce312..869d60a 100644 --- a/recipes-core/init-ifupdown-1.0/init-ifupdown_1.0.bbappend +++ b/recipes-core/init-ifupdown-1.0/init-ifupdown_1.0.bbappend @@ -1,8 +1,2 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -do_install_append () { - mkdir -p ${D}${sysconfdir}/rcS.d/ - cd ${D}${sysconfdir}/rcS.d/ - ln -s ../init.d/networking S40networking.sh -} - diff --git a/tatus b/tatus new file mode 100644 index 0000000..1f766f5 --- /dev/null +++ b/tatus @@ -0,0 +1,89 @@ +commit f5a399e87a63543d5ffe2a32895fddb8560a6765 (HEAD -> develop/docker-image, bf/develop/docker-image) +Author: Thomas Klaehn +Date: Sun Jan 26 12:42:49 2020 +0100 + + docker-image: add beaglebone + +commit 2ea40c1e8aea2a92670adf95cd8a7fd4c105e57d (m/master, bf/zeus) +Author: Thomas Klaehn +Date: Thu Jan 23 18:58:15 2020 +0100 + + docker image for rpi3_64 + +commit f655d5f14b2716262c99a0396c01f46619ae893e +Author: Thomas Klaehn +Date: Mon Jan 20 15:09:26 2020 +0100 + + Add docker-image in order to launch a base system capable of running docker daemon + +commit 63182b910a07b438aba7fa51580e6c65dd23ad09 +Author: Thomas Klaehn +Date: Sun Dec 1 08:13:02 2019 +0100 + + recipes-core: Reorder console-image and console-dev-image + +commit e13e24240612de06a58a029c5808683e1a5eef49 +Author: Thomas Klaehn +Date: Fri Nov 29 20:21:11 2019 +0100 + + conf: New branch zeus + +commit 6d422b1544e00fc65a2a85fa7d109880f6774fb7 (bf/warrior) +Author: Thomas Klaehn +Date: Fri Nov 29 07:36:46 2019 +0100 + + conf: New branch warrior + +commit 81715eee0344574f50370cad3052d22b83009980 (bf/thud) +Author: Thomas Klaehn +Date: Fri Nov 29 07:18:14 2019 +0100 + + recipes-core: Add new development console image + +commit 4106b9bfce4a928c7ef14aec4137ecf9508471a6 +Author: Thomas Klaehn +Date: Tue Mar 12 08:58:52 2019 +0100 + + meta-blackfinn: Unify layer structure + + Signed-off-by: Thomas Klaehn + +commit 3d6da70452493b18d54bfc08fe8b66cdaef31eb9 +Author: Thomas Klaehn +Date: Tue Mar 12 06:22:10 2019 +0100 + + conf: Add machine configuration for bananapi-m3 + + Signed-off-by: Thomas Klaehn + +commit 2424981737dde7b9eb8f8d12c6930b81ca511a9d +Author: Thomas Klaehn +Date: Tue Mar 12 06:16:55 2019 +0100 + + meta-blackfinn: Fix layer config + + Signed-off-by: Thomas Klaehn + +commit cd3f5d98cd552bf9e98604ce148a0fba13eef492 +Author: Thomas Klaehn +Date: Sun Mar 3 14:02:48 2019 +0100 + + condloe-image: Add packagegroup-board + + Signed-off-by: Thomas Klaehn + +commit 19ab0af33a3997d4486a03a90161bfa2bb8c5add +Author: Thomas Klaehn +Date: Sat Mar 2 08:05:03 2019 +0100 + + buildconf: Add init environment script for bbb and rpi + + Signed-off-by: Thomas Klaehn + +commit baa49abfdd418ac82a9808323e5281ee34139596 +Author: Thomas Klaehn +Date: Fri Jan 25 15:20:21 2019 +0100 + + meta-blackfinn: Initial commit + + Signed-off-by: Thomas Klaehn