[U-Boot-Users] Re: The i386 patch

Daniel Engström daniel at omicron.se
Mon Nov 18 11:31:39 CET 2002


Wolfgang,

On 2002.11.18 01:15 Wolfgang Denk wrote:
> Comments on specific parts of the patch:
> 
> common/cmd_bootm.c:
> 
>         x86 should _not_ need any special code here. Do you think  it
>         is  possible to add support for "standard" mkimage format and
>         get rid of your new #ifdef's?
The "standard" mkimage format IS supported, this code add support for Linux
images without the mkimage header as well.
If you do not need any of the features in the image header the header it 
slef is just
an extra source of problems, for example the load address is bogus for 
i386 I would like
to have an option to ignore it completly for Linux image and always load 
at a safe place.
This is currently what happens if you boot a kernel with out the image 
header.
Or better yet not load the kernel at all if the kernel resides in flash,
just give do_bootm_linux() a pointer to where the kernel is located.

Right now do_bootm() loads the kernel from flash and do_bootm_linux() 
moves it to the correct
location.

The fisrt part, setup should be loaded at 0x90000 (size may vary between 
2.5k and 32k), the rest of the kernel should be loaded at 0x10000 if it is 
a zImage or 0x100000 if it
is a bzImage.

0xa0000-0xfffff is ROM and memory mapped I/O area, so loading the entire 
thing at
0x90000 will fail as well.

  
> 	Added with minor modifications:
> 
> 	@@ -145,10 +163,11 @@
> 			SHOW_BOOT_PROGRESS (-2);
> 			return 1;
> 		}
> 	+       hdr->ih_hcrc = htonl(checksum);
> 		SHOW_BOOT_PROGRESS (3);
> 
> 	I don't understand why this could be needed; omitted.
OK, I saw that it was referenced below in the function, but it seems to be 
when
the ramdisk-image gets loaded, so that would be another header. 
> common/cmd_ide.c:
> 	+#ifdef __PPC__
> 	Are you sure this is PPC only?
No, I thought that ide was only used by ppc before, but I se now that IDE 
is used
by the ARM as well.
Should perhaps be #ifdef __BIG_ENDIAN ?

> 
> ppcboot/examples/syscall.S:
> 
> 	Are you sure there is only a "ret" needed?
Its a place holder, syscalls are not functional yet.
I think it will be a problem that printf is defined as a
syscall because it is a variable argument list function.

How do I know how much of the stack to copy when I enter
the firmware?

   /Daniel
  




More information about the U-Boot mailing list