Sorry, just came across this - not sure if it's the same, but I am having issues adding a new SUBTARGET to a device => even setting SUBTARGET in the target.mk file, the value is not being taken into use.
Are others seeing this same issue?
Let me try to explain. I am trying to add a tiny build to ramips, similar to what is done for ar71xx and ath79 (where I think it works ). I have added a new sub-target to the ramips makefile,
SUBTARGETS:=mt7620 tiny mt7621 mt76x8 rt288x rt305x rt3883
I have added the tiny directory, and inside that I modified target.mk, setting
And this new target (tiny, with images as desired) shows up in menuconfig - perfect! But, .config isn't set correctly (as follows),
Instead of the (needed?),
Given the SUBTARGET setting above, I would expect the second result? And as a consequence, follow on processing (like adding WiFi drivers) is not working as needed.
OK, a step forward! I found that the specific subtarget name was being used as a check inside the package (kernel) directory. Added the new subtarget, and that builds. Now, the next issue ... . It seems that for some reason now base-files is not building ... thoughts?
OK, figured that out ... was fixed with make clean. Now I get a full build, all packages seem to be there, manifest too. Just no sysupgrade file. Hmmm - not sure why that wouldn't get generated. Any ideas appreciated!
Yep, definitely narrowed to make target/linux/install - succeeds, and rootfs is built, just not taken from there to an image. I admit, struggling through all the Makefiles to try to figure out where this is all defined.
OK, figured it out! Want to report back, hopefully help others out.
So two things you need to do when adding a new SUBTARGET,
- Check packages, there may be logic in there based on the subtarget. Make sure to add / include the new target as necessary.
- DON'T leave an "old" (incorrect) SUBTARGET in the new target.mk file. While it may be the same platform, it will break the build. Found that out the hard way ... LOL.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.