diff options
author | Luis R. Rodriguez <mcgrof@kernel.org> | 2015-12-04 14:36:23 -0800 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@kernel.org> | 2016-02-11 08:42:16 -0800 |
commit | 5311211ce3367039cc90a97053ed6c52c794e3e9 (patch) | |
tree | 831a2c85366e30492da746924244aed6d383f8e9 | |
parent | 373e2ea4a0176319158d868617a98aa0fceb10b8 (diff) | |
download | linker-tables-5311211ce3367039cc90a97053ed6c52c794e3e9.tar.gz |
include: use Linux header paths
Again, another thing to make it easier to test / exchange code
with upstream as it evolves.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | alpha.c | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/boot/boot.h (renamed from setup.h) | 0 | ||||
-rw-r--r-- | arch/x86/include/asm/bootparam.h (renamed from bootparam.h) | 0 | ||||
-rw-r--r-- | arch/x86/include/asm/x86.h (renamed from x86.h) | 0 | ||||
-rw-r--r-- | arch/x86/include/asm/x86_init_fn.h (renamed from x86_init_fn.h) | 7 | ||||
-rw-r--r-- | beta.c | 4 | ||||
-rw-r--r-- | driver.c | 9 | ||||
-rw-r--r-- | include/linux/kasan.h (renamed from kasan.h) | 0 | ||||
-rw-r--r-- | include/linux/kernel.h (renamed from kernel.h) | 1 | ||||
-rw-r--r-- | include/linux/pci.h | 3 | ||||
-rw-r--r-- | include/linux/start_kernel.h (renamed from start_kernel.h) | 0 | ||||
-rw-r--r-- | include/linux/string.h | 6 | ||||
-rw-r--r-- | include/linux/tables.h (renamed from tables.h) | 0 | ||||
-rw-r--r-- | include/linux/types.h | 7 | ||||
-rw-r--r-- | include/xen/xen.h (renamed from xen.h) | 0 | ||||
-rw-r--r-- | init.c | 10 | ||||
-rw-r--r-- | kasan.c | 8 | ||||
-rw-r--r-- | main.c | 9 | ||||
-rw-r--r-- | memory.c | 2 | ||||
-rw-r--r-- | pci.c | 11 | ||||
-rw-r--r-- | pci.h | 1 | ||||
-rw-r--r-- | sort-init.c | 7 | ||||
-rw-r--r-- | start_kernel.c | 4 | ||||
-rw-r--r-- | x86.c | 18 | ||||
-rw-r--r-- | xen-driver.c | 8 | ||||
-rw-r--r-- | xen.c | 7 |
29 files changed, 74 insertions, 61 deletions
@@ -1,3 +1,4 @@ main *.o *.swp +parse-bzimage @@ -1,5 +1,6 @@ CFLAGS += -O2 -g CFLAGS += -std=gnu99 -Wall -Werror +CFLAGS += -I include/ -I arch/x86/include/ CFLAGS +=-Wl,-Tcustom.lds.S @@ -117,3 +117,10 @@ size of all table init structures. For now each subsystem must then define its own sorting scheme. A sorting algorithm is only necessary if the linker script sorting does not suffice for the semantics of the subsystem. + +File mapping upstream +===================== + +In case this project maintains a matching with upstream this project strives +to maintain a one to one direct mapping as things are or we hope would +be on upstream Linux. @@ -1,8 +1,8 @@ #include <stdio.h> #include <unistd.h> -#include "x86_init_fn.h" -#include "kernel.h" +#include <linux/kernel.h> +#include <asm/x86_init_fn.h> static void early_init_alpha(void) { } diff --git a/setup.h b/arch/x86/include/asm/boot/boot.h index af91b94..af91b94 100644 --- a/setup.h +++ b/arch/x86/include/asm/boot/boot.h diff --git a/bootparam.h b/arch/x86/include/asm/bootparam.h index a7ef342..a7ef342 100644 --- a/bootparam.h +++ b/arch/x86/include/asm/bootparam.h diff --git a/x86.h b/arch/x86/include/asm/x86.h index 974ea97..974ea97 100644 --- a/x86.h +++ b/arch/x86/include/asm/x86.h diff --git a/x86_init_fn.h b/arch/x86/include/asm/x86_init_fn.h index 42aab41..9b4db23 100644 --- a/x86_init_fn.h +++ b/arch/x86/include/asm/x86_init_fn.h @@ -1,12 +1,11 @@ #ifndef __X86_INIT_TABLES_H #define __X86_INIT_TABLES_H -#include <stdbool.h> #include <linux/types.h> +#include <linux/kernel.h> +#include <linux/tables.h> -#include "kernel.h" -#include "tables.h" -#include "bootparam.h" +#include <asm/bootparam.h> /** * struct x86_init_fn - x86 generic kernel init call @@ -1,8 +1,8 @@ #include <stdio.h> #include <unistd.h> -#include "x86_init_fn.h" -#include "kernel.h" +#include <linux/kernel.h> +#include <asm/x86_init_fn.h> static void early_init_beta(void) { } @@ -1,9 +1,6 @@ -#include <stdio.h> -#include <unistd.h> - -#include "x86_init_fn.h" -#include "pci.h" -#include "kernel.h" +#include <linux/kernel.h> +#include <linux/pci.h> +#include <asm/x86_init_fn.h> static void early_init_driver(void) { sleep(2); diff --git a/kasan.h b/include/linux/kasan.h index c30a087..c30a087 100644 --- a/kasan.h +++ b/include/linux/kasan.h diff --git a/kernel.h b/include/linux/kernel.h index 9ffc05c..c91fdeb 100644 --- a/kernel.h +++ b/include/linux/kernel.h @@ -1,4 +1,5 @@ #include <stdio.h> +#include <unistd.h> #define BIT(nr) (1UL << (nr)) diff --git a/include/linux/pci.h b/include/linux/pci.h new file mode 100644 index 0000000..7f7f560 --- /dev/null +++ b/include/linux/pci.h @@ -0,0 +1,3 @@ +#include <linux/types.h> + +bool detect_pci(void); diff --git a/start_kernel.h b/include/linux/start_kernel.h index 5c2cb9a..5c2cb9a 100644 --- a/start_kernel.h +++ b/include/linux/start_kernel.h diff --git a/include/linux/string.h b/include/linux/string.h new file mode 100644 index 0000000..26b1615 --- /dev/null +++ b/include/linux/string.h @@ -0,0 +1,6 @@ +#ifndef __LINUX_USER_STRING_H +#define __LINUX_USER_STRING_H + +#include <string.h> /* for memmove */ + +#endif /* __LINUX_USER_STRING_H */ diff --git a/tables.h b/include/linux/tables.h index 6fa9174..6fa9174 100644 --- a/tables.h +++ b/include/linux/tables.h diff --git a/include/linux/types.h b/include/linux/types.h new file mode 100644 index 0000000..86b1d23 --- /dev/null +++ b/include/linux/types.h @@ -0,0 +1,7 @@ +#ifndef __LINUX_USER_TYPES_H +#define __LINUX_USER_TYPES_H + +#include_next <linux/types.h> +#include <stdbool.h> + +#endif /* __LINUX_USER_TYPES_H */ diff --git a/xen.h b/include/xen/xen.h index 2201e97..2201e97 100644 --- a/xen.h +++ b/include/xen/xen.h @@ -1,10 +1,6 @@ -#include <stdio.h> -#include <unistd.h> -#include <errno.h> - -#include "kernel.h" -#include "x86_init_fn.h" -#include "setup.h" +#include <linux/kernel.h> +#include <asm/x86_init_fn.h> +#include <asm/boot/boot.h> static bool x86_init_supports_subarch(struct x86_init_fn *fn) { @@ -1,9 +1,11 @@ #include <stdio.h> #include <unistd.h> #include <errno.h> -#include "x86_init_fn.h" -#include "kernel.h" -#include "bootparam.h" + +#include <linux/kernel.h> + +#include <asm/x86_init_fn.h> +#include <asm/bootparam.h> void kasan_early_init(void) { pr_info("Early init for Kasan...\n"); @@ -1,8 +1,7 @@ -#include <string.h> - -#include "x86.h" -#include "xen.h" -#include "bootparam.h" +#include <linux/string.h> +#include <xen/xen.h> +#include <asm/x86.h> +#include <asm/bootparam.h> struct boot_params boot_params __attribute__((aligned(16))); @@ -2,7 +2,7 @@ #include <unistd.h> #include <errno.h> -#include "x86_init_fn.h" +#include <asm/x86_init_fn.h> static void early_init_memory(void) { sleep(1); @@ -1,11 +1,8 @@ -#include <stdio.h> -#include <unistd.h> -#include <errno.h> +#include <linux/tables.h> +#include <asm/x86_init_fn.h> +#include <asm/bootparam.h> -#include "tables.h" -#include "x86_init_fn.h" -#include "pci.h" -#include "bootparam.h" +#include <linux/pci.h> void early_init_pci(void) { sleep(1); @@ -1 +0,0 @@ -bool detect_pci(void); diff --git a/sort-init.c b/sort-init.c index 3450a4b..aee2696 100644 --- a/sort-init.c +++ b/sort-init.c @@ -1,6 +1,7 @@ -#include <stdio.h> /* for NULL and pr_info */ -#include <string.h> /* for memmove */ -#include "x86_init_fn.h" +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/string.h> +#include <asm/x86_init_fn.h> #define DEBUG 1 diff --git a/start_kernel.c b/start_kernel.c index a409926..9345f5b 100644 --- a/start_kernel.c +++ b/start_kernel.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <stdbool.h> -#include "x86_init_fn.h" -#include "x86.h" +#include <asm/x86_init_fn.h> +#include <asm/x86.h> void start_kernel(void) { @@ -1,13 +1,11 @@ -#include <stdio.h> -#include <stdbool.h> -#include <unistd.h> -#include <errno.h> -#include "tables.h" -#include "x86_init_fn.h" -#include "start_kernel.h" -#include "kasan.h" -#include "setup.h" -#include "bootparam.h" +#include <linux/tables.h> + +#include <asm/x86_init_fn.h> +#include <asm/boot/boot.h> +#include <asm/bootparam.h> + +#include <linux/start_kernel.h> +#include <linux/kasan.h> extern struct x86_init_fn __tbl_x86_start_init_fns[], __tbl_x86_end_init_fns[]; diff --git a/xen-driver.c b/xen-driver.c index f30d1c4..e81042d 100644 --- a/xen-driver.c +++ b/xen-driver.c @@ -1,9 +1,7 @@ -#include <stdio.h> -#include <unistd.h> +#include <asm/x86_init_fn.h> -#include "x86_init_fn.h" -#include "pci.h" -#include "xen.h" +#include <linux/pci.h> +#include <xen/xen.h> static void early_xen_init_driver(void) { sleep(2); @@ -1,8 +1,9 @@ #include <stdio.h> #include <stdbool.h> -#include "x86_init_fn.h" -#include "tables.h" -#include "x86.h" + +#include <linux/tables.h> +#include <asm/x86_init_fn.h> +#include <asm/x86.h> extern struct x86_init_fn __tbl_x86_start_init_fns[], __tbl_x86_end_init_fns[]; |