commit baa49abfdd418ac82a9808323e5281ee34139596 Author: Thomas Klaehn Date: Fri Jan 25 15:20:21 2019 +0100 meta-blackfinn: Initial commit Signed-off-by: Thomas Klaehn diff --git a/conf/distro/tkl.conf b/conf/distro/tkl.conf new file mode 100644 index 0000000..960e2df --- /dev/null +++ b/conf/distro/tkl.conf @@ -0,0 +1,15 @@ +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/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..63b31c0 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,16 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += " \ + ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/images/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ +" + +BBFILE_COLLECTIONS += "meta-bbb" +BBFILE_PATTERN_meta-bbb = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-bbb = "8" + +LAYERSERIES_COMPAT_meta-bbb = "thud" + diff --git a/images/console-image.bb b/images/console-image.bb new file mode 100644 index 0000000..b78f64c --- /dev/null +++ b/images/console-image.bb @@ -0,0 +1,98 @@ +SUMMARY = "A console image with some additional tools" +HOMEPAGE = "https://blackfinn.de" +LICENSE = "MIT" + +inherit core-image extrausers + +IMAGE_FEATURES += "package-management" + +# 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; \ +" + +CORE_OS = " \ + openssh \ + openssh-keygen \ + openssh-sftp-server \ + psplash \ + tzdata \ +" + +KERNEL_EXTRA_INSTALL = " \ + kernel-modules \ + " + +WIFI_SUPPORT = " \ + iw \ + linux-firmware-rtl8192cu \ + wpa-supplicant \ + " + +DEV_SDK_INSTALL = " \ + file \ + git \ + make \ + perl-modules \ + pkgconfig \ + python-modules \ + " + +EXTRA_TOOLS_INSTALL = " \ + acpid \ + bc \ + bzip2 \ + dosfstools \ + e2fsprogs-mke2fs \ + ethtool \ + findutils \ + htop \ + i2c-tools \ + less \ + mc \ + procps \ + rsync \ + sysfsutils \ + unzip \ + util-linux \ + util-linux-blkid \ + vim \ + wget \ + curl \ + zip \ + ntp \ + " + +MQTT = " \ + python-paho-mqtt \ +" + +PYTHON_LIBS = " \ +" + +IMAGE_INSTALL += " \ + ${CORE_OS} \ + ${DEV_SDK_INSTALL} \ + ${EXTRA_TOOLS_INSTALL} \ + ${KERNEL_EXTRA_INSTALL} \ + ${WIFI_SUPPORT} \ + ${MQTT} \ + ${PYTHON_LIBS} \ +" + +set_local_timezone() { + ln -sf /usr/share/zoneinfo/Etc/UTC ${IMAGE_ROOTFS}/etc/localtime +} + +disable_bootlogd() { + echo BOOTLOGD_ENABLE=no > ${IMAGE_ROOTFS}/etc/default/bootlogd +} + +ROOTFS_POSTPROCESS_COMMAND += " \ + set_local_timezone ; \ + disable_bootlogd ; \ + " + +export IMAGE_BASENAME = "console-image" + diff --git a/recipes-connectivity/wpa-supplicant/files/wpa_supplicant.conf b/recipes-connectivity/wpa-supplicant/files/wpa_supplicant.conf new file mode 100644 index 0000000..671c8a1 --- /dev/null +++ b/recipes-connectivity/wpa-supplicant/files/wpa_supplicant.conf @@ -0,0 +1,17 @@ +#create encrypted passphrase with: wpa_passphrase '' '' +country=DE +ctrl_interface=DIR=/var/run/wpa_supplicant +update_config=1 +network={ + ssid="FRITZ!Box 7330_EXT" + psk=6bee2296d336ab07a1aca9f210be55095896e740225d920c0d7f15906dc35846 + id_str="home_outdoor" + priority=1 +} +network={ + ssid="FRITZ!Box 7330" + psk=44df1640e42b8f4e4b424a39af700c817bc2b89f13c324d29c10bf7ba3028258 + id_str="home_indoor" + priority=2 +} + diff --git a/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.6.bbappend b/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.6.bbappend new file mode 100644 index 0000000..70bc231 --- /dev/null +++ b/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.6.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +do_install_append () { + install -m 0644 ${WORKDIR}/wpa_supplicant.conf ${D}${sysconfdir}/wpa_supplicant.conf +} + diff --git a/recipes-support/ntp/files/ntp.conf b/recipes-support/ntp/files/ntp.conf new file mode 100644 index 0000000..6efc6de --- /dev/null +++ b/recipes-support/ntp/files/ntp.conf @@ -0,0 +1,19 @@ +# This is the most basic ntp configuration file +# The driftfile must remain in a place specific to this +# machine - it records the machine specific clock error +driftfile /var/lib/ntp/drift +# This should be a server that is close (in IP terms) +# to the machine. Add other servers as required. +# Unless you un-comment the line below ntpd will sync +# only against the local system clock. +# +# server time.server.example.com +server 192.168.178.1 +# +# Using local hardware clock as fallback +# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself +server 127.127.1.0 +fudge 127.127.1.0 stratum 14 +# Defining a default security setting +restrict default + diff --git a/recipes-support/ntp/ntp_%.bbappend b/recipes-support/ntp/ntp_%.bbappend new file mode 100644 index 0000000..869d60a --- /dev/null +++ b/recipes-support/ntp/ntp_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +