Compile from svn

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 6802
Location: Dresden, Germany

PostPosted: Fri Dec 08, 2006 11:40    Post subject: Reply with quote
TomTom wrote:
Tornado wrote:
Maybe, I can help Tom, what are you trying to compile. Did you see the recent post on Compiling SP3 ?

Let me know, I would be happy to help ?


Thanx,

I've seen all the posts concerning SP3.- In the meanwhile I've figured out how to create piggy:

cd src/linux/brcm/linux.v23/arch/mips/bcm947xx/compressed/
export OBJCOPY=/opt/3.3.4/bin/mipsel-linux-uclibc-objcopy
export TOPDIR=/home/dd-wrt/snapshot/DD-WRT/src/linux/brcm/linux.v23/
make piggy
make

Which gives:


wrt@nomad:~/snapshot/DD-WRT/src/linux/brcm/linux.v23/arch/mips/bcm947xx/compressed> export OBJCOPY=/opt/3.3.4/bin/mipsel-linux-uclibc-objcopy
wrt@nomad:~/snapshot/DD-WRT/src/linux/brcm/linux.v23/arch/mips/bcm947xx/compressed> export TOPDIR=/home/dd-wrt/snapshot/DD-WRT/src/linux/brcm/linux.v23/
wrt@nomad:~/snapshot/DD-WRT/src/linux/brcm/linux.v23/arch/mips/bcm947xx/compressed> make piggy
/opt/3.3.4/bin/mipsel-linux-uclibc-objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S /home/dd-wrt/snapshot/DD-WRT/src/linux/brcm/linux.v23//vmlinux piggy
wrt@nomad:~/snapshot/DD-WRT/src/linux/brcm/linux.v23/arch/mips/bcm947xx/compressed> make
gzip -c9 piggy > vmlinuz
wrt@nomad:~/snapshot/DD-WRT/src/linux/brcm/linux.v23/arch/mips/bcm947xx/compressed> l
total 2672
-rw-r--r-- 1 wrt users 843 2006-08-12 21:45 Makefile
-rwxr-xr-x 1 wrt users 1929216 2006-12-07 18:32 piggy
-rw-r--r-- 1 wrt users 790913 2006-12-07 18:32 vmlinuz
wrt@nomad:~/snapshot/DD-WRT/src/linux/brcm/linux.v23/arch/mips/bcm947xx/compressed>

Then I'm able to copy vmlinuz

I'm still looking for the code which does this during the automatic installation - 'cause all the magic with the .config_mini .config_mserver would be useless..... and the used kernel is always the same....

When I'm back at home I'll look on my wrts if the kernel build date of the different dd-wrt version is different.

//TomTom


you dont need this. the objcopy stuff is done by the kernel makefiles. and yes i'm compiling the kernel with a different toolchain and this is needed. all what i said is true

_________________
one cigarette costs 2 minutes of your life.
one bottle of beer costs 4 minutes of your life.
one working day costs 8 hours of your life.

Yummee:
Linux DD-WRT 4.14.8 #42 SMP PREEMPT Thu Dec 21 18:11:16 CET 2017 armv7l DD-WRT
root@DD-WRT:/sys# nvram get DD_BOARD
Netgear R7800
Sponsor
TomTom
DD-WRT Novice


Joined: 13 Jul 2006
Posts: 19
Location: Braunschweig

PostPosted: Fri Dec 08, 2006 12:06    Post subject: Reply with quote
BrainSlayer wrote:


you dont need this. the objcopy stuff is done by the kernel makefiles. and yes i'm compiling the kernel with a different toolchain and this is needed.


Oh - this makes sense. I looked into the Makefile of the kernel and I haven't found it. Maybe you may post the code-sniplet ? Or where can I found this different toolchain ?

BrainSlayer wrote:

all what i said is true


Maybe. But you don't _answer_ questions - you just give a few scraps of information. The whole thing was about "where is piggy" and I haven't seen this simple answer in this thread.

So either you don't know or you don't tell. IMHO Information hidding is as worse as lying.

//TomTom
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 6802
Location: Dresden, Germany

