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
This commit is contained in:
2018-03-22 11:01:02 -05:00
parent 9c94dc2f94
commit 3150e81315
7 changed files with 24 additions and 19 deletions

View File

@@ -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); \