Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25c862cc authored by Linus Torvalds's avatar Linus Torvalds
Browse files
parents 52347f4e 8ded4ac0
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,7 @@ Module.symvers
# Generated include files
# Generated include files
#
#
include/asm
include/asm
include/asm-*/asm-offsets.h
include/config
include/config
include/linux/autoconf.h
include/linux/autoconf.h
include/linux/compile.h
include/linux/compile.h
+12 −12
Original line number Original line Diff line number Diff line
@@ -38,7 +38,7 @@ included in the kernel tree.
What is covered within this file is mainly information to authors
What is covered within this file is mainly information to authors
of modules. The author of an external modules should supply
of modules. The author of an external modules should supply
a makefile that hides most of the complexity so one only has to type
a makefile that hides most of the complexity so one only has to type
'make' to buld the module. A complete example will be present in
'make' to build the module. A complete example will be present in
chapter ¤. Creating a kbuild file for an external module".
chapter ¤. Creating a kbuild file for an external module".




@@ -69,7 +69,7 @@ when building an external module.


--- 2.2 Available targets
--- 2.2 Available targets


	$KDIR refers to path to kernel source top-level directory
	$KDIR refers to the path to the kernel source top-level directory


	make -C $KDIR M=`pwd`
	make -C $KDIR M=`pwd`
		Will build the module(s) located in current directory.
		Will build the module(s) located in current directory.
@@ -87,11 +87,11 @@ when building an external module.
	make -C $KDIR M=$PWD modules_install
	make -C $KDIR M=$PWD modules_install
		Install the external module(s).
		Install the external module(s).
		Installation default is in /lib/modules/<kernel-version>/extra,
		Installation default is in /lib/modules/<kernel-version>/extra,
		but may be prefixed with INSTALL_MOD_PATH - see separate chater.
		but may be prefixed with INSTALL_MOD_PATH - see separate chapter.


	make -C $KDIR M=$PWD clean
	make -C $KDIR M=$PWD clean
		Remove all generated files for the module - the kernel
		Remove all generated files for the module - the kernel
		source directory is not moddified.
		source directory is not modified.


	make -C $KDIR M=`pwd` help
	make -C $KDIR M=`pwd` help
		help will list the available target when building external
		help will list the available target when building external
@@ -99,7 +99,7 @@ when building an external module.


--- 2.3 Available options:
--- 2.3 Available options:


	$KDIR refer to path to kernel src
	$KDIR refers to the path to the kernel source top-level directory


	make -C $KDIR
	make -C $KDIR
		Used to specify where to find the kernel source.
		Used to specify where to find the kernel source.
@@ -206,11 +206,11 @@ following files:


		KERNELDIR := /lib/modules/`uname -r`/build
		KERNELDIR := /lib/modules/`uname -r`/build
		all::
		all::
			$(MAKE) -C $KERNELDIR M=`pwd` $@
			$(MAKE) -C $(KERNELDIR) M=`pwd` $@


		# Module specific targets
		# Module specific targets
		genbin:
		genbin:
			echo "X" > 8123_bini.o_shipped
			echo "X" > 8123_bin.o_shipped


		endif
		endif


@@ -341,13 +341,13 @@ directory and therefore needs to deal with this in their kbuild file.
		EXTRA_CFLAGS := -Iinclude
		EXTRA_CFLAGS := -Iinclude
		8123-y := 8123_if.o 8123_pci.o 8123_bin.o
		8123-y := 8123_if.o 8123_pci.o 8123_bin.o


	Note that in the assingment there is no space between -I and the path.
	Note that in the assignment there is no space between -I and the path.
	This is a kbuild limitation and no space must be present.
	This is a kbuild limitation:  there must be no space present.




=== 6. Module installation
=== 6. Module installation


Modules which are included in the kernel is installed in the directory:
Modules which are included in the kernel are installed in the directory:


	/lib/modules/$(KERNELRELEASE)/kernel
	/lib/modules/$(KERNELRELEASE)/kernel


@@ -384,7 +384,7 @@ External modules are installed in the directory:


=== 7. Module versioning
=== 7. Module versioning


