1 (edited by kukodajanos 2011-03-28 16:36:17)

Topic: compile a single package for backfire

Hi!

I want to compile only an simple package for backfire without compile everything from scratch. I downloaded backfire source. First I tried this SDK compiling tutorial. But I get the error below. I thought, that the include directory is missing, because I dont installed SDK yet. So I went to make menuconfig, check "build SDK" but now it started to build the whole system. How can I compile an lonely nano for backfire, not wasting my time to compile everything?

$make package/ncurses/compile V=99
and the error: checking for C compiler default output... configure: error: C compiler cannot create executables

Re: compile a single package for backfire

I was meaning to do the same, but as you found out already there's no SDK for backfire. Still to build even just one package, you need the toolchain and I don't know whether you can actually build that alone... I tried a few times then gave up cos it would take far less time to build everything and call it a day.

If by any chance you happen to have a WR1043ND and 64-bit Linux, I have the SDK and can upload it somewhere for you to try.

TP-Link WR1043N v1.8 (Backfire 10.03.1-RC6) - Seagate Dockstar revC (ArchLinux|ARM) - Netgear DG834v2 (DGTeam v849) - Netgear DG834Gv3 (bricked, still)

Re: compile a single package for backfire

Did you select your target and build the cross-compiler first?  You don't need to build the SDK.  Try:

make menuconfig
make toolchain/install V=99
make package/ncurses/compile V=99

Re: compile a single package for backfire

Hey!

Thank you your advise, I tried the "make toolchain/install V=99", but I get an error. What do you think, what is the problem? I set up in menuconfig the system target and profile.

cp -fpR /home/kukodajanos/backfire/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-readelf /home/kukodajanos/backfire/staging_dir/host/bin/readelf
cp: cannot create regular file `/home/kukodajanos/backfire/staging_dir/host/bin/readelf': No such file or directory
make[2]: *** [/home/kukodajanos/backfire/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/stamp/.binutils_installed] Error 1

Re: compile a single package for backfire

Sorry, I'm not in front of my Linux box right now... so I was just suggesting something to try w/o testing it myself.  I usually build everything first (i.e. make V=99), then recompile individual packages as needed.  What does "make prereq" tell you?  Just checking if you have all the required tools installed.  You may also try "make toolchain/compile" instead of "make toolchain/install".

Re: compile a single package for backfire

For "make toolchain/compile" I get an other error, see below. "make prereq" give nothing back.

/home/kukodajanos/backfire/staging_dir/host/bin/sed -i -e 's/@expr length/@-expr length/' /home/kukodajanos/backfire/build_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/linux-2.6.32.27/Makefile
--: /home/kukodajanos/backfire/staging_dir/host/bin/sed: No such file or directory
make[2]: *** [/home/kukodajanos/backfire/build_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/linux-2.6.32.27/.prepared] Error 127

7 (edited by kukodajanos 2011-03-28 21:26:00)

Re: compile a single package for backfire

OK, I think I have the solution, first: make tools/install, then make toolchain/install.

Re: compile a single package for backfire

I would surely like to see you achieve and document a "simple" package compilation/build, but if all you want is nano, have you tried "opkg install nano"?

If you're trying to learn how to build a package, ignore this, and good luck.

Re: compile a single package for backfire

Actually it is not about nano, I have it, use it every day, but the tutorial what I mentioned above was about nano. My problem was till today, when I had figured out I need an new package, I had to compile the whole toolchain process from scratch, and I was fed up with this.

10 (edited by kukodajanos 2011-04-10 09:39:08)

Re: compile a single package for backfire

OK, these are the commands. Now there is no error, and packages are in bin/ .

svn checkout svn://svn.openwrt.org/openwrt/trunk backfire
./scripts/feeds update
make defconfig
make package/symlinks
make menuconfig

make menuconfig -> check nano and libncurses
make tools/install
make toolchain/install
make target/compile
make package/ncurses/compile
make package/ncurses/install
make package/feeds/packages/nano/compile
make package/feeds/packages/nano/install
make package/index