diff --git a/Makefile b/Makefile index 7cde9e3..58b9a03 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,8 @@ LINUX-FIRMWARE := $(PWD)/linux-firmware LINUX-FIRMWARE-ROOT := $(LINUX-FIRMWARE)/ROOT LINUX-HEADERS := $(PWD)/linux-headers-$(KERNVER)-$(SNAPVER) LINUX-HEADERS-ROOT := $(LINUX-HEADERS)/ROOT +LINUX-LIBC := $(PWD)/linux-libc +LINUX-LIBC-ROOT := $(LINUX-LIBC)/ROOT include /usr/share/snap/Makefile.snaplinux @@ -53,7 +55,7 @@ $(LINUX-DOC-ROOT): $(LINUX-HEADERS-ROOT) -exec gzip {} \; && \ cd $(LINUX-DOC) && make -f ../Makefile.linux-doc && mv *.snap ../ -$(LINUX-HEADERS-ROOT): $(LINUX-FIRMWARE-ROOT) +$(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-ROOT) && \ @@ -63,16 +65,24 @@ $(LINUX-HEADERS-ROOT): $(LINUX-FIRMWARE-ROOT) install -v -d -m 755 $(LINUX-HEADERS-ROOT)/lib/modules/$(VERSION) && \ ln -sf /usr/src/linux-headers-$(VERSION) \ $(LINUX-HEADERS-ROOT)/lib/modules/$(VERSION)/build && \ - cd $(SRCDIR) && make headers_install \ - INSTALL_HDR_PATH=$(LINUX-HEADERS-ROOT)/usr && \ - cp -vrp {include,Makefile,Module.symvers,scripts} $$HEADERS && \ - cp -vrp arch/x86/include/uapi $$HEADERS/arch/x86/include/uapi && \ - cp -vp arch/x86/Makefile $$HEADERS/arch/x86/Makefile && \ + cd $(SRCDIR) && find {include,arch/x86*} \( -name \*.h -o \ + -name Kbuild -o -name Makefile -o -name \*.conf \) \ + -exec cp --parents {} $$HEADERS \; && \ + find scripts/ -type f -exec cp --parents {} $$HEADERS \; && \ + cp {.config,Makefile,Module.symvers} $$HEADERS && \ 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 ../ +$(LINUX-LIBC-ROOT): $(LINUX-FIRMWARE-ROOT) + install -v -d $(LINUX-LIBC)/SNAP && \ + 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 ../ + $(LINUX-FIRMWARE-ROOT): $(SRCDIR)/arch/x86_64/boot/bzImage @install -v -d $(LINUX-FIRMWARE)/SNAP && \ install -v -d $(LINUX-FIRMWARE-ROOT)/lib/firmware && \ @@ -129,6 +139,7 @@ clean: @rm -rvf $(ROOT) \ $(LINUX-DOC) \ $(LINUX-FIRMWARE) \ + $(LINUX-LIBC) \ $(LINUX-HEADERS) \ $(SNAPINFO) \ $(MANIFEST) \ diff --git a/Makefile.linux-headers b/Makefile.linux-headers index 41978f3..c0cfb2a 100644 --- a/Makefile.linux-headers +++ b/Makefile.linux-headers @@ -8,7 +8,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -DEPENDS = +DEPENDS = linux-libc 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 new file mode 100644 index 0000000..03459b4 --- /dev/null +++ b/Makefile.linux-libc @@ -0,0 +1,15 @@ +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation here: +# (http://www.gnu.org/licenses/gpl-2.0.html) +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +DEPENDS = +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 diff --git a/SNAP/config b/SNAP/config index e8e42c6..1088974 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="-7" +CONFIG_LOCALVERSION="-8" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y