PDA

Bekijk de volledige versie : patches which adds utils/wl



mctiew
02-02-2005, 10:15
I am still struggling to make sure or porve that my compile environment is correct. I tried applying some of the patches prepared by some honourable members here. But I am now stucked with this :-

One of the patches utils.diff, patches the Makefile in utils to add one more target, wl. But in my sources, the wl sources are not there.

Where can I find the sources for 'wl' ?

I suspect the GPL_1927 which I downloaded from one of the websites is different from yours, that accounts for the differences I noticed.

I appreciate if someone could help me out on this.

Thanks.

Oleg
02-02-2005, 10:41
wl is binary only and is "prepared" by ASUS somewhere in the mipsel-uclibc/.
One of steps is to copy this binary to the utils dir.

mctiew
02-02-2005, 14:31
wl is binary only and is "prepared" by ASUS somewhere in the mipsel-uclibc/.
One of steps is to copy this binary to the utils dir.

OK that is fixed. I have other errors in the make :-
--------------------------------------------------------
make[3]: Entering directory `/root/broadcom/src/router/www/asus'
echo EN
EN
./mkweb WL500g "EN"
Make WL500g Web Page
WL500g
s/ZVMODELVZ/WL500g/g
cat: ../web_WL500g/flash.default: No such file or directory
cp: cannot create regular file `../target/ramfs/etc/linuxigd/flash.default': No such file or directory
---------------------------------------------------------
I searched the entire system, the file flash.default is actually in folder "shared". I dont' have a directory ../web_WL500g at `/root/broadcom/src/router/www/asus'

The other error I have was the patching of www.diff. Might be because I patch it manually ( vs running your makefile/patch.sh ), there is a pages.mk.rej produced :-

----------------------------------------------------
***************
*** 0 ****
--- 1 ----
+ PAGES := *
----------------------------------------------------

and the content of pages.mk is :-

----------------
PAGES := *
----------------

Thanks in advance and looking forward to your reply.

Oleg
02-02-2005, 18:07
cat: ../web_WL500g/flash.default: No such file or directory
cp: cannot create regular file `../target/ramfs/etc/linuxigd/flash.default': No such file or directory

This is ok, ignore this message - this is yet another unused thing.


The other error I have was the patching of www.diff. Might be because I patch it manually ( vs running your makefile/patch.sh ), there is a pages.mk.rej produced :-

This should not be a problem, patch.sh is only used for kernel patching.



----------------------------------------------------
***************
*** 0 ****
--- 1 ----
+ PAGES := *
----------------------------------------------------

and the content of pages.mk is :-

----------------
PAGES := *
----------------

Thanks in advance and looking forward to your reply.
Hm... Looks like I've lost pages.mk in the original sources somehow. ok, just remove last chunk from the patch.

Why don't you just type make in the custom firmware dir? I've spent much time playing with this and you're trying to do that once again? I see no reason for that...

mctiew
03-02-2005, 04:02
Why don't you just type make in the custom firmware dir? I've spent much time playing with this and you're trying to do that once again? I see no reason for that...

Reason is I was kind of cautious. I want to know what's going on and make sure I will not wipe out certain things which could cause me a few days to repair.

Now that I have gotten a bit more knowledge on the thing, I did a make but I still could not match the file size exactly. This is what I got vs what you have compiled :-

total 11696
drwxr-xr-x 4 root root 4096 Feb 3 11:38 .
drwxr-xr-x 44 root root 4096 Feb 3 11:39 ..
drwxr-xr-x 38 root root 4096 Feb 3 11:38 install
-rw-r--r-- 1 root root 3686980 Feb 3 11:39 linux.bin
drwxr-xr-x 11 root root 4096 Feb 3 11:39 target
-rwx------ 1 root root 2835012 Feb 3 11:39 target.cramfs
-rw-r--r-- 1 root root 863647 Feb 3 11:39 vmlinuz
-rw-r--r-- 1 root root 3698688 Feb 3 11:39 WL500g-1.9.2.7-3b.trx
-rwxr-xr-x 1 root root 847474 Feb 3 11:39 zImage


# Firmware from Oleg
-rwxr-xr-x 1 root root 3715072 Feb 2 09:17 WL500g-1.9.2.7-3b.trx

I wonder if anybody else bother about this, ie it is quite impossible to match the file size exactly ? There is about 15K file size difference, which can be very significant. Wonder if it is due to the pages.mk ?

Cheers

mctiew
03-02-2005, 06:56
# Firmware from Oleg
-rwxr-xr-x 1 root root 3715072 Feb 2 09:17 WL500g-1.9.2.7-3b.trx

I wonder if anybody else bother about this, ie it is quite impossible to match the file size exactly ? There is about 15K file size difference, which can be very significant. Wonder if it is due to the pages.mk ?

Cheers

OK to move forward I guess my question now is, given a *.trx, how can I split it into vmlinuz and squashfs so that at least I could verify if the file list and file sizes are the same.

Appreciate your input.

Cheers

mctiew
03-02-2005, 10:21
OK to move forward I guess my question now is, given a *.trx, how can I split it into vmlinuz and squashfs so that at least I could verify if the file list and file sizes are the same.


OK I wrote a shell script to perform "brute force" trial on it.
My observation is the size of vmlinuz are out by 3 bytes in size, and the biggest different comes from files in the squashfs. The file list and names are identical.

So my conclusion is the my build environment is not too far out. I guess the executables are different sizes and content and it is due to differences in the header files ?

Cheers

p/s: script included :-



#!/bin/bash
#
# assuming your kernel is supporting squashfs and loop mount
#
LIMIT=1000000
a=863645

file=$1
while [ $a -le "$LIMIT" ]
do

a=$(($a+1))
rm squashfs.out header.out vmlinuz.out 2>/dev/null
echo "attempt squashfs $a"
dd if=$file of=squashfs.out bs=$a skip=1
mytype=`mount -o loop -t squashfs squashfs.out tmp`
err=$?
if [ "$err" -eq 0 ]
then


echo FOUND squashfs at "$a" "($err)"!!!
umount tmp
dd if=$file of=header.out bs=$a count=1
break
fi
done
# always at byte 28 ?
b=25
[ -f header.out ] && while [ $b -le "$a" ]
do

b=$(($b+1))
echo "attempt kernel $b"
dd if=header.out of=vmlinuz.out bs=$b skip=1
set -- `file vmlinuz.out`
if [ "$2" = "gzip" -a "$3" = "compressed" ]; then

echo FOUND vmlinuz at $b !!!
break
fi
done
# end script