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