diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-20 12:28:30 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-20 12:37:55 +0200 |
| commit | dc2e2cc9dc9d7790e23dd9a4ccc265d7bb6d76aa (patch) | |
| tree | ee12863bb4aab536810bbe13638bf21317b37658 /arch/riscv/conf | |
| parent | 98255910aa82c27d04ba79704086eca2310b3075 (diff) | |
| download | kmi-dc2e2cc9dc9d7790e23dd9a4ccc265d7bb6d76aa.tar.gz kmi-dc2e2cc9dc9d7790e23dd9a4ccc265d7bb6d76aa.zip | |
Added init back
Diffstat (limited to 'arch/riscv/conf')
| -rw-r--r-- | arch/riscv/conf/apos.its | 4 | ||||
| -rwxr-xr-x | arch/riscv/conf/init | bin | 0 -> 1032 bytes | |||
| -rw-r--r-- | arch/riscv/conf/init-link.S | 30 | ||||
| -rw-r--r-- | arch/riscv/conf/initrd | bin | 0 -> 1536 bytes | |||
| -rw-r--r-- | arch/riscv/conf/initrd.txt | 1 | ||||
| -rw-r--r-- | arch/riscv/conf/kernel-link.S | 4 | ||||
| -rw-r--r-- | arch/riscv/conf/s.S | 4 |
7 files changed, 38 insertions, 5 deletions
diff --git a/arch/riscv/conf/apos.its b/arch/riscv/conf/apos.its index 1581025..15db4a4 100644 --- a/arch/riscv/conf/apos.its +++ b/arch/riscv/conf/apos.its @@ -7,7 +7,7 @@ images { kernel { description = "Garbaggio"; - data = /incbin/("../../../kernel.bin"); + data = /incbin/("../../../apos.bin"); type = "kernel"; arch = "riscv"; os = "apos"; @@ -21,7 +21,7 @@ initrd { description = "Gargabbio initrd"; - data = /incbin/("initrd.txt"); + data = /incbin/("initrd"); type = "ramdisk"; arch = "riscv"; os = "apos"; diff --git a/arch/riscv/conf/init b/arch/riscv/conf/init Binary files differnew file mode 100755 index 0000000..06e61e0 --- /dev/null +++ b/arch/riscv/conf/init diff --git a/arch/riscv/conf/init-link.S b/arch/riscv/conf/init-link.S new file mode 100644 index 0000000..642e831 --- /dev/null +++ b/arch/riscv/conf/init-link.S @@ -0,0 +1,30 @@ +OUTPUT_ARCH(riscv) +ENTRY(main) + +SECTIONS { + . = ABSOLUTE(PM_KERN); + __init_start = .; + + /* objcopy only copies these three sections (as far as I'm aware) into the + produces binary, so __init_end should point to the correct location in the + final binary + */ + .text ALIGN(4K) : AT(0) { + *(.init.start) + *(.text*); + } + + .rodata : { + *(.rodata*) + } + + .data : { + *(.data*) + } + + .bss : { + *(.bss*) *(COMMON) + } + + __init_end = . ; +} diff --git a/arch/riscv/conf/initrd b/arch/riscv/conf/initrd Binary files differnew file mode 100644 index 0000000..8dc931b --- /dev/null +++ b/arch/riscv/conf/initrd diff --git a/arch/riscv/conf/initrd.txt b/arch/riscv/conf/initrd.txt deleted file mode 100644 index e965047..0000000 --- a/arch/riscv/conf/initrd.txt +++ /dev/null @@ -1 +0,0 @@ -Hello diff --git a/arch/riscv/conf/kernel-link.S b/arch/riscv/conf/kernel-link.S index bf0ad28..d3b1223 100644 --- a/arch/riscv/conf/kernel-link.S +++ b/arch/riscv/conf/kernel-link.S @@ -2,10 +2,10 @@ OUTPUT_ARCH(riscv) ENTRY(main) SECTIONS { - . = ABSOLUTE(PM_KERN); + . = ABSOLUTE(VM_KERN); __kernel_start = .; - .text : AT(0) { + .text ALIGN(4K) : AT(0) { *(.kernel.start); *(.text*); } diff --git a/arch/riscv/conf/s.S b/arch/riscv/conf/s.S new file mode 100644 index 0000000..7b796ce --- /dev/null +++ b/arch/riscv/conf/s.S @@ -0,0 +1,4 @@ +.text +.global _start +_start: +loop: j loop |
