Always use kernel-headers.
This commit is contained in:
parent
16a8faf0fa
commit
ee654b59c3
1
Makefile
1
Makefile
|
@ -193,7 +193,6 @@ TARGETS+=uclibc-configured binutils gcc ccache
|
|||
# that...
|
||||
TARGETS+=kernel-headers
|
||||
#TARGETS+=linux
|
||||
#TARGETS+=system-linux
|
||||
|
||||
# The default minimal set
|
||||
TARGETS+=busybox #tinylogin
|
||||
|
|
|
@ -49,7 +49,7 @@ $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY): $(BRIDGE_BUILD_DIR)/brctl/brctl
|
|||
#cp -af $(BRIDGE_BUILD_DIR)/brctl/brctld $(TARGET_DIR)/usr/sbin/
|
||||
#$(STRIP) $(TARGET_DIR)/usr/sbin/brctld
|
||||
|
||||
bridge: $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
|
||||
bridge: linux $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
|
||||
|
||||
bridge-source: $(DL_DIR)/$(BRIDGE_SOURCE)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ $(IPROUTE2_DIR)/.unpacked: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PA
|
|||
|
||||
$(IPROUTE2_DIR)/.configured: $(IPROUTE2_DIR)/.unpacked
|
||||
$(SED) "s,-I/usr/include/db3,," $(IPROUTE2_DIR)/Makefile
|
||||
$(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
|
||||
$(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_HEADERS_DIR)/include," \
|
||||
$(IPROUTE2_DIR)/Makefile
|
||||
$(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
|
||||
$(IPROUTE2_DIR)/Makefile
|
||||
|
|
|
@ -38,7 +38,7 @@ $(TARGET_DIR)/sbin/iptables: $(IPTABLES_BUILD_DIR)/iptables
|
|||
$(STRIP) $(TARGET_DIR)/usr/lib/iptables/*.so
|
||||
rm -rf $(TARGET_DIR)/usr/man
|
||||
|
||||
iptables: $(TARGET_DIR)/sbin/iptables
|
||||
iptables: linux $(TARGET_DIR)/sbin/iptables
|
||||
|
||||
iptables-source: $(DL_DIR)/$(IPTABLES_SOURCE)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ $(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE)
|
|||
touch $(MTD_DIR)/.unpacked
|
||||
|
||||
$(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked
|
||||
CFLAGS=-I$(LINUX_DIR)/include $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
|
||||
CFLAGS=-I$(LINUX_HEADERS_DIR)/include $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
|
||||
|
||||
mtd: $(MKFS_JFFS2)
|
||||
|
||||
|
|
|
@ -50,71 +50,71 @@ endif
|
|||
|
||||
LINUX_VERSION:=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
|
||||
|
||||
LINUX_DIR:=$(TOOL_BUILD_DIR)/linux
|
||||
LINUX_HEADERS_DIR:=$(TOOL_BUILD_DIR)/linux
|
||||
|
||||
$(DL_DIR)/$(LINUX_SOURCE):
|
||||
mkdir -p $(DL_DIR)
|
||||
$(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
|
||||
|
||||
$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
|
||||
$(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
|
||||
mkdir -p $(TOOL_BUILD_DIR)
|
||||
bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
|
||||
ifneq ($(LINUX_UNPACK_DIR),$(LINUX_DIR))
|
||||
mv $(LINUX_UNPACK_DIR) $(LINUX_DIR)
|
||||
ifneq ($(LINUX_UNPACK_DIR),$(LINUX_HEADERS_DIR))
|
||||
mv $(LINUX_UNPACK_DIR) $(LINUX_HEADERS_DIR)
|
||||
endif
|
||||
touch $(LINUX_DIR)/.unpacked
|
||||
touch $(LINUX_HEADERS_DIR)/.unpacked
|
||||
|
||||
$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
|
||||
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR) $(SOURCE_DIR) linux-libc-headers-$(LINUX_VERSION)-\*.patch
|
||||
touch $(LINUX_DIR)/.patched
|
||||
$(LINUX_HEADERS_DIR)/.patched: $(LINUX_HEADERS_DIR)/.unpacked
|
||||
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_HEADERS_DIR) $(SOURCE_DIR) linux-libc-headers-$(LINUX_VERSION)-\*.patch
|
||||
touch $(LINUX_HEADERS_DIR)/.patched
|
||||
|
||||
$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
|
||||
rm -f $(LINUX_DIR)/include/asm
|
||||
@if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
|
||||
$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.patched
|
||||
rm -f $(LINUX_HEADERS_DIR)/include/asm
|
||||
@if [ ! -f $(LINUX_HEADERS_DIR)/Makefile ] ; then \
|
||||
echo -e "VERSION = $(VERSION)\nPATCHLEVEL = $(PATCHLEVEL)\n" > \
|
||||
$(LINUX_DIR)/Makefile; \
|
||||
$(LINUX_HEADERS_DIR)/Makefile; \
|
||||
echo -e "SUBLEVEL = $(SUBLEVEL)\nEXTRAVERSION =\n" >> \
|
||||
$(LINUX_DIR)/Makefile; \
|
||||
$(LINUX_HEADERS_DIR)/Makefile; \
|
||||
echo -e "KERNELRELEASE=\$$(VERSION).\$$(PATCHLEVEL).\$$(SUBLEVEL)\$$(EXTRAVERSION)" >> \
|
||||
$(LINUX_DIR)/Makefile; \
|
||||
$(LINUX_HEADERS_DIR)/Makefile; \
|
||||
fi;
|
||||
@if [ "$(ARCH)" = "powerpc" ];then \
|
||||
(cd $(LINUX_DIR)/include; ln -fs asm-ppc$(NOMMU) asm;) \
|
||||
(cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-ppc$(NOMMU) asm;) \
|
||||
elif [ "$(ARCH)" = "mips" ];then \
|
||||
(cd $(LINUX_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
|
||||
(cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
|
||||
elif [ "$(ARCH)" = "mipsel" ];then \
|
||||
(cd $(LINUX_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
|
||||
(cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
|
||||
elif [ "$(ARCH)" = "arm" ];then \
|
||||
(cd $(LINUX_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \
|
||||
(cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \
|
||||
cd asm; \
|
||||
if [ ! -L proc ] ; then \
|
||||
ln -fs proc-armv proc; \
|
||||
ln -fs arch-ebsa285 arch; fi); \
|
||||
elif [ "$(ARCH)" = "armeb" ];then \
|
||||
(cd $(LINUX_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \
|
||||
(cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \
|
||||
cd asm; \
|
||||
if [ ! -L proc ] ; then \
|
||||
ln -fs proc-armv proc; \
|
||||
ln -fs arch-ebsa285 arch; fi); \
|
||||
elif [ "$(ARCH)" = "cris" ];then \
|
||||
(cd $(LINUX_DIR)/include; ln -fs asm-cris asm;) \
|
||||
(cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-cris asm;) \
|
||||
else \
|
||||
(cd $(LINUX_DIR)/include; ln -fs asm-$(ARCH)$(NOMMU) asm;) \
|
||||
(cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-$(ARCH)$(NOMMU) asm;) \
|
||||
fi
|
||||
touch $(LINUX_DIR)/include/linux/autoconf.h;
|
||||
touch $(LINUX_DIR)/.configured
|
||||
touch $(LINUX_HEADERS_DIR)/include/linux/autoconf.h;
|
||||
touch $(LINUX_HEADERS_DIR)/.configured
|
||||
|
||||
$(LINUX_KERNEL): $(LINUX_DIR)/.configured
|
||||
$(LINUX_KERNEL): $(LINUX_HEADERS_DIR)/.configured
|
||||
|
||||
kernel-headers: $(LINUX_DIR)/.configured
|
||||
kernel-headers: $(LINUX_HEADERS_DIR)/.configured
|
||||
|
||||
kernel-headers-source: $(DL_DIR)/$(LINUX_SOURCE)
|
||||
|
||||
kernel-headers-clean: clean
|
||||
rm -f $(LINUX_KERNEL)
|
||||
rm -rf $(LINUX_DIR)
|
||||
rm -rf $(LINUX_HEADERS_DIR)
|
||||
|
||||
kernel-headers-dirclean:
|
||||
rm -rf $(LINUX_DIR)
|
||||
rm -rf $(LINUX_HEADERS_DIR)
|
||||
|
||||
endif
|
||||
|
|
|
@ -97,7 +97,7 @@ $(PCMCIA_DIR)/.modules.dep: $(BUSYBOX_DIR)/.configured $(TARGET_DIR)/lib/modules
|
|||
> $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep
|
||||
touch $(PCMCIA_DIR)/.modules.dep
|
||||
|
||||
pcmcia: uclibc $(TARGET_DIR)/sbin/cardmgr $(PCMCIA_DIR)/.modules.dep
|
||||
pcmcia: uclibc linux $(TARGET_DIR)/sbin/cardmgr $(PCMCIA_DIR)/.modules.dep
|
||||
|
||||
pcmcia-clean:
|
||||
rm -f $(TARGET_DIR)/sbin/cardmgr
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
#############################################################
|
||||
#
|
||||
# System Linux kernel target
|
||||
#
|
||||
# This uses an existing linux kernel source tree on
|
||||
# your build system, and makes no effort at compiling
|
||||
# anything....
|
||||
#
|
||||
# You will probably want to change LINUX_SOURCE to
|
||||
# point to wherever you installed you kernel.
|
||||
#
|
||||
# -Erik
|
||||
#
|
||||
#############################################################
|
||||
ifneq ($(filter $(TARGETS),system-linux),)
|
||||
|
||||
LINUX_SOURCE=/usr/src/linux
|
||||
LINUX_DIR=$(BUILD_DIR)/linux
|
||||
LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel
|
||||
# Used by pcmcia-cs and others
|
||||
LINUX_SOURCE_DIR=$(LINUX_SOURCE)
|
||||
|
||||
$(LINUX_DIR)/.configured:
|
||||
mkdir -p $(LINUX_DIR)/include
|
||||
(cd $(LINUX_DIR)/include; \
|
||||
for i in $(LINUX_SOURCE)/include/*; do ln -sf $$i ; done; \
|
||||
rm -f asm; \
|
||||
if [ "$(ARCH)" = "powerpc" ];then \
|
||||
ln -fs asm-ppc asm; \
|
||||
elif [ "$(ARCH)" = "mips" ];then \
|
||||
ln -fs asm-mips asm; \
|
||||
elif [ "$(ARCH)" = "mipsel" ];then \
|
||||
ln -fs asm-mips asm; \
|
||||
elif [ "$(ARCH)" = "arm" ];then \
|
||||
ln -fs asm-arm asm; \
|
||||
(cd asm-arm; \
|
||||
if [ ! -L proc ] ; then \
|
||||
ln -fs proc-armv proc; \
|
||||
ln -fs arch-ebsa285 arch; fi); \
|
||||
elif [ "$(ARCH)" = "cris" ];then \
|
||||
ln -fs asm-cris asm; \
|
||||
else ln -fs asm-$(ARCH) asm; \
|
||||
fi)
|
||||
cp $(LINUX_SOURCE)/Makefile $(LINUX_DIR)/
|
||||
cp $(LINUX_SOURCE)/Rules.make $(LINUX_DIR)/
|
||||
touch $(LINUX_DIR)/.configured
|
||||
|
||||
$(LINUX_KERNEL): $(LINUX_DIR)/.configured
|
||||
|
||||
system-linux: $(LINUX_DIR)/.configured
|
||||
|
||||
system-linux-clean: clean
|
||||
rm -f $(LINUX_KERNEL)
|
||||
rm -rf $(LINUX_DIR)
|
||||
|
||||
system-linux-dirclean:
|
||||
rm -rf $(LINUX_DIR)
|
||||
|
||||
endif
|
|
@ -41,7 +41,7 @@ $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
|
|||
bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
|
||||
touch $(UCLIBC_DIR)/.unpacked
|
||||
|
||||
$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(LINUX_DIR)/.configured
|
||||
$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(LINUX_HEADERS_DIR)/.configured
|
||||
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(UCLIBC_DIR)/Rules.mak
|
||||
ifeq ($(ENABLE_LOCALE),true)
|
||||
cp $(SOURCE_DIR)/uClibc.config-locale $(UCLIBC_DIR)/.config
|
||||
|
@ -51,7 +51,7 @@ endif
|
|||
$(SED) 's,^.*TARGET_$(UCLIBC_TARGET_ARCH).*,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \
|
||||
$(UCLIBC_DIR)/.config
|
||||
$(SED) 's,^TARGET_ARCH.*,TARGET_ARCH=\"$(UCLIBC_TARGET_ARCH)\",g' $(UCLIBC_DIR)/.config
|
||||
$(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_DIR)\",g' \
|
||||
$(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \
|
||||
$(UCLIBC_DIR)/.config
|
||||
$(SED) 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \
|
||||
$(UCLIBC_DIR)/.config
|
||||
|
|
Loading…
Reference in a new issue