Kbuild. Remove linux name references.
This commit substitutes references to the linux string in variable names. It changes the LINUX prefix and uses the TIMO prefix (short for tiny mountain) It changes the vmlinux prefix for tinymountain prefix. It preserves linux references found in licenses, comments giving credits and from scripts that are not supported by the current build system yet, like rpm generation. Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com> Change-Id: Id17d8d12161f00e2a2ff38f218cdb6c5afd169c0
This commit is contained in:
parent
0d01f5bedc
commit
7ac851afef
3 changed files with 95 additions and 95 deletions
90
Makefile
90
Makefile
|
@ -35,7 +35,7 @@ unexport GREP_OPTIONS
|
|||
# their own directory. If in some directory we have a dependency on
|
||||
# a file in another dir (which doesn't happen often, but it's often
|
||||
# unavoidable when linking the built-in.o targets which finally
|
||||
# turn into vmlinux), we will call a sub make in that other dir, and
|
||||
# turn into tinymountain), we will call a sub make in that other dir, and
|
||||
# after that we are sure that everything which is in that other dir
|
||||
# is now up to date.
|
||||
#
|
||||
|
@ -391,9 +391,9 @@ PROJECTINCLUDE := $(strip -I$(srctree)/include/microkernel \
|
|||
-I$(CURDIR)/misc/generated/nodes) \
|
||||
$(USERINCLUDE)
|
||||
|
||||
# Use LINUXINCLUDE when you must reference the include/ directory.
|
||||
# Use TIMOINCLUDE when you must reference the include/ directory.
|
||||
# Needed to be compatible with the O= option
|
||||
LINUXINCLUDE := \
|
||||
TIMOINCLUDE := \
|
||||
-I$(srctree)/arch/$(hdr-arch)/include \
|
||||
$(if $(KBUILD_SRC), -I$(srctree)/include) \
|
||||
-I$(srctree)/include \
|
||||
|
@ -436,7 +436,7 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP
|
|||
export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
|
||||
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||
|
||||
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
|
||||
export KBUILD_CPPFLAGS NOSTDINC_FLAGS TIMOINCLUDE OBJCOPYFLAGS LDFLAGS
|
||||
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
|
||||
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
|
||||
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
|
||||
|
@ -558,7 +558,7 @@ config: scripts_basic outputmakefile FORCE
|
|||
|
||||
else
|
||||
# ===========================================================================
|
||||
# Build targets only - this includes vmlinux, arch specific targets, clean
|
||||
# Build targets only - this includes tinymountain, arch specific targets, clean
|
||||
# targets and others. In general all targets except *config targets.
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
|
@ -570,7 +570,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
|
|||
asm-generic
|
||||
$(Q)$(MAKE) $(build)=$(@)
|
||||
|
||||
# Objects we will link into vmlinux / subdirs we need to visit
|
||||
# Objects we will link into tinymountain / subdirs we need to visit
|
||||
core-y := arch/ kernel/ misc/ lib/
|
||||
bsp-y := drivers/
|
||||
|
||||
|
@ -626,8 +626,8 @@ sinclude $(srctree)/scripts/Makefile.$(SRCARCH).preparch
|
|||
# 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 to vmlinux, but the arch makefile usually adds further targets
|
||||
all: vmlinux
|
||||
# Defaults to tinymountain, but the arch makefile usually adds further targets
|
||||
all: tinymountain
|
||||
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
||||
|
@ -775,15 +775,15 @@ KBUILD_CFLAGS += $(KCFLAGS)
|
|||
|
||||
# Use --build-id when available.
|
||||
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-nostartfiles)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-nodefaultlibs)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-nostdlib)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-static)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-Wl$(comma)--unresolved-symbols=ignore-in-object-files)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-Wl$(comma)-X)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-Wl$(comma)-N)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-Wl$(comma)--gc-sections)
|
||||
LDFLAGS_vmlinux += $(call cc-ldoption,-Wl$(comma)--build-id=none)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-nostartfiles)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-nodefaultlibs)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-nostdlib)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-static)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-Wl$(comma)--unresolved-symbols=ignore-in-object-files)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-Wl$(comma)-X)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-Wl$(comma)-N)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-Wl$(comma)--gc-sections)
|
||||
LDFLAGS_tinymountain += $(call cc-ldoption,-Wl$(comma)--build-id=none)
|
||||
|
||||
LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__
|
||||
export LD_TOOLCHAIN
|
||||
|
@ -793,7 +793,7 @@ export LD_TOOLCHAIN
|
|||
# set in the environment
|
||||
# Also any assignments in arch/$(ARCH)/Makefile take precedence over
|
||||
# this default value
|
||||
export KBUILD_IMAGE ?= vmlinux
|
||||
export KBUILD_IMAGE ?= tinymountain
|
||||
|
||||
#
|
||||
# INSTALL_PATH specifies where to place the updated kernel and system map
|
||||
|
@ -875,11 +875,11 @@ export mod_sign_cmd
|
|||
ifeq ($(KBUILD_EXTMOD),)
|
||||
core-y +=
|
||||
|
||||
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
|
||||
tinymountain-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
|
||||
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
|
||||
$(bsp-y) $(bsp-m) $(libs-y) $(libs-m)))
|
||||
|
||||
vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
|
||||
tinymountain-alldirs := $(sort $(tinymountain-dirs) $(patsubst %/,%,$(filter %/, \
|
||||
$(init-) $(core-) $(drivers-) $(bsp-) $(libs-))))
|
||||
|
||||
init-y := $(patsubst %/, %/built-in.o, $(init-y))
|
||||
|
@ -890,25 +890,25 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
|
|||
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
|
||||
libs-y := $(libs-y1) $(libs-y2)
|
||||
|
||||
# Externally visible symbols (used by link-vmlinux.sh)
|
||||
# Externally visible symbols (used by link-tinymountain.sh)
|
||||
DQUOTE = "
|
||||
#This comment line is to fix the highlighting of some editors due the quote effect."
|
||||
export KBUILD_VMLINUX_INIT := $(head-y) $(init-y)
|
||||
export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(bsp-y)
|
||||
export KBUILD_TIMO_INIT := $(head-y) $(init-y)
|
||||
export KBUILD_TIMO_MAIN := $(core-y) $(libs-y) $(drivers-y) $(bsp-y)
|
||||
export KBUILD_LDS := $(srctree)/arch/$(SRCARCH)/$(subst $(DQUOTE),,$(CONFIG_BSP_DIR))/linker.cmd
|
||||
export LDFLAGS_vmlinux
|
||||
export LDFLAGS_tinymountain
|
||||
# used by scripts/pacmage/Makefile
|
||||
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt)
|
||||
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(tinymountain-alldirs)) arch Documentation include samples scripts tools virt)
|
||||
|
||||
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN)
|
||||
tinymountain-deps := $(KBUILD_LDS) $(KBUILD_TIMO_INIT) $(KBUILD_TIMO_MAIN)
|
||||
|
||||
# Final link of vmlinux
|
||||
cmd_link-vmlinux = $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux)
|
||||
quiet_cmd_link-vmlinux = LINK $@
|
||||
# Final link of tinymountain
|
||||
cmd_link-tinymountain = $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_tinymountain)
|
||||
quiet_cmd_link-tinymountain = LINK $@
|
||||
|
||||
# Include targets which we want to
|
||||
# execute if the rest of the kernel build went well.
|
||||
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
|
||||
tinymountain: scripts/link-tinymountain.sh $(tinymountain-deps) FORCE
|
||||
ifdef CONFIG_HEADERS_CHECK
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
|
||||
endif
|
||||
|
@ -920,21 +920,21 @@ ifdef CONFIG_BUILD_DOCSRC
|
|||
endif
|
||||
|
||||
ifneq ($(strip $(PROJECT)),)
|
||||
+$(call if_changed,link-vmlinux)
|
||||
+$(call if_changed,link-tinymountain)
|
||||
endif
|
||||
|
||||
# The actual objects are generated when descending,
|
||||
# make sure no implicit rule kicks in
|
||||
$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
|
||||
$(sort $(tinymountain-deps)): $(tinymountain-dirs) ;
|
||||
|
||||
# Handle descending into subdirectories listed in $(vmlinux-dirs)
|
||||
# Handle descending into subdirectories listed in $(tinymountain-dirs)
|
||||
# Preset locale variables to speed up the build process. Limit locale
|
||||
# tweaks to this spot to avoid wrong language settings when running
|
||||
# make menuconfig etc.
|
||||
# Error messages still appears in the original language
|
||||
|
||||
PHONY += $(vmlinux-dirs)
|
||||
$(vmlinux-dirs): prepare scripts
|
||||
PHONY += $(tinymountain-dirs)
|
||||
$(tinymountain-dirs): prepare scripts
|
||||
$(Q)$(MAKE) $(build)=$@
|
||||
|
||||
define filechk_kernel.release
|
||||
|
@ -1129,13 +1129,13 @@ all: modules
|
|||
# using awk while concatenating to the final file.
|
||||
|
||||
PHONY += modules
|
||||
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
|
||||
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
|
||||
modules: $(tinymountain-dirs) $(if $(KBUILD_BUILTIN),tinymountain) modules.builtin
|
||||
$(Q)$(AWK) '!x[$$0]++' $(tinymountain-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
|
||||
@$(kecho) ' Building modules, stage 2.';
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
|
||||
|
||||
modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
|
||||
modules.builtin: $(tinymountain-dirs:%=%/modules.builtin)
|
||||
$(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
|
||||
|
||||
%/modules.builtin: include/config/auto.conf
|
||||
|
@ -1221,16 +1221,16 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
|
|||
#
|
||||
clean: rm-dirs := $(CLEAN_DIRS)
|
||||
clean: rm-files := $(CLEAN_FILES)
|
||||
clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) )
|
||||
clean-dirs := $(addprefix _clean_, . $(tinymountain-alldirs) )
|
||||
|
||||
PHONY += $(clean-dirs) clean archclean vmlinuxclean
|
||||
PHONY += $(clean-dirs) clean archclean tinymountainclean
|
||||
$(clean-dirs):
|
||||
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||
|
||||
vmlinuxclean:
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
|
||||
tinymountainclean:
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-tinymountain.sh clean
|
||||
|
||||
clean: archclean vmlinuxclean
|
||||
clean: archclean tinymountainclean
|
||||
|
||||
# mrproper - Delete all generated files, including .config
|
||||
#
|
||||
|
@ -1291,7 +1291,7 @@ help:
|
|||
@echo ''
|
||||
@echo 'Other generic targets:'
|
||||
@echo ' all - Build all targets marked with [*]'
|
||||
@echo '* vmlinux - Build the bare kernel'
|
||||
@echo '* tinymountain - Build the bare kernel'
|
||||
@echo '* modules - Build all modules'
|
||||
@echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
|
||||
@echo ' firmware_install- Install all firmware to INSTALL_FW_PATH'
|
||||
|
@ -1523,7 +1523,7 @@ else
|
|||
CHECKSTACK_ARCH := $(ARCH)
|
||||
endif
|
||||
checkstack:
|
||||
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
|
||||
$(OBJDUMP) -d tinymountain $$(find . -name '*.ko') | \
|
||||
$(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
|
||||
|
||||
kernelrelease:
|
||||
|
|
|
@ -137,14 +137,14 @@ __a_flags = $(call flags,_a_flags)
|
|||
__cpp_flags = $(call flags,_cpp_flags)
|
||||
endif
|
||||
|
||||
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
|
||||
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(TIMOINCLUDE) \
|
||||
$(__c_flags) $(modkern_cflags) \
|
||||
-D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
|
||||
|
||||
a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
|
||||
a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(TIMOINCLUDE) \
|
||||
$(__a_flags) $(modkern_aflags)
|
||||
|
||||
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
|
||||
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(TIMOINCLUDE) \
|
||||
$(__cpp_flags)
|
||||
|
||||
ld_flags = $(LDFLAGS) $(ldflags-y)
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# link vmlinux
|
||||
# link tinymountain
|
||||
#
|
||||
# vmlinux is linked from the objects selected by $(KBUILD_VMLINUX_INIT) and
|
||||
# $(KBUILD_VMLINUX_MAIN). Most are built-in.o files from top-level directories
|
||||
# tinymountain is linked from the objects selected by $(KBUILD_TIMO_INIT) and
|
||||
# $(KBUILD_TIMO_MAIN). Most are built-in.o files from top-level directories
|
||||
# in the kernel tree, others are specified in arch/$(ARCH)/Makefile.
|
||||
# Ordering when linking is important, and $(KBUILD_VMLINUX_INIT) must be first.
|
||||
# Ordering when linking is important, and $(KBUILD_TIMO_INIT) must be first.
|
||||
#
|
||||
# vmlinux
|
||||
# tinymountain
|
||||
# ^
|
||||
# |
|
||||
# +-< $(KBUILD_VMLINUX_INIT)
|
||||
# +-< $(KBUILD_TIMO_INIT)
|
||||
# | +--< init/version.o + more
|
||||
# |
|
||||
# +--< $(KBUILD_VMLINUX_MAIN)
|
||||
# +--< $(KBUILD_TIMO_MAIN)
|
||||
# | +--< drivers/built-in.o mm/built-in.o + more
|
||||
# |
|
||||
# +-< ${kallsymso} (see description in KALLSYMS section)
|
||||
#
|
||||
# vmlinux version (uname -v) cannot be updated during normal
|
||||
# tinymountain version (uname -v) cannot be updated during normal
|
||||
# descending-into-subdirs phase since we do not yet know if we need to
|
||||
# update vmlinux.
|
||||
# Therefore this step is delayed until just before final link of vmlinux.
|
||||
# update tinymountain.
|
||||
# Therefore this step is delayed until just before final link of tinymountain.
|
||||
#
|
||||
# System.map is generated to document addresses of all kernel symbols
|
||||
|
||||
|
@ -42,11 +42,11 @@ info()
|
|||
# {2} symbol map file
|
||||
linker_params()
|
||||
{
|
||||
echo "${LDFLAGS_vmlinux}" >> ${1}
|
||||
echo "${LDFLAGS_tinymountain}" >> ${1}
|
||||
echo "-Wl,-Map,./${2}" >> ${1}
|
||||
echo "-L ${objtree}/include/generated" >> ${1}
|
||||
echo "-u _OffsetAbsSyms -u _ConfigAbsSyms" >> ${1}
|
||||
echo "-Wl,--start-group ${KBUILD_VMLINUX_MAIN}" >> ${1}
|
||||
echo "-Wl,--start-group ${KBUILD_TIMO_MAIN}" >> ${1}
|
||||
echo "${objtree}/include/generated/offsets.o" >> ${1}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ linker_command()
|
|||
-o ${1}
|
||||
}
|
||||
|
||||
# Link of vmlinux.o used for section mismatch analysis
|
||||
# Link of tinymountain.o used for section mismatch analysis
|
||||
# ${1} output file
|
||||
# ${2} linker parameters file
|
||||
# ${3} linker command file
|
||||
|
@ -73,7 +73,7 @@ initial_link()
|
|||
}
|
||||
|
||||
#Generates IDT and merge them into final binary
|
||||
# ${1} input file (vmlinux.elf)
|
||||
# ${1} input file (tinymountain.elf)
|
||||
# ${2} output file (staticIdt.o)
|
||||
gen_idt()
|
||||
{
|
||||
|
@ -84,12 +84,12 @@ gen_idt()
|
|||
rm -f isrList.bin
|
||||
}
|
||||
|
||||
# Link of vmlinux
|
||||
# ${1} - linker params file (vmlinux.lnk)
|
||||
# Link of tinymountain
|
||||
# ${1} - linker params file (tinymountain.lnk)
|
||||
# ${2} - linker command file (final-linker.cmd)
|
||||
# ${3} - input file (staticIdt.o)
|
||||
# ${4} - output file
|
||||
vmlinux_link()
|
||||
tinymountain_link()
|
||||
{
|
||||
${CC} -o ${4} @${1} ${3} -T ${2}
|
||||
${OBJCOPY} --set-section-flags intList=noload ${4} elf.tmp
|
||||
|
@ -121,7 +121,7 @@ kallsyms()
|
|||
fi
|
||||
|
||||
local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \
|
||||
${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
|
||||
${NOSTDINC_FLAGS} ${TIMOINCLUDE} ${KBUILD_CPPFLAGS}"
|
||||
|
||||
${NM} -n ${1} | \
|
||||
scripts/kallsyms ${kallsymopt} | \
|
||||
|
@ -148,11 +148,11 @@ cleanup()
|
|||
rm -f .tmp_System.map
|
||||
rm -f .tmp_kallsyms*
|
||||
rm -f .tmp_version
|
||||
rm -f .tmp_vmlinux*
|
||||
rm -f .tmp_tinymountain*
|
||||
rm -f System.map
|
||||
rm -f vmlinux.lnk
|
||||
rm -f vmlinux.map
|
||||
rm -f vmlinux.elf
|
||||
rm -f tinymountain.lnk
|
||||
rm -f tinymountain.map
|
||||
rm -f tinymountain.elf
|
||||
rm -f staticIdt.o
|
||||
rm -f linker.cmd
|
||||
rm -f final-linker.cmd
|
||||
|
@ -182,11 +182,11 @@ case "${KCONFIG_CONFIG}" in
|
|||
. "./${KCONFIG_CONFIG}"
|
||||
esac
|
||||
|
||||
#link vmlinux.o
|
||||
info LD vmlinux.elf
|
||||
linker_params vmlinux.lnk vmlinux.map
|
||||
#link tinymountain.o
|
||||
info LD tinymountain.elf
|
||||
linker_params tinymountain.lnk tinymountain.map
|
||||
linker_command linker.cmd
|
||||
initial_link vmlinux.elf vmlinux.lnk linker.cmd
|
||||
initial_link tinymountain.elf tinymountain.lnk linker.cmd
|
||||
|
||||
# Update version
|
||||
info GEN .version
|
||||
|
@ -199,68 +199,68 @@ else
|
|||
fi;
|
||||
|
||||
kallsymso=""
|
||||
kallsyms_vmlinux=""
|
||||
kallsyms_tinymountain=""
|
||||
if [ -n "${CONFIG_KALLSYMS}" ]; then
|
||||
|
||||
# kallsyms support
|
||||
# Generate section listing all symbols and add it into vmlinux
|
||||
# Generate section listing all symbols and add it into tinymountain
|
||||
# It's a three step process:
|
||||
# 1) Link .tmp_vmlinux1 so it has all symbols and sections,
|
||||
# 1) Link .tmp_tinymountain1 so it has all symbols and sections,
|
||||
# but __kallsyms is empty.
|
||||
# Running kallsyms on that gives us .tmp_kallsyms1.o with
|
||||
# the right size
|
||||
# 2) Link .tmp_vmlinux2 so it now has a __kallsyms section of
|
||||
# 2) Link .tmp_tinymountain2 so it now has a __kallsyms section of
|
||||
# the right size, but due to the added section, some
|
||||
# addresses have shifted.
|
||||
# From here, we generate a correct .tmp_kallsyms2.o
|
||||
# 2a) We may use an extra pass as this has been necessary to
|
||||
# woraround some alignment related bugs.
|
||||
# KALLSYMS_EXTRA_PASS=1 is used to trigger this.
|
||||
# 3) The correct ${kallsymso} is linked into the final vmlinux.
|
||||
# 3) The correct ${kallsymso} is linked into the final tinymountain.
|
||||
#
|
||||
# a) Verify that the System.map from vmlinux matches the map from
|
||||
# a) Verify that the System.map from tinymountain matches the map from
|
||||
# ${kallsymso}.
|
||||
|
||||
kallsymso=.tmp_kallsyms2.o
|
||||
kallsyms_vmlinux=.tmp_vmlinux2
|
||||
kallsyms_tinymountain=.tmp_tinymountain2
|
||||
|
||||
# step 1
|
||||
vmlinux_link "" .tmp_vmlinux1
|
||||
kallsyms .tmp_vmlinux1 .tmp_kallsyms1.o
|
||||
tinymountain_link "" .tmp_tinymountain1
|
||||
kallsyms .tmp_tinymountain1 .tmp_kallsyms1.o
|
||||
|
||||
# step 2
|
||||
vmlinux_link .tmp_kallsyms1.o .tmp_vmlinux2
|
||||
kallsyms .tmp_vmlinux2 .tmp_kallsyms2.o
|
||||
tinymountain_link .tmp_kallsyms1.o .tmp_tinymountain2
|
||||
kallsyms .tmp_tinymountain2 .tmp_kallsyms2.o
|
||||
|
||||
# step 2a
|
||||
if [ -n "${KALLSYMS_EXTRA_PASS}" ]; then
|
||||
kallsymso=.tmp_kallsyms3.o
|
||||
kallsyms_vmlinux=.tmp_vmlinux3
|
||||
kallsyms_tinymountain=.tmp_tinymountain3
|
||||
|
||||
vmlinux_link .tmp_kallsyms2.o .tmp_vmlinux3
|
||||
tinymountain_link .tmp_kallsyms2.o .tmp_tinymountain3
|
||||
|
||||
kallsyms .tmp_vmlinux3 .tmp_kallsyms3.o
|
||||
kallsyms .tmp_tinymountain3 .tmp_kallsyms3.o
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${SRCARCH}" = "x86" ]; then
|
||||
info SIDT vmlinux.elf
|
||||
gen_idt vmlinux.elf staticIdt.o
|
||||
info SIDT tinymountain.elf
|
||||
gen_idt tinymountain.elf staticIdt.o
|
||||
linker_command final-linker.cmd -DFINAL_LINK
|
||||
vmlinux_link vmlinux.lnk final-linker.cmd staticIdt.o vmlinux.elf
|
||||
tinymountain_link tinymountain.lnk final-linker.cmd staticIdt.o tinymountain.elf
|
||||
fi
|
||||
|
||||
if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
|
||||
info SORTEX vmlinux
|
||||
sortextable vmlinux
|
||||
info SORTEX tinymountain
|
||||
sortextable tinymountain
|
||||
fi
|
||||
|
||||
info SYSMAP System.map
|
||||
mksysmap vmlinux.elf System.map
|
||||
mksysmap tinymountain.elf System.map
|
||||
|
||||
# step a (see comment above)
|
||||
if [ -n "${CONFIG_KALLSYMS}" ]; then
|
||||
mksysmap ${kallsyms_vmlinux} .tmp_System.map
|
||||
mksysmap ${kallsyms_tinymountain} .tmp_System.map
|
||||
|
||||
if ! cmp -s System.map .tmp_System.map; then
|
||||
echo >&2 Inconsistent kallsyms data
|
Loading…
Add table
Add a link
Reference in a new issue