This elf file is position-independent and can be loaded to any location. We can
add a simple script to handle it.
1. Convert vmlinux to binary by objcopy, the binary file name is flat_file
2. Write a simple assembly file (tmp.S), convert binary to object, the file
name is obj_file
```
.section .text
.globl _start
_start:
.incbin "flat_file"
```
command: as tmp.S -o obj_file
3. Relink. Linker script like this(tmp.ld):
```
ENTRY(_start)
SECTIONS {
. = target_address;
.text : { *(.text) }
}
```
command: ld -T tmp.ld obj_file
在2018年09月25 20时51分, "Philipp Hug"<[email protected]>写道:
Am Di., 25. Sep. 2018 um 13:50 Uhr schrieb Jonathan Neuschäfer
<[email protected]>:
Would FIT support require discussion/cooperation with other projects
like Linux or u-boot?
What seems to be missing is the kernel image format to be used within the FIT.
e.g. look at arm64:
https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/head.S#L73
https://github.com/coreboot/coreboot/blob/master/src/arch/arm64/fit_payload.c#L29
Philipp
--
coreboot mailing list: [email protected]
https://mail.coreboot.org/mailman/listinfo/coreboot