From 31c3c8dcb5ea281201b9c01140bceeadc80f7686 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 20 Aug 2021 20:57:59 +0300 Subject: New build system --- arch/riscv/conf/init-link.S | 14 ++++++++++++++ arch/riscv/conf/kernel-link.S | 14 ++++++++++++++ arch/riscv/conf/kernel.its | 34 ++++++++++++++++++++++++++++++++++ arch/riscv/init-link.S | 14 -------------- arch/riscv/kernel-link.S | 14 -------------- arch/riscv/kernel.its | 34 ---------------------------------- arch/riscv/riscv-link.S | 22 ---------------------- arch/riscv/source.mk | 8 ++------ 8 files changed, 64 insertions(+), 90 deletions(-) create mode 100644 arch/riscv/conf/init-link.S create mode 100644 arch/riscv/conf/kernel-link.S create mode 100644 arch/riscv/conf/kernel.its delete mode 100644 arch/riscv/init-link.S delete mode 100644 arch/riscv/kernel-link.S delete mode 100644 arch/riscv/kernel.its delete mode 100644 arch/riscv/riscv-link.S (limited to 'arch/riscv') diff --git a/arch/riscv/conf/init-link.S b/arch/riscv/conf/init-link.S new file mode 100644 index 0000000..db18822 --- /dev/null +++ b/arch/riscv/conf/init-link.S @@ -0,0 +1,14 @@ +#include +#include + +OUTPUT_ARCH(riscv) +ENTRY(_start) + +SECTIONS { + . = ABSOLUTE(PM_KERN); + .text ALIGN(4K) : AT(0) { + *(.init.start) + *(.text); + . = ALIGN(4K); + } +} diff --git a/arch/riscv/conf/kernel-link.S b/arch/riscv/conf/kernel-link.S new file mode 100644 index 0000000..873c7de --- /dev/null +++ b/arch/riscv/conf/kernel-link.S @@ -0,0 +1,14 @@ +#include +#include + +OUTPUT_ARCH(riscv) +ENTRY(main) + +SECTIONS { + . = ABSOLUTE(VM_KERN); + .text ALIGN(4K) : AT(0) { + *(.text.start); + *(.text); + . = ALIGN(4K); + } +} diff --git a/arch/riscv/conf/kernel.its b/arch/riscv/conf/kernel.its new file mode 100644 index 0000000..f984d40 --- /dev/null +++ b/arch/riscv/conf/kernel.its @@ -0,0 +1,34 @@ +/dts-v1/; + +/ { + description = "FUCK"; +#address-cells = <1>; + + images { + kernel { + description = "My default kenel"; + data = /incbin/("kernel.bin"); + type = "kernel"; + arch = "riscv"; + os = "apos"; + compression = "none"; + load = <0x83800000>; + entry = <0x83800000>; + hash-1 { + algo = "md5"; + }; + }; + + }; + + configurations { + default = "config"; + + config { + description = "Default configuration"; + kernel = "kernel"; + }; + + + }; +}; diff --git a/arch/riscv/init-link.S b/arch/riscv/init-link.S deleted file mode 100644 index db18822..0000000 --- a/arch/riscv/init-link.S +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -OUTPUT_ARCH(riscv) -ENTRY(_start) - -SECTIONS { - . = ABSOLUTE(PM_KERN); - .text ALIGN(4K) : AT(0) { - *(.init.start) - *(.text); - . = ALIGN(4K); - } -} diff --git a/arch/riscv/kernel-link.S b/arch/riscv/kernel-link.S deleted file mode 100644 index 873c7de..0000000 --- a/arch/riscv/kernel-link.S +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -OUTPUT_ARCH(riscv) -ENTRY(main) - -SECTIONS { - . = ABSOLUTE(VM_KERN); - .text ALIGN(4K) : AT(0) { - *(.text.start); - *(.text); - . = ALIGN(4K); - } -} diff --git a/arch/riscv/kernel.its b/arch/riscv/kernel.its deleted file mode 100644 index f984d40..0000000 --- a/arch/riscv/kernel.its +++ /dev/null @@ -1,34 +0,0 @@ -/dts-v1/; - -/ { - description = "FUCK"; -#address-cells = <1>; - - images { - kernel { - description = "My default kenel"; - data = /incbin/("kernel.bin"); - type = "kernel"; - arch = "riscv"; - os = "apos"; - compression = "none"; - load = <0x83800000>; - entry = <0x83800000>; - hash-1 { - algo = "md5"; - }; - }; - - }; - - configurations { - default = "config"; - - config { - description = "Default configuration"; - kernel = "kernel"; - }; - - - }; -}; diff --git a/arch/riscv/riscv-link.S b/arch/riscv/riscv-link.S deleted file mode 100644 index 0950850..0000000 --- a/arch/riscv/riscv-link.S +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - -OUTPUT_ARCH(riscv) -ENTRY(_start) - -SECTIONS { - . = ABSOLUTE(PM_KERN); - .init ALIGN(4K) : AT(0) { - *(.init.start); - *(.init.text); - *(.init.data); - . = ALIGN(4K); - } - - . = ABSOLUTE(VM_KERN); - .text ALIGN(4K) : AT(SIZEOF(.init)) { - *(.text.start); - *(.text.text); - *(.text.data); - } -} diff --git a/arch/riscv/source.mk b/arch/riscv/source.mk index 8bd67ee..626ecd2 100644 --- a/arch/riscv/source.mk +++ b/arch/riscv/source.mk @@ -1,9 +1,5 @@ -KERNEL_LOCAL != ./scripts/prepend arch/riscv/ main.c +KERNEL_LOCAL != echo arch/riscv/*.[cS] KERNEL_SOURCES += $(KERNEL_LOCAL) -INIT_LOCAL != ./scripts/prepend arch/riscv/init/ init.c head.S +INIT_LOCAL != echo arch/riscv/init/*.[cS] INIT_SOURCES += $(INIT_LOCAL) - -INCLUDE_DIRS += arch/riscv/include -KERNEL_LINK := arch/riscv/kernel-link.S -INIT_LINK := arch/riscv/init-link.S -- cgit v1.3