簡體   English   中英

在Linux編譯中錯過了asm / types.h

[英]miss asm/types.h in linux compile

lenge@lenge-pc:/lenge/linux/kernel_online$ git branch 
  master  
* tag_v4.15 
CONFIG is defconfig. 

當我編譯kernel(v4.15) ,發生錯誤,如下所示:

在包含的文件中

/lenge/linux/kernel_online/include/linux/types.h:6,
      from /lenge/linux/kernel_online/include/linux/page-flags.h:9,
      from /lenge/linux/kernel_online/kernel/bounds.c:10: 
/lenge/linux/kernel_online/include/uapi/linux/types.h:5:10: fatal
      error: asm/types.h: No such file or directory  #include <asm/types.h>
                  ^~~~~~~~~~~~~ compilation terminated.

那是我的編譯方法:
make ARCH=arm64 -C /lenge/linux/kernel_online O=/lenge/linux/kernel_out_aarch64 CROSS_COMPILE=/lenge/gnu/aarch64/bin/aarch64-lenge-linux-gnu- -j4

我創建符號鏈接作為休假:

ln -s /lenge/linux/kernel_out_aarch64/source/arch/arm64/include/generated/uapi/asm arch/arm64/include/generated/uapi/asm

沒關系。

我只是將相同的問題交叉編譯到arm64。

我注意到即使在我的構建中使用輸出目錄(O =),我的源代碼樹中仍有一些生成的文件。 我不確定是否一次不小心忽略了O =或發生了什么,但這使事情變得混亂了。

為了解決這個問題,我在源目錄中執行了clean(如果您偏執,則設為mrproper)以刪除所有生成的文件。 成功運行O =的常規make命令成功,並且未在源目錄中生成文件(如預期)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM