In my sw-description file I have one small issue where one of the bootloader(uboot) environment variables is incorrectly set when the swupdate process is executed (which is successful).
The one in question is this:
```
{
name = "recovery_setargs";
value = "setenv bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200 ${kern_ip}";
},
```
Which expands to this:
```
recovery_setargssetenv=bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200 ${kern_ip} setenv bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200 ${kern_ip}
```
I confirm this while I'm in userspace as well:
```
root@var-som-mx6:~# fw_printenv recovery_setargs
## Error: "recovery_setargs" not defined
root@var-som-mx6:~# fw_printenv recovery_setargssetenv
recovery_setargssetenv=bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200 ${kern_ip} setenv bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200 ${kern_ip}
```
Is there something in the background with string replacements and keywords that I am unaware of?
Thanks
Hi Stefano,
Thank you for your swift reply.
```
root@var-som-mx6:~# fw_printenv recovery_setargs
## Error: "recovery_setargs" not defined
root@var-som-mx6:~# fw_setenv recovery_setargs "setenv bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200 ${kern_ip}"
root@var-som-mx6:~# fw_printenv recovery_setargs
recovery_setargs=setenv bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200
```
I have no issues using fw_setenv albeit ${kern_ip} isn't defined hence why it is blank, which I understand.
I used the verbose swupdate output and saw that it parses it as below:
```
[NOTIFY] : SWUPDATE running : [parse_uboot] : U-Boot var: recovery_setargssetenv bootargs ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs ro console=ttymxc0,115200 ${kern_ip} = setenv bootargs ubi.mtd=4 root=ubi0:r
```
Just an update on this for others who might stumble onto this thread or suffer with this problem.
It was indeed because I was using an older version of swupdate; one before this commit was added: https://github.com/sbabic/swupdate/commit/87565c2693acfc049102ba07268286ef1d5be6ef