Hello,
i generate a custom CE8 image and will flash it with the Toradex Easy Installer on the iMX6. That step is basical working, if i use the nk.nb0 file form the image builder.
Now i search for a way, to set the Config Block with the Toradex Easy Installer.
Is there any posibility to do this?
The Toradex Easy Installer does not have this built in. What you can do is running a script that does the job with the first boot with the update tool, there is some documentation available about this here:
The basic information about installer scripts are on the page describing the Toradex-Easy-Installer.
For Colibri iMX6 and Apalis iMX6 there is already a wrapup script wrapup.sh included in our standard image download package.
You should not remove this script, but you can extend it with your code. The following extension should do the job of flashing the config block.
Shouldn’t the offset be OFFSET=$(($(cat /sys/block/mmcblk0boot0/size)-127))? Information from Flash Layout page: First sector of Config block = boot partion size - 127. And shouldn’t the count be 126?
Yes, your values are correct for WinCE, I fixed the post. The script above has been used to write the U-Boot environment, which is only 8KB long, that is where -17/count=16 came from.
In Windows CE you can save config block from the update tool, but in this case the tool will add a 16bytes offset to the actual contents of the flash.
In this case things get a bit more complicated (thanks to @michaelg to help sorting that out) because you need to skip those 16 bytes when reading the input file.
You can do that by passing bs=16 command line parameter to dd (the dd version we have in the easy installer does not support different sizes for input and output blocks) and add skip=1 to skip the first 16bytes. This would lead to 16 blocks also on the output, so you’ll have to mutiply the seek offset accordingly.
This should work for config block file exported by windows CE update tool (backup.cfg is the default name for config block exported via update tool):
you can find a template that can be used to install a custom Windows CE setup (image, registry, config block) using the Easy Installer. You’ll have to add your own image and configuration files and copy to a removable storage device.
Check the readme.txt file inside the download package for more detailed instructions.