PostPosted: Fri Dec 08, 2006 13:47    Post subject: Reply with quote
TomTom wrote:
BrainSlayer wrote:


you dont need this. the objcopy stuff is done by the kernel makefiles. and yes i'm compiling the kernel with a different toolchain and this is needed.


Oh - this makes sense. I looked into the Makefile of the kernel and I haven't found it. Maybe you may post the code-sniplet ? Or where can I found this different toolchain ?

BrainSlayer wrote:

all what i said is true


Maybe. But you don't _answer_ questions - you just give a few scraps of information. The whole thing was about "where is piggy" and I haven't seen this simple answer in this thread.

So either you don't know or you don't tell. IMHO Information hidding is as worse as lying.

//TomTom


and i just said. if piggy is not there, there must be a buld problem. all toolchains i use are provided on my download site. all_toolchains.tar.bz2 for example which includes really everything

back to piggy

piggy is generated by linux/brcm/linux.v23/arch/mips/bcm947xx/compressed/Makefile

surelly i could explain any codesnipped in dd-wrt but i dont have the time for this. a more or less experiences developer can find this out in a easy way. do you know how many questions are asked to me each day?

_________________
one cigarette costs 2 minutes of your life.
one bottle of beer costs 4 minutes of your life.
one working day costs 8 hours of your life.

Yummee:
Linux DD-WRT 4.14.8 #42 SMP PREEMPT Thu Dec 21 18:11:16 CET 2017 armv7l DD-WRT
root@DD-WRT:/sys# nvram get DD_BOARD
Netgear R7800
TomTom
DD-WRT Novice


Joined: 13 Jul 2006
Posts: 19
Location: Braunschweig

PostPosted: Fri Dec 08, 2006 19:34    Post subject: Reply with quote
BrainSlayer wrote:

back to piggy

piggy is generated by linux/brcm/linux.v23/arch/mips/bcm947xx/compressed/Makefile

surelly i could explain any codesnipped in dd-wrt but i dont have the time for this. a more or less experiences developer can find this out in a easy way. do you know how many questions are asked to me each day?


Thats what I've described above - but this Makefile is __never__ called. All the scripts provided with the Code never call this Makefile. So I wonder how all the nightly builds are created.

And no - I'm not a developer. I was a buildmaster - I made my money by maintaining huge sourcecodetrees for Telcos. Merging - building - testing - testbuilds - debugbuilds - release builds - crosscompiled builds - all that stuff. I've seen more worse buildsystems - but not many.


//TomTom
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Fri Dec 08, 2006 20:10    Post subject: Reply with quote
TomTom wrote:
Thats what I've described above - but this Makefile is __never__ called. All the scripts provided with the Code never call this Makefile. So I wonder how all the nightly builds are created.
Well I succeeded compiling it, even this piggy file is created. So it does gets called.
_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 6802
Location: Dresden, Germany

PostPosted: Sat Dec 09, 2006 16:27    Post subject: Reply with quote
TomTom wrote:
BrainSlayer wrote:

back to piggy

piggy is generated by linux/brcm/linux.v23/arch/mips/bcm947xx/compressed/Makefile

surelly i could explain any codesnipped in dd-wrt but i dont have the time for this. a more or less experiences developer can find this out in a easy way. do you know how many questions are asked to me each day?


Thats what I've described above - but this Makefile is __never__ called. All the scripts provided with the Code never call this Makefile. So I wonder how all the nightly builds are created.

And no - I'm not a developer. I was a buildmaster - I made my money by maintaining huge sourcecodetrees for Telcos. Merging - building - testing - testbuilds - debugbuilds - release builds - crosscompiled builds - all that stuff. I've seen more worse buildsystems - but not many.


//TomTom


this makefile is called by the kernel make subsystem. believe me

_________________
one cigarette costs 2 minutes of your life.
one bottle of beer costs 4 minutes of your life.
one working day costs 8 hours of your life.

Yummee:
Linux DD-WRT 4.14.8 #42 SMP PREEMPT Thu Dec 21 18:11:16 CET 2017 armv7l DD-WRT
root@DD-WRT:/sys# nvram get DD_BOARD
Netgear R7800
TomTom
DD-WRT Novice


