Hi Vincent,
On 03.06.24 11:30,
vincent....@gmail.com wrote:
> Hello again,
>
> For my understanding, "ustate" and "recovery_status" are saved into
> bootloader with bootloader_env_set whereas "action_id"
> uses swupdate_vars_set that calls libuboot_env_store.
>
swupdate_vars_set() are again wrapper to libuboot calls like
bootloader_env_set() in case of U-Boot, but they accept a namespace.
This allows to split between bootloader and not bootloader variables.
This is independent from the bootloader.bootloader_env_set() will always
call the respective bootloader implementation, in your case Grub.
In case of Grub, you haven't surely configured libubootenv via
fw_env.config. Due to this and some other new features, the library has
become mandatory.
However, it is thought to be compatible - there should be some issue. In
server_handle_initial_state(), the action_id is first retrieved from the
server as it was done in the past. Only in case action_id is found in
environemnt (not grub environment), the new action_id overwrites the one
from server:
937 result = server_get_deployment_info(server_hawkbit.channel,
938
&channel_data, &action_id);
939
940 /*
941 * Get action_id from env, if any
942 */
943 get_action_id_from_env(&action_id);
get_action_id_from_env() shouldn't touch the value retrieved from
server. So in your case, it shouldn't fix the mismatch in case action_id
is changed on the server, what the patchset is doing, but it should work
as before.
But sure, this was fully tested with U-Boot as bootloader, Maybe somne
other side effects ?
Best regards,
Stefano Babic
> In my case, I use grub so I feel it will not work?
>
> Best regards,
> Vincent
>
> Le samedi 1 juin 2024 à 15:00:21 UTC+2, Stefano Babic a écrit :
>
> Hi Vincent,
>
> On 31.05.24 17:27,
vincent....@gmail.com wrote:
> > Hello,
> >
> > I'm using suricatta and I have following issue during kirkstone to
> > scarthgap migration.
> > After successfull install from hawkbit, my board reboots and
> fails to
> > set OK status back to the server.
> >
> > I guess it comes from following patch series:
> > "hawkbit: use stored action_id instead of current"
> >
> > For what I understand, "action_id" shall be saved into SWUpdate's
> > variable,
>
> SWUpdate tries to read action-id from bootloader environment, and it
> fallbacks to ask the server in case no variable is found.
>
> > but I'm not familiar with this "new" feature. I read
> >
>
https://sbabic.github.io/swupdate/sw-description.html#swupdate-persistent-variables <
https://sbabic.github.io/swupdate/sw-description.html#swupdate-persistent-variables> and maybe the need to set "namespace-vars" but I can't find any example for this simple legacy usecase ?
> >
> > action_id couldn't be saved in bootloader file? (I use grub)
> >
>
> It is.
>
> Best regards,
> Stefano Babic
>
> > I'm a bit lost if someone can help?
> >
> > Thanks by advance,
> > Vincent
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "swupdate" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to
swupdate+u...@googlegroups.com
> > <mailto:
swupdate+u...@googlegroups.com>.
> > To view this discussion on the web visit
> >
>
https://groups.google.com/d/msgid/swupdate/8f5485fa-8132-4d5f-8296-01dc864eadf7n%40googlegroups.com <
https://groups.google.com/d/msgid/swupdate/8f5485fa-8132-4d5f-8296-01dc864eadf7n%40googlegroups.com> <
https://groups.google.com/d/msgid/swupdate/8f5485fa-8132-4d5f-8296-01dc864eadf7n%40googlegroups.com?utm_medium=email&utm_source=footer <
https://groups.google.com/d/msgid/swupdate/8f5485fa-8132-4d5f-8296-01dc864eadf7n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swupdate+u...@googlegroups.com
> <mailto:
swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/swupdate/c0e8f527-61e3-45af-9fb6-dd5316bd0803n%40googlegroups.com <
https://groups.google.com/d/msgid/swupdate/c0e8f527-61e3-45af-9fb6-dd5316bd0803n%40googlegroups.com?utm_medium=email&utm_source=footer>.