diff options
Diffstat (limited to 'arch/x86/boot/Makefile')
-rw-r--r-- | arch/x86/boot/Makefile | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 57a29fecf6bb..fb737ce5888d 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -23,6 +23,7 @@ ROOT_DEV := CURRENT | |||
23 | SVGA_MODE := -DSVGA_MODE=NORMAL_VGA | 23 | SVGA_MODE := -DSVGA_MODE=NORMAL_VGA |
24 | 24 | ||
25 | targets := vmlinux.bin setup.bin setup.elf bzImage | 25 | targets := vmlinux.bin setup.bin setup.elf bzImage |
26 | targets += fdimage fdimage144 fdimage288 image.iso mtools.conf | ||
26 | subdir- := compressed | 27 | subdir- := compressed |
27 | 28 | ||
28 | setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o | 29 | setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o |
@@ -109,9 +110,11 @@ $(obj)/setup.bin: $(obj)/setup.elf FORCE | |||
109 | $(obj)/compressed/vmlinux: FORCE | 110 | $(obj)/compressed/vmlinux: FORCE |
110 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | 111 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ |
111 | 112 | ||
112 | # Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel | 113 | # Set this if you want to pass append arguments to the |
114 | # bzdisk/fdimage/isoimage kernel | ||
113 | FDARGS = | 115 | FDARGS = |
114 | # Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel | 116 | # Set this if you want an initrd included with the |
117 | # bzdisk/fdimage/isoimage kernel | ||
115 | FDINITRD = | 118 | FDINITRD = |
116 | 119 | ||
117 | image_cmdline = default linux $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,) | 120 | image_cmdline = default linux $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,) |
@@ -120,7 +123,7 @@ $(obj)/mtools.conf: $(src)/mtools.conf.in | |||
120 | sed -e 's|@OBJ@|$(obj)|g' < $< > $@ | 123 | sed -e 's|@OBJ@|$(obj)|g' < $< > $@ |
121 | 124 | ||
122 | # This requires write access to /dev/fd0 | 125 | # This requires write access to /dev/fd0 |
123 | zdisk: $(BOOTIMAGE) $(obj)/mtools.conf | 126 | bzdisk: $(obj)/bzImage $(obj)/mtools.conf |
124 | MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync | 127 | MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync |
125 | syslinux /dev/fd0 ; sync | 128 | syslinux /dev/fd0 ; sync |
126 | echo '$(image_cmdline)' | \ | 129 | echo '$(image_cmdline)' | \ |
@@ -128,10 +131,10 @@ zdisk: $(BOOTIMAGE) $(obj)/mtools.conf | |||
128 | if [ -f '$(FDINITRD)' ] ; then \ | 131 | if [ -f '$(FDINITRD)' ] ; then \ |
129 | MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' a:initrd.img ; \ | 132 | MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' a:initrd.img ; \ |
130 | fi | 133 | fi |
131 | MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux ; sync | 134 | MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage a:linux ; sync |
132 | 135 | ||
133 | # These require being root or having syslinux 2.02 or higher installed | 136 | # These require being root or having syslinux 2.02 or higher installed |
134 | fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf | 137 | fdimage fdimage144: $(obj)/bzImage $(obj)/mtools.conf |
135 | dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440 | 138 | dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440 |
136 | MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync | 139 | MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync |
137 | syslinux $(obj)/fdimage ; sync | 140 | syslinux $(obj)/fdimage ; sync |
@@ -140,9 +143,9 @@ fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf | |||
140 | if [ -f '$(FDINITRD)' ] ; then \ | 143 | if [ -f '$(FDINITRD)' ] ; then \ |
141 | MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' v:initrd.img ; \ | 144 | MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' v:initrd.img ; \ |
142 | fi | 145 | fi |
143 | MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux ; sync | 146 | MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage v:linux ; sync |
144 | 147 | ||
145 | fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf | 148 | fdimage288: $(obj)/bzImage $(obj)/mtools.conf |
146 | dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880 | 149 | dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880 |
147 | MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync | 150 | MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync |
148 | syslinux $(obj)/fdimage ; sync | 151 | syslinux $(obj)/fdimage ; sync |
@@ -151,9 +154,9 @@ fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf | |||
151 | if [ -f '$(FDINITRD)' ] ; then \ | 154 | if [ -f '$(FDINITRD)' ] ; then \ |
152 | MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' w:initrd.img ; \ | 155 | MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' w:initrd.img ; \ |
153 | fi | 156 | fi |
154 | MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux ; sync | 157 | MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage w:linux ; sync |
155 | 158 | ||
156 | isoimage: $(BOOTIMAGE) | 159 | isoimage: $(obj)/bzImage |
157 | -rm -rf $(obj)/isoimage | 160 | -rm -rf $(obj)/isoimage |
158 | mkdir $(obj)/isoimage | 161 | mkdir $(obj)/isoimage |
159 | for i in lib lib64 share end ; do \ | 162 | for i in lib lib64 share end ; do \ |
@@ -163,7 +166,7 @@ isoimage: $(BOOTIMAGE) | |||
163 | fi ; \ | 166 | fi ; \ |
164 | if [ $$i = end ] ; then exit 1 ; fi ; \ | 167 | if [ $$i = end ] ; then exit 1 ; fi ; \ |
165 | done | 168 | done |
166 | cp $(BOOTIMAGE) $(obj)/isoimage/linux | 169 | cp $(obj)/bzImage $(obj)/isoimage/linux |
167 | echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg | 170 | echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg |
168 | if [ -f '$(FDINITRD)' ] ; then \ | 171 | if [ -f '$(FDINITRD)' ] ; then \ |
169 | cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \ | 172 | cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \ |
@@ -174,12 +177,13 @@ isoimage: $(BOOTIMAGE) | |||
174 | isohybrid $(obj)/image.iso 2>/dev/null || true | 177 | isohybrid $(obj)/image.iso 2>/dev/null || true |
175 | rm -rf $(obj)/isoimage | 178 | rm -rf $(obj)/isoimage |
176 | 179 | ||
177 | zlilo: $(BOOTIMAGE) | 180 | bzlilo: $(obj)/bzImage |
178 | if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi | 181 | if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi |
179 | if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi | 182 | if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi |
180 | cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz | 183 | cat $(obj)/bzImage > $(INSTALL_PATH)/vmlinuz |
181 | cp System.map $(INSTALL_PATH)/ | 184 | cp System.map $(INSTALL_PATH)/ |
182 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi | 185 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi |
183 | 186 | ||
184 | install: | 187 | install: |
185 | sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" | 188 | sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(obj)/bzImage \ |
189 | System.map "$(INSTALL_PATH)" | ||