Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1#
2# This file is subject to the terms and conditions of the GNU General Public
3# License. See the file "COPYING" in the main directory of this archive
4# for more details.
5#
6
7GZIP = gzip
8GZIP_FLAGS = -v9fc
9
10ifeq ($(BIG_ENDIAN),1)
11OBJCOPY_ARGS := -O elf32-xtensa-be
12else
13OBJCOPY_ARGS := -O elf32-xtensa-le
14endif
15
16export OBJCOPY_ARGS
17export CPPFLAGS_boot.lds += -P -C
18
19boot-y := bootstrap.o
20
21OBJS := $(addprefix $(obj)/,$(boot-y))
22
23Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
24 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
25 vmlinux vmlinux.tmp
26 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
27 --add-section image=vmlinux.tmp \
28 --set-section-flags image=contents,alloc,load,load,data \
29 $(OBJS) $@.tmp
30 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
31 -T arch/$(ARCH)/boot/boot-elf/boot.lds \
32 -o arch/$(ARCH)/boot/$@.elf $@.tmp
33 rm -f $@.tmp vmlinux.tmp
34
35Image.initrd: vmlinux $(OBJS)
36 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
37 --add-section .initrd=arch/$(ARCH)/boot/ramdisk \
38 --set-section-flags .initrd=contents,alloc,load,load,data \
39 vmlinux vmlinux.tmp
40 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
41 --add-section image=vmlinux.tmp \
42 --set-section-flags image=contents,alloc,load,load,data \
43 $(OBJS) $@.tmp
44 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
45 -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \
46 -o arch/$(ARCH)/boot/$@.elf $@.tmp
47 rm -f $@.tmp vmlinux.tmp
48
49
50zImage: Image
51
52zImage.initrd: Image.initrd
53