idea sounds good.
flashing the first firmimg.bin to the flash is easy - we can just swap the firmimg.bin from the same directory as the firmware updater.
question is how we get the second firmimg.bin to the right position of the hdd. as you are thinking of using the firmware updater we need to find a simple way to transfer a file to the folder of our choice on the hdd.
maybe this is possible via ap_servd/ls_servd?
i mean.....the image.dat is also transfered to the box....
kuroguy wrote:
The first init file in the first firmimg would automatically run on reboot and mount the harddisk and flash the permanent 4 MB firmware.
this should be easy. the current enhanced firmimg.bins already have /usr/sbin/mount_disk inside which mounts /dev/hda1 & /dev/hda3.
Code:
#! /bin/sh
echo -n "Mounting system (/dev/hda1) + data partition (/dev/hda3)"
echo -n "of the internal HDD to /mnt/"
mkdir /mnt/hda1
mkdir /mnt/hda3
mount -t vfat,ext3,ext2 /dev/hda1 /mnt/hda1
mount -t vfat,ext3,ext2 /dev/hda3 /mnt/hda3
exit 0
we have to write a script that automatically starts the mounting and then flashes the UBoot binary.
i call it /etc/init.d/uboot_installer - it has to be linked to the beginning of the starting process...
Quote:
# !/bin/sh
# mount the hdd-partitions
/usr/sbin/mount_disk
# check if hdd really was successfully mounted
# if yes proceed, if no stop
>> TO BE DONE
# start the UBoot flashing-script
/usr/sbin/flash_full_image
# maybe do some post-flashing checks before rebooting automatically and do not reboot if anything goes wrong
# so debugging + fixing it via telnet is possible
>> TO BE DONE
# automatically reboot
reboot
of course we need the /usr/sbin/flash_full_image script also:
Quote:
# !/bin/sh
# check which box this script is running on
>> can be used from other scripts
# check if a valid all-flash-file is available at the correct position on the hdd.
>> TO BE DONE
# flash the all-flash-file to the complete flash-device
>> TO BE DONE
exit 0;
any thoughts, suggestions or criticism?
or maybe some replacements for some "TO BE DONE"-blocks?
_________________
LS1 (2.6 kernel, foonas svn1062, 750 GB, UBoot 1.2) & LS Pro (FreeLink/jtymod/GenLink, changes all the time)
Thx to all donators!