Ubuntu 18.04でLinuxカーネルv.5.0.0をクロスコンパイル中にエラーが発生しました。
v7.4.0とv5.5.0の2つの異なるバージョンをテストしましたが、aarch64-linux-gnu-gcc
どちらも同じエラーが発生しました。
以下は、私がインストールした依存関係とカーネルをコンパイルするために実行したコマンドです。
$ sudo apt install libssl-dev libelf-dev build-essentials libncurses5-dev flex bison gcc-arm-linux-gnueabi gcc-arm-none-eabi gcc-arm-linux-gnueabihf gcc-arm-none-eabi-source
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j
私が受け取ったエラーメッセージは次のとおりです。
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
AR init/built-in.a
AR built-in.a
LD vmlinux.o
MODPOST vmlinux.o
arch/arm64/crypto/sha2-ce-glue.o: In function `sha256_base_do_update':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:82: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:82:(.text+0x220): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75:(.text+0x2bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
arch/arm64/crypto/sha2-ce-glue.o: In function `sha256_base_do_finalize':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:111: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:111:(.text+0x4ec): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:106: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:106:(.text+0x598): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
arch/arm64/crypto/sha2-ce-glue.o: In function `sha256_base_do_update':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:82: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:82:(.text+0x694): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
arch/arm64/crypto/sha2-ce-glue.o:/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75: more undefined references to `sha256_block_data_order' follow
arch/arm64/crypto/sha2-ce-glue.o: In function `sha256_base_do_update':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75:(.text+0x6cc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
arch/arm64/crypto/sha2-ce-glue.o: In function `sha256_base_do_finalize':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:111:(.text+0x79c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:106:(.text+0x908): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
arch/arm64/crypto/sha256-glue.o: In function `sha256_base_do_update':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:82:(.text+0x158): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75:(.text+0x190): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `sha256_block_data_order'
arch/arm64/crypto/sha256-glue.o: In function `sha256_base_do_finalize':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:111:(.text+0x218): additional relocation overflows omitted from the output
arch/arm64/crypto/sha256-glue.o: In function `sha256_base_do_update':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:82: undefined reference to `sha256_block_neon'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75: undefined reference to `sha256_block_neon'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75: undefined reference to `sha256_block_data_order'
arch/arm64/crypto/sha256-glue.o: In function `sha256_base_do_finalize':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:111: undefined reference to `sha256_block_neon'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:111: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:106: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:106: undefined reference to `sha256_block_neon'
arch/arm64/crypto/sha256-glue.o: In function `sha256_base_do_update':
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:82: undefined reference to `sha256_block_data_order'
/home/shpark/git.kernel.org/arm64/linux/./include/crypto/sha256_base.h:75: undefined reference to `sha256_block_data_order'
arch/arm64/crypto/sha256-glue.o: In function `__ksymtab_sha256_block_data_order':
sha256-glue.c:(___ksymtab+sha256_block_data_order+0x0): undefined reference to `sha256_block_data_order'
Makefile:1021: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
この問題をどのように解決できますか?失敗の理由がわかりません。
ありがとうございます!