Update of /cvsroot/linux-vax/kernel-2.4/arch/ppc/boot/prep
In directory sc8-pr-cvs1:/tmp/cvs-serv23180/arch/ppc/boot/prep
Modified Files:
Makefile misc.c
Log Message:
DA: sync to Marcelo 2.4.18 + remove init_mmap (no longer needed)
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/boot/prep/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile 10 Apr 2002 15:04:01 -0000 1.1
+++ Makefile 10 Jun 2003 01:46:01 -0000 1.2
@@ -1,4 +1,4 @@
-# BK Id: SCCS/s.Makefile 1.26 09/25/01 07:54:40 trini
+# BK Id: SCCS/s.Makefile 1.28 10/21/01 20:47:58 trini
#
# arch/ppc/boot/Makefile
#
@@ -45,6 +45,12 @@
-DZIMAGE_SIZE=0 -c -o $@ $*.c
zvmlinux.initrd: $(obj-y) $(LIBS) ../images/vmlinux.gz
+#
+# Recompile misc.oagain with more 'correct' bogus offsets
+#
+ $(CC) $(CFLAGS) -DINITRD_OFFSET=0x00138466 -DINITRD_SIZE=0x0000111a \
+ -DZIMAGE_OFFSET=0x0001b000 -DZIMAGE_SIZE=0x0011d460 \
+ -c -o misc.o misc.c
$(LD) $(ZLINKFLAGS) -o $@.tmp $(obj-y) $(LIBS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section=initrd=../images/ramdisk.image.gz \
@@ -60,7 +66,7 @@
--add-section=initrd=../images/ramdisk.image.gz \
--add-section=image=../images/vmlinux.gz \
$@.tmp $@
- rm -f $@.tmp zvmlinux
+ rm -f $@.tmp
zImage: zvmlinux $(MKPREP)
$(MKPREP) -pbp zvmlinux ../images/$@.prep
@@ -72,6 +78,12 @@
zvmlinux: $(obj-y) $(LIBS) ../images/vmlinux.gz
#
+# Recompile misc.oagain with more 'correct' bogus offsets
+#
+ $(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \
+ -DZIMAGE_OFFSET=0x0001b000 -DZIMAGE_SIZE=0x0011d460 \
+ -c -o misc.o misc.c
+#
# build the boot loader image and then compute the offset into it
# for the kernel image
#
@@ -88,7 +100,7 @@
$(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(obj-y) $(LIBS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section=image=../images/vmlinux.gz $@.tmp $@
- rm $@.tmp
+ rm -f $@.tmp
floppy: zImage
dd if=../images/zImage.prep of=/dev/fd0H1440 bs=64b
Index: misc.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/ppc/boot/prep/misc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- misc.c 10 Apr 2002 15:04:01 -0000 1.1
+++ misc.c 10 Jun 2003 01:46:01 -0000 1.2
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.misc.c 1.20 09/24/01 18:42:54 trini
+ * BK Id: SCCS/s.misc.c 1.22 10/15/01 17:46:21 trini
*
* arch/ppc/boot/prep/misc.c
*
@@ -48,14 +48,6 @@
RESIDUAL *hold_residual = &hold_resid_buf;
unsigned long initrd_start = 0, initrd_end = 0;
-/* These values must be variables. If not, the compiler optimizer
- * will remove some code, causing the size of the code to vary
- * when these values are zero. This is bad because we first
- * compile with these zero to determine the size and offsets
- * in an image, than compile again with these set to the proper
- * discovered value.
- */
-unsigned int initrd_offset, initrd_size;
char *zimage_start;
int zimage_size;
@@ -311,14 +303,12 @@
size of the elf header which we strip -- Cort */
zimage_start = (char *)(load_addr - 0x10000 + ZIMAGE_OFFSET);
zimage_size = ZIMAGE_SIZE;
- initrd_offset = INITRD_OFFSET;
- initrd_size = INITRD_SIZE;
- if ( initrd_offset )
- initrd_start = load_addr - 0x10000 + initrd_offset;
+ if ( INITRD_OFFSET )
+ initrd_start = load_addr - 0x10000 + INITRD_OFFSET;
else
initrd_start = 0;
- initrd_end = initrd_size + initrd_start;
+ initrd_end = INITRD_SIZE + initrd_start;
/*
* Find a place to stick the zimage and initrd and
@@ -343,9 +333,9 @@
puts(" "); puthex(initrd_end); puts("\n");
avail_ram = (char *)PAGE_ALIGN(
(unsigned long)zimage_size+(unsigned long)zimage_start);
- memcpy ((void *)avail_ram, (void *)initrd_start, initrd_size );
+ memcpy ((void *)avail_ram, (void *)initrd_start, INITRD_SIZE );
initrd_start = (unsigned long)avail_ram;
- initrd_end = initrd_start + initrd_size;
+ initrd_end = initrd_start + INITRD_SIZE;
puts("relocated to: "); puthex(initrd_start);
puts(" "); puthex(initrd_end); puts("\n");
}
@@ -395,7 +385,7 @@
puts("\n");
/* mappings on early boot can only handle 16M */
- if ( (int)(cmd_line[0]) > (16<<20))
+ if ( (int)(cmd_line) > (16<<20))
puts("cmd_line located > 16M\n");
if ( (int)hold_residual > (16<<20))
puts("hold_residual located > 16M\n");
|