Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux LTS proposal #2261

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion kernel/linux-lts/BUILD → kernel/linux-5.15-lts/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYARCH="`arch | grep -qw i.86 && echo i386 || arch`"
PATCH_VERSION=$(echo $VERSION | cut -d . -f 3)
FULL_VERSION=$(echo $VERSION | cut -d . -f 1,2).${PATCH_VERSION:-0}-lts
echo | make oldconfig
LD_PRELOAD= cp .config $CONFIG_CACHE/.config-lts
LD_PRELOAD= cp .config $CONFIG_CACHE/.config-${BASE}-lts
rm -f arch/${MYARCH}/boot/bzImage

make ${MAKES:+-j$MAKES} bzImage
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions kernel/linux-lts/DETAILS → kernel/linux-5.15-lts/DETAILS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MODULE=linux-lts
VERSION=5.15.58
MODULE=linux-5.15-lts
VERSION=5.15.135
BASE=$(echo $VERSION | cut -d. -f1,2)
SOURCE=linux-$BASE.tar.xz
if [ -n "$(echo $VERSION | cut -d. -f3)" ] ; then
Expand All @@ -10,16 +10,16 @@ fi
SOURCE2_URL[0]=$KERNEL_URL/pub/linux/kernel/v5.x
SOURCE2_URL[1]=https://www.kernel.org/pub/linux/kernel/v5.x
SOURCE_VFY=sha256:57b2cf6991910e3b67a1b3490022e8a0674b6965c74c12da1e99d138d1991ee8
SOURCE2_VFY=sha256:d53ba7438f77e5a95a4c2766844d39c0854aac86d186f2ee245149df4dc421a6
SOURCE2_VFY=sha256:869447fcd318cf6b9437ed399bb702fefc8c82d2e52d3b50c18baa5b1454bb26
WEB_SITE=https://www.kernel.org/
ENTERED=20111121
UPDATED=20220801
UPDATED=20231018
SHORT="The core of a Linux GNU Operating System"
KEEP_SOURCE=on
TMPFS=off

cat << EOF
This is the latest stable version the Linux kernel for Lunar Linux distro.
This is the long-term-support release of version 5.15 of the Linux kernel.
Linux is a clone of the Unix kernel, written from scratch by Linus Torvalds
with assistance from a loosely-knit team of hackers across the Net. It aims
towards POSIX and Single UNIX Specification compliance.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ fi &&

if [ -f $CONFIG_CACHE/.config-lts ]; then
cp $CONFIG_CACHE/.config-lts $SOURCE_DIRECTORY/.config;
elif [ -f $CONFIG_CACHE/.config-${BASE}-lts ]; then
cp $CONFIG_CACHE/.config-${BASE}-lts $SOURCE_DIRECTORY/.config;
elif [ -f $CONFIG_CACHE/.config.current ]; then
cp $CONFIG_CACHE/.config.current $SOURCE_DIRECTORY/.config;
elif [ -f $CONFIG_CACHE/.config.stable ]; then
Expand Down
21 changes: 21 additions & 0 deletions kernel/linux-6.1-lts/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Do not install firmware on modules_install
sedit '/Makefile.*__fw_modinst/d' Makefile

# Needed for x86_64
MYARCH="`arch | grep -qw i.86 && echo i386 || arch`"

PATCH_VERSION=$(echo $VERSION | cut -d . -f 3)
FULL_VERSION=$(echo $VERSION | cut -d . -f 1,2).${PATCH_VERSION:-0}-lts
echo | make oldconfig
LD_PRELOAD= cp .config $CONFIG_CACHE/.config-${BASE}-lts
rm -f arch/${MYARCH}/boot/bzImage

make ${MAKES:+-j$MAKES} bzImage
make ${MAKES:+-j$MAKES} modules
backup_mods_krnl $FULL_VERSION
prepare_install
make INSTALL_MOD_STRIP=1 modules_install

cp arch/${MYARCH}/boot/bzImage /boot/vmlinuz-$FULL_VERSION-$(arch)
cp System.map /boot/System.map-$FULL_VERSION-$(arch)
gzip -c -9 .config > /boot/config-$FULL_VERSION-$(arch).gz
16 changes: 16 additions & 0 deletions kernel/linux-6.1-lts/CONFIGURE
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mquery PREFER_XCONFIG "Do you prefer xconfig over nconfig?" n

