User's Manual

8
‘CONFIG_PLATFORM_I386_PC’isselectedbydefault.
We can select an existing entry or add a new entry for your target platform. For
example,toaddandselectanewentry,‘CONFIG_PLATFORM_NEW’:
CONFIG_PLATFORM_I386_PC=n
CONFIG_PLATFORM_NEW=y
Second,you shouldcreateand/or modifythe corresponding entryinside platform
setting section. For example, adding the following entry in platform setting section for
‘CONFIG_PLATFORM_NEW’wejustadd:
ifeq($(CONFIG_PLATFORM_NEW),y)
EXTRA_CFLAGS+=‐DCONFIG_LITTLE_ENDIAN
ARCH:=arm
CROSS_COMPILE:=/opt/new/toolchain/armeabi4.4.3/bin/armeabi‐
KSRC:=/opt/new/kernel
endif
2.4.2.PlatformSettingSectioninDetail
EXTRA_CFLAGS
TheEXTRA_CFLAGSisusually
usedtocarrysomeadditionalsettings
atcompilationtimethroughmacro
definitions.Macro
Effect
CONFIG_BIG_ENDIAN Definesomeinternaldatastructureasbig
endian.
CONFIG_LITTLE_ENDIAN Definesomeinternaldatastructureaslittle
endian.
CONFIG_MINIMAL_MEMORY_USAGE Forbetterperformanceinpowerfulplatform,
weallocatelargephysicalcontinuousmemory
asTX/RXIObuffers.Insome
embeddedplatform,thereischancetofailto
allocatememory.Definethis
macrotoprevent
thissituation.
CONFIG_PLATFORM_ANDROID OlderAndroidkerneldonothas
CONFIG_ANDROIDdefined.Definethismacro
toforcetheAndroidcorrespondingcodeinside
ourdrivertobecompiled.Fornewer
Androidkernel,ithasnoneedtodefinethis
macro,otherwise,warningmessageabout
redefinitionwillshowup