develop/docker-image #3

Merged
tkl merged 4 commits from develop/docker-image into zeus 2020-01-30 21:09:38 +00:00
16 changed files with 147 additions and 5 deletions
Showing only changes of commit 2ea40c1e8a - Show all commits

View File

@ -1,6 +1,6 @@
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
POKY_BBLAYERS_CONF_VERSION = "3"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
@ -9,9 +9,11 @@ BBLAYERS ?= " \
${TOPDIR}/../layers/poky/meta \
${TOPDIR}/../layers/poky/meta-poky \
${TOPDIR}/../layers/poky/meta-yocto-bsp \
${TOPDIR}/../layers/meta-openembedded/meta-filesystems \
${TOPDIR}/../layers/meta-openembedded/meta-oe \
${TOPDIR}/../layers/meta-openembedded/meta-networking \
${TOPDIR}/../layers/meta-openembedded/meta-python \
${TOPDIR}/../layers/meta-raspberrypi \
${TOPDIR}/../layers/meta-virtualization \
${TOPDIR}/../layers/meta-blackfinn \
"

View File

@ -2,6 +2,7 @@ Common targets are:
console-image
console-dev-image
tiny-image
docker-image
core-image-minimal
core-image-sato
meta-toolchain

View File

@ -27,6 +27,10 @@ BB_DISKMON_DIRS = "\
CONF_VERSION = "1"
ENABLE_UART = "1"
ENABLE_SPI = "1"
ENABLE_I2C = "1"
INHERIT += "rm_work"
INHERIT += "own-mirrors"

View File

@ -6,10 +6,36 @@ DISTRO_VERSION = "1.0"
DISTRO_CODENAME = "roro"
#DISTRO_FEATURES_append = " alsa usbhost usbgadget keyboard bluetooth"
POKY_DEFAULT_DISTRO_FEATURES = "largefile"
# Comment out any of the lines below to disable them in the build
# DISTRO_FEATURES options:
# alsa bluetooth ext2 pcmcia usbgadget usbhost wifi nfs zeroconf pci
DISTRO_FEATURES_TINY = "largefile zeroconf virtualization"
DISTRO_FEATURES_NET = "ipv4 ipv6"
DISTRO_FEATURES_USB = "usbhost"
DISTRO_FEATURES_WIFI = "wifi"
DISTRO_FEATURES = " \
${DISTRO_FEATURES_TINY} \
${DISTRO_FEATURES_NET} \
${DISTRO_FEATURES_USB} \
${DISTRO_FEATURES_WIFI} \
"
POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
DISTRO_FEATURES_DEFAULT = "ipv4 ipv6 largefile usbhost wifi zeroconf virtualization"
INIT_MANAGER ?= "mdev-busybox"
TCLIBC = "musl"
# Disable wide char support for ncurses as we don't include it in
# in the LIBC features below.
# Leave native enable to avoid build failures
ENABLE_WIDEC = "false"
ENABLE_WIDEC_class-native = "true"
# Drop native language support. This removes the
# eglibc->bash->gettext->libc-posix-clang-wchar dependency.
USE_NLS="no"
SDK_VENDOR = "-rorodistsdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"

View File

@ -3,5 +3,16 @@ 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
}

View File

@ -0,0 +1,12 @@
#!/bin/sh
case "${1}" in
start)
cgroups-mount
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac

View File

@ -0,0 +1,19 @@
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
}

View File

@ -0,0 +1,26 @@
#!/bin/sh
LOAD_DIR="/etc/modules-load.d"
MODULES="$(ls $LOAD_DIR)"
case "${1}" in
start)
for MOD in $MODULES;
do
while read module args;
do
# Ignore comments and blank lines
case "$module" in
""|"#"*) continue;;
esac
modprobe ${module} ${args}
done < $LOAD_DIR/$MOD
done
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac

View File

@ -0,0 +1,5 @@
CONFIG_NTPD=y
CONFIG_FEATURE_NTPD_SERVER=y
CONFIG_FEATURE_NTPD_CONF=y
CONFIG_FEATURE_NTP_AUTH=y

View File

@ -0,0 +1,5 @@
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org

View File

@ -0,0 +1,12 @@
#!/bin/sh
case "${1}" in
start)
ntpd -q
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac

View File

@ -4,7 +4,7 @@ LICENSE = "MIT"
require tiny-image-base.inc
IMAGE_INSTALL_append = " docker"
IMAGE_INSTALL_append = " initscripts init-ifupdown docker-ce"
export IMAGE_BASENAME = "tiny-image"
export IMAGE_BASENAME = "docker-image"

View File

@ -31,6 +31,7 @@ IMAGE_INSTALL += " \
"
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() {

View File

@ -1,2 +1,8 @@
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
}

View File

@ -0,0 +1,10 @@
KERNEL_MODULE_AUTOLOAD += " brcmfmac"
do_install_append () {
install -d ${D}/lib/
install -d ${D}/lib/firmware/
install -d ${D}/lib/firmware/brcm
cd ${D}/lib/firmware/brcm
ln -s brcmfmac43430-sdio.raspberrypi,3-model-b.txt brcmfmac43430-sdio.txt
}

View File

@ -0,0 +1,2 @@
KERNEL_MODULE_AUTOLOAD += " brcmfmac i2c-dev spi-bcm2835"