[coreboot] Loading Linux payloads on RISC-V
王翔
wxjstz at 126.com
Wed Sep 26 07:28:33 CEST 2018
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"<philipp at hug.cx>写道:
Am Di., 25. Sep. 2018 um 13:50 Uhr schrieb Jonathan Neuschäfer <j.neuschaefer at gmx.net>:
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180926/b9fe5b8e/attachment.html>
More information about the coreboot
mailing list