On Tue, Dec 19, 2006 at 06:04:16PM +0900, Magnus Damm wrote:
>
> I think we should let people continue to use whatever method they've
> used so far and have an option to move over to relocatable kernels.
> This without breaking the existing vmlinux loading soltution.
>
Hi Magnus,
It turned out that changes are very small to support CONFIG_PHYSICAL_START.
Can you please check if attached patch works for you. I am also doing more
testing to make sure nothing else if broken.
Thanks
Vivek
Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]>
---
arch/i386/Kconfig | 31 +++++++++++++++++++++++++++++++
include/asm-i386/boot.h | 3 ++-
2 files changed, 33 insertions(+), 1 deletion(-)
diff -puN
arch/i386/boot/compressed/head.S~i386-restore-CONFIG_PHYSICAL_START-option
arch/i386/boot/compressed/head.S
diff -puN arch/i386/Kconfig~i386-restore-CONFIG_PHYSICAL_START-option
arch/i386/Kconfig
---
linux-2.6.19-rc1-reloc/arch/i386/Kconfig~i386-restore-CONFIG_PHYSICAL_START-option
2006-12-20 11:48:50.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/arch/i386/Kconfig 2006-12-20
12:02:45.000000000 +0530
@@ -777,6 +777,37 @@ config CRASH_DUMP
PHYSICAL_START.
For more details see Documentation/kdump/kdump.txt
+config PHYSICAL_START
+ hex "Physical address where the kernel is loaded" if (EMBEDDED ||
CRASH_DUMP)
+
+ default "0x1000000" if CRASH_DUMP
+ default "0x100000"
+ help
+ This gives the physical address where the kernel is loaded. Normally
+ for regular kernels this value is 0x100000 (1MB). But in the case
+ of kexec on panic the fail safe kernel needs to run at a different
+ address than the panic-ed kernel. This option is used to set the load
+ address for kernels used to capture crash dump on being kexec'ed
+ after panic. The default value for crash dump kernels is
+ 0x1000000 (16MB). This can also be set based on the "X" value as
+ specified in the "[EMAIL PROTECTED]" command line boot parameter
+ passed to the panic-ed kernel. Typically this parameter is set as
+ [EMAIL PROTECTED] Please take a look at
+ Documentation/kdump/kdump.txt for more details about crash dumps.
+
+ If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
+ bzImage will decompress itself to above physical address and
+ run from there. Otherwise, bzImage will run from its load address
+ and will ignore above physical address.
+
+ In normal kdump cases one does not have to set/change this option
+ as bzImage can be used to load and run from a different address.
+ This option is mainly useful for the folks who don't want to use
+ a bzImage and want to use a vmlinux which has been compiled for
+ a non-1MB address.
+
+ Don't change this unless you know what you are doing.
+
config RELOCATABLE
bool "Build a relocatable kernel(EXPERIMENTAL)"
depends on EXPERIMENTAL
diff -puN
arch/i386/kernel/vmlinux.lds.S~i386-restore-CONFIG_PHYSICAL_START-option
arch/i386/kernel/vmlinux.lds.S
diff -puN include/asm-i386/boot.h~i386-restore-CONFIG_PHYSICAL_START-option
include/asm-i386/boot.h
---
linux-2.6.19-rc1-reloc/include/asm-i386/boot.h~i386-restore-CONFIG_PHYSICAL_START-option
2006-12-20 12:11:17.000000000 +0530
+++ linux-2.6.19-rc1-reloc-root/include/asm-i386/boot.h 2006-12-20
12:12:50.000000000 +0530
@@ -13,7 +13,8 @@
#define ASK_VGA 0xfffd /* ask for it at bootup */
/* Physical address where kenrel should be loaded. */
-#define LOAD_PHYSICAL_ADDR ((0x100000 + CONFIG_PHYSICAL_ALIGN - 1) \
+#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
+ + (CONFIG_PHYSICAL_ALIGN - 1)) \
& ~(CONFIG_PHYSICAL_ALIGN - 1))
#endif /* _LINUX_BOOT_H */
_
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot