diff --git a/.github/workflows/yocto-build.yml b/.github/workflows/yocto-build.yml new file mode 100644 index 0000000..fa05ed9 --- /dev/null +++ b/.github/workflows/yocto-build.yml @@ -0,0 +1,444 @@ +name: Yocto Build Pipeline + +on: + workflow_dispatch: + inputs: + target: + description: 'Build target' + required: true + default: 'core-image-minimal' + type: choice + options: + - core-image-minimal + - core-image-base + - core-image-full-cmdline + - core-image-sato + - core-image-weston + machine: + description: 'Target machine' + required: true + default: 'qemux86-64' + type: choice + options: + - qemux86-64 + - qemuarm64 + - raspberrypi4-64 + - raspberrypi4 + - raspberrypi3-64 + - raspberrypi3 + - raspberrypi2 + - raspberrypi + - raspberrypi0-wifi + - raspberrypi0 + branch: + description: 'Yocto branch/version' + required: true + default: 'kirkstone' + type: choice + options: + - kirkstone + - dunfell + - hardknott + - honister + - langdale + - mickledore + clean_build: + description: 'Clean build (removes tmp directory)' + required: false + default: false + type: boolean + parallel_jobs: + description: 'Number of parallel jobs' + required: false + default: '4' + type: string + + push: + branches: [ main, develop ] + paths: + - 'recipes-**' + - 'conf/**' + - 'meta-*/**' + + pull_request: + branches: [ main ] + paths: + - 'recipes-**' + - 'conf/**' + - 'meta-*/**' + +env: + # Build configuration + YOCTO_BRANCH: ${{ github.event.inputs.branch || 'kirkstone' }} + MACHINE: ${{ github.event.inputs.machine || 'qemux86-64' }} + TARGET: ${{ github.event.inputs.target || 'core-image-minimal' }} + PARALLEL_JOBS: ${{ github.event.inputs.parallel_jobs || '4' }} + CLEAN_BUILD: ${{ github.event.inputs.clean_build || 'false' }} + + # Cache and workspace configuration + DL_DIR: /opt/yocto-cache/downloads + SSTATE_DIR: /opt/yocto-cache/sstate-cache + TMPDIR: /opt/yocto-cache/tmp + BUILDDIR: build + +jobs: + # Build validation job for quick checks + validate: + runs-on: [self-hosted, yocto, linux, x64] + if: github.event_name == 'pull_request' + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + lfs: true + + - name: Set up build environment + run: | + echo "Setting up Yocto build environment" + df -h + free -h + nproc + + # Ensure cache directories exist and are writable + sudo mkdir -p $DL_DIR $SSTATE_DIR $TMPDIR + sudo chown -R $USER:$USER /opt/yocto-cache + + # Set build variables + echo "MACHINE=$MACHINE" >> $GITHUB_ENV + echo "TARGET=$TARGET" >> $GITHUB_ENV + echo "DL_DIR=$DL_DIR" >> $GITHUB_ENV + echo "SSTATE_DIR=$SSTATE_DIR" >> $GITHUB_ENV + echo "TMPDIR=$TMPDIR" >> $GITHUB_ENV + + - name: Initialize Yocto environment + run: | + # Clone or update poky + if [ ! -d "poky" ]; then + git clone -b $YOCTO_BRANCH https://git.yoctoproject.org/git/poky + else + cd poky && git fetch && git checkout $YOCTO_BRANCH && git pull && cd .. + fi + + # Clone meta-openembedded if needed + if [ ! -d "meta-openembedded" ]; then + git clone -b $YOCTO_BRANCH https://git.openembedded.org/meta-openembedded + else + cd meta-openembedded && git fetch && git checkout $YOCTO_BRANCH && git pull && cd .. + fi + + # Clone meta-raspberrypi for Raspberry Pi builds + if [[ "$MACHINE" == raspberrypi* ]] && [ ! -d "meta-raspberrypi" ]; then + git clone -b $YOCTO_BRANCH https://git.yoctoproject.org/git/meta-raspberrypi + fi + + - name: Configure build + run: | + source poky/oe-init-build-env $BUILDDIR + + # Configure local.conf + cat >> conf/local.conf << EOF + + # Machine configuration + MACHINE = "$MACHINE" + + # Performance tuning + BB_NUMBER_THREADS = "$PARALLEL_JOBS" + PARALLEL_MAKE = "-j $PARALLEL_JOBS" + + # Cache configuration + DL_DIR = "$DL_DIR" + SSTATE_DIR = "$SSTATE_DIR" + TMPDIR = "$TMPDIR" + + # Disk space monitoring + BB_DISKMON_DIRS = "STOPTASKS,\${TMPDIR},1G,100K STOPTASKS,\${DL_DIR},1G,100K STOPTASKS,\${SSTATE_DIR},1G,100K ABORT,\${TMPDIR},100M,1K ABORT,\${DL_DIR},100M,1K ABORT,\${SSTATE_DIR},100M,1K" + + # Package management + PACKAGE_CLASSES ?= "package_rpm" + EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + + # Security and compliance + INHERIT += "buildhistory" + BUILDHISTORY_COMMIT = "1" + + EOF + + # Add meta-layers to bblayers.conf if they exist + if [ -d "../meta-openembedded" ]; then + bitbake-layers add-layer ../meta-openembedded/meta-oe + bitbake-layers add-layer ../meta-openembedded/meta-python + bitbake-layers add-layer ../meta-openembedded/meta-networking + fi + + if [ -d "../meta-raspberrypi" ] && [[ "$MACHINE" == raspberrypi* ]]; then + bitbake-layers add-layer ../meta-raspberrypi + fi + + # Show configuration + echo "Build configuration:" + echo "MACHINE: $MACHINE" + echo "TARGET: $TARGET" + echo "PARALLEL_JOBS: $PARALLEL_JOBS" + bitbake-layers show-layers + + - name: Syntax check and recipe validation + run: | + source poky/oe-init-build-env $BUILDDIR + + echo "Validating recipes and configuration..." + + # Parse recipes + bitbake -p + + # Show target recipe info + bitbake -e $TARGET | grep "^IMAGE_" + + # Validate custom recipes if they exist + if ls ../recipes-* 1> /dev/null 2>&1; then + echo "Found custom recipes, validating..." + for recipe_dir in ../recipes-*; do + if [ -d "$recipe_dir" ]; then + echo "Checking $recipe_dir" + # Add validation logic here + fi + done + fi + + - name: Build dependencies only + if: github.event_name == 'pull_request' + run: | + source poky/oe-init-build-env $BUILDDIR + + echo "Building dependencies for validation..." + bitbake -c fetchall $TARGET + bitbake -c populate_sdk $TARGET --dry-run + + # Full build job + build: + runs-on: [self-hosted, yocto, linux, x64] + needs: [validate] + if: always() && (needs.validate.result == 'success' || github.event_name != 'pull_request') + + strategy: + fail-fast: false + matrix: + include: + - machine: qemux86-64 + target: core-image-minimal + - machine: raspberrypi4-64 + target: core-image-base + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + lfs: true + + - name: Clean previous build + if: env.CLEAN_BUILD == 'true' + run: | + echo "Cleaning previous build artifacts..." + sudo rm -rf $TMPDIR/* || true + df -h + + - name: Set up build environment + run: | + echo "=== System Information ===" + uname -a + df -h + free -h + nproc + echo "==========================" + + # Ensure cache directories exist + sudo mkdir -p $DL_DIR $SSTATE_DIR $TMPDIR + sudo chown -R $USER:$USER /opt/yocto-cache + + # Set matrix-specific environment + echo "MACHINE=${{ matrix.machine }}" >> $GITHUB_ENV + echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV + + - name: Initialize Yocto environment + run: | + echo "Initializing Yocto $YOCTO_BRANCH environment..." + + # Clone poky + if [ ! -d "poky" ]; then + git clone -b $YOCTO_BRANCH https://git.yoctoproject.org/git/poky + fi + + # Clone meta-openembedded + if [ ! -d "meta-openembedded" ]; then + git clone -b $YOCTO_BRANCH https://git.openembedded.org/meta-openembedded + fi + + # Clone meta-raspberrypi for RPi builds + if [[ "${{ matrix.machine }}" == raspberrypi* ]] && [ ! -d "meta-raspberrypi" ]; then + git clone -b $YOCTO_BRANCH https://git.yoctoproject.org/git/meta-raspberrypi + fi + + - name: Configure build environment + run: | + source poky/oe-init-build-env $BUILDDIR + + cat > conf/local.conf << EOF + MACHINE = "${{ matrix.machine }}" + + # Performance configuration + BB_NUMBER_THREADS = "$PARALLEL_JOBS" + PARALLEL_MAKE = "-j $PARALLEL_JOBS" + + # Cache and workspace + DL_DIR = "$DL_DIR" + SSTATE_DIR = "$SSTATE_DIR" + TMPDIR = "$TMPDIR" + + # Disk monitoring + BB_DISKMON_DIRS = "STOPTASKS,\${TMPDIR},2G,100M STOPTASKS,\${DL_DIR},1G,100M STOPTASKS,\${SSTATE_DIR},1G,100M ABORT,\${TMPDIR},500M,1M ABORT,\${DL_DIR},100M,1M ABORT,\${SSTATE_DIR},100M,1M" + + # Package and image configuration + PACKAGE_CLASSES ?= "package_rpm" + EXTRA_IMAGE_FEATURES ?= "debug-tweaks package-management" + + # Build history and reproducibility + INHERIT += "buildhistory" + BUILDHISTORY_COMMIT = "1" + SOURCE_DATE_EPOCH = "1640995200" + + # Security features + DISTRO_FEATURES:append = " systemd" + VIRTUAL-RUNTIME_init_manager = "systemd" + + EOF + + # Add required layers + bitbake-layers add-layer ../meta-openembedded/meta-oe + bitbake-layers add-layer ../meta-openembedded/meta-python + bitbake-layers add-layer ../meta-openembedded/meta-networking + + if [[ "${{ matrix.machine }}" == raspberrypi* ]]; then + bitbake-layers add-layer ../meta-raspberrypi + fi + + echo "Configuration complete:" + bitbake-layers show-layers + + - name: Build Yocto image + timeout-minutes: 480 # 8 hours max + run: | + source poky/oe-init-build-env $BUILDDIR + + echo "Starting build of ${{ matrix.target }} for ${{ matrix.machine }}" + echo "Build started at: $(date)" + + # Monitor system resources during build + ( + while true; do + echo "$(date): CPU: $(uptime | awk '{print $10,$11,$12}') | Memory: $(free -h | grep Mem | awk '{print $3"/"$2}') | Disk: $(df -h /opt/yocto-cache | tail -1 | awk '{print $3"/"$2" ("$5")"}')" + sleep 300 # Every 5 minutes + done + ) & + MONITOR_PID=$! + + # Run the build + bitbake ${{ matrix.target }} 2>&1 | tee build-${{ matrix.machine }}-${{ matrix.target }}.log + BUILD_RESULT=${PIPESTATUS[0]} + + # Stop monitoring + kill $MONITOR_PID 2>/dev/null || true + + echo "Build completed at: $(date)" + echo "Build result: $BUILD_RESULT" + + if [ $BUILD_RESULT -eq 0 ]; then + echo "Build SUCCESS" + + # Show build results + ls -la tmp/deploy/images/${{ matrix.machine }}/ + + # Calculate image sizes + find tmp/deploy/images/${{ matrix.machine }}/ -name "*.wic*" -o -name "*.img*" -o -name "*.rootfs.*" | while read file; do + echo "$(basename "$file"): $(du -h "$file" | cut -f1)" + done + + else + echo "Build FAILED" + + # Show recent error logs + echo "Recent build errors:" + find tmp/log -name "log.do_*" -mtime -1 -exec grep -l "ERROR\|FAILED" {} \; | head -5 | while read log; do + echo "=== $log ===" + tail -20 "$log" + echo "=============" + done + + exit $BUILD_RESULT + fi + + - name: Generate build report + if: always() + run: | + source poky/oe-init-build-env $BUILDDIR + + echo "=== Build Report ===" > build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "Machine: ${{ matrix.machine }}" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "Target: ${{ matrix.target }}" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "Branch: $YOCTO_BRANCH" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "Build Date: $(date)" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "Build Host: $(uname -a)" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "Parallel Jobs: $PARALLEL_JOBS" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + + if [ -d "tmp/deploy/images/${{ matrix.machine }}" ]; then + echo "=== Build Artifacts ===" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + ls -la tmp/deploy/images/${{ matrix.machine }}/ >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + + echo "=== Package Statistics ===" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + if [ -d "tmp/deploy/rpm" ]; then + find tmp/deploy/rpm -name "*.rpm" | wc -l | xargs echo "Total RPM packages:" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + fi + fi + + echo "=== System Resources at End ===" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + df -h >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + echo "" >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + free -h >> build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + + - name: Archive build artifacts + if: success() + uses: actions/upload-artifact@v4 + with: + name: yocto-build-${{ matrix.machine }}-${{ matrix.target }}-${{ github.run_number }} + path: | + ${{ env.BUILDDIR }}/tmp/deploy/images/${{ matrix.machine }}/ + build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + retention-days: 7 + + - name: Upload build logs + if: failure() + uses: actions/upload-artifact@v4 + with: + name: build-logs-${{ matrix.machine }}-${{ matrix.target }}-${{ github.run_number }} + path: | + build-${{ matrix.machine }}-${{ matrix.target }}.log + ${{ env.BUILDDIR }}/tmp/log/ + build-report-${{ matrix.machine }}-${{ matrix.target }}.txt + retention-days: 3 + + - name: Clean up workspace + if: always() + run: | + echo "Cleaning up build workspace..." + # Keep downloads and sstate cache, but clean tmp + if [ "$CLEAN_BUILD" = "true" ] || [ "${{ github.event_name }}" = "pull_request" ]; then + sudo rm -rf $TMPDIR/* || true + fi + + # Clean old build directories + find . -maxdepth 1 -name "build*" -type d -mtime +1 -exec rm -rf {} \; || true + + df -h diff --git a/meta-crankshaft/conf/layer.conf b/meta-crankshaft/conf/layer.conf index 68237ca..0adfb23 100644 --- a/meta-crankshaft/conf/layer.conf +++ b/meta-crankshaft/conf/layer.conf @@ -11,4 +11,4 @@ BBFILE_PATTERN_meta-crankshaft = "^${LAYERDIR}/" BBFILE_PRIORITY_meta-crankshaft = "10" LAYERDEPENDS_meta-crankshaft = "core openembedded-layer qt5-layer meta-openauto" -LAYERSERIES_COMPAT_meta-crankshaft = "warrior zeus dunfell gatesgarth hardknott" +LAYERSERIES_COMPAT_meta-crankshaft = "kirkstone" diff --git a/meta-crankshafthost/COPYING.MIT b/meta-crankshafthost/COPYING.MIT new file mode 100644 index 0000000..fb950dc --- /dev/null +++ b/meta-crankshafthost/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta-crankshafthost/LICENSE b/meta-crankshafthost/LICENSE new file mode 100644 index 0000000..d6e2475 --- /dev/null +++ b/meta-crankshafthost/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 opencardev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/meta-crankshafthost/README b/meta-crankshafthost/README new file mode 100644 index 0000000..d93378d --- /dev/null +++ b/meta-crankshafthost/README @@ -0,0 +1,50 @@ +This README file contains information on the contents of the meta-crankshaft layer. + +Please see the corresponding sections below for details. + + +Dependencies +============ + + URI: git://git.openembedded.org/meta-openembedded + branch: hardknott + + URI: git://git.yoctoproject.org/meta-virtualization + branch: hardknott + + URI: git://git.openembedded.org/meta-openembedded + branch: hardknott + + URI: git://git.yoctoproject.org/meta-security + branch: hardknott + + URI: git://git.yoctoproject.org/meta-raspberrypi + branch: hardknott + + URI:git://github.com/opencardev/meta-opencardev + branch: hardknott + + +Patches +======= + +Please submit any patches against this layer github repo located at: +https://github.com/opencardev/meta-opencardev + + +Table of Contents +================= + + I. Adding the meta-opencardev layer to your build + II. Misc + + +I. Adding the meta-opencardev layer to your build +================================================= + +Run 'bitbake-layers add-layer meta-opencardev' + +II. Misc +======== + +--- replace with specific information about the meta-opencardev layer --- diff --git a/meta-crankshafthost/conf/bblayers.conf.sample b/meta-crankshafthost/conf/bblayers.conf.sample new file mode 100644 index 0000000..b55bed8 --- /dev/null +++ b/meta-crankshafthost/conf/bblayers.conf.sample @@ -0,0 +1,24 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${HOME}/yocto/poky-hardknott/meta \ + ${HOME}/yocto/poky-hardknott/meta-poky \ + ${HOME}/yocto/poky-hardknott/meta-openembedded/meta-oe \ + ${HOME}/yocto/poky-hardknott/meta-openembedded/meta-multimedia \ + ${HOME}/yocto/poky-hardknott/meta-openembedded/meta-networking \ + ${HOME}/yocto/poky-hardknott/meta-openembedded/meta-perl \ + ${HOME}/yocto/poky-hardknott/meta-openembedded/meta-python \ + ${HOME}/yocto/poky-hardknott/meta-openembedded/meta-filesystems \ + ${HOME}/yocto/poky-hardknott/meta-openembedded/meta-gnome \ + ${HOME}/yocto/poky-hardknott/meta-virtualization \ + ${HOME}/yocto/poky-hardknott/meta-qt5 \ + ${HOME}/yocto/poky-hardknott/meta-raspberrypi \ + ${HOME}/yocto/poky-hardknott/meta-security \ + ${HOME}/yocto/poky-hardknott/meta-opencardev/meta-openauto \ + ${HOME}/yocto/poky-hardknott/meta-opencardev/meta-crankshaft \ +" diff --git a/meta-crankshafthost/conf/layer.conf b/meta-crankshafthost/conf/layer.conf new file mode 100644 index 0000000..956d402 --- /dev/null +++ b/meta-crankshafthost/conf/layer.conf @@ -0,0 +1,14 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ + ${LAYERDIR}/images/*.bb" + +BBFILE_COLLECTIONS += "meta-crankshafthost" +BBFILE_PATTERN_meta-crankshafthost = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-crankshafthost = "11" + +LAYERDEPENDS_meta-crankshafthost = "core openembedded-layer meta-python multimedia-layer networking-layer perl-layer filesystems-layer virtualization-layer security " +LAYERSERIES_COMPAT_meta-crankshafthost = "kirkstone" diff --git a/meta-crankshafthost/conf/local.conf.sample b/meta-crankshafthost/conf/local.conf.sample new file mode 100644 index 0000000..490b7e8 --- /dev/null +++ b/meta-crankshafthost/conf/local.conf.sample @@ -0,0 +1,98 @@ +# Local configuration for meta-rpi images +# Yocto Project 3.1 Poky distribution [dunfell] branch +# This is a sysvinit system + +# mask wireguard from meta-openembedded/meta-networking +# use version in meta-jumpnow to support kernels < 5.6 +# with wireguard-linux-compat +BBMASK = "meta-networking/recipes-kernel/wireguard" + +LICENSE_FLAGS_WHITELIST = "commercial" + +DISTRO_FEATURES_append = " pulseaudio bluetooth bluez5 ext2 usbhost ${DISTRO_FEATURES_LIBC} systemd " + + +PREFERRED_PROVIDER_jpeg = "libjpeg-turbo" +PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native" + +PREFERRED_PROVIDER_udev = "eudev" + +VIRTUAL-RUNTIME_init_manager = "systemd" +VIRTUAL-RUNTIME_initscripts = "" + +MACHINE_FEATURES_remove = "apm" + +IMAGE_FSTYPES = "rpi-sdimg" + +MACHINE = "raspberrypi4-64" + +KERNEL_IMAGETYPE = "Image" + +# uncomment for kernels < 5.6 +WIREGUARD_COMPAT = "1" + +DISABLE_OVERSCAN = "1" +# ENABLE_UART = "1" +SERIAL_CONSOLES = "" + +# default to 5.10 +PREFERRED_VERSION_linux-raspberrypi = "5.10.%" +# PREFERRED_VERSION_linux-raspberrypi = "4.19.%" + +# DL_DIR = "/src/oe" +# SSTATE_DIR = "/oe8/rpi64/sstate-cache" +# TMPDIR = "/oe8/rpi64/tmp-zeus" + +DISTRO = "poky" +PACKAGE_CLASSES = "package_ipk" + +# i686 or x86_64 +SDKMACHINE = "x86_64" + +# for no root passwd uncomment the following and comment the two extra user lines +# EXTRA_IMAGE_FEATURES = "debug-tweaks" + +# for a root passwd, change jumpnowtek below to your password +INHERIT += "extrausers" +EXTRA_USERS_PARAMS = "\ + usermod -P raspberry root; \ + useradd -P raspberry -G sudo pi; \ + groupadd netdev; \ +" + +# this will force root to change password on first login +# INHERIT += "chageusers" +# CHAGE_USERS_PARAMS = "chage -d0 root; " + +USER_CLASSES = "image-mklibs image-prelink" +PATCHRESOLVE = "noop" +RM_OLD_IMAGE = "1" +# INHERIT += "rm_work" +CONF_VERSION = "1" + +LICENSE_FLAGS_WHITELIST_append = " commercial_faad2" +VIRTUAL-RUNTIME_init_manager = "systemd" +DISTRO_FEATURES_append = " systemd" +DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" +# add QT5 +IMAGE_INSTALL_append = " make cmake" +IMAGE_INSTALL_append = " qtbase-tools qtbase qtdeclarative qtimageformats qtmultimedia qtquickcontrols2 qtquickcontrols qtbase-plugins cinematicexperience liberation-fonts" +PACKAGECONFIG_FONTS_append_pn-qtbase = " fontconfig" +# enable remote qt dev +IMAGE_INSTALL_append = " openssh-sftp-server rsync" + +# add bluetooth +MACHINE_FEATURES += " bluetooth" +CORE_IMAGE_EXTRA_INSTALL = " rsync " +DISTRO_FEATURES_append = " pi-bluetooth bluez5 bluetooth linux-firmware-bcm43430 linux-firmware-brcmfmac43430" +IMAGE_INSTALL_append = " pi-bluetooth bluez5 bluez5-testtools linux-firmware-bcm43430 i2c-tools hostapd dhcp-server udev-rules-rpi bridge-utils iptables linux-firmware-ralink linux-firmware-rtl8192ce linux-firmware-rtl8192cu linux-firmware-rtl8192su linux-firmware-rpidistro-bcm43430" +ENABLE_UART = "1" + +# add audio +IMAGE_INSTALL_append = " gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly" +LICENSE_FLAGS_WHITELIST_append = " commercial commercial_gstreamer1.0-plugins-ugly commercial_gstreamer1.0-plugins-ugly" +PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer alsa" + +# add pulse audio required to stream over bluetooth +DISTRO_FEATURES_append = " pulseaudio" +IMAGE_INSTALL_append = " pulseaudio pulseaudio-module-dbus-protocol pulseaudio-server pulseaudio-module-bluetooth-discover pulseaudio-module-bluetooth-policy pulseaudio-module-bluez5-device pulseaudio-module-bluez5-discover alsa-utils alsa-plugins" diff --git a/meta-crankshafthost/images/crankshaft-host.bb b/meta-crankshafthost/images/crankshaft-host.bb new file mode 100644 index 0000000..45a7bcc --- /dev/null +++ b/meta-crankshafthost/images/crankshaft-host.bb @@ -0,0 +1,11 @@ +SUMMARY = "Crankshaft host production image" + +include core-image-base.bb + +IMAGE_FEATURES += "splash" + +LICENSE = "MIT" + +IMAGE_BASENAME = "${MACHINE}_Crankshaft-Host-Image-Yocto" + +IMAGE_INSTALL:append = " crankshaft-host-packagegroup" diff --git a/meta-crankshafthost/recipes-core/packagegroups/crankshaft-host-packagegroup.bb b/meta-crankshafthost/recipes-core/packagegroups/crankshaft-host-packagegroup.bb new file mode 100644 index 0000000..6f79521 --- /dev/null +++ b/meta-crankshafthost/recipes-core/packagegroups/crankshaft-host-packagegroup.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Crankshaft host package group" +SUMMARY = "Crankshaft host package group" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +INSANE_SKIP_${PN} = "dev-deps" + +inherit packagegroup + +CORE_OS = " \ + libinput-dev openssh openssh-keygen openssh-sftp-server git \ +" + +WIFI_SUPPORT = " \ + packagegroup-base \ + iw \ + linux-firmware-bcm43430\ + wpa-supplicant \ + init-ifupdown \ + wpa-supplicant \ +" + +DOCKER_SUPPORT = " \ + docker \ + python3-docker-compose \ +" \ No newline at end of file diff --git a/meta-crankshafthost/recipes-core/psplash/files/splash.png b/meta-crankshafthost/recipes-core/psplash/files/splash.png new file mode 100644 index 0000000..058a3fc Binary files /dev/null and b/meta-crankshafthost/recipes-core/psplash/files/splash.png differ diff --git a/meta-crankshafthost/recipes-core/psplash/psplash_%.bbappend b/meta-crankshafthost/recipes-core/psplash/psplash_%.bbappend new file mode 100644 index 0000000..d0868d5 --- /dev/null +++ b/meta-crankshafthost/recipes-core/psplash/psplash_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +SPLASH_IMAGES = "file://splash.png;outsuffix=default" \ No newline at end of file diff --git a/meta-openauto/conf/layer.conf b/meta-openauto/conf/layer.conf index 1047fd6..d9c187c 100644 --- a/meta-openauto/conf/layer.conf +++ b/meta-openauto/conf/layer.conf @@ -11,4 +11,4 @@ BBFILE_PATTERN_meta-openauto = "^${LAYERDIR}/" BBFILE_PRIORITY_meta-openauto = "10" LAYERDEPENDS_meta-openauto = "core openembedded-layer" -LAYERSERIES_COMPAT_meta-openauto = "warrior zeus dunfell gatesgarth hardknott" +LAYERSERIES_COMPAT_meta-openauto = "kirkstone"