if [ "`get_module_config PREFER_XCONFIG`" = "y" ]; then
set_module_config "PREFER_NCONFIG" "n" ;
set_module_config "PREFER_MENUCONFIG" "n" ;
else
mquery PREFER_NCONFIG "Do you prefer nconfig over menuconfig?" y
if [ "`get_module_config PREFER_NCONFIG`" = "y" ]; then
set_module_config "PREFER_MENUCONFIG" "n" ;
else
mquery PREFER_MENUCONFIG "Do you prefer menuconfig over config?" y
fi
fi

unset_module_config CONFIG_KERNEL
mquery CONFIG_KERNEL "Configure linux kernel?" n
5 changes: 5 additions & 0 deletions kernel/linux-6.1-lts/DEPENDS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
depends autoconf
depends bc
depends kmod
depends linux-firmware
depends coreutils
30 changes: 30 additions & 0 deletions kernel/linux-6.1-lts/DETAILS
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
MODULE=linux-6.1-lts
VERSION=6.1.58
BASE=$(echo $VERSION | cut -d. -f1,2)
SOURCE=linux-$BASE.tar.xz
if [ -n "$(echo $VERSION | cut -d. -f3)" ] ; then
SOURCE2=patch-$VERSION.xz
fi
SOURCE_URL[0]=$KERNEL_URL/pub/linux/kernel/v6.x/
SOURCE_URL[1]=https://www.kernel.org/pub/linux/kernel/v6.x/
SOURCE2_URL[0]=$KERNEL_URL/pub/linux/kernel/v6.x/
SOURCE2_URL[1]=https://www.kernel.org/pub/linux/kernel/v6.x/
SOURCE_VFY=sha256:2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb
SOURCE2_VFY=sha256:ed65c0992c9e2888ed161f6ab996552b320e2a9cec480e3e0ea69b947fcf760e
WEB_SITE=https://www.kernel.org/
ENTERED=20111121
UPDATED=20231018
SHORT="The core of a Linux GNU Operating System"
KEEP_SOURCE=on
TMPFS=off

cat << EOF
This is the long-term-support release of version 6.1.18 of the Linux kernel.
Linux is a clone of the Unix kernel, written from scratch by
Linus Torvalds with assistance from a loosely-knit team of hackers
across the Net. It aims towards POSIX and Single UNIX Specification
compliance. It has all the features you would expect in a modern
fully-fledged Unix kernel, including true multitasking, virtual memory,
shared libraries, demand loading, shared copy-on-write executables,
proper memory management, TCP/IP networking and control groups.
EOF
11 changes: 11 additions & 0 deletions kernel/linux-6.1-lts/POST_INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PATCH_VERSION=$(echo $VERSION | cut -d . -f 3)
FULL_VERSION=$(echo $VERSION | cut -d . -f 1,2).${PATCH_VERSION:-0}-lts

update_bootloader $FULL_VERSION ${VERSION}-lts

# Reinstall packages that add their own kernel modules

lin -c kernel-reqs

# create /sys
mkdir -p /sys
44 changes: 44 additions & 0 deletions kernel/linux-6.1-lts/PRE_BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
validate_source_dir $SOURCE_DIRECTORY &&
KEEP_SOURCE=off mk_source_dir $SOURCE_DIRECTORY &&
rm -f /usr/src/linux
ln -sf $SOURCE_DIRECTORY /usr/src/linux
cd $SOURCE_DIRECTORY &&

tar xf $SOURCE_CACHE/$SOURCE --no-same-owner --no-same-permissions --strip-components=1

# if we have an EXTRA patch, apply it
if [ -n "${SOURCE2}" ]; then
patch_it ${SOURCE2} 1
fi &&

# Fix issue with patch failing to set the correct permissions
if [ -f "tools/objtool/sync-check.sh" ]; then
chmod u+x tools/objtool/sync-check.sh
fi &&

if [ -f $CONFIG_CACHE/.config.current ]; then
cp $CONFIG_CACHE/.config.current $SOURCE_DIRECTORY/.config;
elif [ -f $CONFIG_CACHE/.config-${BASE}-lts ]; then
cp $CONFIG_CACHE/.config-${BASE}-lts $SOURCE_DIRECTORY/.config;
fi &&

while
if [ "$CONFIG_KERNEL" == "y" ]; then
if [ "$PREFER_XCONFIG" == "y" -a -n "$DISPLAY" ]; then
make xconfig || make nconfig || make menuconfig || make config
elif [ "$PREFER_NCONFIG" == "y" ]; then
make nconfig || make menuconfig || make config
elif [ "$PREFER_MENUCONFIG" == "y" ]; then
make menuconfig || make config
else
make config
fi &&
if ! query "Repeat configuration?" n; then
CONFIG_KERNEL=n
fi
else
false
fi
do
true
done