Hi. I'm looking for ideas or suggestions for field updates for an embedded system running linux with syslinux as the bootloader. The requirements are to be able to upload an image online (probably a private network using sftp) while the device is running, do some error checking on the new image and then reboot the device and run the new version. I'll be running off a CF card. The image is likely to be over 1G, and I only have 512M of RAM, which means I'll have to load the image into flash and run it from flash. I'm assuming I'll set a bit somewhere in upper flash space to tell which image to boot from. I know syslinux will allow booting multiple OSs. Is there any way I can configure things to do what I'm trying to do? Or come close? Thanks. Lee
On Wed, Apr 14, 2010 at 1:22 PM, Lee Thalblum <LThalblum-consultant at cleverdevices.com> wrote:> Hi. I'm looking for ideas or suggestions for field updates for an embedded system running linux with syslinux as the bootloader. The requirements are to be able to upload an image online (probably a private network using sftp) while the device is running, do some error checking on the new image and then reboot the device and run the new version. I'll be running off a CF card. The image is likely to be over 1G, and I only have 512M of RAM, which means I'll have to load the image into flash and run it from flash. I'm assuming I'll set a bit somewhere in upper flash space to tell which image to boot from. > > I know syslinux will allow booting multiple OSs. Is there any way I can configure things to do what I'm trying to do? Or come close? Thanks. > > Lee >I saw something similar to this once, but im not convinced it will work for you. I remember cf cards having a max write limit but im not sure about the current state of cf card affairs. Anyway, This is how I saw this done: The hard drive was configured to run the grub boot loader. There were two grub configuration files. Normal boot, and reimage boot. a copy of normal boot was copied to grubs config location and name. a script ran in the backround of the normal boot process looking for a new image to load. If it found a new image it did the sanity checking, switched the two grub config files so that the next boot it would boot from the network and run the reimage procedure. The reimage process took care of restoring the normal grub.conf file and when it was done it scheduled another reboot. I thought this was really intelligent and relatively maintenance free. The only issue is when the location of the image on the network moves. all the scripts had to be redone. What we did for this transition is that we created a dummy image that had updated scripts. and put the real new image in its new home. the next update cycle forced two updates per device, but it worked. Maybe something like this would help you.
On 04/14/2010 11:22 AM, Lee Thalblum wrote:> Hi. I'm looking for ideas or suggestions for field updates for an embedded system running linux with syslinux as the bootloader. The requirements are to be able to upload an image online (probably a private network using sftp) while the device is running, do some error checking on the new image and then reboot the device and run the new version. I'll be running off a CF card. The image is likely to be over 1G, and I only have 512M of RAM, which means I'll have to load the image into flash and run it from flash. I'm assuming I'll set a bit somewhere in upper flash space to tell which image to boot from. > > I know syslinux will allow booting multiple OSs. Is there any way I can configure things to do what I'm trying to do? Or come close? Thanks. >Hi there, There are multiple ways to do what you want, and it's not entirely clear from context which would be the easiest in your situation. The simplest way, if you have sufficient flash, is probably to have two partitions, one active and one standby, in your flash, and install the new image to the standby partition. After your verification tests pass, you can flip the active bit to the formerly-standby partition and reboot. -hpa