66# for more details.
77#
88# Copyright (C) 1994 by Linus Torvalds
9+ # Changed by many, many contributors over the years.
910#
1011
1112# ROOT_DEV specifies the default root-device when making the image.
1213# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
1314# the default of FLOPPY is used by 'build'.
1415
15- ROOT_DEV := CURRENT
16+ ROOT_DEV := CURRENT
1617
1718# If you want to preset the SVGA mode, uncomment the next line and
1819# set SVGA_MODE to whatever number you want.
1920# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
2021# The number is the same as you would ordinarily press at bootup.
2122
22- SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
23+ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
2324
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 setup.bin setup.elf zImage bzImage
25+ targets := vmlinux.bin setup.bin setup.elf bzImage
26+ targets += fdimage fdimage144 fdimage288 image.iso mtools.conf
2927subdir- := compressed
3028
3129setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
@@ -71,17 +69,13 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
7169KBUILD_CFLAGS += $(call cc-option,-m32)
7270KBUILD_AFLAGS := $(KBUILD_CFLAGS ) -D__ASSEMBLY__
7371
74- $(obj ) /zImage : asflags-y := $(SVGA_MODE ) $(RAMDISK )
75- $(obj ) /bzImage : ccflags-y := -D__BIG_KERNEL__
76- $(obj ) /bzImage : asflags-y := $(SVGA_MODE ) $(RAMDISK ) -D__BIG_KERNEL__
77- $(obj ) /bzImage : BUILDFLAGS := -b
72+ $(obj ) /bzImage : asflags-y := $(SVGA_MODE )
7873
7974quiet_cmd_image = BUILD $@
80- cmd_image = $(obj ) /tools/build $(BUILDFLAGS ) $(obj ) /setup .bin \
81- $( obj ) /vmlinux.bin $(ROOT_DEV ) > $@
75+ cmd_image = $(obj ) /tools/build $(obj ) /setup.bin $(obj ) /vmlinux .bin \
76+ $(ROOT_DEV ) > $@
8277
83- $(obj ) /zImage $(obj ) /bzImage : $(obj ) /setup.bin \
84- $(obj ) /vmlinux.bin $(obj ) /tools/build FORCE
78+ $(obj ) /bzImage : $(obj ) /setup.bin $(obj ) /vmlinux.bin $(obj ) /tools/build FORCE
8579 $(call if_changed,image)
8680 @echo ' Kernel: $@ is ready' ' (#' ` cat .version` ' )'
8781
@@ -116,9 +110,11 @@ $(obj)/setup.bin: $(obj)/setup.elf FORCE
116110$(obj ) /compressed/vmlinux : FORCE
117111 $(Q )$(MAKE ) $(build ) =$(obj ) /compressed $@
118112
119- # 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
120115FDARGS =
121- # 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
122118FDINITRD =
123119
124120image_cmdline = default linux $(FDARGS ) $(if $(FDINITRD ) ,initrd=initrd.img,)
@@ -127,18 +123,18 @@ $(obj)/mtools.conf: $(src)/mtools.conf.in
127123 sed -e ' s|@OBJ@|$(obj)|g' < $< > $@
128124
129125# This requires write access to /dev/fd0
130- zdisk : $(BOOTIMAGE ) $(obj ) /mtools.conf
126+ bzdisk : $(obj ) /bzImage $(obj ) /mtools.conf
131127 MTOOLSRC=$(obj ) /mtools.conf mformat a: ; sync
132128 syslinux /dev/fd0 ; sync
133129 echo ' $(image_cmdline)' | \
134130 MTOOLSRC=$(src ) /mtools.conf mcopy - a:syslinux.cfg
135131 if [ -f ' $(FDINITRD)' ] ; then \
136132 MTOOLSRC=$(obj ) /mtools.conf mcopy ' $(FDINITRD)' a:initrd.img ; \
137133 fi
138- MTOOLSRC=$(obj ) /mtools.conf mcopy $(BOOTIMAGE ) a:linux ; sync
134+ MTOOLSRC=$(obj ) /mtools.conf mcopy $(obj ) /bzImage a:linux ; sync
139135
140136# These require being root or having syslinux 2.02 or higher installed
141- fdimage fdimage144 : $(BOOTIMAGE ) $(obj ) /mtools.conf
137+ fdimage fdimage144 : $(obj ) /bzImage $(obj ) /mtools.conf
142138 dd if=/dev/zero of=$(obj ) /fdimage bs=1024 count=1440
143139 MTOOLSRC=$(obj ) /mtools.conf mformat v: ; sync
144140 syslinux $(obj ) /fdimage ; sync
@@ -147,9 +143,9 @@ fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf
147143 if [ -f ' $(FDINITRD)' ] ; then \
148144 MTOOLSRC=$(obj ) /mtools.conf mcopy ' $(FDINITRD)' v:initrd.img ; \
149145 fi
150- MTOOLSRC=$(obj ) /mtools.conf mcopy $(BOOTIMAGE ) v:linux ; sync
146+ MTOOLSRC=$(obj ) /mtools.conf mcopy $(obj ) /bzImage v:linux ; sync
151147
152- fdimage288 : $(BOOTIMAGE ) $(obj ) /mtools.conf
148+ fdimage288 : $(obj ) /bzImage $(obj ) /mtools.conf
153149 dd if=/dev/zero of=$(obj ) /fdimage bs=1024 count=2880
154150 MTOOLSRC=$(obj ) /mtools.conf mformat w: ; sync
155151 syslinux $(obj ) /fdimage ; sync
@@ -158,9 +154,9 @@ fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf
158154 if [ -f ' $(FDINITRD)' ] ; then \
159155 MTOOLSRC=$(obj ) /mtools.conf mcopy ' $(FDINITRD)' w:initrd.img ; \
160156 fi
161- MTOOLSRC=$(obj ) /mtools.conf mcopy $(BOOTIMAGE ) w:linux ; sync
157+ MTOOLSRC=$(obj ) /mtools.conf mcopy $(obj ) /bzImage w:linux ; sync
162158
163- isoimage : $(BOOTIMAGE )
159+ isoimage : $(obj ) /bzImage
164160 -rm -rf $(obj ) /isoimage
165161 mkdir $(obj ) /isoimage
166162 for i in lib lib64 share end ; do \
@@ -170,7 +166,7 @@ isoimage: $(BOOTIMAGE)
170166 fi ; \
171167 if [ $$ i = end ] ; then exit 1 ; fi ; \
172168 done
173- cp $(BOOTIMAGE ) $(obj ) /isoimage/linux
169+ cp $(obj ) /bzImage $(obj ) /isoimage/linux
174170 echo ' $(image_cmdline)' > $(obj ) /isoimage/isolinux.cfg
175171 if [ -f ' $(FDINITRD)' ] ; then \
176172 cp ' $(FDINITRD)' $(obj ) /isoimage/initrd.img ; \
@@ -181,12 +177,13 @@ isoimage: $(BOOTIMAGE)
181177 isohybrid $(obj ) /image.iso 2> /dev/null || true
182178 rm -rf $(obj ) /isoimage
183179
184- zlilo : $(BOOTIMAGE )
180+ bzlilo : $(obj ) /bzImage
185181 if [ -f $( INSTALL_PATH) /vmlinuz ]; then mv $( INSTALL_PATH) /vmlinuz $( INSTALL_PATH) /vmlinuz.old; fi
186182 if [ -f $( INSTALL_PATH) /System.map ]; then mv $( INSTALL_PATH) /System.map $( INSTALL_PATH) /System.old; fi
187- cat $(BOOTIMAGE ) > $(INSTALL_PATH ) /vmlinuz
183+ cat $(obj ) /bzImage > $(INSTALL_PATH ) /vmlinuz
188184 cp System.map $(INSTALL_PATH ) /
189185 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
190186
191187install :
192- 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) "
0 commit comments