2005-04-16 15:20:36 -07:00
|
|
|
#
|
|
|
|
# Makefile for the linux kernel.
|
|
|
|
#
|
|
|
|
|
kbuild: allow archs to select link dead code/data elimination
Introduce LD_DEAD_CODE_DATA_ELIMINATION option for architectures to
select to build with -ffunction-sections, -fdata-sections, and link
with --gc-sections. It requires some work (documented) to ensure all
unreferenced entrypoints are live, and requires toolchain and build
verification, so it is made a per-arch option for now.
On a random powerpc64le build, this yelds a significant size saving,
it boots and runs fine, but there is a lot I haven't tested as yet, so
these savings may be reduced if there are bugs in the link.
text data bss dec filename
11169741 1180744 1923176 14273661 vmlinux
10445269 1004127 1919707 13369103 vmlinux.dce
~700K text, ~170K data, 6% removed from kernel image size.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-08-24 05:29:20 -07:00
|
|
|
ccflags-y := -fno-function-sections -fno-data-sections
|
|
|
|
|
2007-02-10 01:44:43 -08:00
|
|
|
obj-y := main.o version.o mounts.o
|
|
|
|
obj-y += noinitramfs.o
|
|
|
|
obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o
|
2005-04-16 15:20:36 -07:00
|
|
|
obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
|
2012-05-03 02:03:02 -07:00
|
|
|
|
|
|
|
ifneq ($(CONFIG_ARCH_INIT_TASK),y)
|
|
|
|
obj-y += init_task.o
|
|
|
|
endif
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
mounts-y := do_mounts.o
|
|
|
|
mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o
|
|
|
|
mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o
|
|
|
|
mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o
|
CHROMIUM: dm: boot time specification of dm=
This is a wrap-up of three patches pending upstream approval.
I'm bundling them because they are interdependent, and it'll be
easier to drop it on rebase later.
1. dm: allow a dm-fs-style device to be shared via dm-ioctl
Integrates feedback from Alisdair, Mike, and Kiyoshi.
Two main changes occur here:
- One function is added which allows for a programmatically created
mapped device to be inserted into the dm-ioctl hash table. This binds
the device to a name and, optional, uuid which is needed by udev and
allows for userspace management of the mapped device.
- dm_table_complete() was extended to handle all of the final
functional changes required for the table to be operational once
called.
2. init: boot to device-mapper targets without an initr*
Add a dm= kernel parameter modeled after the md= parameter from
do_mounts_md. It allows for device-mapper targets to be configured at
boot time for use early in the boot process (as the root device or
otherwise). It also replaces /dev/XXX calls with major:minor opportunistically.
The format is dm="name uuid ro,table line 1,table line 2,...". The
parser expects the comma to be safe to use as a newline substitute but,
otherwise, uses the normal separator of space. Some attempt has been
made to make it forgiving of additional spaces (using skip_spaces()).
A mapped device created during boot will be assigned a minor of 0 and
may be access via /dev/dm-0.
An example dm-linear root with no uuid may look like:
root=/dev/dm-0 dm="lroot none ro, 0 4096 linear /dev/ubdb 0, 4096 4096 linear /dv/ubdc 0"
Once udev is started, /dev/dm-0 will become /dev/mapper/lroot.
Older upstream threads:
http://marc.info/?l=dm-devel&m=127429492521964&w=2
http://marc.info/?l=dm-devel&m=127429499422096&w=2
http://marc.info/?l=dm-devel&m=127429493922000&w=2
Latest upstream threads:
https://patchwork.kernel.org/patch/104859/
https://patchwork.kernel.org/patch/104860/
https://patchwork.kernel.org/patch/104861/
Bug: 27175947
Signed-off-by: Will Drewry <wad@chromium.org>
Review URL: http://codereview.chromium.org/2020011
Change-Id: I92bd53432a11241228d2e5ac89a3b20d19b05a31
2010-06-09 15:47:38 -07:00
|
|
|
mounts-$(CONFIG_BLK_DEV_DM) += do_mounts_dm.o
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
# dependencies on generated files need to be listed explicitly
|
2009-10-17 15:36:47 -07:00
|
|
|
$(obj)/version.o: include/generated/compile.h
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-01-10 05:45:28 -08:00
|
|
|
# compile.h changes depending on hostname, generation number, etc,
|
|
|
|
# so we regenerate it always.
|
|
|
|
# mkcompile_h will make sure to only update the
|
|
|
|
# actual file if its content has changed.
|
|
|
|
|
2008-02-11 05:26:26 -08:00
|
|
|
chk_compile.h = :
|
2008-02-07 21:05:52 -08:00
|
|
|
quiet_chk_compile.h = echo ' CHK $@'
|
|
|
|
silent_chk_compile.h = :
|
2009-10-17 15:36:47 -07:00
|
|
|
include/generated/compile.h: FORCE
|
2008-02-07 21:05:52 -08:00
|
|
|
@$($(quiet)chk_compile.h)
|
2007-01-10 05:45:28 -08:00
|
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
|
2007-10-14 13:21:35 -07:00
|
|
|
"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)"
|