For the TL;DR out there, here is the short version:
Where is the CONFIG_TARGET_AM335X_EVM=y being set when compiling the am335x_evm_defconfig? Git history shows that sometime around April this line was removed from the am335x_evm_defconfig file yet when I compile, the .config file in the root directory lists this config as being set.
Compile Commands From eewiki
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig
make ARCH=arm CROSS_COMPILE=${CC}
Full Story:
I have a new chunk of hardware we developed based on the beaglebone black world. We did some changes to the board and to round it all out I would like to make a derivative of the “/board/ti/am335x_evm” for our board. I can give specific files and changes I made if needed but the jist is I copied the TI am335x_evm board and all associated files (include, configs, common, etc), renamed all to my board name, changed Kconfigs to add reference to my new board, and changed any file references in the sources to point to my new board (/board/me/myboard).
At this point I have essentially cloned the TI files under my own name but have not modified any sources. I attempted to compile U-Boot under my new board name but it appears that the source being compiled is still the /board/ti/am335x_evm/.
Compile commands:
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} myboard_defconfig
make ARCH=arm CROSS_COMPILE=${CC}
When I open up the .config file in the root folder I see that CONFIG_SYS_BOARD=“am335x” and not “myboard”, VENDOR is “ti” and not “me”, all of which are changed in the Kconfig file in my /board/my/myboard directory.
After some digging it appears that CONFIG_TARGET_AM335X_EVM is set when I would expect CONFIG_TARGET_MYBOARD would be set. Looking in /configs/am335x_evm_defconfig I do not see any CONFIG_TARGET_xxxxxxxxx lines. A text search for this line in the source turned up nothing that jumped out at me.
Where is the CONFIG_TARGET_AM335X_EVM being set? Git history shows that sometime around April this line was removed from the am335x_evm_defconfig file but I am not able to determine what has taken up defining this when compiling. Since I copied all the TI files, something recognizes myboard as am335x_evm and sets the CONFIG_TARGET_AM335x_EVM.
I did try adding a CONFIG_TARGET_MYBOARD=y to /configs/myboad_defconfig and build using that config and I get what I expected (CONFIG_SYS_BOARD=“myboard” in the .config) but why do I have to do this when the TI board does not?
Any insight greatly appreciated,
Ty