I noticed that the romimage files created by the linuxBIOS build do not have a date in the last few bytes of the image. I believe that most rom images use this area to identify the date the rom was compiled. Is there a tool in the LinuxBIOS "arsenal" that can add the date to the correct file, say linuxbios.rom, before performing the cat to get romimage?
John
On Thu, 16 Jan 2003, John Allen wrote:
I noticed that the romimage files created by the linuxBIOS build do not have a date in the last few bytes of the image. I believe that most rom images use this area to identify the date the rom was compiled. Is there a tool in the LinuxBIOS "arsenal" that can add the date to the correct file, say linuxbios.rom, before performing the cat to get romimage?
If you want to send me the script to do it I'll set it up in the tree.
ron
Ron, I whipped together this little script to add the date to linuxbios.rom. Its ugly but it seems to work.
#!/bin/sh #rom_add_date
date +%D > date.bin dd if=/dev/zero of=two.bin bs=2 count=1 dd if=linuxbios.rom of=linuxbios_pre_date.bin bs=`expr $1 - 11` count=1 rm -f linuxbios.rom cat linuxbios_pre_date.bin date.bin two.bin > linuxbios.rom rm -f two.bin rm -f date.bin rm -f linuxbios_pre_date.bin
I also have added a line under the linuxbios.rom heading in the makefile as follows.
linuxbios.rom: linuxbios.strip
export size=`ls -l linuxbios.strip | (read p c u g size r ; echo $$size)` ; \ echo $$size ; \ dd if=linuxbios.strip of=linuxbios.rom bs=1 seek=`expr $(ROM_IMAGE_SIZE) - $$size` ./rom_add_date $(ROM_IMAGE_SIZE)
Do with it what you want. Its all yours.
John
Ronald G. Minnich wrote:
On Thu, 16 Jan 2003, John Allen wrote:
I noticed that the romimage files created by the linuxBIOS build do not have a date in the last few bytes of the image. I believe that most rom images use this area to identify the date the rom was compiled. Is there a tool in the LinuxBIOS "arsenal" that can add the date to the correct file, say linuxbios.rom, before performing the cat to get romimage?
If you want to send me the script to do it I'll set it up in the tree.
ron
#!/bin/sh #rom_add_date
date +%D > date.bin dd if=/dev/zero of=two.bin bs=2 count=1 dd if=linuxbios.rom of=linuxbios_pre_date.bin bs=`expr $1 - 11` count=1 rm -f linuxbios.rom cat linuxbios_pre_date.bin date.bin two.bin > linuxbios.rom rm -f two.bin rm -f date.bin rm -f linuxbios_pre_date.bin
John Allen jallen@integraltech.com writes:
Ron, I whipped together this little script to add the date to linuxbios.rom. Its
ugly but it seems to work.
For what it is worth the build date is already recorded in the version string of LinuxBIOS, and is in the LinuxBIOS table. At the end of the romimage if you include id.inc and id.lds you get the motherboard manufacturer and model at the end of the romimage.
I would suggest simply prepending the date in the form to the data already present in id.inc, if you want to be able to get at it that way...
Eric
I am following a specific format used in most rom images where the date is in MM/DD/YY format starting 11 bytes from the end of the romimage.
Eric W. Biederman wrote:
John Allen jallen@integraltech.com writes:
Ron, I whipped together this little script to add the date to linuxbios.rom. Its
ugly but it seems to work.
For what it is worth the build date is already recorded in the version string of LinuxBIOS, and is in the LinuxBIOS table. At the end of the romimage if you include id.inc and id.lds you get the motherboard manufacturer and model at the end of the romimage.
I would suggest simply prepending the date in the form to the data already present in id.inc, if you want to be able to get at it that way...
Eric