This question might be sound obvious to some of you, but to me, it looks like a missing piece that I need in order to understand the picture.
Edit: Specifically, I'm using Ubuntu VM on my PC, trying to build Out-of-Tree kernel module that should run on BeagleBone Black,
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C M=$PWD
In the make command I usually need to enter the following 2 parameters:
- ARCH=
- CROSS_COMPILE=
To me "1" looks like redundant information that only adds to the complexity of the make command.
Of course, there is a solid reason why using both of them, and I tried to search in many forums and sites, but couldn't find an "answer for dummies" - I guess this is what I'm looking for.
So - my question: Isn't specifying the CROSS_COMPILE= enough to build the source code? taking for example:
- arm-linux-gnueabihf-
- aarch64-none-elf-
- arm-none-linux-gnueabihf
In all of the above options, we have the target CPU architecture, which is arm or aarch64 (which is also arm64).
So why do we need a specific directive such as ARCH= if the architecture is already implied in the CROSS_COMPILE= directive?