From 91a65612a9d408f64e0c46781ef98ad15ff7dc11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Tue, 15 Sep 2020 03:00:02 +0000 Subject: [PATCH] Fix fatal error: errno.h: No such file or directory in ./build-modules --arch aarch64 ``` make -C '/home/ciro/bak/git/linux-kernel-module-cheat/out/linux/default/aarch64' M='/home/ciro/bak/git/linux-kernel-module-cheat/out/kernel_modules/aarch64/kernel_modules' make[1]: Entering directory '/mnt/sda3/linux-kernel-module-cheat-out/linux/default/aarch64' CC [M] /home/ciro/bak/git/linux-kernel-module-cheat/out/kernel_modules/aarch64/kernel_modules/dump_regs.o In file included from /home/ciro/bak/git/linux-kernel-module-cheat/lkmc/aarch64_dump_regs.h:4, from /home/ciro/bak/git/linux-kernel-module-cheat/out/kernel_modules/aarch64/kernel_modules/dump_regs.c:8: /home/ciro/bak/git/linux-kernel-module-cheat/lkmc.h:10:10: fatal error: errno.h: No such file or directory #include ^~~~~~~~~ ``` Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/127 --- lkmc/aarch64_dump_regs.h | 4 +--- path_properties.py | 2 ++ submodules/gem5-resources | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lkmc/aarch64_dump_regs.h b/lkmc/aarch64_dump_regs.h index a0c0e4b..eada1d4 100644 --- a/lkmc/aarch64_dump_regs.h +++ b/lkmc/aarch64_dump_regs.h @@ -1,8 +1,6 @@ #ifndef LKMC_AARCH64_DUMP_REGS_H #define LKMC_AARCH64_DUMP_REGS_H -#include - /* https://cirosantilli.com/linux-kernel-module-cheat#dump-regs */ /* So that a sigle source will work with baremetal and printk from kernel module. */ @@ -19,7 +17,7 @@ #endif /* Dump registers that are only visible from privileged levels of the system. */ -void lkmc_dump_system_regs() { +void lkmc_dump_system_regs(void) { uint32_t sctlr_el1; __asm__ ("mrs %0, sctlr_el1" : "=r" (sctlr_el1) : :); LKMC_DUMP_SYSTEM_REGS_PRINTF("SCTLR_EL1 0x%" PRIX32 "\n", sctlr_el1); diff --git a/path_properties.py b/path_properties.py index 2a7b828..9abe4f0 100644 --- a/path_properties.py +++ b/path_properties.py @@ -689,6 +689,8 @@ path_properties_tuples = ( 'return2.c': {'exit_status': 2}, # This has complex failure modes, too hard to assert. 'smash_stack.c': {'skip_run_unclassified': True}, + 'std_atomic.c': {'baremetal': False}, + 'atomic': {'baremetal': False}, # Wrapper not defined by newlib. 'timespec_get.c': {'baremetal': False}, } diff --git a/submodules/gem5-resources b/submodules/gem5-resources index d1965aa..caf7ef4 160000 --- a/submodules/gem5-resources +++ b/submodules/gem5-resources @@ -1 +1 @@ -Subproject commit d1965aa16ae9e7b91045c795646188d4f98caeca +Subproject commit caf7ef4e10d7f9467132895e03614fe00296cbe5