Joined: 13 Jul 2006
Posts: 19
Location: Braunschweig

PostPosted: Wed Dec 13, 2006 10:26    Post subject: Reply with quote
BrainSlayer wrote:

this makefile is called by the kernel make subsystem. believe me


Und die Rente ist sicher - the right target would be "make zImage" - but this is not called. To be more precise: It is not called in the provided "under-class" build system. His royal highness uses another buildsystem - as stated in this thread above.


Over and out,
TomTom
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 6802
Location: Dresden, Germany

PostPosted: Wed Dec 13, 2006 16:28    Post subject: Reply with quote
okay. then explain me the following lines out of src/router/Makefile

if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
$(MAKE) -C $(LINUXDIR) zImage ; \
fi
if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
$(MAKE) -C $(LINUXDIR) modules ; \
fi


anything else you need to discuss. please read the Makefiles before telling such stuff

_________________
one cigarette costs 2 minutes of your life.
one bottle of beer costs 4 minutes of your life.
one working day costs 8 hours of your life.

Yummee:
Linux DD-WRT 4.14.8 #42 SMP PREEMPT Thu Dec 21 18:11:16 CET 2017 armv7l DD-WRT
root@DD-WRT:/sys# nvram get DD_BOARD
Netgear R7800
TomTom
DD-WRT Novice


Joined: 13 Jul 2006
Posts: 19
Location: Braunschweig

PostPosted: Fri Dec 15, 2006 11:46    Post subject: Reply with quote
BrainSlayer wrote:
okay. then explain me the following lines out of src/router/Makefile

if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
$(MAKE) -C $(LINUXDIR) zImage ; \
fi
if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
$(MAKE) -C $(LINUXDIR) modules ; \
fi


anything else you need to discuss. please read the Makefiles before telling such stuff


So finally you made a grep onto the "underclass" build system. The simple answer for the whole piggy problem is: "make zImage" - which I've already explained above. It took a whole month and a lot of post to get this information from you. As stated above: you don't support people to _understand_ what is going on.

And in the meanwhile I have to add: most likley because you are trying to make money with opensource.

Do you really think you draw a red herring across the track ? Do you really think noone does notice i.e. the "MAGICBOX" statements in the Subdirs and that there is no corresponding config file ? The missing tools ? You where basicly forced to check webcomp.c in. The evasive answers ?

I've already stated my opinion:

Have a look a the current status of the build system. I'm watching the development for quite a while now. I got the impression that it is prefered _not_ to have a clean and traceable source tree and buildsystem.

//TomTom

BTW: Where to get: "all_toolchains.tar.bz2" ?




Joined: 01 Jan 1970
Posts:

PostPosted: Fri Dec 15, 2006 11:55    Post subject: Reply with quote
TomTom wrote:
It took a whole month and a lot of post to get this information from you. As stated above: you don't support people to _understand_ what is going on.

And in the meanwhile I have to add: most likley because you are trying to make money with opensource.
What did you expect? And really, I wouldn't be surprised for yet another Sveasoft in the near future ...

Compare it to OpenWrt. I've written a howto to show users how easy it is to build OpenWrt. OpenWrt can be build in about 1 hour.

