Re: Linksys WRT54G and the GPL

From: Erik Andersen (andersen@codepoet.org)
Date: Sun Jun 08 2003 - 18:35:46 EST


On Sat, 7 Jun 2003 21:53:14 -0600, Erik Andersen wrote:
> I went through a similar exercise several weeks ago when I saw
> the thread on the l-k mailing list. It took just a fix minutes
> to extract the linux kernel and cramfs filesystem from their
> firmware. Linksys is indeed shipping BusyBox and the Linux

BTW, this is what I did to open up the Linksys rom...

    #!/bin/sh

    wget ftp://ftp.linksys.com/pub/network/WRT54G_1.02.1_US_code.bin

    # I noticed a GZIP signature for a file name "piggy" at offset
    # 60 bytes from the start, suggesting we have a compressed Linux
    # kernel
    dd if=WRT54G_1.02.1_US_code.bin bs=60 skip=1 | zcat > kernel

    # Noticed there was a cramfs magic signature (bytes 45 3D CD 28
    followed shortly by "Compressed ROMFS") at offset 786464
    dd if=WRT54G_1.02.1_US_code.bin of=cramfs.image bs=786464 skip=1
    file cramfs.image

    sudo mount -o loop,ro -t cramfs ./cramfs.image /mnt
    ls -la /mnt/bin
    file /mnt/bin/busybox
    strings /mnt/bin/busybox | grep BusyBox
    # Use uClibc's ldd to get useful answers for non-x86 binaries
    /usr/i386-linux-uclibc/bin/i386-uclibc-ldd /mnt/bin/busybox

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:19 EST