Patrick Georgi via coreboot wrote:
It's absurd to me that coreboot would require any routines out of any submodule for a build which will not use those routines.
coreboot doesn't, cbfstool does.
If that were the case things would already be a lot better!
Alas, coreboot unconditionally requires vboot in these files:
Makefile.inc src/commonlib/bsd/cbfs_private.c src/commonlib/bsd/include/commonlib/bsd/cbfs_private.h src/commonlib/bsd/include/commonlib/bsd/cbfs_serialized.h src/commonlib/cbfs.c src/commonlib/include/commonlib/cbfs.h src/include/memlayout.h src/lib/bootmode.c
There are additional, more or less target-specific, dependencies in:
src/drivers/intel/fsp2_0/memory_init.c src/soc/amd/picasso/psp_verstage/psp_verstage.c src/soc/intel/common/block/cse/cse_lite.c src/soc/qualcomm/common/qclib.c src/soc/rockchip/rk3288/crypto.c
The hard requirements increase over time. Two years ago they were:
Makefile.inc src/commonlib/cbfs.c src/commonlib/include/commonlib/cbfs.h src/lib/bootmode.c src/security/vboot/Makefile.inc src/southbridge/intel/common/pmbase.c
In addition to that, since every coreboot build does require cbfstool (no problem per se) the indirect requirement through cbfstool also counts, as long as cbfstool can only be built to support everything.
One purpose of Kconfig is to ensure that only what's neccessary gets built.
But cbfstool isn't hooked up to Kconfig. Given that it's not part of the final coreboot build, having extra stuff in cbfstool doesn't affect coreboot in the slightest, so it's not clear to me that we should change that.
Maybe we view Kconfig differently. I expect it to control not only the final build artefact but also the build process, meaning what gets built and what is needed for successful build.
It's wrong to pull in anything during build. I too am guilty of this by pushing for buildgcc, it would be good to improve that case too.
Given your reference to buildgcc, I guess you mean "download"? In that case: git clone --recurse-submodules and there's not a single extra download going on at build time.
Right, but maybe we at least agree that requiring some submodule(s) for nothing is at a minimum unneccessary?
It is because that's what consistently causes me extra work and
frustration every time I want to build a minimal coreboot.
git clone --recurse-submodules is extra work, really?
I don't want any submodules, so I go over the source and remove the requirement.
What some people always want isn't OK to require when other people do not want it. I think that's just lazy, and not the smart kind. :\
Some people do not want ramstage. Some people do not want blobs. Some people do not want x86 support. They still carry the baggage when downloading coreboot.
Indeed I think that coreboot has a lot of unneccessary baggage, like this vboot requirement. It seems that it's rather one of a few cases of this type of problem, but unneccessary dependencies are never good.
//Peter