[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bgl-discuss] elf format ramdisk for I/O node
- To: discuss@xxxxxxxxxxxxxxx
- Subject: [bgl-discuss] elf format ramdisk for I/O node
- From: Kazutomo Yoshii <kazutomo@xxxxxxxxxxx>
- Date: Tue, 08 Feb 2005 18:30:38 -0600
- Delivered-to: discuss-outgoing@bgl.mcs.anl.gov
- Delivered-to: discuss@bgl.mcs.anl.gov
- Sender: owner-discuss@xxxxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913
Hi,
I made tools to extract gzip'ed ramdisk from elf ramdisk
and create elf ramdisk with your gzip'ed ramdisk.
Here is quick usage
# ./extract-gzrd ramdisk.elf rd.gz
extract rd.gz from ramdisk.elf
# ./create-elfrd rd.gz newramdisk.elf
create newramdisk.elf with rd.gz
you can find them at bgl.mcs.anl.gov:/home/kazutomo/bin/
( I'll put the source code to cvs tomorrow. )
It works on both ppc(BigEndian) and x86(little endian).
You can also create your elf ramdisk using the gnu ld command
on ppc platoform. information from Pete
# ${CROSS}ld -b binary -e 0 -o ramdisk.img.elf ramdisk.img.gz
# ${CROSS}ld -T ramdisk.lds -o ramdisk.elf
# cat ramdisk.lds
OUTPUT_ARCH(powerpc)
SECTIONS
{
.data 0x1000000: {
LONG(0xf0e1d2c3);
LONG(ramdisk_end - ramdisk_start);
ramdisk_start = .;
ramdisk.img.elf
ramdisk_end = .;
}
}
8 bytes at the beginning of data is tricky...
Thanks,
Kaz
- --------------------------------------------------------------------
To add or remove yourself from this mailing list, use the 'notifyme'
command on any BGL machine. To remove: notifyme -n, to add: notifyme -y.