How to change the compiler to aarch64-linux-gnu when building the imx8mp bsp

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to change the compiler to aarch64-linux-gnu when building the imx8mp bsp

跳至解决方案
2,488 次查看
newplough
Contributor I

Hello,

Can I specify a different version of the compiler  (such as aarch64-Linux-gnu)  when compiling the imx8mp bsp using the following command ? 

MACHINE=imx8mpevk DISTRO=fsl-imx-wayland source ./imx-setup-release.sh -b build-wayland

Bitbake imx-image-full

It uses aarch64-poky-linux-gcc when building the bsp,  I don't know how to change it.

Thanks !

 

0 项奖励
回复
1 解答
2,392 次查看
ramprakash08
Contributor IV

Certainly, you can designate an alternative compiler version while constructing the imx8mp bsp. Achieve this by adjusting the TARGET_PREFIX variable within your local.conf file. This variable determines the toolchain prefix. In your situation, set it as aarch64-linux-gnu-.

Follow these steps:

1. Open your local.conf file using a text editor.
2. Locate the line beginning with #TARGET_PREFIX, remove the # to uncomment it.
3. Change the TARGET_PREFIX value to aarch64-linux-gnu-
4. Save and close the file.
5. Re-execute your build command.

After implementing the change, your local.conf line should appear as follows:

TARGET_PREFIX = 'aarch64-linux-gnu-'

Note that altering the compiler might cause build errors if the new compiler isn't fully compatible with the source code. Only switch compilers if you're certain of compatibility.

Keep in mind, the local.conf file resides in the build directory generated upon running imx-setup-release.sh script. Run this script before modifying the local.conf file.

Run the imx-setup-release.sh script using this command:

MACHINE=imx8mpevk DISTRO=fsl-imx-wayland source ./imx-setup-release.sh -b build-wayland

Upon running the command, the build directory will form, enabling local.conf modification.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,393 次查看
ramprakash08
Contributor IV

Certainly, you can designate an alternative compiler version while constructing the imx8mp bsp. Achieve this by adjusting the TARGET_PREFIX variable within your local.conf file. This variable determines the toolchain prefix. In your situation, set it as aarch64-linux-gnu-.

Follow these steps:

1. Open your local.conf file using a text editor.
2. Locate the line beginning with #TARGET_PREFIX, remove the # to uncomment it.
3. Change the TARGET_PREFIX value to aarch64-linux-gnu-
4. Save and close the file.
5. Re-execute your build command.

After implementing the change, your local.conf line should appear as follows:

TARGET_PREFIX = 'aarch64-linux-gnu-'

Note that altering the compiler might cause build errors if the new compiler isn't fully compatible with the source code. Only switch compilers if you're certain of compatibility.

Keep in mind, the local.conf file resides in the build directory generated upon running imx-setup-release.sh script. Run this script before modifying the local.conf file.

Run the imx-setup-release.sh script using this command:

MACHINE=imx8mpevk DISTRO=fsl-imx-wayland source ./imx-setup-release.sh -b build-wayland

Upon running the command, the build directory will form, enabling local.conf modification.

0 项奖励
回复
2,344 次查看
newplough
Contributor I

Thank you !

0 项奖励
回复