diff --git a/Makefile b/Makefile index 58b9a03..2f47fa5 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,12 @@ # 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 \ @@ -24,7 +27,8 @@ 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 DEPENDS = grub,mkinitramfs,linux-firmware +export BUILDDEPS = bc,gcc # This overrids the package file name in Makefile.snaplinux # This is necessary due to the kernel version string being @@ -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)/SNAP/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 ../SNAP/usb.conf $(ROOT)/usr/share/linux-$(VERSION) && \ + install -m 644 Module.symvers $(ROOT)/lib/modules/$(VERSION) test: $(ROOT) @cd $(SRCDIR); \ diff --git a/Makefile.linux-doc b/Makefile.linux-doc index a962844..5e07213 100644 --- a/Makefile.linux-doc +++ b/Makefile.linux-doc @@ -9,6 +9,7 @@ # 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/.*\///') diff --git a/Makefile.linux-firmware b/Makefile.linux-firmware index e2a5f5c..a68532c 100644 --- a/Makefile.linux-firmware +++ b/Makefile.linux-firmware @@ -9,6 +9,7 @@ # 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 diff --git a/Makefile.linux-headers b/Makefile.linux-headers index c0cfb2a..b400c42 100644 --- a/Makefile.linux-headers +++ b/Makefile.linux-headers @@ -9,6 +9,7 @@ # 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 diff --git a/Makefile.linux-libc b/Makefile.linux-libc index 03459b4..f36b785 100644 --- a/Makefile.linux-libc +++ b/Makefile.linux-libc @@ -9,6 +9,7 @@ # 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 diff --git a/SNAP/config b/SNAP/config index 1088974..7830245 100644 --- a/SNAP/config +++ b/SNAP/config @@ -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="-9" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y diff --git a/SNAP/usher b/SNAP/usher index 29a5e14..5be7b48 100755 --- a/SNAP/usher +++ b/SNAP/usher @@ -7,27 +7,23 @@ case $1 in exit 0 ;; postinst) - if [[ ${TARGET} ]]; then - echo "Running within ${TARGET} for kernel ${VERSION}" + echo "Running 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 - 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 + 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) - exit 0 + if [ -f /boot/initrd.img-${VERSION} ]; then + rm /boot/initrd.img-${VERSION} + fi + + grub-mkconfig -o /boot/grub/grub.cfg ;; esac