diff --git a/buildconf/raspberrypi3-64/bblayers.conf.sample b/buildconf/raspberrypi3-64/bblayers.conf.sample index dba7e85..8c65ece 100644 --- a/buildconf/raspberrypi3-64/bblayers.conf.sample +++ b/buildconf/raspberrypi3-64/bblayers.conf.sample @@ -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 \ " diff --git a/buildconf/raspberrypi3-64/conf-notes.txt b/buildconf/raspberrypi3-64/conf-notes.txt index df80596..48af6bd 100644 --- a/buildconf/raspberrypi3-64/conf-notes.txt +++ b/buildconf/raspberrypi3-64/conf-notes.txt @@ -2,6 +2,7 @@ Common targets are: console-image console-dev-image tiny-image + docker-image core-image-minimal core-image-sato meta-toolchain diff --git a/buildconf/raspberrypi3-64/local.conf.sample b/buildconf/raspberrypi3-64/local.conf.sample index f0e4959..e6fcd5c 100644 --- a/buildconf/raspberrypi3-64/local.conf.sample +++ b/buildconf/raspberrypi3-64/local.conf.sample @@ -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" diff --git a/conf/distro/roro.conf b/conf/distro/roro.conf index da50503..e7bf956 100644 --- a/conf/distro/roro.conf +++ b/conf/distro/roro.conf @@ -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')}" diff --git a/recipes-containers/docker/docker-ce_git.bbappend b/recipes-containers/docker/docker-ce_git.bbappend index 89cf576..c51fc66 100644 --- a/recipes-containers/docker/docker-ce_git.bbappend +++ b/recipes-containers/docker/docker-ce_git.bbappend @@ -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 + +} + diff --git a/recipes-containers/docker/files/S49cgroups_mount.sh b/recipes-containers/docker/files/S49cgroups_mount.sh new file mode 100644 index 0000000..3584f8b --- /dev/null +++ b/recipes-containers/docker/files/S49cgroups_mount.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +case "${1}" in + start) + cgroups-mount + ;; + *) + echo "Usage: ${0} {start}" + exit 1 + ;; +esac + diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend new file mode 100644 index 0000000..f0f2c96 --- /dev/null +++ b/recipes-core/busybox/busybox_%.bbappend @@ -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 +} + diff --git a/recipes-core/busybox/files/S20load_modules.sh b/recipes-core/busybox/files/S20load_modules.sh new file mode 100644 index 0000000..4b46adf --- /dev/null +++ b/recipes-core/busybox/files/S20load_modules.sh @@ -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 + diff --git a/recipes-core/busybox/files/fragments.cfg b/recipes-core/busybox/files/fragments.cfg new file mode 100644 index 0000000..24d2bd9 --- /dev/null +++ b/recipes-core/busybox/files/fragments.cfg @@ -0,0 +1,5 @@ +CONFIG_NTPD=y +CONFIG_FEATURE_NTPD_SERVER=y +CONFIG_FEATURE_NTPD_CONF=y +CONFIG_FEATURE_NTP_AUTH=y + diff --git a/recipes-core/busybox/files/ntp.conf b/recipes-core/busybox/files/ntp.conf new file mode 100644 index 0000000..700991d --- /dev/null +++ b/recipes-core/busybox/files/ntp.conf @@ -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 + diff --git a/recipes-core/busybox/files/ntpd b/recipes-core/busybox/files/ntpd new file mode 100644 index 0000000..4a222af --- /dev/null +++ b/recipes-core/busybox/files/ntpd @@ -0,0 +1,12 @@ +#!/bin/sh + +case "${1}" in + start) + ntpd -q + ;; + *) + echo "Usage: ${0} {start}" + exit 1 + ;; +esac + diff --git a/recipes-core/images/docker-image.bb b/recipes-core/images/docker-image.bb index 5386270..bcec382 100644 --- a/recipes-core/images/docker-image.bb +++ b/recipes-core/images/docker-image.bb @@ -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" diff --git a/recipes-core/images/tiny-image-base.inc b/recipes-core/images/tiny-image-base.inc index 16786b0..12d35dc 100644 --- a/recipes-core/images/tiny-image-base.inc +++ b/recipes-core/images/tiny-image-base.inc @@ -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() { 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 869d60a..88ce312 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,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 +} + diff --git a/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend new file mode 100644 index 0000000..2f28da7 --- /dev/null +++ b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend @@ -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 +} + diff --git a/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/recipes-kernel/linux/linux-raspberrypi_%.bbappend new file mode 100644 index 0000000..4594474 --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi_%.bbappend @@ -0,0 +1,2 @@ +KERNEL_MODULE_AUTOLOAD += " brcmfmac i2c-dev spi-bcm2835" +