diff --git a/Kconfig b/Kconfig index abaaa8c5fe..4783a50185 100644 --- a/Kconfig +++ b/Kconfig @@ -53,25 +53,6 @@ config LOCALVERSION help Append an extra string to the end of the LinuxBIOS version. -config NOELF - bool "Don't use ELF for payloads" - depends EXPERT - default n - help - Until now, LinuxBIOS has used elf for the payload. There are many problems - this, not least being the inefficiency -- the ELF has to be decompressed to - memory and then the segments have to be copied. Plus, lar can't see the segments - in the elf -- to see all segments, you have to extract the elf and run readelf on it. - There are problems with collisions of the decompressed ELF location in memory - and the segment locations in memory. - Finally, validation of the ELF is done at run time, once you have flashed the - FLASH and rebooted the machine. Boot time is really not the time you want to find - out your ELF payload is broken. - With this option, LinuxBIOS will direct lar to break each elf segment into a LAR - entry. ELF will not be used at all. Note that (for now) LinuxBIOS is backward - compatible -- if you put an ELF payload in, LinuxBIOS can still parse it. We hope - to remove ELF entirely in the future. - config BEEPS bool "Enable beeps upon certain LinuxBIOS events" depends EXPERT @@ -113,6 +94,25 @@ choice prompt "Payload type" default PAYLOAD_NONE +config PAYLOAD_PREPARSE_ELF + bool "Pre-parse ELF file and convert ELF segments to LAR entries" + depends EXPERT + default n + help + Until now, LinuxBIOS has used elf for the payload. There are many problems + this, not least being the inefficiency -- the ELF has to be decompressed to + memory and then the segments have to be copied. Plus, lar can't see the segments + in the elf -- to see all segments, you have to extract the elf and run readelf on it. + There are problems with collisions of the decompressed ELF location in memory + and the segment locations in memory. + Finally, validation of the ELF is done at run time, once you have flashed the + FLASH and rebooted the machine. Boot time is really not the time you want to find + out your ELF payload is broken. + With this option, LinuxBIOS will direct lar to break each elf segment into a LAR + entry. ELF will not be used at all. Note that (for now) LinuxBIOS is backward + compatible -- if you put an ELF payload in, LinuxBIOS can still parse it. We hope + to remove ELF entirely in the future. + config PAYLOAD_ELF bool "An ELF executable payload file" help @@ -137,7 +137,7 @@ endchoice config PAYLOAD_FILE string "Payload path and filename" - depends PAYLOAD_ELF + depends PAYLOAD_ELF || PAYLOAD_PREPARSE_ELF default "payload.elf" help The path and filename of the ELF executable file to use as payload. diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 6b4dcd1d2d..f8783a19e4 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -122,7 +122,7 @@ else endif endif -ifeq ($(CONFIG_NOELF), y) +ifeq ($(CONFIG_PAYLOAD_PREPARSE_ELF), y) PARSEELF = -e else PARSEELF =