* android-msm-wahoo-4.4-q-preview: soc: qcom: smem: Add secure device check for smem dump qcacld-3.0: Fix buffer overflow in htt_t2h_msg_handler_fast qcacld-3.0: Fix possible OOB in wma_unified_radio_tx_mem_free() diag: dci: Validate dci client entries prior read msm: camera_v2: handle the error value returned during get clock msm: kgsl: Fix race condition while making page as dirty lsm: check payload size validity before using it as array index qcacld-3.0: Remove off-by-one write condition in sch_beacon_process dsp: asm: validate payload size before access drivers: soc: qcom: Added check to avoid opening multiple instance drivers: soc: Synchronize apr callback and voice svc release UPSTREAM: binder: check for overflow when alloc for security context msm: adsprpc: use same CPU address during DMA allocation and free msm: ADSPRPC: Update correct VA to user space msm: kgsl: Prevent race condition when freeing memory Revert "msm: kgsl: Offload mementry destroy work to separate thread" arm64/config: integrate hang/locking/memory debug configs into memory debug icnss: Not capture msa dump for modem watchdog bite reset lib/bug.c: make panic_on_warn available for all architectures arm64/config: enable CONFIG_PANIC_ON_WARN_DEFAULT_ENABLE in debug build configs. arm64/config: support panic on warn by config misc: mnh-thermal: register a cooling device. arm64/configs: wahoo: Expand USB HID game controller support iommu: do not attempt reclaim on higher order allocs msm: adsprpc: allocate all remote memory in kernel net: ipc_router: Initialize the sockaddr in recvmsg() handler msm: asm: Remove redundant payload size check msm: asm: validate ADSP data size before access dts: taimen: lower fg-temp charging factor & comp on high temp battery: fix htc_battery_probe abort in charger mode subsystem_restart: Not capture ssrdump as detected specific pattern soc: qcom: glink: Return error in case of invalid input soc: qcom: Validate read and write index before calculating ptr dsp: q6voice: Check size of shared memory buffer before access msm: ice: check for crypto engine availability qseecom: fix kclient free issue in qseecom_remove dsp: codecs: fix range check for audio buffer copying fbdev/msm: sanitize debugfs inputs when reading mdp memory msm: jpegdma: Fix for ASAN issues in jpegdma module qdsp6v2: apr: check for packet size to header size comparison ARM: dts: msm: Untrusted pointer dereference msm: ipa: Fix to validate the buffer size msm: adsprpc: destroy mutex before file free i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA audio: remove static variable in capture copy qcacld-3.0: Return proper error on request id mapping failure qcacld-3.0: OOB read while processing extscan change results icnss: Add check on msa region input: misc: vl53L0 security vulnerability fix ANDROID: clang: upgrade wahoo to 9.0.3 touchscreen: synaptics_dsx: prevent NULL pointer dereference diag: block WDSP mask transmission mm: mm_event: remove get/put_online_cpus call iommu: dma-mapping-fast: Add a check for count in fast_smmu_alloc ion: fix a possible memory leak in ion_cma_allocate input: qpnp-power-on: correct Power-off reason of PMIC FAULT cases qcacld-3.0: Unset sme roaming in progress after roam synch complete qcacld-3.0: Fix use after free of pCurRoamProfile ANDROID: tracing: fix race condition reading saved tgids qcacld-3.0: Send frames with GCMP MIC LEN if encryption is GCMP BACKPORT: USB: dwc3-msm: Protect enabling phy irqs with mutex SSM: Remove support for SSM driver ANDROID: drop CONFIG_INPUT_KEYCHORD from all msm: msm_bus: Fix error handling in msm_bus_device_probe msm: msm_bus: Fix error handling in msm_bus_device_init BACKPORT: userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas diag: Prevent out of bound access while initializing msg mask diag: Update mask pointers after reallocation UPSTREAM: net: socket: set sock->sk to NULL after calling proto_ops::release() UPSTREAM: socket: close race condition between sock_close() and sockfs_setattr() arm64/configs: wahoo: simplify log buffer allocation kgsl: add GPU driver memory consumption in vmstat mm: add ION heap-pool allocation stat into vmstat BACKPORT: mm: add NR_ZSMALLOC to vmstat diag: Add missing protection while accessing session's info diag: Update mask buffer after reallocation diag: Fix diag msg mask buffer overflow issue diag: Fix possible usage of freed resource issue cpufreq: stats: optimize proc files msm: ipa3: Add mutex to prevent race condition lpm-levels: Remove kfree for memory allocated with devm_kzalloc msm: camera: cpp: Check for valid tx level wdsp: reset spi clk user if enable fails soc: qcom: Reorganize PIL code for reclaiming MSS mem during SSR qcacld-3.0: Update connect_timeout correctly in case of scan for ssid qcacld-3.0: Do not add MME for bcast non RMF action frames qcacld-3.0: Check channel_count in DCC_GET_STATS command qcacld-3.0: Fix possible integer underflow in cfg80211_rx_mgmt qcacld-3.0: check the data length when downloading firmware qcacld-3.0: Validate user input for null termination dm-bow: Add free list dm-bow: Do not block reads unnecessarily dm-bow: Fix crash in error handling ANDROID: sdcardfs: Add option to not link obb ANDROID: sdcardfs: Add sandbox ANDROID: sdcardfs: Add option to drop unused dentries ANDROID: sdcardfs: fix potential crash when reserved_mb is not zero ANDROID: sdcardfs: Don't d_drop in d_revalidate ANDROID: sdcardfs: Set s_root to NULL after putting ANDROID: sdcardfs: d_make_root calls iput ANDROID: sdcardfs: Check for private data earlier ANDROID: sdcardfs: Fix sdcardfs to stop creating cases-sensitive duplicate entries. ANDROID: sdcardfs: fix lock issue on 32 bit/SMP architectures ANDROID: sdcardfs: Set num in extension_details during make_item ANDROID: sdcardfs: Hold i_mutex for i_size_write ANDROID: sdcardfs: override credential for ioctl to lower fs ANDROID: sdcardfs: use mount_nodev and fix a issue in sdcardfs_kill_sb ANDROID: sdcardfs: remove dead function open_flags_to_access_mode() ANDROID: sdcardfs: d_splice_alias can return error values ANDROID: mnt: Propagate remount correctly arm64/config: wahoo: Set CONFIG_BLK_DEV_LOOP_MIN_COUNT to 16. qcacld-3.0: Possible OOB access in wlan_hdd_cfg80211_start_bss() qcacld-3.0: Fix possible integer overflow in lim qseecom: set rcv_req_flag to 0 when listener is just registered qseecom: do not wake up listener to receive request if it is not ready qseecom: check if listener is not ready to receive request qseecom: set listener id before sending registration scm_call qseecom: processing invalid listener request qseecom: change check_blocked flag to an u32 value qseecom: check if app is blocked when unloading app qseecom: abort all listener threads before listener unregistration mm: perproc-reclaim: do not discarding file-backed pages BACKPORT: mm: move lazily freed pages to inactive list mm: mm_event: remove unncessary comma of pgout Fix missing prebuilt kernels msm: mdss: Fix scalar LUT handling qcacld-3.0: Fix potential OOB read when check rx mgmt frames ANDROID: clang: upgrade wahoo to 8.0.9 msm: mdss: use uaccess routines to access user space buffers FROMLIST: BACKPORT: overlayfs: override_creds=off option bypass creator_cred build.config: factor out common stuff BACKPORT: mm/debug.c: provide useful debugging information for VM_BUG qcacld-3.0: Dont pass source argument as nla_data to nla_memcpy qcacld-3.0: Avoid possible overflow while parsing scan ie qcacld-3.0: Fix possible OOB access in lim_process_assoc_req_frame qcacld-3.0: Fix possible OOB in lim_chk_n_process_wpa_rsn_ie qcacld-3.0: Validate all channels for avoid_freq channel list qcacld-3.0: Fix the double free for the txrx stats req qcacld-3.0: Implement descriptor pool for fw stats cfg80211: Fix use after free when process wdev events qcacld-3.0: OOB access may occur due to total numChannels exceeds max value qcacld-3.0: Fix possible heap overflow in lim_update_ext_cap_ie qcacld-3.0: Fix possible OOB access in lim_process_disassoc_frame qcacmn: Fix possible OOB access while sending NAN msg to firmware qcacmn: Fix possible buffer overflow in send_stats_ext_req_cmd_tlv qcacmn: Fix Uninitialized byte sent to FW in wmi_unified_cmd_send USB: rndis: Honor dl_max_packet_size value sent by host Add build.config.lts mm: fix passing active page into shrink_page_list msm: camera: Fix arbitrary kernel write ion: ensure valid start address ion: ensure CMO target is valid mm: readahead back to 128KB FROMGIT: loop: drop caches if offset or block_size are changed UPSTREAM: loop: Add LOOP_SET_BLOCK_SIZE in compat ioctl BACKPORT: block/loop: set hw_sectors UPSTREAM: loop: add ioctl for changing logical block size arm64/config: wahoo: enable overlayfs misc: mnh: check device number when stopping mipi FROMGIT: dm: do not allow readahead to limit IO size UPSTREAM: readahead: stricter check for bdi io_pages UPSTREAM: mm: don't cap request size based on read-ahead setting dm-bow: Handle TRIM mode better Add header version and size Handle variable sector sizes Enable dm-bow for checkpointing for wahoo kenrel Port dm-bow to 4.4 [RFC] dm-bow working prototype wahoo_defconfig: enable CONFIG_MEMBARRIER thermal: create tz and cdev softlink in thermal class Release 5.2.1.1L qcacld-3.0: Enable SAE, OWE, GMAC qcacld-3.0: Enable SAE and GCMP by default qcacld-3.0: Changes to support DPP AKM qcacld-3.0: Reset rmfEnabled for STA VDEV during DEL BSS qcacld-3.0: Add suppport to forward GAS action frames to supplicant qcacld-3.0: Add support for GMAC offload qcacld-3.0: Trigger/handle SAE using cfg80211 qcacld-3.0: Add support for SAE PMK caching qcacld-3.0: Add changes to handle SAE status qcacld-3.0: Disable roaming for SAE qcacld-3.0: Add SAE auth timer qcacld-3.0: Add changes to send SAE auth frame to user space qcacld-3.0: Add changes for auth in send mgmt path qcacld-3.0: Add changes to trigger SAE in supplicant qcacld-3.0: Add SAE related ini and cap exchange changes qcacld-3.0: Add support for SAE AKM suites qcacld-3.0: Add support for SuiteB AKM suites qcacld-3.0: Add support for GMAC cipher suite qcacld-3.0: Add support for GMAC MIC validation qcacld-3.0: Disable roaming for OWE qcacld-3.0: Add support for OWE qcacld-3.0: Add OWE IEs qcacld-3.0: Always send assoc req/rsp qcacmn: Add support for GMAC MIC calculation cfg80211: indicate support for external authentication nl80211: Fix external_auth check for offloaded authentication nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT cfg80211/nl80211: Optional authentication offload to userspace cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT cfg80211: Updated nl80211_commands to be in sync with upstream mm: mm_event: comment about enum event type ordering mm: synchronize period update interval mm: mm_event supports vmstat power: qpnp-fg-gen3: fix soc not keeping full after charging overnight qcacld-3.0: Ignore special scan requests from CFG Revert "qcacld-3.0: Flush scan results on interface down" Revert "ANDROID: dm verity: add minimum prefetch size" qcacld-3.0: Forward NDP Indication event for NDP initiator reset/msm-poweroff: Fix to set reboot message pixel-2: enable CONFIG_PROCESS_RECLAIM mm: per-process reclaim Revert "mm: prevent to write out dirty page in CMA by may_writepage" Revert "mm: Per process reclaim" Revert "mm: make shrink_page_list with pages work from multiple zones" Revert "mm: Remove shrink_page" Revert "mm: Enhance per process reclaim to consider shared pages" Revert "mm: Support address range reclaim" Revert "mm: process reclaim: vmpressure based process reclaim" Revert "mm: process_reclaim: fix reclaim skip on low efficiency" Revert "mm: process_reclaim: do not iterate over stale task structs" Revert "mm: process_reclaim: use unbounded cpu workqueue" Make heap_name in ion trace points a copied char array BACKPORT: xfrm: Allow Output Mark to be Updated Using UPDSA ANDROID: clang: upgrade wahoo to 8.0.6 cpufreq: times: add text versions of uid concurrent_*_time files qcacld: Fix compiler warning in policy mgr Enable CONFIG_THERMAL_EMULATION qcacld-3.0: Send roam_scan_mode as 0 for RSO Stop during disconnect sched/debug: Don't dump sched debug info in SysRq-W thermal: Create softlink by name for thermal_zone and cooling device UPSTREAM: HID: sony: remove redundant check for -ve err UPSTREAM: HID: sony: Make sure to unregister sensors on failure UPSTREAM: HID: sony: Make DS4 bt poll interval adjustable UPSTREAM: HID: sony: Set proper bit flags on DS4 output report UPSTREAM: HID: sony: DS4 use brighter LED colors UPSTREAM: HID: sony: Improve navigation controller axis/button mapping UPSTREAM: HID: sony: Use DS3 MAC address as unique identifier on USB UPSTREAM: HID: sony: Perform duplicate device check earlier on UPSTREAM: HID: sony: Expose DS3 motion sensors through separate device UPSTREAM: HID: sony: Print error on failure to active DS3 / Navigation controllers UPSTREAM: HID: sony: DS3 comply to Linux gamepad spec UPSTREAM: HID: sony: Mark DS4 touchpad device as a pointer UPSTREAM: HID: sony: Support motion sensor calibration on dongle UPSTREAM: HID: sony: Make work handling more generic UPSTREAM: HID: sony: Treat the ds4 dongle as a separate device UPSTREAM: HID: sony: Remove report descriptor fixup for DS4 UPSTREAM: HID: sony: Report hardware timestamp for DS4 sensor values UPSTREAM: HID: sony: Calibrate DS4 motion sensors UPSTREAM: HID: sony: Report DS4 motion sensors through a separate device UPSTREAM: HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT UPSTREAM: HID: sony: Use LED_CORE_SUSPENDRESUME UPSTREAM: HID: sony: Ignore DS4 dongle reports when no device is connected UPSTREAM: HID: sony: Use DS4 MAC address as unique identifier on USB UPSTREAM: HID: sony: Fix error handling bug when touchpad registration fails UPSTREAM: HID: sony: Comply to Linux gamepad spec for DS4 UPSTREAM: HID: sony: Make the DS4 touchpad a separate device UPSTREAM: HID: sony: Fix memory issue when connecting device using both Bluetooth and USB UPSTREAM: HID: sony: Adjust value range for motion sensors UPSTREAM: HID: sony: Handle multiple touch events input record UPSTREAM: HID: sony: Send ds4 output reports on output end-point UPSTREAM: HID: sony: Perform CRC check on bluetooth input packets UPSTREAM: HID: sony: Adjust HID report size name definitions UPSTREAM: HID: sony: Fix race condition in sony_probe UPSTREAM: HID: sony: Update copyright and add Dualshock 4 rate control note UPSTREAM: HID: sony: Defer the initial USB Sixaxis output report UPSTREAM: HID: sony: Relax duplicate checking for USB-only devices UPSTREAM: HID: sony: underscores are unnecessary for u8, u16, s32 UPSTREAM: HID: sony: fix some warnings from scripts/checkpatch.pl UPSTREAM: HID: sony: fix errors from scripts/checkpatch.pl UPSTREAM: HID: sony: fix a typo in descriptors comments s/Joystik/Joystick/ UPSTREAM: HID: sony: Fixup output reports for the nyko core controller UPSTREAM: HID: sony: Remove the size check for the Dualshock 4 HID Descriptor UPSTREAM: HID: sony: Save and restore the controller state on suspend and resume UPSTREAM: HID: sony: Refactor the output report sending functions UPSTREAM: HID: sony: Support DS4 dongle UPSTREAM: HID: sony: Update device ids FROMLIST: ANDROID: binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl. FROMLIST: arm64: Build vDSO with -ffixed-x18 usb: typec: Set min voltage as well scsi/ufs: print UFS health info in kernel log ion: add heap size change tracepoints clang: upgrade from clang 7.0.2 to 8.0.3 mm: emit tracepoint when rss watermark is hit staging: bcm15602: Disable intentional panic by default arm64: untag user address in msm_cpp_copy_from_ioctl_ptr FROMLIST: selftests, arm64: add a selftest for passing tagged pointers to kernel FROMLIST: arm64: update Documentation/arm64/tagged-pointers.txt FROMLIST: fs, arm64: untag user address in copy_mount_options FROMLIST: lib, arm64: untag addrs passed to strncpy_from_user and strnlen_user FROMLIST: mm, arm64: untag user addresses in mm/gup.c FROMLIST: arm64: untag user addresses in access_ok and __uaccess_mask_ptr FROMLIST: uaccess: add untagged_addr definition for other arches FROMLIST: arm64: add type casts to untagged_addr macro UPSTREAM: arm64: Use pointer masking to limit uaccess speculation BACKPORT: arm64: barrier: Add CSDB macros to control data-value prediction UPSTREAM: arm64: uaccess: Formalise types for access_ok() BACKPORT: arm64: Make USER_DS an inclusive limit UPSTREAM: arm64: uaccess: Remove redundant __force from addr cast in __range_ok BACKPORT: arm64: move TASK_* definitions to <asm/processor.h> UPSTREAM: mm/gup.c: fix access_ok() argument type UPSTREAM: arm64: remove duplicate macro __KERNEL__ check UPSTREAM: arm64: print a fault message when attempting to write RO memory mm: enable MM_EVENT_STAT by default mm: mm_event: add read io stat mm: mm_event: add special kernel allocation stat mm: mm_event: add swapin stat mm: mm_event: add compaction stat mm: mm_event: add reclaim stat mm: mm_event: add page fault stat mm: mm_event: make capture period configurable mm: introduce per-process mm event tracking feature input: touchscreen: fix reported double free input: touchscreen: fix reported use after free usb: pd_engine: enable self powered device flag BACKPORT: usb: typec: tcpm: charge current handling for sink during hard BACKPORT: usb: typec: tcpm: Do not disconnect link for self powered devices Revert "Revert "arch/arm64/wahoo_defconfig: enable DEADLINE I/O scheduler"" lge_battery: set ibat default current max PREUPLOAD: Add checkpatch hook wahoo_defconfig: remove unused governors Revert "BACKPORT: kbuild: allow archs to select link dead code/data elimination" Revert "UPSTREAM: kbuild: -ffunction-sections fix for archs with conflicting sections" Revert "UPSTREAM: kbuild: keep data tables through dead code elimination" Revert "UPSTREAM: kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured" Revert "kbuild: add ld-name macro and support for ld.gold" Revert "kbuild: fix CONFIG_LD_DEAD_CODE_DATA_ELIMINATION with ld.gold" Revert "arm64: keep .altinstructions and .altinstr_replacement" Revert "arm64: replace the mrs_s/msr_s macros for C callers" Revert "add build system support for clang LTO" Revert "add support for CONFIG_DYNAMIC_FTRACE with clang LTO" Revert "mod/empty.o: disable LTO" Revert "arch/arm64/crypto: disable LTO for aes-ce-cipher.c" Revert "drivers/firmware/efi/libstub: disable LTO" Revert "add a workaround for ld.gold crash with ARM64_MODULE_PLTS" Revert "add build.config.clang.lto" Update prebuilts-master/clang/host/linux-x86 to newer revision BACKPORT: sched/sysctl: Fix attributes of some extern declarations bcm15602: Intentionally panic on Easel PMIC reset Revert "Revert "misc: mnh-pwr: Update link status first on emergency shutdown"" binder: Add instramentation to dump_ref_desc_tree() qcacld-3.0: Change random scan mac attributes to be optional Revert "misc: mnh-pwr: Update link status first on emergency shutdown" misc: mnh-pwr: Update link status first on emergency shutdown cpufreq_stats: Reset cpufreq_task_stats right after dup_task_struct tracing: do not leak kernel addresses fs/pstore/ramoops: Apply `decrypt_state' node sync for BootReceive Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
154 lines
5.3 KiB
Makefile
154 lines
5.3 KiB
Makefile
# ===========================================================================
|
|
# Module versions
|
|
# ===========================================================================
|
|
#
|
|
# Stage one of module building created the following:
|
|
# a) The individual .o files used for the module
|
|
# b) A <module>.o file which is the .o files above linked together
|
|
# c) A <module>.mod file in $(MODVERDIR)/, listing the name of the
|
|
# the preliminary <module>.o file, plus all .o files
|
|
|
|
# Stage 2 is handled by this file and does the following
|
|
# 1) Find all modules from the files listed in $(MODVERDIR)/
|
|
# 2) modpost is then used to
|
|
# 3) create one <module>.mod.c file pr. module
|
|
# 4) create one Module.symvers file with CRC for all exported symbols
|
|
# 5) compile all <module>.mod.c files
|
|
# 6) final link of the module to a <module.ko> file
|
|
|
|
# Step 3 is used to place certain information in the module's ELF
|
|
# section, including information such as:
|
|
# Version magic (see include/linux/vermagic.h for full details)
|
|
# - Kernel release
|
|
# - SMP is CONFIG_SMP
|
|
# - PREEMPT is CONFIG_PREEMPT
|
|
# - GCC Version
|
|
# Module info
|
|
# - Module version (MODULE_VERSION)
|
|
# - Module alias'es (MODULE_ALIAS)
|
|
# - Module license (MODULE_LICENSE)
|
|
# - See include/linux/module.h for more details
|
|
|
|
# Step 4 is solely used to allow module versioning in external modules,
|
|
# where the CRC of each module is retrieved from the Module.symvers file.
|
|
|
|
# KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined
|
|
# symbols in the final module linking stage
|
|
# KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
|
|
# This is solely useful to speed up test compiles
|
|
PHONY := _modpost
|
|
_modpost: __modpost
|
|
|
|
include include/config/auto.conf
|
|
include scripts/Kbuild.include
|
|
|
|
# When building external modules load the Kbuild file to retrieve EXTRA_SYMBOLS info
|
|
ifneq ($(KBUILD_EXTMOD),)
|
|
|
|
# set src + obj - they may be used when building the .mod.c file
|
|
obj := $(KBUILD_EXTMOD)
|
|
src := $(obj)
|
|
|
|
# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
|
|
include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
|
|
$(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
|
|
endif
|
|
|
|
include scripts/Makefile.lib
|
|
|
|
kernelsymfile := $(objtree)/Module.symvers
|
|
modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers
|
|
|
|
# Step 1), find all modules listed in $(MODVERDIR)/
|
|
MODLISTCMD := find $(MODVERDIR) -name '*.mod' | xargs -r grep -h '\.ko$$' | sort -u
|
|
__modules := $(shell $(MODLISTCMD))
|
|
modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
|
|
|
|
# Stop after building .o files if NOFINAL is set. Makes compile tests quicker
|
|
_modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules))
|
|
|
|
# Step 2), invoke modpost
|
|
# Includes step 3,4
|
|
modpost = scripts/mod/modpost \
|
|
$(if $(CONFIG_MODVERSIONS),-m) \
|
|
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
|
|
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
|
|
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
|
|
$(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \
|
|
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
|
|
$(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
|
|
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
|
|
$(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
|
|
|
|
MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS)))
|
|
|
|
# We can go over command line length here, so be careful.
|
|
quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
|
|
cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) $(MODPOST_OPT) -s -T -
|
|
|
|
PHONY += __modpost
|
|
__modpost: $(modules:.ko=.o) FORCE
|
|
$(call cmd,modpost) $(wildcard vmlinux)
|
|
|
|
quiet_cmd_kernel-mod = MODPOST $@
|
|
cmd_kernel-mod = $(modpost) $@
|
|
|
|
vmlinux.o: FORCE
|
|
$(call cmd,kernel-mod)
|
|
|
|
# Declare generated files as targets for modpost
|
|
$(symverfile): __modpost ;
|
|
$(modules:.ko=.mod.c): __modpost ;
|
|
|
|
|
|
# Step 5), compile all *.mod.c files
|
|
|
|
# modname is set to make c_flags define KBUILD_MODNAME
|
|
modname = $(notdir $(@:.mod.o=))
|
|
|
|
quiet_cmd_cc_o_c = CC $@
|
|
cmd_cc_o_c = $(CC) $(c_flags) $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE) \
|
|
-c -o $@ $<
|
|
|
|
$(modules:.ko=.mod.o): %.mod.o: %.mod.c FORCE
|
|
$(call if_changed_dep,cc_o_c)
|
|
|
|
targets += $(modules:.ko=.mod.o)
|
|
|
|
# Step 6), final link of the modules
|
|
quiet_cmd_ld_ko_o = LD [M] $@
|
|
cmd_ld_ko_o = $(LD) -r $(LDFLAGS) \
|
|
$(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
|
|
-o $@ $(filter-out FORCE,$^)
|
|
|
|
$(modules): %.ko :%.o %.mod.o FORCE
|
|
$(call if_changed,ld_ko_o)
|
|
|
|
targets += $(modules)
|
|
|
|
|
|
# Add FORCE to the prequisites of a target to force it to be always rebuilt.
|
|
# ---------------------------------------------------------------------------
|
|
|
|
PHONY += FORCE
|
|
|
|
FORCE:
|
|
|
|
# Read all saved command lines and dependencies for the $(targets) we
|
|
# may be building above, using $(if_changed{,_dep}). As an
|
|
# optimization, we don't need to read them if the target does not
|
|
# exist, we will rebuild anyway in that case.
|
|
|
|
targets := $(wildcard $(sort $(targets)))
|
|
cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
|
|
|
|
ifneq ($(cmd_files),)
|
|
include $(cmd_files)
|
|
endif
|
|
|
|
|
|
# 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.
|
|
|
|
.PHONY: $(PHONY)
|