diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-util/bootconfig | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-util/bootconfig')
| -rw-r--r-- | dev-util/bootconfig/Manifest | 2 | ||||
| -rw-r--r-- | dev-util/bootconfig/bootconfig-6.6.ebuild | 105 | ||||
| -rw-r--r-- | dev-util/bootconfig/bootconfig-6.9.ebuild | 105 | ||||
| -rw-r--r-- | dev-util/bootconfig/files/bootconfig-5.18-cflags.patch | 22 | ||||
| -rw-r--r-- | dev-util/bootconfig/metadata.xml | 14 |
5 files changed, 248 insertions, 0 deletions
diff --git a/dev-util/bootconfig/Manifest b/dev-util/bootconfig/Manifest new file mode 100644 index 000000000000..ebf696914397 --- /dev/null +++ b/dev-util/bootconfig/Manifest @@ -0,0 +1,2 @@ +DIST linux-6.6.tar.xz 140064536 BLAKE2B 5f02fd8696d42f7ec8c5fbadec8e7270bdcfcb1f9844a6c4db3e1fd461c93ce1ccda650ca72dceb4890ebcbbf768ba8fba0bce91efc49fbd2c307b04e95665f2 SHA512 458b2c34d46206f9b4ccbac54cc57aeca1eaecaf831bc441e59701bac6eadffc17f6ce24af6eadd0454964e843186539ac0d63295ad2cc32d112b60360c39a35 +DIST linux-6.9.tar.xz 144034416 BLAKE2B 4cf86c3cfe6e6534745d42dfaeca59b17ea1168c4e8b615c80e6d8aac735f11283cd85fa992b440b5d4452917e94b9f08397a64af0be5894e3df23c68892377e SHA512 fed3b4cd1fbfb4d94618587c1934273d2ecc8b6e42a3d586ff8a5f24980be930f2ef803aa2923ca3bfa5e4e619f967f3af315368f24fa76f610b10443624a579 diff --git a/dev-util/bootconfig/bootconfig-6.6.ebuild b/dev-util/bootconfig/bootconfig-6.6.ebuild new file mode 100644 index 000000000000..7ac49d14eeda --- /dev/null +++ b/dev-util/bootconfig/bootconfig-6.6.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit estack linux-info + +DESCRIPTION="Bootconfig tools for kernel command line to support key-value" +HOMEPAGE="https://kernel.org/" + +LINUX_V="${PV:0:1}.x" +if [[ ${PV} == *_rc* ]] ; then + LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) + PATCH_VERSION=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV//_/-}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} + https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" +elif [[ ${PV} == *.*.* ]] ; then + # stable-release series + LINUX_VER=$(ver_cut 1-2) + LINUX_PATCH=patch-${PV}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" +else + LINUX_VER=${PV} +fi + +LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" +SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" +S_K="${WORKDIR}/linux-${LINUX_VER}" +S="${S_K}/tools/bootconfig" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~riscv" +IUSE="examples" + +BDEPEND=" + ${LINUX_PATCH+dev-util/patchutils} +" + +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-5.10 +" + +CONFIG_CHECK="~BOOT_CONFIG" + +PATCHES=( "${FILESDIR}"/${PN}-5.18-cflags.patch ) + +src_unpack() { + local paths=( + tools/arch tools/build tools/include tools/lib tools/bootconfig tools/scripts + scripts include lib "arch/*/lib" + ) + + # We expect the tar implementation to support the -j option (both + # GNU tar and libarchive's tar support that). + echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" + tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ + "${paths[@]/#/linux-${LINUX_VER}/}" || die + + if [[ -n ${LINUX_PATCH} ]] ; then + eshopts_push -o noglob + ebegin "Filtering partial source patch" + xzcat "${DISTDIR}"/${LINUX_PATCH} | filterdiff -p1 ${paths[@]/#/-i} > ${P}.patch + assert -n "Unpacking to ${P} from ${DISTDIR}/${LINUX_PATCH} failed" + eend $? || die "filterdiff failed" + test -s ${P}.patch || die "patch is empty?!" + eshopts_pop + fi + + local a + for a in ${A}; do + [[ ${a} == ${LINUX_SOURCES} ]] && continue + [[ ${a} == ${LINUX_PATCH} ]] && continue + unpack ${a} + done +} + +src_prepare() { + default + if [[ -n ${LINUX_PATCH} ]] ; then + pushd "${S_K}" >/dev/null || die + eapply "${WORKDIR}"/${P}.patch + popd || die + fi +} + +src_compile() { + emake bootconfig +} + +src_test() { + : +} + +src_install() { + dobin bootconfig + + if use examples; then + dodoc -r scripts + + docinto examples + dodoc -r samples/* + fi +} diff --git a/dev-util/bootconfig/bootconfig-6.9.ebuild b/dev-util/bootconfig/bootconfig-6.9.ebuild new file mode 100644 index 000000000000..7ac49d14eeda --- /dev/null +++ b/dev-util/bootconfig/bootconfig-6.9.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit estack linux-info + +DESCRIPTION="Bootconfig tools for kernel command line to support key-value" +HOMEPAGE="https://kernel.org/" + +LINUX_V="${PV:0:1}.x" +if [[ ${PV} == *_rc* ]] ; then + LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) + PATCH_VERSION=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV//_/-}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} + https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" +elif [[ ${PV} == *.*.* ]] ; then + # stable-release series + LINUX_VER=$(ver_cut 1-2) + LINUX_PATCH=patch-${PV}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" +else + LINUX_VER=${PV} +fi + +LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" +SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" +S_K="${WORKDIR}/linux-${LINUX_VER}" +S="${S_K}/tools/bootconfig" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~riscv" +IUSE="examples" + +BDEPEND=" + ${LINUX_PATCH+dev-util/patchutils} +" + +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-5.10 +" + +CONFIG_CHECK="~BOOT_CONFIG" + +PATCHES=( "${FILESDIR}"/${PN}-5.18-cflags.patch ) + +src_unpack() { + local paths=( + tools/arch tools/build tools/include tools/lib tools/bootconfig tools/scripts + scripts include lib "arch/*/lib" + ) + + # We expect the tar implementation to support the -j option (both + # GNU tar and libarchive's tar support that). + echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" + tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ + "${paths[@]/#/linux-${LINUX_VER}/}" || die + + if [[ -n ${LINUX_PATCH} ]] ; then + eshopts_push -o noglob + ebegin "Filtering partial source patch" + xzcat "${DISTDIR}"/${LINUX_PATCH} | filterdiff -p1 ${paths[@]/#/-i} > ${P}.patch + assert -n "Unpacking to ${P} from ${DISTDIR}/${LINUX_PATCH} failed" + eend $? || die "filterdiff failed" + test -s ${P}.patch || die "patch is empty?!" + eshopts_pop + fi + + local a + for a in ${A}; do + [[ ${a} == ${LINUX_SOURCES} ]] && continue + [[ ${a} == ${LINUX_PATCH} ]] && continue + unpack ${a} + done +} + +src_prepare() { + default + if [[ -n ${LINUX_PATCH} ]] ; then + pushd "${S_K}" >/dev/null || die + eapply "${WORKDIR}"/${P}.patch + popd || die + fi +} + +src_compile() { + emake bootconfig +} + +src_test() { + : +} + +src_install() { + dobin bootconfig + + if use examples; then + dodoc -r scripts + + docinto examples + dodoc -r samples/* + fi +} diff --git a/dev-util/bootconfig/files/bootconfig-5.18-cflags.patch b/dev-util/bootconfig/files/bootconfig-5.18-cflags.patch new file mode 100644 index 000000000000..8ce106275a24 --- /dev/null +++ b/dev-util/bootconfig/files/bootconfig-5.18-cflags.patch @@ -0,0 +1,22 @@ +diff --git a/Makefile b/Makefile +index 566c3e0..aa65fd7 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ srctree := $(patsubst %/,%,$(dir $(srctree))) + endif + + LIBSRC = $(srctree)/lib/bootconfig.c $(srctree)/include/linux/bootconfig.h +-CFLAGS = -Wall -g -I$(CURDIR)/include ++CFLAGS += -Wall -I$(CURDIR)/include + + ALL_TARGETS := bootconfig + ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS)) +@@ -18,7 +18,7 @@ ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS)) + all: $(ALL_PROGRAMS) test + + $(OUTPUT)bootconfig: main.c include/linux/bootconfig.h $(LIBSRC) +- $(CC) $(filter %.c,$^) $(CFLAGS) -o $@ ++ $(CC) $(filter %.c,$^) $(CFLAGS) $(LDFLAGS) -o $@ + + test: $(ALL_PROGRAMS) test-bootconfig.sh + ./test-bootconfig.sh $(OUTPUT) diff --git a/dev-util/bootconfig/metadata.xml b/dev-util/bootconfig/metadata.xml new file mode 100644 index 000000000000..01cb67c6f24b --- /dev/null +++ b/dev-util/bootconfig/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <longdescription> + The boot configuration expands the current kernel command line to support + additional key-value data when booting the kernel in an efficient way. + This allows administrators to pass a structured-Key config file. + </longdescription> + <origin>baldeagleos-repo</origin> +</pkgmetadata> |
