From 08732ed8268cbd9fd23dfae32ffa18ea320b910e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 15 Dec 2016 10:34:30 -0500 Subject: [PATCH] Generate BootLoaderSpec config fragments The BootLoaderSpec (BLS) defines a scheme where different bootloaders can share a format for boot items and a configuration directory that accepts these common configurations as drop-in files [0]. Generate BLS snippets at build time that can be copied on kernel install, so bootloaders can parse to create menu entries using this information. [0]: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/ Signed-off-by: Peter Jones --- generate_bls_conf.sh | 28 ++++++++++++++++++++++++++++ kernel.spec | 6 ++++++ 2 files changed, 34 insertions(+) create mode 100755 generate_bls_conf.sh diff --git a/generate_bls_conf.sh b/generate_bls_conf.sh new file mode 100755 index 000000000..8d9ec0699 --- /dev/null +++ b/generate_bls_conf.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -e + +. /etc/os-release + +kernelver=$1 && shift +rootfs=$1 && shift +variant=$1 && shift + +output="${rootfs}/lib/modules/${kernelver}/bls.conf" +date=$(date -u +%Y%m%d%H%M%S) + +if [ "${variant:-5}" = "debug" ]; then + debugname=" with debugging" +else + debugname="" +fi + +cat >${output} <