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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
2,492 Views
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 Kudos
Reply
1 Solution
2,396 Views
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.

View solution in original post

0 Kudos
Reply
2 Replies
2,397 Views
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 Kudos
Reply
2,348 Views
newplough
Contributor I

Thank you !

0 Kudos
Reply