Give OpenWrt and webif^2 a try and decide yourself...
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Sat Dec 16, 2006 9:45    Post subject: Reply with quote
Ah and forum2006 is back (as you can see he's recommending openwrt in almost every post he makes)...
But I mean come on, if you don't like it so be it. Don't start whining about it. There are people who like dd-wrt (including me) and it's not that hard to build it yourself. Okay there are some additional steps needed in compare to OpenWRT, but it's still compilable.

Just my 2c

_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 6802
Location: Dresden, Germany

PostPosted: Sat Dec 16, 2006 12:06    Post subject: Reply with quote
sure and it doesnt take a hour. i compile dd-wrt in 5 minutes (per distribution)
_________________
one cigarette costs 2 minutes of your life.
one bottle of beer costs 4 minutes of your life.
one working day costs 8 hours of your life.

Yummee:
Linux DD-WRT 4.14.8 #42 SMP PREEMPT Thu Dec 21 18:11:16 CET 2017 armv7l DD-WRT
root@DD-WRT:/sys# nvram get DD_BOARD
Netgear R7800
JohnnyPrimus
DD-WRT User


Joined: 26 Oct 2006
Posts: 378

PostPosted: Mon Dec 18, 2006 14:17    Post subject: Reply with quote
ok so the source compiles fine. you've been able to follow the wiki build instructions with, at worst, extremely minor updates and compile svn for quite some time. putting together a buildroot, downloading via svn, and compiling should take an hour from start to finish. beyond that builds take ~20 minutes a piece for me, because I'm using an archaic machine.

obviously when one person is doing the brunt of the work with help from only a tiny amount more, there is not really any feasible way to both accomplish work and teach someone else how to do it at the same time.

buildroots change occasionally, anyone who is capable of successfully modding the source is more than capable of adapting to a minor compilation difference.

this is starting to sound like something off the WineX dev boards.
aironic
DD-WRT Novice


Joined: 24 Dec 2006
Posts: 3

PostPosted: Sun Dec 24, 2006 13:01    Post subject: The DD-WRT SVN building guide Reply with quote
This guide describes step by step how to build DD-WRT firmware from source on Debian Sarge (32bit, x86) (in my case Celeron 2.6 GHz 1GB RAM).

connection to the Debian Server via Putty (Terminal) and WinSCP (to modify the files)

It’s recommended that you create a normal user account
(„dd-wrt“ username recommended).
Do NOT use „root“ to build DD-WRT.
Add the „dd-wrt“ user to /etc/sudoers

Step1. Install the following Debian packages and its dependencies
(use apt-get install…)

Code:
sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev zlib1g-dev uml-utilities

Step 2. Download the sources (toolchain and the actual SVN Rev. 5380)

Code:
cd /home/dd-wrt

wget ftp://ftp.dd-wrt.com/sourcecode/toolchains.x86.debian.sp1.tar.bz2

mkdir DD-WRT

cd DD-WRT

svn co svn://svn.dd-wrt.com/DD-WRT .


Step 3. Unpack the toolchain in /home/dd-wrt, you get a DIR called “toolchains”

Code:
tar -jxf toolchains.x86.debian.sp1.tar.bz2

Step 3.1 Install the toolchain

Code:
cd /home/dd-wrt/toolchains

ln -sf 3.4.6-uclibc-0.9.28 3.4.6
ln -sf 3.4.6-uclibc-0.9.28 3.3.4
ln -sf 3.4.6-uclibc-0.9.28 3.4.4
ln -sf 4.1.0-uclibc-0.9.28 4.1.0

and
cd /opt

ln -sf /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28 3.4.6 (optional)
ln -sf /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28 3.3.4

(Makefile in /home/dd-wrt/DD-WRT/src/linux/brcm/linux.v23/ and
/home/dd-wrt/DD-WRT/src/linux/brcm/linux.v24 need this link)

ln -sf /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28 3.4.4 (optional)

ln -sf /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28 4.1.0

Step 3.2 Add the toolchains bin folder to your PATH environment variable

Code:
export PATH=/home/dd-wrt/toolchains/opt/4.1.0/bin:$PATH


Step 4. Create some folders and symbolic links needed by the build process

Code:
cd /home/dd-wrt
mkdir -p /home/dd-wrt/DD-WRT/image
sudo ln -sf /home/dd-wrt/DD-WRT/image /GruppenLW

Step 5. Fix some permissions

Code:
cd /home/dd-wrt/DD-WRT
chmod +x src/router/iptables/extensions/.dccp-test
chmod +x src/router/iptables/extensions/.layer7-test

Step 5.1 Fix the path in the zlib Makefile

Code:
vi src/router/zlib/Makefile
-prefix =/usr/local
+prefix =/home/dd-wrt/DD-WRT

Step 5.2 Some more fixes (there is a broken link in the SVN source)
Code:
cd /home/dd-wrt/DD-WRT/opt
rm libgcc_s.so
ln -sf libgcc/libgcc_s.so.1 libgcc_s.so

Step 5.3 check the PATH environment.

Code:
cd /home/dd-wrt/DD-WRT/opt
vi install.sh
export PATH=/home/dd-wrt/toolchains/3.4.6/bin:$MYPATH ---> line 3
export PATH=/home/dd-wrt/toolchains/4.1.0/bin:$MYPATH ---> line 28

Step 5.4 Taken and added from the DD-WRT Wiki “ready_ddwrt.sh”

Code:
#!/bin/sh
#
# title: ready_ddwrt.sh
# version: 1.14

MINPARAMS=1
if [ $# -lt "$MINPARAMS" ]
then
echo usage:
echo ready_ddwrt.sh [ddwrt_base_path]
echo
echo i.e.:
echo ready_ddwrt.sh /home/dd-wrt/DD-WRT
echo
exit 1
fi

ME=`whoami`
DDROOT=$1

echo I am $ME
echo DD-WRT is at $DDROOT

echo ................................................................
echo creating some symlinks
echo ................................................................

rm $DDROOT/src/linux/brcm/linux.v23/include/asm
ln -s $DDROOT/src/linux/brcm/linux.v23/include/asm-mips $DDROOT/src/linux/brcm/linux.v23/include/asm
# for CFE building
ln -s $DDROOT/src/linux/brcm/linux.v23 $DDROOT/src/linux/linux
echo done

echo ................................................................
echo "re-building some tools"
echo ................................................................
cd $DDROOT

# make bb_mkdep
cd src/router/busybox/scripts
rm bb_mkdep
make bb_mkdep
cd ../../../..

# make jsformat
cd src/router/tools
rm jsformat
make jsformat
cd ../../..

# make mksquashfs-lzma
cd src/squashfs-tools/
rm mksquashfs-lzma
make
cp mksquashfs-lzma /home/dd-wrt/DD-WRT/src/linux/brcm/linux.v23/scripts/squashfs
cp mksquashfs-lzma /home/dd-wrt/DD-WRT/src/linux/brcm/linux.v23/scripts/squashfs
cd ../..

# make strip
cd tools
rm ./strip
gcc strip.c -o ./strip
cd ..

# make write3
cd tools
rm ./write3
gcc write3.c -o ./write3
cd ..

# make write4
cd tools
rm ./write4
gcc write4.c -o ./write4
cd ..

# make webcomp
cd tools
rm ./ webcomp
gcc -o webcomp -DUEMF -DWEBS -DLINUX webcomp.c
cd ..

echo done


Step 6. …start the build process.

Code:
cd /home/dd-wrt/DD-WRT/opt
./install.sh (modify the entries depend on the build you want)

and don’t forget the properties: chmod +x /home/dd-wrt/DD-WRT/opt/install.sh

Step 6.1 …you should have images in /home/dd-wrt/DD-WRT/image or / GruppenLW

Version “micro” and “mini” tested on WRT54GS Ver. 1.1

Have a nice XMAS and a happy New Year…..

…wenn jetzt nicht das Weihnachtsfest gerettet ist!




Joined: 01 Jan 1970
Posts:

PostPosted: Sun Dec 24, 2006 13:09    Post subject: Re: The DD-WRT SVN building guide Reply with quote
aironic wrote:
This guide describes step by step how to build DD-WRT firmware from source on Debian
If it compiles, which version of DD-WRT is the result? v23, v24 based or something else?

aironic wrote:
sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev zlib1g-dev uml-utilities
Typical copy & paste error. uml-utilities is not required...

aironic wrote:
svn co svn://svn.dd-wrt.com/DD-WRT .
ROFL. Exactly this command checks out 4GB of source code... WhiteRussian without the tarballs is about 100MB and with tarballs for the standard build it's extra 100MB to download. So, WR is about total of 200MB download.

aironic wrote:
…wenn jetzt nicht das Weihnachtsfest gerettet ist!
Still, OpenWrt WhiteRussian is a lot more easier.
Goto page Previous  1, 2, 3, 4, 5, 6  Next Display posts from previous:    Page 4 of 6
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum