On 30/07/18 19:06, Vladimir Bashkirtsev wrote:
> Don't think that it has any bearing. After file is allocated in the FAT
> then FAT remains unaltered provided writes do not expand the file any
> further. envtools preallocate space in the file and only at this moment
> FAT is changed. Further writes to uboot.env from the point of view of
> the hardware are no different to writing directly to SD sectors.
Unfortunately not. File system writes from user space also triggers file
modification time updates. Since VFAT has no journal, and the
modification time is stored in the same sector as the file name, this
can cause that sector to become corrupted during a powerloss, and the
file can literally disappear.
AFAIK this can only happen while writing with the user space tools, not
when writing with U-Boot itself, which writes to direct sectors as you
say. But both are required for correct operation.
--
Kristian
>> <
ha...@baseflow.com <mailto:
ha...@baseflow.com>> wrote:
>>
>> Hi,
>>
>> I'm running a (non-Yocto) build on a Raspberry Pi.
>> Everyhting works fine, including the update process
>> itself.
>>
>> However, I'm still puzzled about the u-boot
>> environment settings. I see that you can point it
>> directly to a device, but also to a file.
>> My first test with a u-boot.env file with an
>> fw_env.config that looks like this:
>>
>> /uboot/uboot.env 0x0000 0x4000
>>
>> Now, in a different post from Don Cross it's mentioned
>> that for the Pi you need a setup like this:
>>
>> /dev/mmcblk0 0x4000 0x4000
>> /dev/mmcblk0 0x8000 0x4000
>>
>> So ... can anyone clear up my confusion? ;-)
>>
>>
>> Regards Harry
>> --
>> You received this message because you are subscribed
>> to the Google Groups "Mender List
mender.io
>> <
http://mender.io>" group.
>> <mailto:
mender+un...@lists.mender.io>.
>> To post to this group, send email to
>>
men...@lists.mender.io <mailto:
men...@lists.mender.io>.
>> <
http://mender.io>" group.
>> <mailto:
mender+un...@lists.mender.io>.
>> To post to this group, send email to
>>
men...@lists.mender.io <mailto:
men...@lists.mender.io>.
>> --
>> You received this message because you are subscribed to the
>> Google Groups "Mender List
mender.io <
http://mender.io>" group.
>> <mailto:
mender+un...@lists.mender.io>.
>> <mailto:
men...@lists.mender.io>.
>> Groups "Mender List
mender.io <
http://mender.io>" group.
>> <mailto:
mender+un...@lists.mender.io>.
>> <mailto:
men...@lists.mender.io>.
> Northern.tech AS <
https://northern.tech> | @northerntechHQ
> <
https://twitter.com/northerntechhq> | @drewmoseley
> <
https://twitter.com/drewmoseley>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Mender List
mender.io <
http://mender.io>" group.
> <mailto:
mender+un...@lists.mender.io>.
> <mailto:
men...@lists.mender.io>.
> <mailto:
mender+un...@lists.mender.io>.
> <mailto:
men...@lists.mender.io>.