am 3b1b9f9f: am f0447ddb: Merge "Tweaked the cleanup scripts to handle uapi and aarch64 headers."
* commit '3b1b9f9ff6a2dc88ac0d78fd17f3b58448440357': Tweaked the cleanup scripts to handle uapi and aarch64 headers.
This commit is contained in:
commit
2e0b93b01f
@ -43,13 +43,24 @@ def cleanupFile( path, original_path):
|
|||||||
# and the corresponding list of known static functions
|
# and the corresponding list of known static functions
|
||||||
#
|
#
|
||||||
arch = None
|
arch = None
|
||||||
re_asm_arch = re.compile( r"asm-([\w\d_\+\.\-]+)(/.*)" )
|
|
||||||
m = re_asm_arch.match(src_path)
|
|
||||||
statics = kernel_known_generic_statics
|
statics = kernel_known_generic_statics
|
||||||
|
m = re.match(r"asm-([\w\d_\+\.\-]+)(/.*)", src_path)
|
||||||
if m and m.group(1) != 'generic':
|
if m and m.group(1) != 'generic':
|
||||||
dst_path = "arch-%s/asm/%s" % m.groups()
|
dst_path = "arch-%s/asm/%s" % m.groups()
|
||||||
arch = m.group(1)
|
arch = m.group(1)
|
||||||
statics = statics.union( kernel_known_statics.get( arch, set() ) )
|
statics = statics.union( kernel_known_statics.get( arch, set() ) )
|
||||||
|
else:
|
||||||
|
# process headers under the uapi directory
|
||||||
|
# note the "asm" level has been explicitly added in the original
|
||||||
|
# kernel header tree for architectural-dependent uapi headers
|
||||||
|
m_uapi = re.match(r"(uapi)/([\w\d_\+\.\-]+)(/.*)", src_path)
|
||||||
|
if m_uapi:
|
||||||
|
dst_path = src_path
|
||||||
|
m_uapi_arch = re.match(r"asm-([\w\d_\+\.\-]+)", m_uapi.group(2))
|
||||||
|
if m_uapi_arch and m_uapi_arch.group(1) != 'generic':
|
||||||
|
arch = m_uapi_arch.group(1)
|
||||||
|
statics = statics.union( kernel_known_statics.get( arch, set() ) )
|
||||||
|
# common headers (ie non-asm and non-uapi)
|
||||||
else:
|
else:
|
||||||
dst_path = "common/" + src_path
|
dst_path = "common/" + src_path
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ from utils import *
|
|||||||
|
|
||||||
# the list of supported architectures
|
# the list of supported architectures
|
||||||
#
|
#
|
||||||
kernel_archs = [ 'arm', 'mips', 'x86' ]
|
kernel_archs = [ 'aarch64', 'arm', 'mips', 'x86' ]
|
||||||
|
|
||||||
# the list of include directories that belong to the kernel
|
# the list of include directories that belong to the kernel
|
||||||
# tree. used when looking for sources...
|
# tree. used when looking for sources...
|
||||||
@ -44,12 +44,14 @@ kernel_remove_config_macros = True
|
|||||||
# maps an architecture to a set of default macros that would be provided by
|
# maps an architecture to a set of default macros that would be provided by
|
||||||
# toolchain preprocessor
|
# toolchain preprocessor
|
||||||
kernel_default_arch_macros = {
|
kernel_default_arch_macros = {
|
||||||
|
"aarch64": {},
|
||||||
"arm": {},
|
"arm": {},
|
||||||
"mips": {"CONFIG_32BIT":"1"},
|
"mips": {"CONFIG_32BIT":"1"},
|
||||||
"x86": {},
|
"x86": {},
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel_arch_token_replacements = {
|
kernel_arch_token_replacements = {
|
||||||
|
"aarch64": {},
|
||||||
"arm": {},
|
"arm": {},
|
||||||
"mips": {"off_t":"__kernel_off_t"},
|
"mips": {"off_t":"__kernel_off_t"},
|
||||||
"x86": {},
|
"x86": {},
|
||||||
@ -63,6 +65,11 @@ kernel_token_replacements = {
|
|||||||
# this is the set of known static inline functions that we want to keep
|
# this is the set of known static inline functions that we want to keep
|
||||||
# in the final ARM headers. this is only used to keep optimized byteswapping
|
# in the final ARM headers. this is only used to keep optimized byteswapping
|
||||||
# static functions and stuff like that.
|
# static functions and stuff like that.
|
||||||
|
kernel_known_aarch64_statics = set(
|
||||||
|
[
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
kernel_known_arm_statics = set(
|
kernel_known_arm_statics = set(
|
||||||
[ "___arch__swab32", # asm-arm/byteorder.h
|
[ "___arch__swab32", # asm-arm/byteorder.h
|
||||||
]
|
]
|
||||||
@ -92,6 +99,7 @@ kernel_known_generic_statics = set(
|
|||||||
# we want to keep in the final headers
|
# we want to keep in the final headers
|
||||||
#
|
#
|
||||||
kernel_known_statics = {
|
kernel_known_statics = {
|
||||||
|
"aarch64" : kernel_known_aarch64_statics,
|
||||||
"arm" : kernel_known_arm_statics,
|
"arm" : kernel_known_arm_statics,
|
||||||
"mips" : kernel_known_mips_statics,
|
"mips" : kernel_known_mips_statics,
|
||||||
"x86" : kernel_known_x86_statics,
|
"x86" : kernel_known_x86_statics,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user