Module versioning are enabled by the CONFIG_MODVERSIONS tag.
Module versioning is enabled by the CONFIG_MODVERSIONS tag.


Module versioning is used as a simple ABI consistency check. The Module
Module versioning is used as a simple ABI consistency check. The Module
versioning creates a CRC value of the full prototype for an exported symbol and
versioning creates a CRC value of the full prototype for an exported symbol and
+17 −13
Original line number Original line Diff line number Diff line
@@ -286,10 +286,6 @@ export quiet Q KBUILD_VERBOSE
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
             > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
             > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)


# For backward compatibility
check_gcc = $(warning check_gcc is deprecated - use cc-option) \
            $(call cc-option, $(1),$(2))

# cc-option-yn
# cc-option-yn
# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
@@ -481,18 +477,20 @@ ifeq ($(dot-config),1)


# Read in dependencies to all Kconfig* files, make sure to run
# Read in dependencies to all Kconfig* files, make sure to run
# oldconfig if changes are detected.
# oldconfig if changes are detected.
-include .config.cmd
-include .kconfig.d


include .config
include .config


# If .config needs to be updated, it will be done via the dependency
# If .config needs to be updated, it will be done via the dependency
# that autoconf has on .config.
# that autoconf has on .config.
# To avoid any implicit rule to kick in, define an empty command
# To avoid any implicit rule to kick in, define an empty command
.config: ;
.config .kconfig.d: ;


# If .config is newer than include/linux/autoconf.h, someone tinkered
# If .config is newer than include/linux/autoconf.h, someone tinkered
# with it and forgot to run make oldconfig
# with it and forgot to run make oldconfig.
include/linux/autoconf.h: .config
# If kconfig.d is missing then we are probarly in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
include/linux/autoconf.h: .kconfig.d .config
	$(Q)mkdir -p include/linux
	$(Q)mkdir -p include/linux
	$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
	$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
else
else
@@ -1066,7 +1064,7 @@ help:
	@echo  '  all		  - Build all targets marked with [*]'
	@echo  '  all		  - Build all targets marked with [*]'
	@echo  '* vmlinux	  - Build the bare kernel'
	@echo  '* vmlinux	  - Build the bare kernel'
	@echo  '* modules	  - Build all modules'
	@echo  '* modules	  - Build all modules'
	@echo  '  modules_install - Install all modules'
	@echo  '  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
	@echo  '  dir/            - Build all files in dir and below'
	@echo  '  dir/            - Build all files in dir and below'
	@echo  '  dir/file.[ois]  - Build specified target only'
	@echo  '  dir/file.[ois]  - Build specified target only'
	@echo  '  dir/file.ko     - Build module including final link'
	@echo  '  dir/file.ko     - Build module including final link'
@@ -1240,7 +1238,10 @@ cscope: FORCE
quiet_cmd_TAGS = MAKE   $@
quiet_cmd_TAGS = MAKE   $@
define cmd_TAGS
define cmd_TAGS
	rm -f $@; \
	rm -f $@; \
	ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
	ETAGSF=`etags --version | grep -i exuberant >/dev/null &&     \
                echo "-I __initdata,__exitdata,__acquires,__releases  \
                      -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL              \
                      --extra=+f --c-kinds=+px"`;                     \
                $(all-sources) | xargs etags $$ETAGSF -a
                $(all-sources) | xargs etags $$ETAGSF -a
endef
endef


@@ -1251,7 +1252,10 @@ TAGS: FORCE
quiet_cmd_tags = MAKE   $@
quiet_cmd_tags = MAKE   $@
define cmd_tags
define cmd_tags
	rm -f $@; \
	rm -f $@; \
	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
	CTAGSF=`ctags --version | grep -i exuberant >/dev/null &&     \
                echo "-I __initdata,__exitdata,__acquires,__releases  \
                      -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL              \
                      --extra=+f --c-kinds=+px"`;                     \
                $(all-sources) | xargs ctags $$CTAGSF -a
                $(all-sources) | xargs ctags $$CTAGSF -a
endef
endef


+3 −0
Original line number Original line Diff line number Diff line
bootsect
bzImage
setup
+1 −0
Original line number Original line Diff line number Diff line
build
Loading