Bootloader modifications for Gateworks Laguna GW2388-4
On this page, we would like to document our modifications on Gateworks u-boot v2008.10 for the Laguna GW2388-4 board.
ATTENTION: All patches are provided "as is" and without warranty! Please use them only, if you know what you are doing and have knowledge and equipment to (re)activate a virgin board!
Why do we need a modification? The bootloader provided by Gateworks is not able to use the automatic tftp update feature, because they currently use an older release (as of 4th april 2011). We asked them for an update, but there was no reply.
So we take the sources provided from Gateworks' svn and the official u-boot repository and created a diff, because the Cavium cns3xxx chip isn't supported by default from u-boot (as of 4th april 2011).
After that, a rebasing to v2009.01 was done to get the desired feature. After solving the conflicts, we were able to compile a new bootloader for our boards (refer to patches  and ). Now we can use a central server which stores the image and all boards automatically flash their memory, if there is an new image file available- maintainance becomes quite easy now.
Then, we implemented a nice feature to the auto update mechanism: to save boottime and lesser stressing the flash chip, we implemented a hash-check in the auto update function: if the loaded image has the same hash as the one, which is installed, we skip the installation. Please refer to patch  for this feature.
Another feature prevents us (or someone evil) to flash the bootloader of our devices with a new one. This is a simple check, if the flash address is in the area of the system (kernel and rootfs). If it is below them, the auto update process is canceled. This is not really a high security feature and works especially for the Laguna board (other boards have maybe another flash address). Please refer to patch  for this feature.
: u-boot.bin (md5: TBD)