Compare commits
18
Commits
bae5171a46
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd062d67b1
|
||
|
|
5010bdc145
|
||
|
|
ddf696f4db
|
||
|
|
1392201c76
|
||
|
|
a0045433b1
|
||
|
|
b7557e0732
|
||
|
|
8b815f1665
|
||
|
|
367b309078
|
||
|
|
46cbd5f070
|
||
|
|
9e933d6d27
|
||
|
|
b7de9207da
|
||
|
|
b4cd4c00c7
|
||
|
|
2cfd4c8adc
|
||
|
|
7e62ef58b9
|
||
|
|
b5ae25ecce
|
||
|
|
13d38dbcb6
|
||
|
|
2267c6858e
|
||
|
|
8f65a00bfb
|
+21
-3
@@ -1,6 +1,6 @@
|
|||||||
name: linux-lts
|
name: linux-lts
|
||||||
description: The longterm support version of the linux kernel
|
description: The longterm support version of the linux kernel
|
||||||
version: 6.18.21
|
version: 6.18.46
|
||||||
revision: 1
|
revision: 1
|
||||||
url: https://www.kernel.org/
|
url: https://www.kernel.org/
|
||||||
license: GPL2-only
|
license: GPL2-only
|
||||||
@@ -16,19 +16,37 @@ make_depends:
|
|||||||
- libelf
|
- libelf
|
||||||
- lld
|
- lld
|
||||||
- llvm
|
- llvm
|
||||||
|
- openssl
|
||||||
|
- pahole
|
||||||
- perl
|
- perl
|
||||||
- rustc
|
- rustc
|
||||||
- rust-bindgen
|
- rust-bindgen
|
||||||
- rust-src
|
- rust-src
|
||||||
|
- xz-utils
|
||||||
|
- zlib
|
||||||
|
- zstd
|
||||||
downloads:
|
downloads:
|
||||||
- url: https://cdn.kernel.org/pub/linux/kernel/v${BPM_PKG_VERSION%%.*}.x/linux-${BPM_PKG_VERSION}.tar.xz
|
- url: https://cdn.kernel.org/pub/linux/kernel/v${BPM_PKG_VERSION%%.*}.x/linux-${BPM_PKG_VERSION}.tar.xz
|
||||||
extract_to: ${BPM_SOURCE}
|
extract_to: ${BPM_SOURCE}
|
||||||
extract_strip_components: 1
|
extract_strip_components: 1
|
||||||
checksum: 1c38214fb137bae85b82b82537b5987358621b915ab2a8e4f09e60697c19474f
|
checksum: f5d44b93808b02cc2969c5404ba081d97523719c9fd2ba2de6db318b4141cca0
|
||||||
split_packages:
|
split_packages:
|
||||||
- name: linux-lts
|
- name: linux-lts
|
||||||
optional_depends:
|
optional_depends:
|
||||||
- linux-lts-docs
|
- linux-lts-docs:For documentation
|
||||||
|
- linux-lts-headers:For building modules
|
||||||
|
- name: linux-lts-headers
|
||||||
|
description: The longterm support version of the linux kernel (Headers)
|
||||||
|
depends:
|
||||||
|
- linux-lts
|
||||||
|
- binutils
|
||||||
|
- lld
|
||||||
|
- llvm
|
||||||
|
- openssl
|
||||||
|
- pahole
|
||||||
|
- xxhash
|
||||||
|
- zlib
|
||||||
|
- zstd
|
||||||
- name: linux-lts-docs
|
- name: linux-lts-docs
|
||||||
description: The longterm support version of the linux kernel (Documentation)
|
description: The longterm support version of the linux kernel (Documentation)
|
||||||
depends:
|
depends:
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||||
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
|
# The prepare function is executed in the root of the temp directory
|
||||||
|
# This function is used for putting downloaded files to the correct location or applying patches
|
||||||
|
prepare() {
|
||||||
|
cd "$BPM_SOURCE"
|
||||||
|
|
||||||
|
make mrproper
|
||||||
|
cp ../config .config
|
||||||
|
}
|
||||||
|
|
||||||
|
# The build function is executed in the source directory
|
||||||
|
# This function is used to compile the source code
|
||||||
|
build() {
|
||||||
|
make LLVM=1 olddefconfig
|
||||||
|
make LLVM=1
|
||||||
|
make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
|
||||||
|
}
|
||||||
|
|
||||||
|
# The package function is executed in the source directory
|
||||||
|
# This function is used to move the compiled files into the output directory
|
||||||
|
package_linux-lts() {
|
||||||
|
# Install kernel modules
|
||||||
|
make INSTALL_MOD_PATH="$BPM_OUTPUT"/usr INSTALL_MOD_STRIP=1 modules_install
|
||||||
|
|
||||||
|
# Install kernel image and config
|
||||||
|
install -Dm644 arch/x86/boot/bzImage "$BPM_OUTPUT"/boot/vmlinuz-linux-lts
|
||||||
|
install -Dm644 .config "$BPM_OUTPUT"/boot/config-linux-lts
|
||||||
|
|
||||||
|
# Remove build link
|
||||||
|
rm "$BPM_OUTPUT"/usr/lib/modules/$(make -s kernelrelease)/build
|
||||||
|
|
||||||
|
# Install package licenses
|
||||||
|
install -d "$BPM_OUTPUT"/usr/share/licenses
|
||||||
|
cp -r LICENSES "$BPM_OUTPUT"/usr/share/licenses/linux-lts
|
||||||
|
}
|
||||||
|
|
||||||
|
package_linux-lts-headers() {
|
||||||
|
local builddir="$BPM_OUTPUT"/usr/lib/modules/$(make -s kernelrelease)/build
|
||||||
|
|
||||||
|
local karch
|
||||||
|
case $CARCH in
|
||||||
|
x86_64) karch=x86 ;;
|
||||||
|
*) echo "Unknown CARCH $CARCH"; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
echo "Installing build files..."
|
||||||
|
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map vmlinux tools/bpf/bpftool/vmlinux.h
|
||||||
|
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||||
|
install -Dt "$builddir/arch/$karch" -m644 arch/$karch/Makefile
|
||||||
|
cp -t "$builddir" -a scripts
|
||||||
|
ln -srt "$builddir" "$builddir/scripts/gdb/vmlinux-gdb.py"
|
||||||
|
|
||||||
|
if [[ $(scripts/config -s CONFIG_HAVE_STACK_VALIDATION) = y ]]; then
|
||||||
|
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(scripts/config -s CONFIG_DEBUG_INFO_BTF_MODULES) = y ]]; then
|
||||||
|
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing headers..."
|
||||||
|
cp -t "$builddir" -a include
|
||||||
|
cp -t "$builddir/arch/$karch" -a arch/$karch/include
|
||||||
|
install -Dt "$builddir/arch/$karch/kernel" -m644 arch/$karch/kernel/asm-offsets.s
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||||
|
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
|
||||||
|
|
||||||
|
echo "Installing KConfig files..."
|
||||||
|
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||||
|
|
||||||
|
echo "Installing Rust files..."
|
||||||
|
if [[ $(scripts/config -s CONFIG_RUST) = y ]]; then
|
||||||
|
install -Dt "$builddir/rust" -m644 rust/*.rmeta
|
||||||
|
install -Dt "$builddir/rust" rust/*.so
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing unstripped VDSO..."
|
||||||
|
make INSTALL_MOD_PATH="$BPM_OUTPUT"/usr vdso_install \
|
||||||
|
link= # Suppress build-id symlinks
|
||||||
|
|
||||||
|
echo "Removing unneeded architectures..."
|
||||||
|
local arch
|
||||||
|
for arch in "$builddir"/arch/*/; do
|
||||||
|
[[ $arch = */$karch/ ]] && continue
|
||||||
|
echo "Removing $(basename "$arch")"
|
||||||
|
rm -r "$arch"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Removing documentation..."
|
||||||
|
rm -r "$builddir/Documentation"
|
||||||
|
|
||||||
|
echo "Removing broken symlinks..."
|
||||||
|
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
|
echo "Removing loose objects..."
|
||||||
|
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
|
echo "Stripping build tools..."
|
||||||
|
local file
|
||||||
|
while read -rd '' file; do
|
||||||
|
case "$(file -Sib "$file")" in
|
||||||
|
application/x-sharedlib\;*) # Libraries (.so)
|
||||||
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
|
application/x-archive\;*) # Libraries (.a)
|
||||||
|
strip -v $STRIP_STATIC "$file" ;;
|
||||||
|
application/x-executable\;*) # Binaries
|
||||||
|
strip -v $STRIP_BINARIES "$file" ;;
|
||||||
|
application/x-pie-executable\;*) # Relocatable binaries
|
||||||
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
|
esac
|
||||||
|
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
|
||||||
|
|
||||||
|
echo "Stripping vmlinux..."
|
||||||
|
strip -v $STRIP_STATIC "$builddir/vmlinux"
|
||||||
|
|
||||||
|
echo "Adding symlink..."
|
||||||
|
mkdir -p "$BPM_OUTPUT"/usr/src
|
||||||
|
ln -sr "$builddir" "$BPM_OUTPUT"/usr/src/linux-lts
|
||||||
|
}
|
||||||
|
|
||||||
|
package_linux-lts-docs() {
|
||||||
|
# Install documentation
|
||||||
|
install -d "$BPM_OUTPUT"/usr/share/doc/
|
||||||
|
cp -r Documentation "$BPM_OUTPUT"/usr/share/doc/linux-lts
|
||||||
|
|
||||||
|
# Install package licenses
|
||||||
|
install -d "$BPM_OUTPUT"/usr/share/licenses
|
||||||
|
ln -sf linux-lts "$BPM_OUTPUT"/usr/share/licenses/linux-lts-docs
|
||||||
|
}
|
||||||
+736
-403
File diff suppressed because it is too large
Load Diff
@@ -1,44 +0,0 @@
|
|||||||
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
|
||||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
|
||||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
|
||||||
|
|
||||||
# The prepare function is executed in the root of the temp directory
|
|
||||||
# This function is used for putting downloaded files to the correct location or applying patches
|
|
||||||
prepare() {
|
|
||||||
cd "$BPM_SOURCE"
|
|
||||||
|
|
||||||
make mrproper
|
|
||||||
cp ../config .config
|
|
||||||
}
|
|
||||||
|
|
||||||
# The build function is executed in the source directory
|
|
||||||
# This function is used to compile the source code
|
|
||||||
build() {
|
|
||||||
make LLVM=1 olddefconfig
|
|
||||||
make LLVM=1
|
|
||||||
}
|
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
|
||||||
# This function is used to move the compiled files into the output directory
|
|
||||||
package_linux-lts() {
|
|
||||||
# Install kernel modules
|
|
||||||
make INSTALL_MOD_PATH="$BPM_OUTPUT"/usr INSTALL_MOD_STRIP=1 modules_install
|
|
||||||
|
|
||||||
# Install kernel image and config
|
|
||||||
install -Dm644 arch/x86/boot/bzImage "$BPM_OUTPUT"/boot/vmlinuz-linux-lts
|
|
||||||
install -Dm644 .config "$BPM_OUTPUT"/boot/config-linux-lts
|
|
||||||
|
|
||||||
# Install package licenses
|
|
||||||
install -d "$BPM_OUTPUT"/usr/share/licenses
|
|
||||||
cp -r LICENSES "$BPM_OUTPUT"/usr/share/licenses/linux-lts
|
|
||||||
}
|
|
||||||
|
|
||||||
package_linux-lts-docs() {
|
|
||||||
# Install documentation
|
|
||||||
install -d "$BPM_OUTPUT"/usr/share/doc/
|
|
||||||
cp -r Documentation "$BPM_OUTPUT"/usr/share/doc/linux-lts
|
|
||||||
|
|
||||||
# Install package licenses
|
|
||||||
install -d "$BPM_OUTPUT"/usr/share/licenses
|
|
||||||
ln -sf linux-lts "$BPM_OUTPUT"/usr/share/licenses/linux-lts-docs
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user