From b4d9399de68c9f3ff6567017651e9881fa9e2b0e Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Tue, 3 Feb 2026 18:12:28 +0100 Subject: [PATCH] Initial --- COPYING.MIT | 17 +++++ README | 41 +++++++++++ bitbake-cookerdaemon.log | 19 +++++ conf/distro/limbux.conf | 20 ++++++ conf/layer.conf | 13 ++++ linux-yocto-custom.bb | 71 ++++++++++++++++++ .../base-files/base-files_3.%.bbappend | 1 + recipes-core/images/imbus-mini.bb | 22 ++++++ recipes-example/example/example_0.1.bb | 13 ++++ recipes-hello/entr/entr_git.bb | 21 ++++++ recipes-hello/helloworld/files/helloworld.c | 3 + recipes-hello/helloworld/helloworld_1.0.bb | 24 +++++++ recipes-hello/libhash/libhash_git.bb | 31 ++++++++ recipes-kernel/kernelmod-demo_git.bb | 26 +++++++ recipes-kernel/linux/limbux_6.10.6.bb | 72 +++++++++++++++++++ recipes-kernel/linux/linux-yocto-custom.bb | 71 ++++++++++++++++++ 16 files changed, 465 insertions(+) create mode 100644 COPYING.MIT create mode 100644 README create mode 100644 bitbake-cookerdaemon.log create mode 100644 conf/distro/limbux.conf create mode 100644 conf/layer.conf create mode 100644 linux-yocto-custom.bb create mode 100644 recipes-core/base-files/base-files_3.%.bbappend create mode 100644 recipes-core/images/imbus-mini.bb create mode 100644 recipes-example/example/example_0.1.bb create mode 100644 recipes-hello/entr/entr_git.bb create mode 100644 recipes-hello/helloworld/files/helloworld.c create mode 100644 recipes-hello/helloworld/helloworld_1.0.bb create mode 100644 recipes-hello/libhash/libhash_git.bb create mode 100644 recipes-kernel/kernelmod-demo_git.bb create mode 100644 recipes-kernel/linux/limbux_6.10.6.bb create mode 100644 recipes-kernel/linux/linux-yocto-custom.bb diff --git a/COPYING.MIT b/COPYING.MIT new file mode 100644 index 0000000..fb950dc --- /dev/null +++ b/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/README b/README new file mode 100644 index 0000000..2c6eccf --- /dev/null +++ b/README @@ -0,0 +1,41 @@ +This README file contains information on the contents of the meta-imbus layer. + +Please see the corresponding sections below for details. + +Dependencies +============ + + URI: + branch: + + URI: + branch: + + . + . + . + +Patches +======= + +Please submit any patches against the meta-imbus layer to the xxxx mailing list (xxxx@zzzz.org) +and cc: the maintainer: + +Maintainer: XXX YYYYYY + +Table of Contents +================= + + I. Adding the meta-imbus layer to your build + II. Misc + + +I. Adding the meta-imbus layer to your build +================================================= + +Run 'bitbake-layers add-layer meta-imbus' + +II. Misc +======== + +--- replace with specific information about the meta-imbus layer --- diff --git a/bitbake-cookerdaemon.log b/bitbake-cookerdaemon.log new file mode 100644 index 0000000..8c20cf4 --- /dev/null +++ b/bitbake-cookerdaemon.log @@ -0,0 +1,19 @@ +141416 05:56:52.779007 --- Starting bitbake server pid 141416 at 2026-01-17 05:56:52.778988 --- +141416 05:56:52.779731 Started bitbake server pid 141416 +141416 05:56:52.779862 Entering server connection loop +141416 05:56:52.779880 Lockfile is: /storage/yocto/meta-imbus/bitbake.lock +Socket is /storage/yocto/meta-imbus/bitbake.sock (True) +141416 05:56:52.780166 Accepting [] ([]) +141416 05:56:52.780713 Processing Client +141416 05:56:52.780746 Connecting Client +141416 05:56:52.780995 Running command ['setFeatures', [2, 1]] +141416 05:56:52.781027 Sending reply (None, None) +141416 05:56:52.781082 Command Completed (socket: True) +141416 05:56:52.781685 Running command ['updateConfig', {'halt': True, 'force': False, 'invalidate_stamp': None, 'dry_run': False, 'dump_signatures': [], 'extra_assume_provided': [], 'profile': [], 'prefile': [], 'postfile': [], 'server_timeout': None, 'nosetscene': False, 'setsceneonly': False, 'skipsetscene': False, 'runall': [], 'runonly': None, 'writeeventlog': None, 'build_verbose_shell': False, 'build_verbose_stdout': False, 'default_loglevel': 20, 'debug_domains': {}}, {'SHELL': '/bin/bash', 'SSTATE_DIR': '/storage/bitbake/sstate-cache', 'BB_ENV_PASSTHROUGH_ADDITIONS': 'DL_DIR SSTATE_DIR BUILDID', 'PWD': '/storage/yocto/meta-imbus', 'LOGNAME': 'imbus', 'HOME': '/home/imbus', 'USER': 'imbus', 'DL_DIR': '/storage/bitbake/dl-cache', 'PATH': '/home/imbus/.bitbake/bin:/home/imbus/.zig:/home/imbus/.cargo/bin:/home/imbus/.go/bin:/home/imbus/scripts:/home/imbus/bin:/home/imbus/.local/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'LC_ALL': 'en_US.UTF-8', 'WINDOWID': '94165273570896', 'COLORTERM': 'truecolor', 'HISTCONTROL': 'ignoredups:ignorespace', 'XDG_MENU_PREFIX': 'gnome-', 'TERM_PROGRAM_VERSION': '3.5a', 'QT_IM_MODULES': 'wayland;ibus', 'TMUX': '/tmp/tmux-1000/default,125894,0', 'HOSTNAME': 'raptor', 'HISTSIZE': '10000', 'FPATH': '/usr/share/lmod/lmod/init/ksh_funcs', 'LC_ADDRESS': 'sv_SE.UTF-8', 'SSH_AUTH_SOCK': '/run/user/1000/gcr/ssh', 'MEMORY_PRESSURE_WRITE': 'c29tZSAyMDAwMDAgMjAwMDAwMAA=', 'XMODIFIERS': '@im=ibus', 'DESKTOP_SESSION': 'gnome', 'LC_MONETARY': 'sv_SE.UTF-8', 'GPG_TTY': '/dev/pts/2', 'LMOD_DIR': '/usr/share/lmod/lmod/libexec', 'EDITOR': 'nvim', 'XDG_SESSION_DESKTOP': 'gnome', 'XDG_SESSION_TYPE': 'wayland', 'MODULESHOME': '/usr/share/lmod/lmod', 'MANPATH': '/usr/share/lmod/lmod/share/man:', 'SYSTEMD_EXEC_PID': '3436', 'XAUTHORITY': '/run/user/1000/.mutter-Xwaylandauth.Q6H1I3', 'FZF_DEFAULT_COMMAND': 'fd -tf', 'GDM_LANG': 'en_US.UTF-8', 'USERNAME': 'imbus', 'SSH_ASKPASS': '/usr/libexec/openssh/gnome-ssh-askpass', 'LC_PAPER': 'sv_SE.UTF-8', 'LANG': 'en_US.UTF-8', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;37;41:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.7z=01;31:*.ace=01;31:*.alz=01;31:*.apk=01;31:*.arc=01;31:*.arj=01;31:*.bz=01;31:*.bz2=01;31:*.cab=01;31:*.cpio=01;31:*.crate=01;31:*.deb=01;31:*.drpm=01;31:*.dwm=01;31:*.dz=01;31:*.ear=01;31:*.egg=01;31:*.esd=01;31:*.gz=01;31:*.jar=01;31:*.lha=01;31:*.lrz=01;31:*.lz=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.lzo=01;31:*.pyz=01;31:*.rar=01;31:*.rpm=01;31:*.rz=01;31:*.sar=01;31:*.swm=01;31:*.t7z=01;31:*.tar=01;31:*.taz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tgz=01;31:*.tlz=01;31:*.txz=01;31:*.tz=01;31:*.tzo=01;31:*.tzst=01;31:*.udeb=01;31:*.war=01;31:*.whl=01;31:*.wim=01;31:*.xz=01;31:*.z=01;31:*.zip=01;31:*.zoo=01;31:*.zst=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.jxl=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.m4a=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.oga=01;36:*.opus=01;36:*.spx=01;36:*.xspf=01;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:', 'FZF_CTRL_R_OPTS': '--reverse', 'XDG_CURRENT_DESKTOP': 'GNOME', 'MEMORY_PRESSURE_WATCH': '/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/session.slice/org.gnome.SettingsDaemon.MediaKeys.service/memory.pressure', 'WAYLAND_DISPLAY': 'wayland-0', 'LMOD_SETTARG_FULL_SUPPORT': 'no', 'INVOCATION_ID': '6b7722be91574cea80a7c606b7aa8e1c', 'LMOD_VERSION': '8.7.65', 'MANAGERPID': '2974', 'ALACRITTY_SOCKET': '/run/user/1000/Alacritty-wayland-0-114947.sock', 'MODULEPATH_ROOT': '/usr/share/modulefiles', 'MOZ_GMP_PATH': '/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed', 'GNOME_SETUP_DISPLAY': ':1', 'MANWIDTH': '120', 'XDG_SESSION_CLASS': 'user', 'LMOD_PKG': '/usr/share/lmod/lmod', 'TERM': 'tmux-256color', 'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'TMUX_PANE': '%0', 'MANPAGER': 'nvim +Man!', 'DISPLAY': ':0', 'LMOD_ROOT': '/usr/share/lmod', 'SHLVL': '2', 'BASH_ENV': '/usr/share/lmod/lmod/init/bash', 'LMOD_sys': 'Linux', 'LC_TELEPHONE': 'sv_SE.UTF-8', 'QT_IM_MODULE': 'ibus', 'LC_MEASUREMENT': 'sv_SE.UTF-8', 'MANAGERPIDFDID': '2975', 'LD_LIBRARY_PATH': '/usr/local/lib64:/usr/local/lib:', 'XDG_RUNTIME_DIR': '/run/user/1000', 'DEBUGINFOD_URLS': 'ima:enforcing https://debuginfod.fedoraproject.org/ ima:ignore ', 'LC_TIME': 'sv_SE.UTF-8', 'DEBUGINFOD_IMA_CERT_PATH': '/etc/keys/ima:', 'LFS': '/storage/lfs', 'JOURNAL_STREAM': '9:34185', 'XDG_DATA_DIRS': '/home/imbus/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/', 'MODULEPATH': '/etc/modulefiles:/usr/share/modulefiles:/usr/share/modulefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core', 'ALACRITTY_LOG': '/tmp/Alacritty-114947.log', 'GDMSESSION': 'gnome', 'HISTFILESIZE': '10000', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'LMOD_CMD': '/usr/share/lmod/lmod/libexec/lmod', 'MAIL': '/var/spool/mail/imbus', 'ALACRITTY_WINDOW_ID': '94165273570896', 'CMAKE_GENERATOR': 'Ninja', 'GIO_LAUNCHED_DESKTOP_FILE_PID': '114947', 'LC_NUMERIC': 'sv_SE.UTF-8', 'OLDPWD': '/storage/yocto', 'GOPATH': '/home/imbus/.go', 'TERM_PROGRAM': 'tmux', 'BASH_FUNC_ml%%': '() { eval "$($LMOD_DIR/ml_cmd "$@")"\n}', 'BASH_FUNC_module%%': '() { if [ -z "${LMOD_SH_DBG_ON+x}" ]; then\n case "$-" in \n *v*x*)\n __lmod_sh_dbg=\'vx\'\n ;;\n *v*)\n __lmod_sh_dbg=\'v\'\n ;;\n *x*)\n __lmod_sh_dbg=\'x\'\n ;;\n esac;\n fi;\n if [ -n "${__lmod_sh_dbg:-}" ]; then\n set +$__lmod_sh_dbg;\n echo "Shell debugging temporarily silenced: export LMOD_SH_DBG_ON=1 for Lmod\'s output" 1>&2;\n fi;\n eval "$($LMOD_CMD shell "$@")" && eval "$(${LMOD_SETTARG_CMD:-:} -s sh)";\n __lmod_my_status=$?;\n if [ -n "${__lmod_sh_dbg:-}" ]; then\n echo "Shell debugging restarted" 1>&2;\n set -$__lmod_sh_dbg;\n fi;\n unset __lmod_sh_dbg;\n return $__lmod_my_status\n}', '_': '/home/imbus/.bitbake/bin/bitbake'}, ['/home/imbus/.bitbake/bin/bitbake', 'imbus-mini']] +141416 05:56:52.789310 Sending reply (None, 'bb.BBHandledException()\nTraceback (most recent call last):\n File "/home/imbus/.bitbake/lib/bb/command.py", line 91, in runCommand\n result = command_method(self, commandline)\n File "/home/imbus/.bitbake/lib/bb/command.py", line 291, in updateConfig\n command.cooker.updateConfigOpts(options, environment, cmdline)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/imbus/.bitbake/lib/bb/cooker.py", line 507, in updateConfigOpts\n self.reset()\n ~~~~~~~~~~^^\n File "/home/imbus/.bitbake/lib/bb/cooker.py", line 1773, in reset\n self.initConfigurationData()\n ~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n File "/home/imbus/.bitbake/lib/bb/cooker.py", line 300, in initConfigurationData\n self.databuilder.parseBaseConfiguration()\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n File "/home/imbus/.bitbake/lib/bb/cookerdata.py", line 277, in parseBaseConfiguration\n self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/imbus/.bitbake/lib/bb/cookerdata.py", line 477, in parseConfigurationFiles\n bb.fatal(msg)\n ~~~~~~~~^^^^^\n File "/home/imbus/.bitbake/lib/bb/__init__.py", line 262, in fatal\n raise BBHandledException()\nbb.BBHandledException\n') +141416 05:56:52.789383 Command Completed (socket: True) +141416 05:56:53.033832 Processing Client +141416 05:56:53.033892 Disconnecting Client (socket: True) +141416 05:56:53.033974 No timeout, exiting. +141416 05:56:54.034305 Exiting (socket: True) +141416 05:56:54.034591 Exiting as we could obtain the lock diff --git a/conf/distro/limbux.conf b/conf/distro/limbux.conf new file mode 100644 index 0000000..bb7fe31 --- /dev/null +++ b/conf/distro/limbux.conf @@ -0,0 +1,20 @@ +# require conf/distro/poky.conf + +DISTRO = "limbux" +DISTRO_NAME = "Limux" +DISTRO_VERSION = "1.0" + +DISTRO_FEATURES:remove = "wifi irda zeroconf sysvinit" +# DISTRO_FEATURES:remove = "wifi irda zeroconf systemd" + +# Select systemd as the init manager for this distro +# INIT_MANAGER = "systemd" + +# VIRTUAL-RUNTIME_init_manager = "systemd" + +# Select to use "mylinux" as provider of the linux kernel and set the +# version to use to be 6.10.6 +#PREFERRED_PROVIDER_virtual/kernel = "limbux" +#PREFERRED_VERSION_mylinux = "6.10.6%" + +#PACKAGE_CLASSES ?= "package_ipk" diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..31c223f --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,13 @@ +# 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" + +BBFILE_COLLECTIONS += "meta-imbus" +BBFILE_PATTERN_meta-imbus = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-imbus = "6" + +LAYERDEPENDS_meta-imbus = "core" +LAYERSERIES_COMPAT_meta-imbus = "scarthgap" diff --git a/linux-yocto-custom.bb b/linux-yocto-custom.bb new file mode 100644 index 0000000..0879bb1 --- /dev/null +++ b/linux-yocto-custom.bb @@ -0,0 +1,71 @@ +SUMMARY = "An example kernel recipe that uses the linux-yocto and oe-core" +# linux-yocto-custom.bb: +# +# kernel classes to apply a subset of yocto kernel management to git +# managed kernel repositories. +# +# To use linux-yocto-custom in your layer, copy this recipe (optionally +# rename it as well) and modify it appropriately for your machine. i.e.: +# +# COMPATIBLE_MACHINE:yourmachine = "yourmachine" +# +# You must also provide a Linux kernel configuration. The most direct +# method is to copy your .config to files/defconfig in your layer, +# in the same directory as the copy (and rename) of this recipe and +# add file://defconfig to your SRC_URI. +# +# To use the yocto kernel tooling to generate a BSP configuration +# using modular configuration fragments, see the yocto-bsp and +# yocto-kernel tools documentation. +# +# Warning: +# +# Building this example without providing a defconfig or BSP +# configuration will result in build or boot errors. This is not a +# bug. +# +# +# Notes: +# +# patches: patches can be merged into to the source git tree itself, +# added via the SRC_URI, or controlled via a BSP +# configuration. +# +# defconfig: When a defconfig is provided, the linux-yocto configuration +# uses the filename as a trigger to use a 'allnoconfig' baseline +# before merging the defconfig into the build. +# +# If the defconfig file was created with make_savedefconfig, +# not all options are specified, and should be restored with their +# defaults, not set to 'n'. To properly expand a defconfig like +# this, specify: KCONFIG_MODE="--alldefconfig" in the kernel +# recipe. +# +# example configuration addition: +# SRC_URI += "file://smp.cfg" +# example patch addition (for kernel v4.x only): +# SRC_URI += "file://0001-linux-version-tweak.patch" +# example feature addition (for kernel v4.x only): +# SRC_URI += "file://feature.scc" +# + +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +# Override SRC_URI in a copy of this recipe to point at a different source +# tree if you do not want to build from Linus' tree. +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" + +LINUX_VERSION ?= "4.2" +LINUX_VERSION_EXTENSION:append = "-custom" + +# Modify SRCREV to a different commit hash in a copy of this recipe to +# build a different release of the Linux kernel. +# tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2 +SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2" + +PV = "${LINUX_VERSION}+git" + +# Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe +# file. Leaving it empty here ensures an early explicit build failure. +COMPATIBLE_MACHINE = "(^$)" diff --git a/recipes-core/base-files/base-files_3.%.bbappend b/recipes-core/base-files/base-files_3.%.bbappend new file mode 100644 index 0000000..bfb7457 --- /dev/null +++ b/recipes-core/base-files/base-files_3.%.bbappend @@ -0,0 +1 @@ +hostname = "imbus-mini" diff --git a/recipes-core/images/imbus-mini.bb b/recipes-core/images/imbus-mini.bb new file mode 100644 index 0000000..598e10b --- /dev/null +++ b/recipes-core/images/imbus-mini.bb @@ -0,0 +1,22 @@ +SUMMARY = "A small image just capable of allowing a device to boot." + +IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}" + +IMAGE_LINGUAS = " " + +LICENSE = "MIT" + +inherit core-image + +IMAGE_ROOTFS_SIZE ?= "8192" +IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "", d)}" +IMAGE_FSTYPES:beaglebone-yocto += "wic" +WKS_FILE:beaglebone-yocto = "beaglebone-yocto.wks" + +add_buildid() { + echo "${BUILDID}" > ${IMAGE_ROOTFS}/etc/build-id +} + +ROOTFS_POSTPROCESS_COMMAND += "add_buildid;" + +do_rootfs[vardeps] += "BUILDID" diff --git a/recipes-example/example/example_0.1.bb b/recipes-example/example/example_0.1.bb new file mode 100644 index 0000000..facaae3 --- /dev/null +++ b/recipes-example/example/example_0.1.bb @@ -0,0 +1,13 @@ +SUMMARY = "bitbake-layers recipe" +DESCRIPTION = "Recipe created by bitbake-layers" +LICENSE = "MIT" + +python do_display_banner() { + bb.plain("***********************************************"); + bb.plain("* *"); + bb.plain("* Example recipe created by bitbake-layers *"); + bb.plain("* *"); + bb.plain("***********************************************"); +} + +addtask display_banner before do_build diff --git a/recipes-hello/entr/entr_git.bb b/recipes-hello/entr/entr_git.bb new file mode 100644 index 0000000..1425ab6 --- /dev/null +++ b/recipes-hello/entr/entr_git.bb @@ -0,0 +1,21 @@ +LICENSE = "ISC & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9ddb37016e12a99202e14ddb69593155" + +SRC_URI = "git://github.com/eradman/entr;protocol=https;branch=master" + +PV = "1.0+git" +SRCREV = "81fb8966fd709b3d99996df644ee1c4c8492235d" + +S = "${WORKDIR}/git" + +do_configure () { + ./configure +} + +do_compile () { + oe_runmake +} + +do_install() { + oe_runmake install DESTDIR=${D} PREFIX=${prefix} +} diff --git a/recipes-hello/helloworld/files/helloworld.c b/recipes-hello/helloworld/files/helloworld.c new file mode 100644 index 0000000..7c22a48 --- /dev/null +++ b/recipes-hello/helloworld/files/helloworld.c @@ -0,0 +1,3 @@ +#include + +int main(void) { printf("Hello, world!"); } diff --git a/recipes-hello/helloworld/helloworld_1.0.bb b/recipes-hello/helloworld/helloworld_1.0.bb new file mode 100644 index 0000000..97e53f7 --- /dev/null +++ b/recipes-hello/helloworld/helloworld_1.0.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Prints hello world" +LICENSE = "CLOSED" +LIC_FILES_CHKSUM = "" +SRC_URI = "file://helloworld.c" +S = "${WORKDIR}" +TARGET_CC_ARCH += "${LDFLAGS}" + +FILES:${PN} += "/etc/helloworld" +do_compile() { + bbplain "Hello world: do_compile" + # ${CC} helloworld.c -o helloworld + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld +} + +do_install() { + # Install the helloworld application to /usr/bin on target + # install -d ${D}/usr/bin + # install -m 0755 helloworld ${D}/usr/bin + install -d ${D}${bindir} + install -m 0755 helloworld ${D}${bindir} + + install -d ${D}/etc + touch ${D}/etc/helloworld +} diff --git a/recipes-hello/libhash/libhash_git.bb b/recipes-hello/libhash/libhash_git.bb new file mode 100644 index 0000000..62c40c5 --- /dev/null +++ b/recipes-hello/libhash/libhash_git.bb @@ -0,0 +1,31 @@ +# This is borked. Bitbake has strict requirements on .so versioning and symlinking, +# and for a very good reason, of course. + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5741b139eae27eb6a4fc1c9b1732ef7f" + +SRC_URI = "git://git.silversoft.se/Imbus/libhash.git;protocol=https;branch=master" + +PV = "1.0+git" +SRCREV = "9c23dc5653a5de8fef69265411a23c9905495acb" + +S = "${WORKDIR}/git" + +do_configure () { + # Specify any needed configure commands here + : +} + +do_compile () { + # You will almost certainly need to add additional arguments here + oe_runmake +} + +do_install () { + # This is a guess; additional arguments may be required + oe_runmake install 'DESTDIR=${D}' 'PREFIX=/usr' +} + +FILES:${PN}-staticdev += "/usr/lib/libhash.a" +FILES:${PN}-dev += "/usr/lib/libhash.so" +FILES:${PN}-dev += "/usr/include/" diff --git a/recipes-kernel/kernelmod-demo_git.bb b/recipes-kernel/kernelmod-demo_git.bb new file mode 100644 index 0000000..00c7df0 --- /dev/null +++ b/recipes-kernel/kernelmod-demo_git.bb @@ -0,0 +1,26 @@ +# Recipe created by recipetool +# This is the basis of a recipe and may need further editing in order to be fully functional. +# (Feel free to remove these comments when editing.) + +# Unable to find any files that looked like license statements. Check the accompanying +# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly. +# +# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if +# this is not accurate with respect to the licensing of the software being built (it +# will not be in most cases) you must specify the correct value before using this +# recipe for anything other than initial testing/development! +LICENSE = "CLOSED" +LIC_FILES_CHKSUM = "" + +SRC_URI = "git://git.silversoft.se/Imbus/kernelmod_demo.git;protocol=https;branch=master" + +# Modify these as desired +PV = "1.0+git" +SRCREV = "40295d6d459c666d5f7174cce520350be8cac464" + +S = "${WORKDIR}/git" + +inherit module + +EXTRA_OEMAKE:append:task-install = " -C ${STAGING_KERNEL_DIR} M=${S}" +# Kernel path in install makefile is hardcoded - you will need to patch the makefile. Note that the variable KERNEL_SRC will be passed in as the kernel source path. diff --git a/recipes-kernel/linux/limbux_6.10.6.bb b/recipes-kernel/linux/limbux_6.10.6.bb new file mode 100644 index 0000000..6393d54 --- /dev/null +++ b/recipes-kernel/linux/limbux_6.10.6.bb @@ -0,0 +1,72 @@ +SUMMARY = "An example kernel recipe that uses the linux-yocto and oe-core" +# linux-yocto-custom.bb: +# +# kernel classes to apply a subset of yocto kernel management to git +# managed kernel repositories. +# +# To use linux-yocto-custom in your layer, copy this recipe (optionally +# rename it as well) and modify it appropriately for your machine. i.e.: +# +# COMPATIBLE_MACHINE:yourmachine = "yourmachine" +# +# You must also provide a Linux kernel configuration. The most direct +# method is to copy your .config to files/defconfig in your layer, +# in the same directory as the copy (and rename) of this recipe and +# add file://defconfig to your SRC_URI. +# +# To use the yocto kernel tooling to generate a BSP configuration +# using modular configuration fragments, see the yocto-bsp and +# yocto-kernel tools documentation. +# +# Warning: +# +# Building this example without providing a defconfig or BSP +# configuration will result in build or boot errors. This is not a +# bug. +# +# +# Notes: +# +# patches: patches can be merged into to the source git tree itself, +# added via the SRC_URI, or controlled via a BSP +# configuration. +# +# defconfig: When a defconfig is provided, the linux-yocto configuration +# uses the filename as a trigger to use a 'allnoconfig' baseline +# before merging the defconfig into the build. +# +# If the defconfig file was created with make_savedefconfig, +# not all options are specified, and should be restored with their +# defaults, not set to 'n'. To properly expand a defconfig like +# this, specify: KCONFIG_MODE="--alldefconfig" in the kernel +# recipe. +# +# example configuration addition: +# SRC_URI += "file://smp.cfg" +# example patch addition (for kernel v4.x only): +# SRC_URI += "file://0001-linux-version-tweak.patch" +# example feature addition (for kernel v4.x only): +# SRC_URI += "file://feature.scc" +# + +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +# Override SRC_URI in a copy of this recipe to point at a different source +# tree if you do not want to build from Linus' tree. +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;branch=linux-6.10.y" + +LINUX_VERSION ?= "4.2" +LINUX_VERSION_EXTENSION:append = "-custom" + +# Modify SRCREV to a different commit hash in a copy of this recipe to +# build a different release of the Linux kernel. +# tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2 +SRCREV_machine="7ba498d9d1bb67bcbc2a79f19a9054cdc8b95098" + +PV = "${LINUX_VERSION}+git" + +# Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe +# file. Leaving it empty here ensures an early explicit build failure. +COMPATIBLE_MACHINE = "(^$)" diff --git a/recipes-kernel/linux/linux-yocto-custom.bb b/recipes-kernel/linux/linux-yocto-custom.bb new file mode 100644 index 0000000..0879bb1 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-custom.bb @@ -0,0 +1,71 @@ +SUMMARY = "An example kernel recipe that uses the linux-yocto and oe-core" +# linux-yocto-custom.bb: +# +# kernel classes to apply a subset of yocto kernel management to git +# managed kernel repositories. +# +# To use linux-yocto-custom in your layer, copy this recipe (optionally +# rename it as well) and modify it appropriately for your machine. i.e.: +# +# COMPATIBLE_MACHINE:yourmachine = "yourmachine" +# +# You must also provide a Linux kernel configuration. The most direct +# method is to copy your .config to files/defconfig in your layer, +# in the same directory as the copy (and rename) of this recipe and +# add file://defconfig to your SRC_URI. +# +# To use the yocto kernel tooling to generate a BSP configuration +# using modular configuration fragments, see the yocto-bsp and +# yocto-kernel tools documentation. +# +# Warning: +# +# Building this example without providing a defconfig or BSP +# configuration will result in build or boot errors. This is not a +# bug. +# +# +# Notes: +# +# patches: patches can be merged into to the source git tree itself, +# added via the SRC_URI, or controlled via a BSP +# configuration. +# +# defconfig: When a defconfig is provided, the linux-yocto configuration +# uses the filename as a trigger to use a 'allnoconfig' baseline +# before merging the defconfig into the build. +# +# If the defconfig file was created with make_savedefconfig, +# not all options are specified, and should be restored with their +# defaults, not set to 'n'. To properly expand a defconfig like +# this, specify: KCONFIG_MODE="--alldefconfig" in the kernel +# recipe. +# +# example configuration addition: +# SRC_URI += "file://smp.cfg" +# example patch addition (for kernel v4.x only): +# SRC_URI += "file://0001-linux-version-tweak.patch" +# example feature addition (for kernel v4.x only): +# SRC_URI += "file://feature.scc" +# + +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +# Override SRC_URI in a copy of this recipe to point at a different source +# tree if you do not want to build from Linus' tree. +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" + +LINUX_VERSION ?= "4.2" +LINUX_VERSION_EXTENSION:append = "-custom" + +# Modify SRCREV to a different commit hash in a copy of this recipe to +# build a different release of the Linux kernel. +# tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2 +SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2" + +PV = "${LINUX_VERSION}+git" + +# Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe +# file. Leaving it empty here ensures an early explicit build failure. +COMPATIBLE_MACHINE = "(^$)"