在x86上编译U-BOOT引导加载程序。

时间:2022-07-05 09:24:06

I have download and extracted u-boot-1.1.6 on Linux ubuntu. I just want to compile the source code using GCC(not targeting cross compilation for any embedded platform).

我在Linux ubuntu上下载并提取了u-boot-1.1.6。我只是想用GCC编译源代码(不针对任何嵌入式平台的交叉编译)。

I tried running provided MAKEALL makefile but "powerpc-linux-gcc : Not Found" is happening.

我尝试运行提供MAKEALL makefile,但“powerpc-linux-gcc: Not Found”正在发生。

My understanding is irrespective of platform the source code should compile.

我的理解是不考虑平台的源代码应该编译。

What are the necessary makefile and environment changes i need to do for compilation on x86?

在x86上编译所需的makefile和环境更改是什么?

I have taken the recent code. Still facing some issues

我用了最近的代码。仍然面临一些问题

I have followed following steps to compile it on x86. 1) make clean; 2) make coreboot-x86_config 3) ./MAKEALL -C x86

我在x86上执行了编译它的步骤。1)使清洁;2)make coreboot-x86_config 3) ./MAKEALL -C x86。

In step 3 i observed following:

在第3步中,我观察到:

ravitiwari@RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make clean ravitiwari@RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make coreboot-x86_config Configuring for coreboot-x86 - Board: coreboot, Options: SYS_TEXT_BASE=0x01110000 ravitiwari@RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ ./MAKEALL -C x86 Configuring for coreboot-x86 - Board: coreboot, Options: SYS_TEXT_BASE=0x01110000 make[1]: ** [interrupts.o] Error 127 make: ** [arch/x86/cpu/libx86.o] Error 2 make[1]: ** [coreboot.o] Error 127 make: ** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2 make[1]: ** [bootm.o] Error 127 make: ** [arch/x86/lib/libx86.o] Error 2 size: './u-boot': No such file /bin/bash: sparse: command not found make[1]: ** [interrupts.o] Error 127 make: ** [arch/x86/cpu/libx86.o] Error 2 make: ** Waiting for unfinished jobs.... /bin/bash: sparse: command not found make[1]: ** [coreboot.o] Error 127 make: ** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2 /bin/bash: sparse: command not found make[1]: ** [bootm.o] Error 127 make: ** [arch/x86/lib/libx86.o] Error 2 make: INTERNAL: Exiting with 4 jobserver tokens available; should be 3!

mso - hansi - font - family: tahoma; mso - fareast - font - family:宋体;mso - bidi - font - family: " times new roman "; mso - bidi - theme - font: minor - bidi ' > [1] < / span > < span错误127 make: ** (arch/x86/cpu/libx86)。错误2使[1]:** [coreboot]。错误127 make: ** [arch/x86/cpu/coreboot/libcoreboot]。错误2使[1]:** [bootm]。错误127 make: ** (arch/x86/lib/libx86)。错误2大小:'。/u-boot':没有这样的文件/bin/bash:稀疏:命令未被发现[1]:**[中断。错误127 make: ** (arch/x86/cpu/libx86)。错误2:**等待未完成的工作/bin/bash:稀疏:命令未找到make[1]: ** [coreboot。错误127 make: ** [arch/x86/cpu/coreboot/libcoreboot]。错误2 /bin/bash:稀疏:命令未找到make[1]: ** [bootm]。错误127 make: ** (arch/x86/lib/libx86)。错误2:内部:退出4个jobserver令牌可用;应该是3 !

--------------------- SUMMARY ----------------------------

Boards compiled: 1
Boards with errors: 1( coreboot-x86 )

1 个解决方案

#1


2  

make clean; make coreboot-x86_config; make is more likely to be useful to you.

使干净;使coreboot-x86_config;make更有可能对你有用。

In my experience, u-boot is built for a single specific embedded platform. That would be true even when your host is x86, so you have /usr/bin/gcc already installed.

根据我的经验,u-boot是为一个特定的嵌入式平台构建的。即使您的主机是x86,这也是正确的,所以您已经安装了/usr/bin/gcc。

What you stumbled on (I see it by running ./MAKEALL at top level) wants to build ALL of the embedded platforms available. But it will still build specific platforms, that is inherent to U-Boot mission. It defaulted to using powerpc toolchain (powerpc-linux-gcc) rather than the x86 toolchain. My suggestion instead chooses a specific x86-based platform, and builds it. You will see various compilation outputs at console, showing what's going on.

你偶然发现的(我看到它通过运行。/MAKEALL在顶层)想要构建所有可用的嵌入式平台。但它仍将构建特定的平台,这是U-Boot任务的固有特性。它默认使用powerpc工具链(powerpc-linux-gcc)而不是x86工具链。我的建议是选择一个特定的基于x86的平台,并构建它。您将在控制台看到各种编译输出,显示正在发生的事情。

MAKEALL would build, then throw away build results, for multiple other platforms first. You could do .MAKEALL -c x86 but that hides compilation outputs. For other CPU you'd need appropriate cross compiler installed.

MAKEALL将构建,然后抛弃构建结果,为多个其他平台。您可以做。makeall -c x86,但它隐藏了编译输出。对于其他CPU,您需要安装适当的交叉编译器。

#1


2  

make clean; make coreboot-x86_config; make is more likely to be useful to you.

使干净;使coreboot-x86_config;make更有可能对你有用。

In my experience, u-boot is built for a single specific embedded platform. That would be true even when your host is x86, so you have /usr/bin/gcc already installed.

根据我的经验,u-boot是为一个特定的嵌入式平台构建的。即使您的主机是x86,这也是正确的,所以您已经安装了/usr/bin/gcc。

What you stumbled on (I see it by running ./MAKEALL at top level) wants to build ALL of the embedded platforms available. But it will still build specific platforms, that is inherent to U-Boot mission. It defaulted to using powerpc toolchain (powerpc-linux-gcc) rather than the x86 toolchain. My suggestion instead chooses a specific x86-based platform, and builds it. You will see various compilation outputs at console, showing what's going on.

你偶然发现的(我看到它通过运行。/MAKEALL在顶层)想要构建所有可用的嵌入式平台。但它仍将构建特定的平台,这是U-Boot任务的固有特性。它默认使用powerpc工具链(powerpc-linux-gcc)而不是x86工具链。我的建议是选择一个特定的基于x86的平台,并构建它。您将在控制台看到各种编译输出,显示正在发生的事情。

MAKEALL would build, then throw away build results, for multiple other platforms first. You could do .MAKEALL -c x86 but that hides compilation outputs. For other CPU you'd need appropriate cross compiler installed.

MAKEALL将构建,然后抛弃构建结果,为多个其他平台。您可以做。makeall -c x86,但它隐藏了编译输出。对于其他CPU,您需要安装适当的交叉编译器。