diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2015-05-08 10:23:18 -0400 |
---|---|---|
committer | Yoshinori Sato <ysato@users.sourceforge.jp> | 2015-06-23 00:35:54 -0400 |
commit | 8dbdef22d5a720e66ac3939d4c4f7004ef9dd7b4 (patch) | |
tree | 3b85c10115ad7e95be5637cb90457c6ca2c9c0c4 /arch/h8300 | |
parent | a71a29de4c2f95563220a472f265f0bd74701d52 (diff) |
h8300: Build scripts
h8300's Makefile, Kconfig and memory layout.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Diffstat (limited to 'arch/h8300')
-rw-r--r-- | arch/h8300/Kconfig | 77 | ||||
-rw-r--r-- | arch/h8300/Kconfig.cpu | 99 | ||||
-rw-r--r-- | arch/h8300/Makefile | 55 | ||||
-rw-r--r-- | arch/h8300/kernel/Makefile | 19 | ||||
-rw-r--r-- | arch/h8300/kernel/vmlinux.lds.S | 67 |
5 files changed, 317 insertions, 0 deletions
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig new file mode 100644 index 000000000000..696415e58593 --- /dev/null +++ b/arch/h8300/Kconfig | |||
@@ -0,0 +1,77 @@ | |||
1 | config H8300 | ||
2 | def_bool y | ||
3 | select GENERIC_ATOMIC64 | ||
4 | select HAVE_UID16 | ||
5 | select VIRT_TO_BUS | ||
6 | select ARCH_WANT_IPC_PARSE_VERSION | ||
7 | select GENERIC_IRQ_SHOW | ||
8 | select FRAME_POINTER | ||
9 | select GENERIC_CPU_DEVICES | ||
10 | select MODULES_USE_ELF_RELA | ||
11 | select GENERIC_CLOCKEVENTS | ||
12 | select CLKDEV_LOOKUP | ||
13 | select COMMON_CLK | ||
14 | select ARCH_WANT_FRAME_POINTERS | ||
15 | select OF | ||
16 | select OF_IRQ | ||
17 | select OF_EARLY_FLATTREE | ||
18 | select HAVE_MEMBLOCK | ||
19 | select HAVE_DMA_ATTRS | ||
20 | |||
21 | config RWSEM_GENERIC_SPINLOCK | ||
22 | def_bool y | ||
23 | |||
24 | config GENERIC_HWEIGHT | ||
25 | def_bool y | ||
26 | |||
27 | config NO_IOPORT_MAP | ||
28 | def_bool y | ||
29 | |||
30 | config GENERIC_CSUM | ||
31 | def_bool y | ||
32 | |||
33 | config HZ | ||
34 | int | ||
35 | default 100 | ||
36 | |||
37 | config NR_CPUS | ||
38 | int | ||
39 | default 1 | ||
40 | |||
41 | source "init/Kconfig" | ||
42 | |||
43 | source "kernel/Kconfig.freezer" | ||
44 | |||
45 | source "arch/h8300/Kconfig.cpu" | ||
46 | |||
47 | menu "Kernel Features" | ||
48 | |||
49 | source "kernel/Kconfig.preempt" | ||
50 | |||
51 | source "mm/Kconfig" | ||
52 | |||
53 | endmenu | ||
54 | |||
55 | menu "Executable file formats" | ||
56 | |||
57 | source "fs/Kconfig.binfmt" | ||
58 | |||
59 | endmenu | ||
60 | |||
61 | source "net/Kconfig" | ||
62 | |||
63 | source "drivers/Kconfig" | ||
64 | |||
65 | source "fs/Kconfig" | ||
66 | |||
67 | menu "Kernel hacking" | ||
68 | |||
69 | source "lib/Kconfig.debug" | ||
70 | |||
71 | endmenu | ||
72 | |||
73 | source "security/Kconfig" | ||
74 | |||
75 | source "crypto/Kconfig" | ||
76 | |||
77 | source "lib/Kconfig" | ||
diff --git a/arch/h8300/Kconfig.cpu b/arch/h8300/Kconfig.cpu new file mode 100644 index 000000000000..8d0ff20c749a --- /dev/null +++ b/arch/h8300/Kconfig.cpu | |||
@@ -0,0 +1,99 @@ | |||
1 | config CPU_H8300H | ||
2 | bool | ||
3 | |||
4 | config CPU_H8S | ||
5 | bool | ||
6 | |||
7 | config H83069 | ||
8 | bool | ||
9 | select CPU_H8300H | ||
10 | select H8300_TMR16 | ||
11 | select RENESAS_H8300H_INTC | ||
12 | |||
13 | config H8S2678 | ||
14 | bool | ||
15 | select CPU_H8S | ||
16 | select H8300_TPU | ||
17 | select RENESAS_H8S_INTC | ||
18 | |||
19 | config RAMKERNEL | ||
20 | bool | ||
21 | |||
22 | config ROMKERNEL | ||
23 | bool | ||
24 | |||
25 | menu "Processor type and features" | ||
26 | |||
27 | choice | ||
28 | prompt "H8/300 platform" | ||
29 | |||
30 | config H8300_AE3068 | ||
31 | bool "AE-3068/69" | ||
32 | select H83069 | ||
33 | select RAMKERNEL | ||
34 | help | ||
35 | AKI-H8/3068F / AKI-H8/3069F Flashmicom LAN Board Support | ||
36 | More Information. (Japanese Only) | ||
37 | <http://akizukidenshi.com/catalog/default.aspx> | ||
38 | AE-3068/69 Evaluation Board Support | ||
39 | More Information. | ||
40 | <http://www.microtronique.com/ae3069lan.htm> | ||
41 | |||
42 | config H8300_H8MAX | ||
43 | bool "H8MAX" | ||
44 | select H83069 | ||
45 | select RAMKERNEL | ||
46 | select HAVE_IDE | ||
47 | help | ||
48 | H8MAX Evaluation Board Support | ||
49 | More Information. (Japanese Only) | ||
50 | <http://strawberry-linux.com/h8/index.html> | ||
51 | |||
52 | config H8300_KANEBEBE | ||
53 | bool "KaneBebe" | ||
54 | select H83069 | ||
55 | select RAMKERNEL | ||
56 | help | ||
57 | KaneBebe Evalition Board Support | ||
58 | More Information. (Japanese Only) | ||
59 | <http://www.nissin-tech.com/2009/10/uclinuxkane-bebe-h83069f.html> | ||
60 | |||
61 | config H8300H_SIM | ||
62 | bool "H8/300H GDB Simulator" | ||
63 | select H83069 | ||
64 | select ROMKERNEL | ||
65 | help | ||
66 | GDB Simulator Support | ||
67 | More Information. | ||
68 | <http://sourceware.org/sid/> | ||
69 | |||
70 | config H8S_EDOSK2674 | ||
71 | bool "EDOSK-2674" | ||
72 | select H8S2678 | ||
73 | select RAMKERNEL | ||
74 | help | ||
75 | Renesas EDOSK-2674 Evaluation Board Support | ||
76 | More Information. | ||
77 | <http://www.azpower.com/H8-uClinux/index.html> | ||
78 | <http://www.renesas.eu/products/tools/introductory_evaluation_tools/evaluation_development_os_kits/edosk2674r/edosk2674r_software_tools_root.jsp> | ||
79 | |||
80 | config H8S_SIM | ||
81 | bool "H8S GDB Simulator" | ||
82 | select H8S2678 | ||
83 | select ROMKERNEL | ||
84 | help | ||
85 | GDB Simulator Support | ||
86 | More Information. | ||
87 | <http://sourceware.org/sid/> | ||
88 | |||
89 | endchoice | ||
90 | |||
91 | config H8300_BUILTIN_DTB | ||
92 | string "Builtin DTB" | ||
93 | default "" | ||
94 | |||
95 | config OFFSET | ||
96 | hex "Load offset" | ||
97 | default 0 | ||
98 | |||
99 | endmenu | ||
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile new file mode 100644 index 000000000000..0d2d96e52d9f --- /dev/null +++ b/arch/h8300/Makefile | |||
@@ -0,0 +1,55 @@ | |||
1 | # | ||
2 | # arch/h8300/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | ||
5 | # License. See the file "COPYING" in the main directory of this archive | ||
6 | # for more details. | ||
7 | # | ||
8 | # (C) Copyright 2002-2015 Yoshinori Sato <ysato@users.sourceforge.jp> | ||
9 | # | ||
10 | |||
11 | cflags-$(CONFIG_CPU_H8300H) := -mh | ||
12 | aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h | ||
13 | ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux | ||
14 | cflags-$(CONFIG_CPU_H8S) := -ms | ||
15 | aflags-$(CONFIG_CPU_H8S) := -ms -Wa,--mach=h8300s | ||
16 | ldflags-$(CONFIG_CPU_H8S) := -mh8300self_linux | ||
17 | |||
18 | KBUILD_CFLAGS += $(cflags-y) | ||
19 | KBUILD_CFLAGS += -mint32 -fno-builtin | ||
20 | KBUILD_CFLAGS += -D__linux__ | ||
21 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" | ||
22 | KBUILD_AFLAGS += $(aflags-y) | ||
23 | LDFLAGS += $(ldflags-y) | ||
24 | |||
25 | CROSS_COMPILE := h8300-unknown-linux- | ||
26 | |||
27 | core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ | ||
28 | ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""' | ||
29 | core-y += arch/h8300/boot/dts/ | ||
30 | endif | ||
31 | |||
32 | libs-y += arch/$(ARCH)/lib/ | ||
33 | |||
34 | boot := arch/h8300/boot | ||
35 | |||
36 | %.dtb %.dtb.S %.dtb.o: | scripts | ||
37 | $(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@ | ||
38 | |||
39 | PHONY += dtbs | ||
40 | dtbs: scripts | ||
41 | $(Q)$(MAKE) $(build)=arch/h8300/boot/dts | ||
42 | |||
43 | archmrproper: | ||
44 | |||
45 | archclean: | ||
46 | $(Q)$(MAKE) $(clean)=$(boot) | ||
47 | |||
48 | vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux | ||
49 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | ||
50 | |||
51 | define archhelp | ||
52 | @echo 'vmlinux.bin - Create raw binary' | ||
53 | @echo 'vmlinux.srec - Create srec binary' | ||
54 | @echo 'zImage - Compressed kernel image' | ||
55 | endef | ||
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile new file mode 100644 index 000000000000..5bc33f2fcc08 --- /dev/null +++ b/arch/h8300/kernel/Makefile | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | extra-y := vmlinux.lds | ||
6 | |||
7 | obj-y := process.o traps.o ptrace.o \ | ||
8 | signal.o setup.o syscalls.o \ | ||
9 | irq.o entry.o dma.o | ||
10 | |||
11 | obj-$(CONFIG_ROMKERNEL) += head_rom.o | ||
12 | obj-$(CONFIG_RAMKERNEL) += head_ram.o | ||
13 | |||
14 | obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o | ||
15 | obj-$(CONFIG_H8300H_SIM) += sim-console.o | ||
16 | obj-$(CONFIG_H8S_SIM) += sim-console.o | ||
17 | |||
18 | obj-$(CONFIG_CPU_H8300H) += ptrace_h.o | ||
19 | obj-$(CONFIG_CPU_H8S) += ptrace_s.o | ||
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S new file mode 100644 index 000000000000..7c302dcf5249 --- /dev/null +++ b/arch/h8300/kernel/vmlinux.lds.S | |||
@@ -0,0 +1,67 @@ | |||
1 | #include <asm-generic/vmlinux.lds.h> | ||
2 | #include <asm/page.h> | ||
3 | |||
4 | #define ROMTOP 0x000000 | ||
5 | #define RAMTOP 0x400000 | ||
6 | |||
7 | jiffies = jiffies_64 + 4; | ||
8 | |||
9 | ENTRY(_start) | ||
10 | |||
11 | SECTIONS | ||
12 | { | ||
13 | #if defined(CONFIG_ROMKERNEL) | ||
14 | . = ROMTOP; | ||
15 | .vectors : | ||
16 | { | ||
17 | _vector = . ; | ||
18 | *(.vector*) | ||
19 | } | ||
20 | #else | ||
21 | . = RAMTOP; | ||
22 | _ramstart = .; | ||
23 | . = . + CONFIG_OFFSET; | ||
24 | #endif | ||
25 | _text = .; | ||
26 | HEAD_TEXT_SECTION | ||
27 | .text : { | ||
28 | _stext = . ; | ||
29 | TEXT_TEXT | ||
30 | SCHED_TEXT | ||
31 | LOCK_TEXT | ||
32 | #if defined(CONFIG_ROMKERNEL) | ||
33 | *(.int_redirect) | ||
34 | #endif | ||
35 | _etext = . ; | ||
36 | } | ||
37 | EXCEPTION_TABLE(16) | ||
38 | NOTES | ||
39 | RO_DATA_SECTION(4) | ||
40 | ROMEND = .; | ||
41 | #if defined(CONFIG_ROMKERNEL) | ||
42 | . = RAMTOP; | ||
43 | _ramstart = .; | ||
44 | #define ADDR(x) ROMEND | ||
45 | #else | ||
46 | #endif | ||
47 | _sdata = . ; | ||
48 | __data_start = . ; | ||
49 | RW_DATA_SECTION(0,0,0) | ||
50 | #if defined(CONFIG_ROMKERNEL) | ||
51 | #undef ADDR | ||
52 | #endif | ||
53 | . = ALIGN(0x4) ; | ||
54 | __init_begin = .; | ||
55 | INIT_TEXT_SECTION(4) | ||
56 | INIT_DATA_SECTION(4) | ||
57 | SECURITY_INIT | ||
58 | __init_end = .; | ||
59 | _edata = . ; | ||
60 | _begin_data = LOADADDR(.data); | ||
61 | _sbss =.; | ||
62 | BSS_SECTION(0, 0 ,0) | ||
63 | _ebss =.; | ||
64 | _ramend = .; | ||
65 | _end = .; | ||
66 | DISCARDS | ||
67 | } | ||