Skip navigation

Lost password? | Help

9th nonblog

unix, 3rd screen and media noise

Posts tagged with "linux"

building firmware for my AR680W

,

First. I need to install build-essentials and libnurses-dev on Ubuntu 7.10

Now. I should be able to compile a kernel, which is how I bricked my AR680W in the first place.

and back to square one:

-e WRG-N15 Building kernel image file (LZMA)...
make[3]: Entering directory `/tmp/ar680w/tools/squashfs-tools'
cc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 -c -o mksquashfs.o mksquashfs.c
mksquashfs.c:35:18: error: zlib.h: No such file or directory
mksquashfs.c: In function ‘mangle’:
mksquashfs.c:248: error: ‘Z_OK’ undeclared (first use in this function)
mksquashfs.c:248: error: (Each undeclared identifier is reported only once
mksquashfs.c:248: error: for each function it appears in.)
mksquashfs.c:249: error: ‘Z_MEM_ERROR’ undeclared (first use in this function)
mksquashfs.c:251: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)
mksquashfs.c: In function ‘get_fragment’:
mksquashfs.c:769: error: ‘Z_OK’ undeclared (first use in this function)
mksquashfs.c:770: error: ‘Z_MEM_ERROR’ undeclared (first use in this function)
mksquashfs.c:772: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)
make[3]: *** [mksquashfs.o] Error 1
make[3]: Leaving directory `/tmp/ar680w/tools/squashfs-tools'
make[2]: *** [kernel_image_lzma] Error 2
make[2]: Leaving directory `/tmp/ar680w'
make[1]: *** [all_without_kernel] Error 2
make[1]: Leaving directory `/tmp/ar680w'
make: *** [all] Error 2


no kernel for you!

I am not sure why I did not see anything at all when I tried to boot. Maybe somehow the linux kernel or uboot need to know how to output to TTL/RS232 [ my console ]

back to the kernel.... I installed zlibg1-dev and now the build goes a bit further...

g++ -O2 -Wall -o lzma LzmaAlone.o LzmaBench.o LzmaRam.o LzmaRamDecode.o LzmaDecode.o BranchX86.o LZMADecoder.o LZMAEncoder.o LZInWindow.o LZOutWindow.o RangeCoderBit.o InBuffer.o OutBuffer.o FileStreams.o Alloc.o C_FileIO.o CommandLineParser.o CRC.o String.o StringConvert.o StringToInt.o Vector.o -lm
make[4]: Leaving directory `/tmp/ar680w/tools/squashfs-tools/lzma/SRC/7zip/Compress/LZMA_Alone'
cp -f ./lzma/SRC/7zip/Compress/LZMA_Alone/lzma ./lzma
make[3]: Leaving directory `/tmp/ar680w/tools/squashfs-tools'

LZMA 4.17 Copyright (c) 1999-2004 Igor Pavlov 2005-04-18

Error: can not open input file /tmp/ar680w/kernel/arch/arm/boot/Image
make[2]: *** [kernel_image_lzma] Error 1
make[2]: Leaving directory `/tmp/ar680w'
make[1]: *** [all_without_kernel] Error 2
make[1]: Leaving directory `/tmp/ar680w'
make: *** [all] Error 2

what now?

virek@T7400U:/tmp/ar680w$ touch /tmp/ar680w/kernel/arch/arm/boot/Image


virek@T7400U:/tmp/ar680w$ make
-e
===================================================
You are going to build the f/w images.
Both the release and tftp images will be generated.
===================================================
-e -n Do you want to rebuild the linux kernel ? (yes/no) :
yes


---- lots of junk cut ----

make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/ar680w/tools/buildimg'
-e Remove CVS/SVN from target ...
-e WRG-N15: building squashfs!
Creating little endian filesystem on rootfs.img, block size 65536.

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments
Filesystem size 1725.00 Kbytes (1.68 Mbytes)
41.51% of uncompressed filesystem size (4155.12 Kbytes)
Inode table size 5003 bytes (4.89 Kbytes)
30.69% of uncompressed inode table size (16302 bytes)
Directory table size 6164 bytes (6.02 Kbytes)
49.40% of uncompressed directory table size (12477 bytes)
Number of duplicate files found 2
Number of inodes 720
Number of files 577
Number of fragments 36
Number of symbolic links 97
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 46
Number of uids 1
virek (1000)
Number of gids 0
-e WRG-N15 make F/W image (release image)!
boundary: 0x10000 (64K)
output: raw.img
input(0): kernel.img
input(1): rootfs.img
Opening file (0): kernel.img ...
Input File ------ size : 0x00000012 (18)
Add IN File ----- size : 0x00000012 (18)
Opening file (1): rootfs.img ...
Input File ------ size : 0x001b0000 (1769472)
Output File ----- size : 0x00000012 (18)
Output Pack To -- size : 0x00010000 (65536)
Tags Added ------ size : 0x00010020 (65568)
Add IN File ----- size : 0x001c0020 (1835040)
packimgs exit with code 0.
Create a new image file web.img
image header ----------------------------------------
signature : [wrgn15_airlink_ar680w]
magic : 0x20040220
-----------------------------------------------------
input image file ------------------------------------
file length : 1835040 (0x1c0020)
file peek : 5d000080000000000000000000000000
digest : 5c6b84d9900623820d3b64857e6291b4
-----------------------------------------------------
v2 image block header -------------------------------
Little endian image !
magic : 0x20040220
size : 1835040 (0x1c0020)
offset : 0 (0x0)
devname : /dev/mtdblock/1
digest : 5c6b84d9900623820d3b64857e6291b4
-----------------------------------------------------
-e -----------------------------------------------------
-e Image file : ar680w_v1.00_7cdc.bin
-e Signature : wrgn15_airlink_ar680w
-e Build number : 7cdc
-e -----------------------------------------------------
-rw-r--r-- 1 virek virek 1835136 2007-12-13 12:30 images/ar680w_v1.00_7cdc.bin
make[2]: Leaving directory `/tmp/ar680w'
make[1]: Leaving directory `/tmp/ar680w'


Seems I have a firmware image!

virek@T7400U:/tmp/ar680w/images$ md5 ar680w_v1.00_7cdc.bin
89c5a231b5cade11b840012ea61940ae ar680w_v1.00_7cdc.bin


Maybe I can tftp boot it tonight. Still need to research out the console issue.