patch-2.1.16 linux/arch/ppc/boot/Makefile

Next file: linux/arch/ppc/boot/compressed/Makefile
Previous file: linux/arch/ppc/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.15/linux/arch/ppc/boot/Makefile linux/arch/ppc/boot/Makefile
@@ -20,30 +20,61 @@
 .S.o:
 	$(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
 
-OBJECTS = head.o main.o
 
-all:	linux.boot mkboot
+ZLINKFLAGS = -T ../ld.script -Ttext 0x00800000
+GZIP_FLAGS = -9
 
-linux.boot: $(TOPDIR)/vmlinux mkboot
-	rsh charon /bin/rm -f /usr/tftpboot/vmlinux
-	/bin/rm -f /usr/tftpboot/vmlinux
-	./mkboot $(TOPDIR)/vmlinux /usr/tftpboot/vmlinux
-	rcp /usr/tftpboot/vmlinux charon:/usr/tftpboot/vmlinux
-	sync
-
-tImage: mk_type41 $(TOPDIR)/vmlinux mkboot
-	./mkboot $(TOPDIR)/vmlinux vmlinux 
-	mk_type41 vmlinux tImage
-	rm vmlinux
+SYSTEM = $(TOPDIR)/vmlinux
+
+OBJECTS = head.o inflate.o unzip.o misc.o vreset.o
+
+CFLAGS = -O2 -DSTDC_HEADERS -I$(TOPDIR)/include
+
+all:	$(TOPDIR)/zImage
 
 mkboot : cortstrip.c
-	$(HOSTCC) -o mkboot cortstrip.c
+	$(HOSTCC) $(CFLAGSINC) -Wl,-static -o mkboot cortstrip.c
 
 mk_type41: mk_type41.c
-	gcc -o mk_type41 mk_type41.c
+	$(HOSTCC) $(CFLAGSINC) -Wl,-static -o mk_type41 mk_type41.c
+
+floppy: zImage $(TOPDIR)/vmlinux
+	dd if=$(TOPDIR)/zImage of=/dev/fd0H1440 bs=64b
+
+netboot : $(TOPDIR)/vmlinux mkboot
+	mkboot $(TOPDIR)/vmlinux $(TOPDIR)/netboot
+#	rcp $(TOPDIR)/netboot charon:/usr/tftpboot/vmlinux
+
+znetboot : mkboot zvmlinux
+	mkboot zvmlinux $(TOPDIR)/znetboot
+	rcp $(TOPDIR)/znetboot charon:/usr/tftpboot/vmlinux
+
+zImage: mk_type41 zvmlinux
+# make znetboot ourselves since using the normal dep
+# will rcp it -- Cort
+	mkboot zvmlinux $(TOPDIR)/znetboot
+	mk_type41 $(TOPDIR)/znetboot $(TOPDIR)/zImage
+
+install: zImage
+	dd if=$(TOPDIR)/zImage of=/dev/sda4
+	ln -s /dev/sda4 $(INSTALL_PATH)/vmlinuz
+	cp $(TOPDIR)/System.map $(INSTALL_PATH)/	
+
+zvmlinux: $(OBJECTS) $(SYSTEM) piggyback netboot $(TOPDIR)/vmlinux
+	gzip ${GZIP_FLAGS} <$(TOPDIR)/netboot | ./piggyback | $(AS) -o piggy.o
+	$(LD) $(ZLINKFLAGS) -o zvmlinux $(OBJECTS) piggy.o
+	rm -f piggy.o xx_boot
+
+head.o:	head.s
+
+head.s: head.S $(TOPDIR)/include/linux/tasks.h
+	$(CPP) -traditional head.S -o head.s
+
+piggyback: piggyback.c
+	$(HOSTCC) $(CFLAGS) -o piggyback piggyback.c
 
 clean:
-	rsh charon /bin/rm -f /usr/tftpboot/vmlinux
-	/bin/rm -f /usr/tftpboot/vmlinux
+	rm -f piggyback zvmlinux mk_type41 mkprep mkboot
+	rm -f $(TOPDIR)/{zImage,znetboot,netboot}
 
 dep:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov