diff --git a/buildconf/bananapi-m3/conf-notes.txt b/buildconf/bananapi-m3/conf-notes.txt index 5759f0d..df80596 100644 --- a/buildconf/bananapi-m3/conf-notes.txt +++ b/buildconf/bananapi-m3/conf-notes.txt @@ -1,6 +1,7 @@ Common targets are: console-image console-dev-image + tiny-image core-image-minimal core-image-sato meta-toolchain diff --git a/buildconf/bananapi-m3/local.conf.sample b/buildconf/bananapi-m3/local.conf.sample index f73d44b..ce418bd 100644 --- a/buildconf/bananapi-m3/local.conf.sample +++ b/buildconf/bananapi-m3/local.conf.sample @@ -4,7 +4,7 @@ MACHINE ?= "bananapi-m3" #SSTATE_DIR ?= "${TOPDIR}/../../sstate-cache" #TMPDIR = "${TOPDIR}/tmp" -DISTRO ?= "poky" +DISTRO ?= "roro" PACKAGE_CLASSES ?= "package_ipk" #SDKMACHINE ?= "i686" diff --git a/buildconf/beaglebone-yocto/bblayers.conf.sample b/buildconf/beaglebone-yocto/bblayers.conf.sample index 2604ba7..8870963 100644 --- a/buildconf/beaglebone-yocto/bblayers.conf.sample +++ b/buildconf/beaglebone-yocto/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,8 +9,12 @@ 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-virtualization \ + ${TOPDIR}/../layers/meta-raspberrypi \ ${TOPDIR}/../layers/meta-blackfinn \ " + diff --git a/buildconf/beaglebone-yocto/conf-notes.txt b/buildconf/beaglebone-yocto/conf-notes.txt index 5759f0d..c24917c 100644 --- a/buildconf/beaglebone-yocto/conf-notes.txt +++ b/buildconf/beaglebone-yocto/conf-notes.txt @@ -1,6 +1,8 @@ Common targets are: console-image console-dev-image + docker-image + tiny-image core-image-minimal core-image-sato meta-toolchain diff --git a/buildconf/beaglebone-yocto/local.conf.sample b/buildconf/beaglebone-yocto/local.conf.sample index b7fd35e..fddfee5 100644 --- a/buildconf/beaglebone-yocto/local.conf.sample +++ b/buildconf/beaglebone-yocto/local.conf.sample @@ -4,7 +4,7 @@ MACHINE ?= "beaglebone-yocto" #SSTATE_DIR ?= "${TOPDIR}/../../sstate-cache" #TMPDIR = "${TOPDIR}/tmp" -DISTRO ?= "poky" +DISTRO ?= "roro" PACKAGE_CLASSES ?= "package_ipk" #SDKMACHINE ?= "i686" @@ -15,6 +15,8 @@ USER_CLASSES ?= "buildstats image-mklibs image-prelink" IMAGE_BOOT_FILES_append = " uEnv.txt" +SERIAL_CONSOLES = "115200;ttyS0" + PATCHRESOLVE = "noop" BB_DISKMON_DIRS = "\ 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 5759f0d..48af6bd 100644 --- a/buildconf/raspberrypi3-64/conf-notes.txt +++ b/buildconf/raspberrypi3-64/conf-notes.txt @@ -1,6 +1,8 @@ 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 e3407a1..e6fcd5c 100644 --- a/buildconf/raspberrypi3-64/local.conf.sample +++ b/buildconf/raspberrypi3-64/local.conf.sample @@ -1,6 +1,6 @@ MACHINE ?= "raspberrypi3-64" -DISTRO ?= "poky" +DISTRO ?= "roro" PACKAGE_CLASSES ?= "package_ipk" #SDKMACHINE ?= "i686" @@ -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 new file mode 100644 index 0000000..e7bf956 --- /dev/null +++ b/conf/distro/roro.conf @@ -0,0 +1,44 @@ +require conf/distro/poky.conf +# distro name +DISTRO = "roro" +DISTRO_NAME = "roro distribution" +DISTRO_VERSION = "1.0" +DISTRO_CODENAME = "roro" +#DISTRO_FEATURES_append = " alsa usbhost usbgadget keyboard bluetooth" + +# 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" + +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')}" +MAINTAINER = "rorodist " +INHERIT += "buildhistory" +BUILDHISTORY_COMMIT = "1" diff --git a/conf/distro/tkl.conf b/conf/distro/tkl.conf deleted file mode 100644 index 960e2df..0000000 --- a/conf/distro/tkl.conf +++ /dev/null @@ -1,15 +0,0 @@ -require conf/distro/poky.conf -# distro name -DISTRO = "tkl" -DISTRO_NAME = "tkl distribution" -DISTRO_VERSION = "1.0" -DISTRO_CODENAME = "tkl" -#DISTRO_FEATURES_append = " alsa usbhost usbgadget keyboard bluetooth" - -PREFERRED_VERSION_mypy = "0.4.2" - -SDK_VENDOR = "-tkldistsdk" -SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -MAINTAINER = "tkldist " -INHERIT += "buildhistory" -BUILDHISTORY_COMMIT = "1" 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 new file mode 100644 index 0000000..fe6fae9 --- /dev/null +++ b/recipes-containers/docker/docker-ce_git.bbappend @@ -0,0 +1,5 @@ +LICENSE = "GPLv2" +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " file://docker.init" + diff --git a/recipes-containers/docker/files/docker.init b/recipes-containers/docker/files/docker.init new file mode 100644 index 0000000..d4b6a88 --- /dev/null +++ b/recipes-containers/docker/files/docker.init @@ -0,0 +1,131 @@ +#!/bin/sh +# +# /etc/rc.d/init.d/docker +# +# Daemon for docker.com +# +# chkconfig: 2345 95 95 +# description: Daemon for docker.com + +### BEGIN INIT INFO +# Provides: docker +# Required-Start: $network cgconfig +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop docker +# Description: Daemon for docker.com +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +prog="dockerd" +unshare=/usr/bin/unshare +exec="/usr/bin/$prog" +pidfile="/var/run/$prog.pid" +lockfile="/var/lock/subsys/$prog" +logfile="/var/log/$prog" +other_args="--pidfile $pidfile --registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +start() { + [ -x $exec ] || exit 5 + + check_for_cleanup + + if ! [ -f $pidfile ]; then + printf "Starting $prog:\t" + echo -e "\n$(date)\n" >> $logfile + "$unshare" -m -- $exec $other_args & >> $logfile & + pid=$! + touch $lockfile + # wait up to 10 seconds for the pidfile to exist. see + # https://github.com/docker/docker/issues/5359 + tries=0 + while [ ! -f $pidfile -a $tries -lt 10 ]; do + sleep 1 + tries=$((tries + 1)) + done + success + echo + else + failure + echo + printf "$pidfile still exists...\n" + exit 7 + fi +} + +stop() { + echo -n $"Stopping $prog: " + killproc $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +check_for_cleanup() { + if [ -f ${pidfile} ]; then + /bin/ps -fp $(cat ${pidfile}) > /dev/null || rm ${pidfile} + fi +} + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac + +exit $? 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 new file mode 100644 index 0000000..672e5f8 --- /dev/null +++ b/recipes-core/busybox/busybox_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " file://fragments.cfg" + 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/S49cgroups_mount.sh b/recipes-core/busybox/files/S49cgroups_mount.sh new file mode 100644 index 0000000..3584f8b --- /dev/null +++ b/recipes-core/busybox/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/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/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 new file mode 100644 index 0000000..5e8977a --- /dev/null +++ b/recipes-core/images/docker-image.bb @@ -0,0 +1,14 @@ +SUMMARY = "A tiny image" +HOMEPAGE = "https://blackfinn.de" +LICENSE = "MIT" + +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 new file mode 100644 index 0000000..601dd73 --- /dev/null +++ b/recipes-core/images/tiny-image-base.inc @@ -0,0 +1,49 @@ +inherit core-image + +require users.inc + +IMAGE_FEATURES += "package-management" + +CORE_OS = " \ + busybox-initcfg \ + openssh \ + openssh-keygen \ + openssh-sftp-server \ + psplash \ + tzdata \ +" + +KERNEL_EXTRA_INSTALL = " \ + kernel-modules \ +" + +WIFI_SUPPORT = " \ + wpa-supplicant \ +" + +EXTRA_TOOLS_INSTALL = " \ +" + +IMAGE_INSTALL += " \ + ${CORE_OS} \ + ${EXTRA_TOOLS_INSTALL} \ + ${KERNEL_EXTRA_INSTALL} \ + ${WIFI_SUPPORT} \ +" + +IMAGE_INSTALL_append_beaglebone-yocto = " linux-firmware-rtl8192cu" +IMAGE_INSTALL_append_bananapi-m3 += " linux-firmware-bcm43430" + +set_local_timezone() { + ln -sf /usr/share/zoneinfo/Europe/Berlin ${IMAGE_ROOTFS}/etc/localtime +} + +disable_bootlogd() { + echo BOOTLOGD_ENABLE=no > ${IMAGE_ROOTFS}/etc/default/bootlogd +} + +ROOTFS_POSTPROCESS_COMMAND += " \ + set_local_timezone ; \ + disable_bootlogd ; \ +" + diff --git a/recipes-core/images/tiny-image.bb b/recipes-core/images/tiny-image.bb new file mode 100644 index 0000000..364e5eb --- /dev/null +++ b/recipes-core/images/tiny-image.bb @@ -0,0 +1,8 @@ +SUMMARY = "A tiny image" +HOMEPAGE = "https://blackfinn.de" +LICENSE = "MIT" + +require tiny-image-base.inc + +export IMAGE_BASENAME = "tiny-image" + diff --git a/recipes-core/images/users.inc b/recipes-core/images/users.inc new file mode 100644 index 0000000..0894f1b --- /dev/null +++ b/recipes-core/images/users.inc @@ -0,0 +1,8 @@ +inherit extrausers + +# Encrypt the password with: echo "" | openssl passwd -1 -stdin +EXTRA_USERS_PARAMS = " \ + usermod -p '\$1\$4h5Qdc3i\$Vke4J2Ci5z.D3TtFDmV9r/' root; \ + useradd -p '\$1\$4h5Qdc3i\$Vke4J2Ci5z.D3TtFDmV9r/' tkl; \ +" + 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-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/files/beaglebone-yocto/enable_cgroups.cfg b/recipes-kernel/linux/files/beaglebone-yocto/enable_cgroups.cfg new file mode 100644 index 0000000..663ab12 --- /dev/null +++ b/recipes-kernel/linux/files/beaglebone-yocto/enable_cgroups.cfg @@ -0,0 +1,4 @@ +CONFIG_DEBUG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUP_RDMA=y + 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" + diff --git a/recipes-kernel/linux/linux-yocto_5.2.bbappend b/recipes-kernel/linux/linux-yocto_5.2.bbappend index 1af34f6..0cb6d49 100644 --- a/recipes-kernel/linux/linux-yocto_5.2.bbappend +++ b/recipes-kernel/linux/linux-yocto_5.2.bbappend @@ -3,6 +3,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +KERNEL_MODULE_AUTOLOAD += " rtl8192cu" + SRC_URI += " \ file://rtl8192cu.cfg \ file://enable_onboard_leds.cfg \ @@ -14,5 +16,6 @@ KERNEL_CONFIG_FRAGMENTS_append_ti33x = " \ ${WORKDIR}/rtl8192cu.cfg \ ${WORKDIR}/enable_onboard_leds.cfg \ ${WORKDIR}/enable_hostap_wext.cfg \ + ${WORKDIR}/enable_cgroups.cfg \ "