配置 u-boot for new board error because __LINUX_ARM_ARCH__

Config u-boot for new board error because __LINUX_ARM_ARCH__

我尝试了一些设置配置来为新板加载 u-boot。我的配置基于 Beagle Bone Black 的 U-boot。我还在 https://github.com/PacktPublishing/Mastering-Embedded-Linux-Programming-Second-Edition/blob/master/Chapter03/0001-BSP-for-Nova.patch 上关注新板的一些变化。 我克隆了一个新的 u-boot 并站在主站 b运行ch,在我为新板制作配置文件后,我 运行 制作。它有 2 个问题:

  1. 首先是关于SYS_TEXT_BASE:

scripts/kconfig/conf --syncconfig Kconfig

.config:22:warning: symbol value '' invalid for SYS_TEXT_BASE

* * Restart config... * *

  • Boot images *

Enable support for Android Boot Images (ANDROID_BOOT_IMAGE) [Y/n/?] y

Support Flattened Image Tree (FIT) [N/y/?] n

Enable support for the legacy image format (IMAGE_FORMAT_LEGACY) [Y/n/?] y

Set up board-specific details in device tree before boot (OF_BOARD_SETUP) [N/y/?] n

Set up system-specific details in device tree before boot (OF_SYSTEM_SETUP) [N/y/?] n

Update the device-tree stdout alias from U-Boot (OF_STDOUT_VIA_ALIAS) [N/y/?] n

Extra Options (DEPRECATED) (SYS_EXTRA_OPTIONS) []

Text Base (SYS_TEXT_BASE) [] (NEW)

然后我搜索了一个SYS_TEXT_BASE并输入了一个运行dom文本库:0xfff10000。但我认为它不适合 Beagle Bone。

  1. 错误LINUX_ARM_ARCH

In file included from ./arch/arm/include/asm/system.h:6:0,

             from ./arch/arm/include/asm/cache.h:11,
             from include/net.h:15,
             from include/common.h:517,
             from lib/asm-offsets.c:14:

./arch/arm/include/asm/barriers.h:32:24: error: operator '>=' has no left operand #if LINUX_ARM_ARCH >= 7 ^~

./arch/arm/include/asm/barriers.h:36:26: error: operator '==' has no left operand #elif LINUX_ARM_ARCH == 6 ^~ Kbuild:43: recipe for target 'lib/asm-offsets.s' failed

make[1]: *** [lib/asm-offsets.s] Error 1

Makefile:1575: recipe for target 'prepare0' failed

make: *** [prepare0] Error 2

对于第二个问题,这是由 Kconfig 选项在 master 上被重命名(CPU_V7 到 CPU_V7A)引起的。我将 Kconfig CUP_V7A 更改为 CPU_V7,但仍然有同样的问题。请查看,谢谢。

Beaglebone Black Board 的文本库是 CONFIG_SYS_TEXT_BASE=0x80100000。它在 configs/omap3_beagle_defconfig.

中指定

符号__LINUX_ARM_ARCH__是根据.config中定义的CONFIG_SYS_ARM_ARCH在arch/arm/Makefile中定义的。所以你的 .config 文件一定有问题。