Hi again Vivek!

On 12/20/06, Vivek Goyal <[EMAIL PROTECTED]> wrote:
> I think you are the only user. Why can't you load bzImage for second kernel?

Well, I can and I do. =) But I test both i386 and x86_64 (and soon
ia64) so it is much easier to use the same format for all
architectures if possible. I think it is ok to eventually drop
CONFIG_PHYS_START, but now is not the time IMO.

> I think one of the reasons it was removed because it conflicted with the
> relocatable kernel. For example, if somebody compiles the kernel for 4MB
> physical location, and grub loads the kernel at 1MB. Then what do we do?
> Run the kernel from 1MB location or decompress the kernel to 4MB and run
> from there?
>
> If we decompress to 4MB and run from there then the whole purpose of
> relocatable kernel is lost. Because relocatable kernel means that it runs
> from the location where it has been loaded at.
>
> If we don't run from 4MB, then CONFIG_PHYSICAL_START has kind of lost
> its significance and is meaningful only for vmlinux.

Hm, I've never thought about how bzImage and CONFIG_PHYSICAL_START
work together - I've always assumed that kdumping only worked with
vmlinux because of the ELF format. And I've never booted the kdump
kernel as bzImage. =)

But these questions are not new, are they? I guess that we must run
the kernel at the same physical address as CONFIG_PHYSICAL_START if
not CONFIG_RELOCATABLE. And it is up to the bzImage code to make that
happen. Shouldn't just the code behave like it did in previous kernels
whatever that was?

> I agree that we should not be breaking things. Let me look into it
> deeper and let me see if I can write a clean patch without making the
> logic too obscure. I think we can adopt following policy.
>
> #ifndef CONFIG_RELOCATABLE
>         Decompress the kernel to CONFIG_PHYSICAL_START location and run
>         from there. Make sure CONFIG_PHYSICAL_START meets the alignment
>         restriction imposed by CONFIG_PHYSICAL_ALIGN.
> #else
>         Run the bzImage from where it has been loaded and perform the
>         relocations. Align it according to CONFIG_PHYSICAL_ALIGN values.
> #endif

Great! Sounds exactly what I expected!

If we had a wiki I would copy and paste now. =)

Thanks for help!

/ magnus
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to