diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/i386/boot/Makefile |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/i386/boot/Makefile')
-rw-r--r-- | arch/i386/boot/Makefile | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile new file mode 100644 index 000000000000..aa7064a75ee6 --- /dev/null +++ b/arch/i386/boot/Makefile | |||
@@ -0,0 +1,104 @@ | |||
1 | # | ||
2 | # arch/i386/boot/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | ||
5 | # License. See the file "COPYING" in the main directory of this archive | ||
6 | # for more details. | ||
7 | # | ||
8 | # Copyright (C) 1994 by Linus Torvalds | ||
9 | # | ||
10 | |||
11 | # ROOT_DEV specifies the default root-device when making the image. | ||
12 | # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case | ||
13 | # the default of FLOPPY is used by 'build'. | ||
14 | |||
15 | ROOT_DEV := CURRENT | ||
16 | |||
17 | # If you want to preset the SVGA mode, uncomment the next line and | ||
18 | # set SVGA_MODE to whatever number you want. | ||
19 | # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode. | ||
20 | # The number is the same as you would ordinarily press at bootup. | ||
21 | |||
22 | SVGA_MODE := -DSVGA_MODE=NORMAL_VGA | ||
23 | |||
24 | # If you want the RAM disk device, define this to be the size in blocks. | ||
25 | |||
26 | #RAMDISK := -DRAMDISK=512 | ||
27 | |||
28 | targets := vmlinux.bin bootsect bootsect.o setup setup.o \ | ||
29 | zImage bzImage | ||
30 | subdir- := compressed | ||
31 | |||
32 | hostprogs-y := tools/build | ||
33 | |||
34 | HOSTCFLAGS_build.o := $(LINUXINCLUDE) | ||
35 | |||
36 | # --------------------------------------------------------------------------- | ||
37 | |||
38 | $(obj)/zImage: IMAGE_OFFSET := 0x1000 | ||
39 | $(obj)/zImage: EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK) | ||
40 | $(obj)/bzImage: IMAGE_OFFSET := 0x100000 | ||
41 | $(obj)/bzImage: EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__ | ||
42 | $(obj)/bzImage: BUILDFLAGS := -b | ||
43 | |||
44 | quiet_cmd_image = BUILD $@ | ||
45 | cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \ | ||
46 | $(obj)/vmlinux.bin $(ROOT_DEV) > $@ | ||
47 | |||
48 | $(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \ | ||
49 | $(obj)/vmlinux.bin $(obj)/tools/build FORCE | ||
50 | $(call if_changed,image) | ||
51 | @echo 'Kernel: $@ is ready' | ||
52 | |||
53 | $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE | ||
54 | $(call if_changed,objcopy) | ||
55 | |||
56 | LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary | ||
57 | LDFLAGS_setup := -Ttext 0x0 -s --oformat binary -e begtext | ||
58 | |||
59 | $(obj)/setup $(obj)/bootsect: %: %.o FORCE | ||
60 | $(call if_changed,ld) | ||
61 | |||
62 | $(obj)/compressed/vmlinux: FORCE | ||
63 | $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@ | ||
64 | |||
65 | # Set this if you want to pass append arguments to the zdisk/fdimage kernel | ||
66 | FDARGS = | ||
67 | |||
68 | $(obj)/mtools.conf: $(src)/mtools.conf.in | ||
69 | sed -e 's|@OBJ@|$(obj)|g' < $< > $@ | ||
70 | |||
71 | # This requires write access to /dev/fd0 | ||
72 | zdisk: $(BOOTIMAGE) $(obj)/mtools.conf | ||
73 | MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync | ||
74 | syslinux /dev/fd0 ; sync | ||
75 | echo 'default linux $(FDARGS)' | \ | ||
76 | MTOOLSRC=$(src)/mtools.conf mcopy - a:syslinux.cfg | ||
77 | MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux ; sync | ||
78 | |||
79 | # These require being root or having syslinux 2.02 or higher installed | ||
80 | fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf | ||
81 | dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440 | ||
82 | MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync | ||
83 | syslinux $(obj)/fdimage ; sync | ||
84 | echo 'default linux $(FDARGS)' | \ | ||
85 | MTOOLSRC=$(obj)/mtools.conf mcopy - v:syslinux.cfg | ||
86 | MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux ; sync | ||
87 | |||
88 | fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf | ||
89 | dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880 | ||
90 | MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync | ||
91 | syslinux $(obj)/fdimage ; sync | ||
92 | echo 'default linux $(FDARGS)' | \ | ||
93 | MTOOLSRC=$(obj)/mtools.conf mcopy - w:syslinux.cfg | ||
94 | MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux ; sync | ||
95 | |||
96 | zlilo: $(BOOTIMAGE) | ||
97 | if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi | ||
98 | if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi | ||
99 | cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz | ||
100 | cp System.map $(INSTALL_PATH)/ | ||
101 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi | ||
102 | |||
103 | install: $(BOOTIMAGE) | ||
104 | sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" | ||