Failure signing packages while using SDK

I'm trying to use the SDK to build some custom packages on top of 22.03.3. My packages build, but the build fails on the package signing step:

Signing package index...
Cannot open file '/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/key-build' for reading
Cannot open file '/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/key-build' for reading
Cannot open file '/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/key-build' for reading
Cannot open file '/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/key-build' for reading
Cannot open file '/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/key-build' for reading
Cannot open file '/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/key-build' for reading
Cannot open file '/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/key-build' for reading
make[2]: *** [package/Makefile:88: package/index] Error 1

I found a similar issue in an older discussion: Can't compile IPK with SDK ("key-build" signing key is missing). The suggested workaround of running make base-files doesn't appear to work.

How can I fix this problem? Can we update the SDK documentation so that it explains this necessary step?

My apologies if I missed something basic on the SDK page.

Following a quick conversation with @tmn505 on IRC:

You can run scripts/feeds install base-files and then run make; this will generate keys. For me the build still failed as I'm not able to completely build base-files, this appears to be related to the bug discussed here: https://github.com/openwrt/openwrt/pull/10255

However, once doing this I am able to build and fully package my own custom packages without issue:

sysadmin@stanazcac-build3-prd:/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64$ make package/sscep/compile
 make[1] package/sscep/compile
 make[2] -C package/toolchain compile
 make[2] -C package/kernel/linux compile
 make[2] -C feeds/base/package/kernel/cryptodev-linux compile
 make[2] -C feeds/base/package/libs/openssl compile
 make[2] -C feeds/packages/net/sscep compile
sysadmin@stanazcac-build3-prd:/home/johnf/src/openwrt-sdk-22.03.3-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64$

If you run the command ./staging_dir/host/bin/usign -G -s ./key-build -p ./key-build.pub -c "Local build key" from the base of the SDK directory then you'll generate keys and be able to build without packaging errors.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.