VERSION = 1
-PATCHLEVEL = 2
-SUBLEVEL = 1
+PATCHLEVEL = 11
+SUBLEVEL = 0
EXTRAVERSION = .svn
-NAME=Unnamed
+NAME = Unnamed
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
# In both cases the working directory must be the root of the kernel src.
# 1) O=
# Use "make O=dir/to/store/output/files/"
-#
+#
# 2) Set KBUILD_OUTPUT
# Set the environment variable KBUILD_OUTPUT to point to the directory
# where the output files shall be placed.
# SUBARCH tells the usermode build what the underlying arch is. That is set
# first, and if a usermode build is happening, the "ARCH=um" on the command
# line overrides the setting of ARCH below. If a native build is happening,
-# then ARCH is assigned, getting whatever value it gets normally, and
+# then ARCH is assigned, getting whatever value it gets normally, and
# SUBARCH is subsequently ignored.
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
-HOSTCC = gcc
-HOSTCXX = g++
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCXXFLAGS = -O2
-
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
-# If it is set to "quiet_", only the short version will be printed.
+# If it is set to "quiet_", only the short version will be printed.
# If it is set to "silent_", nothing wil be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
+HOSTCC = gcc
+HOSTCXX = g++
+HOSTCFLAGS :=
+HOSTCXXFLAGS :=
# We need some generic definitions
-include $(srctree)/scripts/Kbuild.include
+include $(srctree)/scripts/Kbuild.include
+
+HOSTCFLAGS += $(call hostcc-option,-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer,)
+HOSTCXXFLAGS += -O2
# For maximum performance (+ possibly random breakage, uncomment
# the following)
# Make variables (CC, etc...)
AS = $(CROSS_COMPILE)as
-LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
+LD = $(CC) -nostdlib
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
-CFLAGS :=
-CPPFLAGS :=
-AFLAGS :=
-include $(srctree)/Makefile.flags
+CFLAGS := $(CFLAGS)
+CPPFLAGS := $(CPPFLAGS)
+AFLAGS := $(AFLAGS)
+LDFLAGS := $(LDFLAGS)
+LDLIBS :=
# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
-export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
+export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
+export FLTFLAGS
# When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might
# catch them early, and hand them over to scripts/kconfig/Makefile
# It is allowed to specify more targets when calling make, including
# mixing *config targets and build targets.
-# For example 'make oldconfig all'.
+# For example 'make oldconfig all'.
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).
no-dot-config-targets := clean mrproper distclean \
- cscope TAGS tags help %docs check%
+ cscope TAGS tags help %docs
+#bbox# check% is removed from above
config-targets := 0
mixed-targets := 0
export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE
+ $(Q)mkdir -p include
$(Q)$(MAKE) $(build)=scripts/kconfig $@
$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
coreutils/libcoreutils/ \
debianutils/ \
e2fsprogs/ \
- e2fsprogs/blkid/ \
- e2fsprogs/e2p/ \
- e2fsprogs/ext2fs/ \
- e2fsprogs/uuid/ \
editors/ \
findutils/ \
init/ \
networking/ \
networking/libiproute/ \
networking/udhcp/ \
+ printutils/ \
procps/ \
runit/ \
+ selinux/ \
shell/ \
sysklogd/ \
util-linux/ \
+ util-linux/volume_id/ \
endif # KBUILD_EXTMOD
# To avoid any implicit rule to kick in, define an empty command
.config .kconfig.d: ;
+# Now we can define CFLAGS etc according to .config
+include $(srctree)/Makefile.flags
+
# If .config is newer than include/autoconf.h, someone tinkered
# with it and forgot to run make oldconfig.
# If kconfig.d is missing then we are probarly in a cleaned tree so
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
-# Defaults busybox but it is usually overriden in the arch makefile
+# Defaults busybox but it is usually overridden in the arch makefile
all: busybox
-include $(srctree)/arch/$(ARCH)/Makefile
#bbox# NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
CHECKFLAGS += $(NOSTDINC_FLAGS)
-# warn about C99 declaration after statement
-CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
-
-# disable pointer signedness warnings in gcc 4.0
-CFLAGS += $(call cc-option,-Wno-pointer-sign,)
-
# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the commandline or
# set in the environment
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
libs-y := $(libs-y1) $(libs-y2)
-
# Build busybox
# ---------------------------------------------------------------------------
# busybox is build from the objects selected by $(busybox-init) and
# Rule to link busybox - also used during CONFIG_KALLSYMS
# May be overridden by arch/$(ARCH)/Makefile
quiet_cmd_busybox__ ?= LINK $@
- cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) -o $@ \
- -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
- -Wl,--start-group $(busybox-all) -Wl,--end-group \
+ cmd_busybox__ ?= $(srctree)/scripts/trylink \
+ "$@" \
+ "$(CC)" \
+ "$(CFLAGS)" \
+ "$(LDFLAGS) $(EXTRA_LDFLAGS)" \
+ "$(core-y)" \
+ "$(libs-y)" \
+ "$(LDLIBS)"
# Generate System.map
-quiet_cmd_sysmap = SYSMAP
+quiet_cmd_sysmap = SYSMAP
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
# Link of busybox
# First command is ':' to allow us to use + in front of this rule
cmd_ksym_ld = $(cmd_busybox__)
define rule_ksym_ld
- :
+ :
+$(call cmd,busybox_version)
$(call cmd,busybox__)
$(Q)echo 'cmd_$@ := $(cmd_busybox__)' > $(@D)/.$(@F).cmd
$(Q)rm -f .old_version
busybox: busybox_unstripped
- $(Q)strip -s --remove-section=.note --remove-section=.comment \
+ifeq ($(SKIP_STRIP),y)
+ $(Q)cp $< $@
+else
+ $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
busybox_unstripped -o $@
+endif
-# The actual objects are generated when descending,
+# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(busybox-all)): $(busybox-dirs) ;
localver = $(subst $(space),, \
$(shell cat /dev/null $(_localver)) \
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
-
+
# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
# and if the SCM is know a tag from the SCM is appended.
# The appended tag is determinded by the SCM used.
# Currently, only git is supported.
# Other SCMs can edit scripts/setlocalversion and add the appropriate
# checks as needed.
-ifdef CONFIG_LOCALVERSION_AUTO
+ifdef _BB_DISABLED_CONFIG_LOCALVERSION_AUTO
_localver-auto = $(shell $(CONFIG_SHELL) \
$(srctree)/scripts/setlocalversion $(srctree))
localver-auto = $(LOCALVERSION)$(_localver-auto)
# 2) Create the include2 directory, used for the second asm symlink
prepare3: .kernelrelease
ifneq ($(KBUILD_SRC),)
- @echo ' Using $(srctree) as source for kernel'
+ @echo ' Using $(srctree) as source for busybox'
$(Q)if [ -f $(srctree)/.config ]; then \
echo " $(srctree) is not clean, please run 'make mrproper'";\
echo " in the '$(srctree)' directory.";\
#bbox# @ln -fsn asm-$(ARCH) $@
# Split autoconf.h into include/linux/config/*
+quiet_cmd_gen_bbconfigopts = GEN include/bbconfigopts.h
+ cmd_gen_bbconfigopts = $(srctree)/scripts/mkconfigs > include/bbconfigopts.h
+quiet_cmd_split_autoconf = SPLIT include/autoconf.h -> include/config/*
+ cmd_split_autoconf = scripts/basic/split-include include/autoconf.h include/config
#bbox# piggybacked generation of few .h files
include/config/MARKER: scripts/basic/split-include include/autoconf.h
- @echo ' SPLIT include/autoconf.h -> include/config/*'
- @scripts/basic/split-include include/autoconf.h include/config
- @echo ' GEN include/bbconfigopts.h'
- @$(srctree)/scripts/mkconfigs >include/bbconfigopts.h
- @$(MAKE) $(build)=scripts
- @echo ' GEN include/usage_compressed.h'
- @$(srctree)/scripts/usage_compressed include/usage_compressed.h scripts
+ $(call cmd,split_autoconf)
+ $(call cmd,gen_bbconfigopts)
@touch $@
# Generate some files
# ---------------------------------------------------------------------------
# Modules
-ifdef CONFIG_MODULES
+ifdef _BB_DISABLED_CONFIG_MODULES
# By default, build modules as well
modules modules_install: FORCE
@echo
- @echo "The present kernel configuration has modules disabled."
+ @echo "The present busybox configuration has modules disabled."
@echo "Type 'make config' and enable loadable module support."
@echo "Then build a kernel with module support enabled."
@echo
# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
-CLEAN_FILES += busybox* System.map \
+CLEAN_FILES += busybox* System.map .kernelrelease \
.tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map
# Directories & files removed with 'make mrproper'
include/autoconf.h \
include/bbconfigopts.h \
include/usage_compressed.h \
+ include/applet_tables.h \
+ applets/usage \
.kernelrelease Module.symvers tags TAGS cscope*
# clean - Delete most, but leave enough to build external modules
@find $(srctree) $(RCS_FIND_IGNORE) \
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
- -o -name '.*.rej' -o -size 0 \
+ -o -name '.*.rej' -o -name '*.tmp' -o -size 0 \
-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
-type f -print | xargs rm -f
boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
boards := $(notdir $(boards))
--include Makefile.help
+-include $(srctree)/Makefile.help
# Documentation targets
# ---------------------------------------------------------------------------
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
-# FIXME Should go into a make.lib or something
+# FIXME Should go into a make.lib or something
# ===========================================================================
quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs)))
PHONY += FORCE
FORCE:
--include Makefile.custom
+-include $(srctree)/Makefile.custom
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable se we can use it in if_changed and friends.