Closed dwalkes closed 4 months ago
@leon-anavi this is the PR we discussed previously.
Hi @dwalkes,
After testing this GitHub pull request, I discovered a couple of minor issues:
|
has to be replaced with /
, aka it should be sed -i "s/@@MACHINE@@/${MACHINE}/g" ${WORKDIR}/system.conf
. Otherwise the generated system.conf
in the image is corrupted:
root@raspberrypi4-64:~# grep compatible /etc/rauc/system.conf
compatible=@@MACHINE@@
do_install:prepend
with the sed
command has to be moved from rauc_%.bbappend
to rauc-conf.bbappend
. This is required to be compatible with meta-rauc for Yocto releases Nanbield and Scarthgap. It is a follow-up from the merged https://github.com/rauc/meta-rauc-community/pull/86 Btw, due to things like this, moving on forward master branch of meta-rauc-community will not be compatible with Yocto release Kirkstone.I will merge this GitHub pull request as it is right now and shortly I will create a new GitHub pull request with fixes of the described minor issues.
Best regards, Leon
P.S. fixed with https://github.com/rauc/meta-rauc-community/pull/91
Hi @leon-anavi That's interesting. I tested with nanbield and kirkstone using https://github.com/Trellis-Logic/meta-aws-iot-demo/blob/main/conf/kas/rpi-rauc-aws-nanbield.yml and https://github.com/Trellis-Logic/meta-aws-iot-demo/blob/main/conf/kas/rpi-rauc-aws.yml respectively and didn't see this issue. I was able to update between releases and verified /etc/rauc/system.conf subtitution.
There is a typo in the sed command and | has to be replaced with /, aka it should be sed -i "s/@@MACHINE@@/${MACHINE}/g" ${WORKDIR}/system.conf.
Based on https://www.gnu.org/software/sed/manual/sed.html#The-_0022s_0022-Command I think the /
character can be replaced with |
. This logic was also copied directly from the meta-rauc-tegra implementation on the kirkstone branch at https://github.com/rauc/meta-rauc-community/blob/a24bd25bc1f871782fc956f9a3104256cac16691/meta-rauc-tegra/recipes-core/rauc/rauc_%25.bbappend#L11 and implemented with https://github.com/rauc/meta-rauc-community/commit/efca7d82edd00022034d5a4bf6a0b6bc48dd36b2
Hi @leon-anavi That's interesting. I tested with nanbield and kirkstone using https://github.com/Trellis-Logic/meta-aws-iot-demo/blob/main/conf/kas/rpi-rauc-aws-nanbield.yml and https://github.com/Trellis-Logic/meta-aws-iot-demo/blob/main/conf/kas/rpi-rauc-aws.yml respectively and didn't see this issue. I was able to update between releases and verified /etc/rauc/system.conf subtitution.
There is a patch in layer meta-rauc that splits into 'rauc' for binary and 'rauc-conf' for configuration: https://github.com/rauc/meta-rauc/commit/d51bab8f760d48e082f3515606d2d1a18343f5d6. It is included in the master branch of layer meta-rauc which is compatible with Yocto releases nanbield and scarthgap (not with kirkstone): https://github.com/rauc/meta-rauc/blob/master/conf/layer.conf#L20C28-L20C46. The YAML kas configuration files are using branches kirkstone and nanbield of meta-rauc which do not include this commit. This explains why you did hit this issue.
@drewmoseley submitted a GitHub pull request for meta-rauc-community which adapts meta-rauc-raspberrypi accordingly to rauc-conf https://github.com/rauc/meta-rauc-community/pull/86 I merged it today.
There is a typo in the sed command and | has to be replaced with /, aka it should be sed -i "s/@@machine@@/${MACHINE}/g" ${WORKDIR}/system.conf.
Based on https://www.gnu.org/software/sed/manual/sed.html#The-_0022s_0022-Command I think the
/
character can be replaced with|
. This logic was also copied directly from the meta-rauc-tegra implementation on the kirkstone branch atand implemented with efca7d8
Nice! Sorry, my bad, I forgot about this in meta-rauc-tegra.
Instead of hard-coding RaspberryPi4, use a MACHINE variable in the update bundle and system.conf to support builds of other RPi platforms and avoiding a mismatch of configs.