nerves_system_rpi4 icon indicating copy to clipboard operation
nerves_system_rpi4 copied to clipboard

fwup: Consolodate duplicate metadata into fwup_include/fwup-common.conf

Open ringlej opened this issue 1 year ago • 2 comments

There is duplication of a set of defined variables between the fwup.conf and fwup-ops.conf. This PR eliminate this duplication by putting the common variable definitions into a file: fwup_include/fwup-common.conf and then includes it in fwup.conf and fwup-ops.conf with:

include("${NERVES_SDK_IMAGES:-.}/fwup_include/fwup-common.conf")

This allows the file to be found correctly in all the build environments where it is referenced. In one, the ${NERVES_SDK_IMAGES} variable exists and will be used and in the other it doesn't exist and the default value of . works there too

ringlej avatar Feb 02 '24 20:02 ringlej

i made a new project with and without this change. Two firmware files named

  • hello_fwup_common-current.fw
  • hello_fwup_common-next.fw
$ unzip -p hello_fwup_common-current.fw meta.conf >current.txt
$ unzip -p hello_fwup_common-nextt.fw meta.conf >next.txt
$ diff current.txt next.txt 
109c109
< blake2b-256="48f4572e0ab32146d5ae9908bb696958403c42ed881636f9340c8a22f7c7cb66"
---
> blake2b-256="43d39f3b9b281c54021b51fe422462e5a040a8ab4db9408d81d0ebc416a1b642"

Which i believe should mean the meta.conf file is exactly the same, except the hash.

ConnorRigby avatar Jun 17 '24 16:06 ConnorRigby

@ConnorRigby That's perfect. Thanks for verifying.

fhunleth avatar Jun 17 '24 17:06 fhunleth