2 Commits

Author SHA1 Message Date
Jay Larson
116d545948 Rebuild for new sl package manager 2020-07-20 13:38:15 -05:00
Jay Larson
3150e81315 The following changes were made:
* Added SHELL = /bin/bash to Makefile
  * Added REPO (core)
  * Added grub as dependency
  * Added bc and gcc as BUILDDEPS
  * Removed modules.dep from package
  * Added Module.symvers to package
2018-03-22 11:01:02 -05:00
13 changed files with 3845 additions and 60 deletions

View File

@@ -8,14 +8,17 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
SHELL = /bin/bash
export SRCPKG = $(shell echo $(PWD)|sed 's/.*\///')
export ARCH = x86_64
export URL = https://www.kernel.org/
REPO = core
BRIEF = The Linux kernel
DESC = Linux is a clone of the operating system Unix, written from scratch \
by Linus Torvalds with assistance from a loosely-knit team of hackers \
across the Net.
export SNAPVER = $(shell grep '^CONFIG_LOCALVERSION=' SNAP/config| \
export SLVER = $(shell grep '^CONFIG_LOCALVERSION=' SL/config| \
sed 's/.*="\-\|"$$//g')
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
@@ -23,29 +26,30 @@ TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches
export KERNVER := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')
export VERSION := $(KERNVER)-$(SNAPVER)
export DEPENDS = mkinitramfs,linux-firmware
export VERSION := $(KERNVER)-$(SLVER)
export DEPENDS = grub,mkinitramfs,linux-firmware
export BUILDDEPS = bc,gcc
# This overrids the package file name in Makefile.snaplinux
# This overrides the package file name in Makefile.snaplinux
# This is necessary due to the kernel version string being
# a part of the package name
PACKAGE = $(shell echo $(PWD)|sed 's/.*\///')-$(SNAPVER)
PKGFILE = $(PACKAGE).snap
PACKAGE = $(shell echo $(PWD)|sed 's/.*\///')-$(SLVER)
PKGFILE = $(PACKAGE).slp
LINUX-DOC := $(PWD)/linux-doc-$(KERNVER)
LINUX-DOC-ROOT := $(LINUX-DOC)/ROOT
LINUX-FIRMWARE := $(PWD)/linux-firmware
LINUX-FIRMWARE-ROOT := $(LINUX-FIRMWARE)/ROOT
LINUX-HEADERS := $(PWD)/linux-headers-$(KERNVER)-$(SNAPVER)
LINUX-HEADERS := $(PWD)/linux-headers-$(KERNVER)-$(SLVER)
LINUX-HEADERS-ROOT := $(LINUX-HEADERS)/ROOT
LINUX-LIBC := $(PWD)/linux-libc
LINUX-LIBC-ROOT := $(LINUX-LIBC)/ROOT
include /usr/share/snap/Makefile.snaplinux
include /usr/share/sl/Makefile.snaplinux
$(LINUX-DOC-ROOT): $(LINUX-HEADERS-ROOT)
@install -v -d $(LINUX-DOC)/SNAP && \
@install -v -d $(LINUX-DOC)/SL && \
install -v -d $(LINUX-DOC-ROOT) && \
install -d -m 755 \
$(LINUX-DOC-ROOT)/usr/share/doc/linux-$(KERNVER) && \
@@ -53,11 +57,11 @@ $(LINUX-DOC-ROOT): $(LINUX-HEADERS-ROOT)
$(LINUX-DOC-ROOT)/usr/share/doc/linux-$(KERNVER) && \
find $(LINUX-DOC-ROOT) -name \*.txt -o -name \*.html \
-exec gzip {} \; && \
cd $(LINUX-DOC) && make -f ../Makefile.linux-doc && mv *.snap ../
cd $(LINUX-DOC) && make -f ../Makefile.linux-doc && mv *.slp ../
$(LINUX-HEADERS-ROOT): $(LINUX-LIBC-ROOT)
@HEADERS=$(LINUX-HEADERS-ROOT)/usr/src/linux-headers-$(VERSION) && \
install -v -d $(LINUX-HEADERS)/SNAP && \
install -v -d $(LINUX-HEADERS)/SL && \
install -v -d $(LINUX-HEADERS-ROOT) && \
install -v -d -m 755 $$HEADERS && \
install -v -d -m 755 $$HEADERS/arch/x86/kernel && \
@@ -73,23 +77,23 @@ $(LINUX-HEADERS-ROOT): $(LINUX-LIBC-ROOT)
cp -vp arch/x86/kernel/asm-offsets.s \
$$HEADERS/arch/x86/kernel/asm-offsets.s && \
cd $(LINUX-HEADERS) && make -f ../Makefile.linux-headers && \
mv *.snap ../
mv *.slp ../
$(LINUX-LIBC-ROOT): $(LINUX-FIRMWARE-ROOT)
install -v -d $(LINUX-LIBC)/SNAP && \
install -v -d $(LINUX-LIBC)/SL && \
install -v -d $(LINUX-LIBC-ROOT) && \
install -v -d -m 755 $(LINUX-LIBC-ROOT)/usr && \
cd $(SRCDIR) && make headers_install \
INSTALL_HDR_PATH=$(LINUX-LIBC-ROOT)/usr && \
cd $(LINUX-LIBC) && make -f ../Makefile.linux-libc && mv *.snap ../
cd $(LINUX-LIBC) && make -f ../Makefile.linux-libc && mv *.slp ../
$(LINUX-FIRMWARE-ROOT): $(SRCDIR)/arch/x86_64/boot/bzImage
@install -v -d $(LINUX-FIRMWARE)/SNAP && \
@install -v -d $(LINUX-FIRMWARE)/SL && \
install -v -d $(LINUX-FIRMWARE-ROOT)/lib/firmware && \
cd $(SRCDIR) && make firmware_install \
INSTALL_FW_PATH=$(LINUX-FIRMWARE-ROOT)/lib/firmware && \
cd $(LINUX-FIRMWARE) && make -f \
../Makefile.linux-firmware && mv *.snap ../
../Makefile.linux-firmware && mv *.slp ../
$(SRCDIR)/Makefile: $(ARCHIVE)
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
@@ -108,7 +112,7 @@ $(SRCDIR)/Makefile: $(ARCHIVE)
$(SRCDIR)/arch/x86_64/boot/bzImage: $(SRCDIR)/Makefile
@cd $(SRCDIR) && make mrproper && \
cp $(PWD)/SNAP/config .config && make
cp $(PWD)/SL/config .config && CONFIG_MODVERSIONS=1 make
$(ROOT): $(LINUX-DOC-ROOT)
@if [ -d $(ROOT) ]; then \
@@ -119,7 +123,7 @@ $(ROOT): $(LINUX-DOC-ROOT)
@cd $(SRCDIR); \
make modules_install INSTALL_MOD_PATH=$(ROOT) && \
rm $(ROOT)/lib/modules/$(VERSION)/{build,source} && \
rm $(ROOT)/lib/modules/$(VERSION)/{build,source,modules.dep*} && \
rm -rf $(ROOT)/lib/firmware && \
install -d -m 755 $(ROOT)/boot && \
install -d -m 755 $(ROOT)/etc/modprobe.d && \
@@ -129,7 +133,8 @@ $(ROOT): $(LINUX-DOC-ROOT)
$(ROOT)/boot/System.map-$(VERSION) && \
install -m 644 arch/x86_64/boot/bzImage \
$(ROOT)/boot/vmlinuz-$(VERSION) && \
install -m 644 ../SNAP/usb.conf $(ROOT)/usr/share/linux-$(VERSION)
install -m 644 ../SL/usb.conf $(ROOT)/usr/share/linux-$(VERSION) && \
install -m 644 Module.symvers $(ROOT)/lib/modules/$(VERSION)
test: $(ROOT)
@cd $(SRCDIR); \
@@ -141,7 +146,7 @@ clean:
$(LINUX-FIRMWARE) \
$(LINUX-LIBC) \
$(LINUX-HEADERS) \
$(SNAPINFO) \
$(SLINFO) \
$(MANIFEST) \
$(FILES) \
$(SRCDIR)

View File

@@ -9,9 +9,10 @@
# GNU General Public License for more details.
DEPENDS =
REPO = main
BRIEF = Documentation for The Linux kernel
DESC = Detailed documentation describing the Linux kernel
PACKAGE = $(shell echo $(PWD)|sed 's/.*\///')
PKGFILE = $(PACKAGE)-$(SNAPVER).snap
PKGFILE = $(PACKAGE)-$(SLVER).slp
include /usr/share/snap/Makefile.snaplinux
include /usr/share/sl/Makefile.snaplinux

View File

@@ -9,7 +9,8 @@
# GNU General Public License for more details.
DEPENDS =
REPO = main
BRIEF = Firmware for the Linux kernel
DESC = This provides the firmware necessary for some Linux kernel modules
include /usr/share/snap/Makefile.snaplinux
include /usr/share/sl/Makefile.snaplinux

View File

@@ -9,10 +9,11 @@
# GNU General Public License for more details.
DEPENDS = linux-libc
REPO = dev
BRIEF = Header files for The Linux kernel
DESC = This provides the header files that are generally used to compile \
kernel modules
PACKAGE = $(shell echo $(PWD)|sed 's/.*\///')
PKGFILE = $(PACKAGE).snap
PKGFILE = $(PACKAGE).slp
include /usr/share/snap/Makefile.snaplinux
include /usr/share/sl/Makefile.snaplinux

View File

@@ -9,7 +9,8 @@
# GNU General Public License for more details.
DEPENDS =
REPO = dev
BRIEF = Userspace linux header files
DESC = This provides the header files necessary for compiling user space applications for Linux
include /usr/share/snap/Makefile.snaplinux
include /usr/share/sl/Makefile.snaplinux

View File

@@ -50,7 +50,7 @@ CONFIG_BUILDTIME_EXTABLE_SORT=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION="-8"
CONFIG_LOCALVERSION="-10"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y

BIN
SL/files.tar.gz Normal file

Binary file not shown.

3768
SL/manifest Normal file

File diff suppressed because it is too large Load Diff

12
SL/slinfo Normal file
View File

@@ -0,0 +1,12 @@
name: linux-3.16.37-10
version: 3.16.37-10
arch: x86_64
depends: grub,mkinitramfs,linux-firmware
builddeps: bc,gcc
srcpkg: linux-3.16.37
bytes: 169728000
url: https://www.kernel.org/
repo: core
sha256man: 940e81b3e91428aad2ec8f87483ec13bb3a54f117e07bd9e75b938b41e289c87
brief: The Linux kernel
description: Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net.

29
SL/usher Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
set -e
case $1 in
preinst)
exit 0
;;
postinst)
echo "Running for kernel ${VERSION}"
mkinitramfs ${VERSION}
grub-mkconfig -o /boot/grub/grub.cfg
if [ ! -f /etc/modprobe.d/usb.conf ]; then
cp /usr/share/linux-${VERSION}/usb.conf /etc/modprobe.d/usb.conf
fi
;;
prerm)
exit 0
;;
postrm)
if [ -f /boot/initrd.img-${VERSION} ]; then
rm /boot/initrd.img-${VERSION}
fi
grub-mkconfig -o /boot/grub/grub.cfg
;;
esac

View File

@@ -1,33 +0,0 @@
#!/bin/bash
set -e
case $1 in
preinst)
exit 0
;;
postinst)
if [[ ${TARGET} ]]; then
echo "Running within ${TARGET} for kernel ${VERSION}"
chroot ${TARGET} mkinitramfs ${VERSION}
chroot ${TARGET} grub-mkconfig -o /boot/grub/grub.cfg
else
echo "Running for kernel ${VERSION}"
mkinitramfs ${VERSION}
grub-mkconfig -o /boot/grub/grub.cfg
fi
if [ ! -f ${TARGET}/etc/modprobe.d/usb.conf ]; then
cp ${TARGET}/usr/share/linux-${VERSION}/usb.conf \
${TARGET}/etc/modprobe.d/usb.conf
fi
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac