Messages in this thread Patch in this message |  | | Date | Wed, 25 Sep 1996 00:09:55 +0200 | From | Hans Lermen <> | Subject | FIXED broken (b)zImage [ was: test version of 2.1.0 available ] |
| |
Hi Linus, me again,
On Tue, 24 Sep 1996, Hans Lermen wrote:
> el16:/usr/src/linux-pre-2.1.0-2/arch/i386/boot# ls -l bzImage > -rw-r--r-- 1 root root 5121 Sep 24 18:05 bzImage > ^^^^ > Which is also reflected by the kernel-size variable in the bootsector. > > 00001e0 0d 0a 4c 6f 61 64 69 6e 67 00 00 00 00 00 00 00 ..Loading....... > 00001f0 00 09 01 00 01 00 00 00 00 00 ff ff 02 08 55 aa ..............U. > ^^^^^ > == 0x10 paragraphs == 0x100 bytes !! > > Not the right kernelsize I guess. This _must_ bomb during boot. > I'll try to have a look at it, but sorry no promisses for this evening.
Ok, found it, in fact there are _two_ different odds:
1. My version of 'objdump' seems not to like the '-o 0xC0100000' ( have binutils 2.6.0.12, no problems compiling 2.0.21 ).
objdump -k -q -o 0xC0100000 compressed/bvmlinux > compressed/bvmlinux.out produces: -rwxr-xr-x 1 root root 15761 Sep 24 21:06 bvmlinux* -rw-r--r-- 1 root root 1 Sep 24 21:07 bvmlinux.out ^^^^^
I fixed this by disabling the use of 'encaps' ( 'objcopy' works ). Sure this is not the right solution, but it is a possible workaround. ( anyone of the binutils people listening ? )
2. When using bzImages, the uncompression loader should not be linked to 0xC0100000 but to 0x100000 (as in 2.0.x). So bzImages were broken. This I fixed by using BZIMAGE_OFFSET=0x100000 again.
With these fixes I finaly could compile and load (via Loadlin) the kernel. Further testing (sorry) wasn't impossible, because I need the AHA2940 driver :-( Anyway, the kernel is booting again.
I guess that those of us, who _succeeded_ booting 2.1.0, have been so lucky to a. having no broken objdump (or have no encaps) _and_ b. have been generated a zImage.
---------------------------------------------------------------------- --- /tmp/linux/arch/i386/Makefile Tue Sep 24 23:58:34 1996 +++ linux-pre-2.1.0-2/arch/i386/Makefile Tue Sep 24 23:19:16 1996 @@ -13,6 +13,9 @@ # Copyright (C) 1994 by Linus Torvalds # +# if having a broken objdump, uncomment the below +HAVE_BROKEN_OBJDUMP = 1 + AS86 =$(CROSS_COMPILE)as86 -0 -a AS386 =$(CROSS_COMPILE)as86 -3 LD86 =$(CROSS_COMPILE)ld86 -0 @@ -21,6 +24,10 @@ # ZIMAGE_OFFSET is the load offset of the compression loader # ZIMAGE_OFFSET=0x1000 +# +# BZIMAGE_OFFSET is the load offset of the high loaded compression loader +# +BZIMAGE_OFFSET=0x100000 # # IMAGE_OFFSET is the load offset of the _real_ kernel, soon @@ -35,12 +42,18 @@ CPP=$(CC) -E -D__ELF__ OBJDUMP=$(CROSS_COMPILE)objdump OBJDUMP_FLAGS=-k -q + +ifdef HAVE_BROKEN_OBJDUMP +ENCAPS=must_hide_encaps +else ENCAPS=$(CROSS_COMPILE)encaps +endif + OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -R .stab -R .stabstr ZLDFLAGS=-e startup_32 LDFLAGS=-e stext ZLINKFLAGS =-Ttext $(ZIMAGE_OFFSET) $(ZLDFLAGS) -BZLINKFLAGS =-Ttext $(IMAGE_OFFSET) $(ZLDFLAGS) +BZLINKFLAGS =-Ttext $(BZIMAGE_OFFSET) $(ZLDFLAGS) LINKFLAGS =-Ttext $(IMAGE_OFFSET) $(LDFLAGS) CFLAGS := $(CFLAGS) -pipe ----------------------------------------------------------------------
Hans <lermen@fgan.de>
|  |