aboutsummaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-initramfs/recipes-bsp')
-rw-r--r--meta-initramfs/recipes-bsp/images/initramfs-debug-image.bb22
-rw-r--r--meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb28
-rw-r--r--meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb12
-rw-r--r--meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh31
-rw-r--r--meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb14
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch42
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch33
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb10
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb56
9 files changed, 97 insertions, 151 deletions
diff --git a/meta-initramfs/recipes-bsp/images/initramfs-debug-image.bb b/meta-initramfs/recipes-bsp/images/initramfs-debug-image.bb
deleted file mode 100644
index be7350ade2..0000000000
--- a/meta-initramfs/recipes-bsp/images/initramfs-debug-image.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-# Simple initramfs image. Mostly used for live images.
-DESCRIPTION = "Small image capable of booting a device. The kernel includes \
-the Minimal RAM-based Initial Root Filesystem (initramfs), which one can use \
-to check the hardware efficiently."
-
-PACKAGE_INSTALL = "initramfs-debug busybox base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
-
-# Do not pollute the initrd image with rootfs features
-IMAGE_FEATURES = ""
-
-export IMAGE_BASENAME = "initramfs-debug-image"
-IMAGE_LINGUAS = ""
-
-LICENSE = "MIT"
-
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
-inherit core-image
-
-IMAGE_ROOTFS_SIZE = "8192"
-IMAGE_ROOTFS_EXTRA_SPACE = "0"
-
-BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb b/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb
deleted file mode 100644
index 2573eb4818..0000000000
--- a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Initramfs image for kexecboot kernel"
-DESCRIPTION = "This image provides kexecboot (linux as bootloader) and helpers."
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-
-inherit image
-
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
-
-# avoid circular dependencies
-EXTRA_IMAGEDEPENDS = ""
-KERNELDEPMODDEPEND = ""
-
-# We really need just kexecboot, kexec and ubiattach
-IMAGE_INSTALL = "kexecboot kexec mtd-utils-ubifs"
-
-# Do not pollute the initrd image with rootfs features
-IMAGE_FEATURES = ""
-
-IMAGE_LINGUAS = ""
-
-FEED_DEPLOYDIR_BASE_URI = ""
-LDCONFIGDEPEND = ""
-IMAGE_ROOTFS_EXTRA_SPACE = "0"
-
-# disable runtime dependency on run-postinsts -> update-rc.d
-ROOTFS_BOOTSTRAP_INSTALL = ""
-
diff --git a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb b/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb
deleted file mode 100644
index 6b845bd9d3..0000000000
--- a/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require initramfs-kexecboot-image.bb
-
-SUMMARY = "Initramfs image for kexecboot kernel (klibc-static binaries)"
-
-# We really need just kexecboot, kexec and ubiattach
-# statically compiled against klibc
-IMAGE_INSTALL = "kexecboot-klibc kexec-klibc ubiattach-klibc"
-
-python () {
- if d.getVar('TARGET_ARCH') == "nios2":
- raise bb.parse.SkipPackage("'nios2' not supported arch")
-}
diff --git a/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh b/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh
deleted file mode 100644
index 7edbd70cb0..0000000000
--- a/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-do_mount_fs() {
- grep -q "$1" /proc/filesystems || return
- test -d "$2" || mkdir -p "$2"
- mount -t "$1" "$1" "$2"
-}
-
-do_mknod() {
- test -e "$1" || mknod "$1" "$2" "$3" "$4"
-}
-
-mkdir -p /proc
-mount -t proc proc /proc
-
-do_mount_fs sysfs /sys
-do_mount_fs debugfs /sys/kernel/debug
-do_mount_fs devtmpfs /dev
-do_mount_fs devpts /dev/pts
-do_mount_fs tmpfs /dev/shm
-
-mkdir -p /run
-mkdir -p /var/run
-
-do_mknod /dev/console c 5 1
-do_mknod /dev/null c 1 3
-do_mknod /dev/zero c 1 5
-
-exec sh </dev/console >/dev/console 2>/dev/console
diff --git a/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb b/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
deleted file mode 100644
index 667690f888..0000000000
--- a/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Extremely basic live image init script"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-SRC_URI = "file://init-debug.sh"
-
-S = "${WORKDIR}"
-
-do_install() {
- install -m 0755 ${WORKDIR}/init-debug.sh ${D}/init
-}
-
-inherit allarch
-
-FILES_${PN} += " /init "
diff --git a/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch
new file mode 100644
index 0000000000..52d622a2f8
--- /dev/null
+++ b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch
@@ -0,0 +1,42 @@
+From a6d1678379df6142a68cc9bb76dae540a31b8fdb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Mar 2019 23:47:50 -0700
+Subject: [PATCH] kexecboot: Use new reboot() API with klibc
+
+Klibc has changed this API in
+https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=6b621b8705ce5901dcf49607c8a3523c9e521901
+
+therefore adopt the code
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/kexecboot.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/kexecboot.c b/src/kexecboot.c
+index cf49b40..c785fce 100644
+--- a/src/kexecboot.c
++++ b/src/kexecboot.c
+@@ -857,7 +857,7 @@ int process_ctx_menu(struct params_t *params, int action) {
+ #else
+ sync();
+ /* if ( -1 == reboot(LINUX_REBOOT_CMD_RESTART) ) { */
+- if ( -1 == reboot(RB_AUTOBOOT) ) {
++ if ( -1 == reboot(RB_AUTOBOOT, NULL) ) {
+ log_msg(lg, "Can't initiate reboot: %s", ERRMSG);
+ }
+ #endif
+@@ -874,7 +874,7 @@ int process_ctx_menu(struct params_t *params, int action) {
+ #else
+ sync();
+ /* if ( -1 == reboot(LINUX_REBOOT_CMD_POWER_OFF) ) { */
+- if ( -1 == reboot(RB_POWER_OFF) ) {
++ if ( -1 == reboot(RB_POWER_OFF, NULL) ) {
+ log_msg(lg, "Can't initiate shutdown: %s", ERRMSG);
+ }
+ #endif
+--
+2.21.0
+
diff --git a/meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch b/meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch
new file mode 100644
index 0000000000..abfd8b77ee
--- /dev/null
+++ b/meta-initramfs/recipes-bsp/kexecboot/files/0001-make-Add-compiler-includes-in-cflags.patch
@@ -0,0 +1,33 @@
+From 528a64d17488295299dad9fbfe3d7140bc1cfdfa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 6 Feb 2021 11:06:48 -0800
+Subject: [PATCH] make: Add compiler includes in cflags
+
+Fixes
+| In file included from /mnt/b/yoe/master/build/tmp/work/raspberrypi4_64-yoe-linux/kexecboot-klibc/0.6+gitAUTOINC+5a5e04be20-r0/recipe-sysroot/usr/lib/klibc/include/stdio.h:11:
+| /mnt/b/yoe/master/build/tmp/work/raspberrypi4_64-yoe-linux/kexecboot-klibc/0.6+gitAUTOINC+5a5e04be20-r0/recipe-sysroot/usr/lib/klibc/include/stdarg.h:9:15: fatal error: 'stdarg.h' file not found
+| #include_next <stdarg.h>
+| ^~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index c75df23..d2adf38 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,6 +1,6 @@
+ bin_PROGRAMS=kexecboot
+
+-kexecboot_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS)
++kexecboot_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) -I$(shell $(CC) -print-file-name=include)
+
+ kexecboot_SOURCES = \
+ util.c \
+--
+2.30.0
+
diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
index 804ec32350..2dce19c6be 100644
--- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
+++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot-cfg_0.2.bb
@@ -8,7 +8,7 @@ SRC_URI = "file://icon.xpm"
S = "${WORKDIR}"
-do_install_prepend () {
+do_install:prepend () {
echo '# /boot/boot.cfg - KEXECBOOT configuration file.
#
# First kernel stanza.
@@ -19,9 +19,15 @@ LABEL=${KEXECBOOT_LABEL}
# Specify full kernel path on target.
KERNEL=/boot/${KERNEL_IMAGETYPE}
#
+# Specify which device tree blob to use
+# DTB=/boot/my-own-dtb
+#
# Append this tags to the kernel cmdline.
APPEND=${CMDLINE} ${CMDLINE_DEBUG}
#
+# Overwrite kernel command line instead of appending to it
+# CMDLINE=console=/dev/tty0 root=/dev/sdb1
+#
# Specify optional initrd/initramfs.
# INITRD=/boot/initramfs.cpio.gz
#
@@ -49,7 +55,7 @@ do_install () {
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILES_${PN} += "/boot/*"
+FILES:${PN} += "/boot/*"
CMDLINE ?= ""
CMDLINE_DEBUG ?= "quiet"
diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
index 9f5dad7c64..a92c0e8966 100644
--- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
+++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
@@ -1,52 +1,24 @@
-###########################
-# Configure options:
-#
-# --enable-static-linking compile kexecboot as static executable [default=no]
-# --enable-fbui support framebuffer menu [default=yes]
-# --enable-fbui-width limit FB UI width to specified value [default=no]
-# --enable-fbui-height limit FB UI height to specified value [default=no]
-# --enable-textui support console text user interface [default=no]
-# --enable-cfgfiles support config files [default=yes]
-# --enable-icons support custom icons (depends on fbui) [default=yes]
-# --enable-zaurus compile Sharp Zaurus specific code [default=no]
-# --enable-zimage compile with zImage support [default=yes]
-# --enable-uimage compile with uImage support [default=no]
-# --enable-machine-kernel look for machine-specific zImage kernel [default=no]
-# --enable-devices-recreating
-# enable devices re-creating [default=yes]
-# --enable-debug enable debug output [default=no]
-# --enable-host-debug allow for non-destructive executing of kexecboot on
-# host system [default=no]
-# --enable-numkeys enable menu item selection by keys [0-9] [default=yes]
-# --enable-bg-buffer enable buffer for pre-drawed FB GUI background
-#
-# --enable-timeout allow to boot 1st kernel after timeout in seconds
-# [default=no]
-# --enable-delay specify delay before device scanning, allowing
-# initialization of old CF/SD cards [default=1]
-# --enable-bpp enable support of specified bpp modes
-# (all,32,24,18,16,4,2,1) [default=all]
-# --enable-evdev-rate change evdev (keyboard/mouse) repeat rate
-# in milliseconds e.g. "1000,250" [default=no]
-# --with-kexec-binary look for kexec binary at path
-# [default="/usr/sbin/kexec"]
-##########################
SUMMARY = "kexecboot linux-as-bootloader"
DESCRIPTION = "kexecboot is a graphical linux-as-bootloader implementation based on kexec."
-HOMEPAGE = "http://kexecboot.org"
-LICENSE = "GPLv2"
+HOMEPAGE = "https://github.com/kexecboot/kexecboot/wiki"
+LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PV = "0.6+git${SRCPV}"
+PV = "0.6+git"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/kexecboot/kexecboot.git"
-SRCREV = "4c4f127e79ac5b8d6b6e2fbb938ccbf12b04c531"
+SRC_URI = "git://github.com/kexecboot/kexecboot.git;branch=master;protocol=https"
+SRC_URI:append:libc-klibc = "\
+ file://0001-kexecboot-Use-new-reboot-API-with-klibc.patch \
+ file://0001-make-Add-compiler-includes-in-cflags.patch \
+"
+SRCREV = "5a5e04be206140059f42ac786d424da1afaa04b6"
inherit autotools
EXTRA_OECONF = "--enable-textui --enable-delay=2 --enable-evdev-rate=1000,250"
+CFLAGS += "-fcommon"
+
do_install () {
- install -d ${D}${bindir}
- install -m 0755 kexecboot ${D}${bindir}
+ install -D -m 0755 ${B}/src/kexecboot ${D}${bindir}/kexecboot
install -d ${D}/proc
install -d ${D}/mnt
install -d ${D}/dev
@@ -55,9 +27,9 @@ do_install () {
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILES_${PN} += " ${bindir}/kexecboot /init /proc /mnt /dev /sys"
+FILES:${PN} += " ${bindir}/kexecboot /init /proc /mnt /dev /sys"
-pkg_postinst_${PN} () {
+pkg_postinst:${PN} () {
ln -sf ${bindir}/kexecboot $D/init
}