coolsnowwolf / lede

Lean's LEDE source
Other
29.71k stars 19.51k forks source link

K3 内核编译错误 The present kernel configuration has modules disabled. #718

Closed tossp closed 6 years ago

tossp commented 6 years ago
make -f ./scripts/Makefile.build obj=scripts/kconfig silentoldconfig
  gcc -Wp,-MD,scripts/kconfig/.conf.o.d -O2 -I/builds/zh/lede-k3/staging_dir/host/include  -Wall -Wmissing-prototypes -Wstrict-prototypes   -I/builds/zh/lede-k3/staging_dir/host/include -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/conf.o scripts/kconfig/conf.c
  cat scripts/kconfig/zconf.tab.c_shipped > scripts/kconfig/zconf.tab.c
  cat scripts/kconfig/zconf.lex.c_shipped > scripts/kconfig/zconf.lex.c
  gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -O2 -I/builds/zh/lede-k3/staging_dir/host/include  -Wall -Wmissing-prototypes -Wstrict-prototypes   -I/builds/zh/lede-k3/staging_dir/host/include -DCURSES_LOC="<ncurses.h>" -DLOCALE  -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c
  gcc  -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.o -L/builds/zh/lede-k3/staging_dir/host/lib 
mkdir -p include/config include/generated
test -e include/generated/autoksyms.h || \
        touch   include/generated/autoksyms.h
scripts/kconfig/conf  --silentoldconfig Kconfig
net/sched/Kconfig:44: warning: menuconfig statement without prompt
*
* Restart config...
*
*
* System Type
*
MMU-based Paged Memory Management Support (MMU) [Y/n/?] y
ARM system type
> 1. Allow multiple platforms to be selected (ARCH_MULTIPLATFORM)
  2. EBSA-110 (ARCH_EBSA110)
  3. EP93xx-based (ARCH_EP93XX)
  4. FootBridge (ARCH_FOOTBRIDGE)
  5. Hilscher NetX based (ARCH_NETX)
  6. IOP13xx-based (ARCH_IOP13XX)
  7. IOP32x-based (ARCH_IOP32X)
  8. IOP33x-based (ARCH_IOP33X)
  9. IXP4xx-based (ARCH_IXP4XX)
  10. Marvell Dove (ARCH_DOVE)
  11. Micrel/Kendin KS8695 (ARCH_KS8695)
  12. Nuvoton W90X900 CPU (ARCH_W90X900)
  13. NXP LPC32XX (ARCH_LPC32XX)
  14. PXA2xx/PXA3xx-based (ARCH_PXA)
  15. RiscPC (ARCH_RPC)
  16. SA1100-based (ARCH_SA1100)
  17. Samsung S3C24XX SoCs (ARCH_S3C24XX)
  18. TI DaVinci (ARCH_DAVINCI)
  19. TI OMAP1 (ARCH_OMAP1)
choice[1-19]: 1
Dummy Virtual Machine (ARCH_VIRT) [N/y] n
Annapurna Labs Alpine platform (ARCH_ALPINE) [N/y/?] n
Conexant Digicolor SoC Support (ARCH_DIGICOLOR) [N/y] n
Calxeda ECX-1000/2000 (Highbank/Midway) (ARCH_HIGHBANK) [N/y] n
Hisilicon SoC Support (ARCH_HISI) [N/y] n
Texas Instruments Keystone Devices (ARCH_KEYSTONE) [N/y/?] n
Rockchip RK2928 and RK3xxx SOCs (ARCH_ROCKCHIP) [N/y/?] n
Samsung S5PV210/S5PC110 (ARCH_S5PV210) [N/y/?] n
Sigma Designs Tango4 (SMP87xx) (ARCH_TANGO) [N/y] n
Socionext UniPhier SoCs (ARCH_UNIPHIER) [N/y/?] n
WonderMedia WM8850 (ARCH_WM8850) [N/y/?] n
Xilinx Zynq ARM Cortex A9 Platform (ARCH_ZYNQ) [N/y/?] n
*
* Processor Type
*
*
* Processor Features
*
Support for the Large Physical Address Extension (ARM_LPAE) [N/y/?] n
Support Thumb user binaries (ARM_THUMB) [Y/n/?] y
Enable ThumbEE CPU extension (ARM_THUMBEE) [N/y/?] n
Disable I-Cache (I-bit) (CPU_ICACHE_DISABLE) [N/y/?] n
Disable branch prediction (CPU_BPREDICT_DISABLE) [N/y/?] n
Harden the branch predictor against aliasing attacks (HARDEN_BRANCH_PREDICTOR) [Y/n/?] (NEW) aborted!

Console input/output is redirected. Run 'make oldconfig' to update configuration.

make[7]: *** [silentoldconfig] Error 1
make[6]: *** [silentoldconfig] Error 2

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make[5]: Leaving directory `/builds/zh/lede-k3/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/linux-4.14.77'
make[5]: *** [modules] Error 1
make[4]: *** [/builds/zh/lede-k3/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/linux-4.14.77/.modules] Error 2
make[4]: Leaving directory `/builds/zh/lede-k3/target/linux/bcm53xx'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/builds/zh/lede-k3/target/linux'
time: target/linux/compile#20.89#9.56#24.91
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/builds/zh/lede-k3'
make[1]: *** [/builds/zh/lede-k3/staging_dir/target-arm_cortex-a9_musl_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory `/builds/zh/lede-k3'
make: *** [world] Error 2
ERROR: Job failed: exit code 1
tossp commented 6 years ago

做出以下调整后编译通过

From 96717bbc64eb798d6c15645c62eec6a074f284aa Mon Sep 17 00:00:00 2001
From: Dennis <code@tossp.com>
Date: Mon, 22 Oct 2018 01:20:56 +0800
Subject: [PATCH] fix CONFIG_HARDEN_BRANCH_PREDICTOR=y

---
 target/linux/bcm53xx/config-4.14 |  1 +
 1 files changed, 1 insertions(+)

diff --git a/target/linux/bcm53xx/config-4.14 b/target/linux/bcm53xx/config-4.14
index e6f578c6..4b48298f 100644
--- a/target/linux/bcm53xx/config-4.14
+++ b/target/linux/bcm53xx/config-4.14
@@ -360,3 +360,4 @@ CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
-- 
2.19.1.windows.1