OpenWrt Forum Archive

Topic: Buildroot - clear instructions

The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Is there a clear step-by step WiKi that actually works in real life for compiling buildroot?

That would include true steps that will produce results - such as: get Fedora9 DVD, install etc, svn the trunk, type make menuconfig, type make, you are done but by done I dont mean someone typed "done" in a non-working WiKi but done by means of compile with no errors at the very last line before the blinking cursor!

Sadly the trunk flat out bombs out under FC9 and I honetly can't spend 77 hours monkeying around with packages, etc so a clear directive towards success will be most  helpful!

In other words, is there at least ONE example of successful compile and if yes - what did it take to achive that? 1-2-3?

Thanks
B

(Last edited by ds18s20 on 22 May 2008, 21:50)

Is there a clear step-by step WiKi that actually works in real life for compiling buildroot?

I build nearly every day for one reason or another:

mkdir -p ~/build/openwrt
svn co https://svn.openwrt.org/openwrt/trunk/ ~/build/openwrt
cd ~/build/openwrt
make menuconfig
make
ls -l bin

That's roughly the process I follow (changed directory names to protect the innocent).

Sadly the trunk flat out bombs out under FC9 and I honetly can't spend 77 hours monkeying around with packages, etc so a clear directive towards success will be most  helpful!

It would be even more helpful to those that would help you to post what your build error is; not the whole build log, but what the last ~50 lines say after 'make V=99'.

In other words, is there at least ONE example of successful compile and if yes - what did it take to achive that? 1-2-3?

You have one, and the wiki has some too.  It sounds like you're wanting a FC9-specific HOWTO, which you are unlikely to get; there isn't a lot of hand-holding patience for development-level work.

I personally use Gentoo since it's so developer-friendly and comes with all the toolchain and such that I could need.  That said, the build environment is quite good about checking for the things it needs before setting off to compile.

Without posting the error nobody can tell you what is wrong. I use F9 with the buildroot and it works fine.

But guys you miss the point - errors ARE NOT relevant if a clean way exists to do this.

aoz.syn - you are getting close to what I was hoping to see. So in your case, would a preeding steps such as those produce a successful outcome or will it again error somewhere:

get the latest ISO of Gentoo
install on blank HD, select ALL (sources, etc)
mkdir -p ~/build/openwrt
svn co https://svn.openwrt.org/openwrt/trunk/ ~/build/openwrt
cd ~/build/openwrt
make menuconfig
make
ls -l bin

I am defenitely NOT committed to FC9. The binary image doesnt care what distro it was compiled under nor does it the wrt54g platform which will run it. I am happy to redo the dev setup as long as clear and PREDICTIBLE steps exist. Meaning 1-2-3 and it works.

Thanks

(Last edited by ds18s20 on 23 May 2008, 00:41)

But guys you miss the point - errors ARE NOT relevant if a clean way exists to do this.

I'm afraid that is the point - there are a multitude of very clean, very well-documented approaches to setting up a Linux C/C++ development environment in general, and there are many of us that do the whole process from scratch weekly if not daily.  We know the build process works (for some in the very environment you seem to be using), so there has to have been either a missing component or a user error.  I am not an OpenWRT dev (even though I've been around the Linux programming block a time or five), but thepeople most definitely is, and it would behoove you to listen to what they say about the build process.

Meaning 1-2-3 and it works.

Therein lies the problem - you are insisting on somebody spoon-feeding you baby steps when you're trying to venture into an area where you must understand at least the basic concepts and cannot blindly fumble around.  The OWRT devs have done a fantastic job of streamlining the build process and making it nearly self-sufficient, which comes back to the issue of, "show us your error and we'll fix your problem."

Here's the thing: I may be alone in voicing this, but I detest and refuse to author or support HOWTOs.  The reason behind this is that they take too much post-authorship work to maintain as a relevant work and are far too brittle - if someone wants or needs to deviate from the steps outlined, they get hopelessly lost.  Whether they agree or not, users need concepts, not steps. [insert aphorism about teaching to fish]  I have yet to encounter a series of steps to do anything that are absolutely fool-proof and guarantee 100% success for all users.  Yes, I'm a cynical engineer and know just about everyone does some kind of deviation from given steps.

If you are really up for tackling installing Gentoo, the only additional software you need to install is subversion; everything else the OWRT buildroot needs is already there due to Gentoo's compile-from-source approach.  However, it is developer-friendly, not user-friendly.  A more user-friendly flavor (Fedora, Ubuntu, etc.) typically need some extras that often come in the form of a "development" package group or the like; if you just took the shotgun "install everything" approach, you probably have what you need.

ds18s20,
I just started on building and I have been meeting some "challenges", too.

cd ~
svn checkout https://svn.openwrt.org/openwrt/trunk/ kamikaze
cd kamikaze
make prereq

This failed with missing g++ and autoconf.  I'm using Suse 10.3 so apt-get doesn't work (though a friend said one can get packages to do this).  YAST doesn't turn up anything for g++, however g++-4.2 was already present and

ln -s g++-4.2 g++

took care of that.  YAST installed autoconf fine.
Running make prereq then was OK and goes into menuconfig, which goes on to start "make".  This failed right off.  I then tried--

make world

This builds the tools (and takes a long time--hour or so on a 1.8GHz machine with 2GB ram).  Alas, this failed, too, though it got most of the way through.  The message said to run it again with V=99 to see what happened.  Here is the tail-end of that run--

/home/deh/Lnksys/wrt54g/OpenWRT/kamikaze/staging_dir/mipsel/usr/include/lauxlib.h:59: error: `lua_Integer' declared as function return                       ing a function
/home/deh/Lnksys/wrt54g/OpenWRT/kamikaze/staging_dir/mipsel/usr/include/lauxlib.h:59: warning: parameter names (without types) in func                       tion declaration
make[4]: *** [uci.o] Error 1
make[3]: *** [/home/deh/Lnksys/wrt54g/OpenWRT/kamikaze/build_dir/mipsel/uci-0.3.4/.built] Error 2
make[2]: *** [package/uci/compile] Error 2
make[1]: *** [/home/deh/Lnksys/wrt54g/OpenWRT/kamikaze/staging_dir/mipsel/stamp/.package_compile] Error 2
make: *** [world] Error 2

I'm leary that the distro & compiler are part of the problem.  All it takes is one small detail for it to fail.  (Time for bed.  I'll give it another "go" tomorrow.)

@deh: that bug was fixed in r11241, please update and try again.

You might want to stick with the sources of the released versions of Kamikaze instead of trying to use the trunk. You'll avoid problems due to the developmental nature of the trunk.

placebo wrote:

You might want to stick with the sources of the released versions of Kamikaze instead of trying to use the trunk. You'll avoid problems due to the developmental nature of the trunk.

I'm happy to report that kamikaze_7.09 compiles fine on FC9 clean install directly from DVD with "all" option selected:

1839104 2008-05-22 05:58 openwrt-brcm-2.4-squashfs.trx
27072341 2008-05-22 06:00 OpenWrt-ImageBuilder-brcm-2.4-for-Linux-i686.tar.bz2
37482306 2008-05-22 05:59 OpenWrt-SDK-brcm-2.4-for-Linux-i686.tar.bz2
1839132 2008-05-22 05:58 openwrt-usr5461-squashfs.bin
1839112 2008-05-22 05:58 openwrt-wa840g-squashfs.bin
1839112 2008-05-22 05:58 openwrt-we800g-squashfs.bin
1839112 2008-05-22 05:58 openwrt-wr850g-squashfs.bin
1839136 2008-05-22 05:58 openwrt-wrt150n-2.4-squashfs.bin
1839136 2008-05-22 05:58 openwrt-wrt300n_v1-2.4-squashfs.bin
1839136 2008-05-22 05:58 openwrt-wrt54g-2.4-squashfs.bin
1839136 2008-05-22 05:58 openwrt-wrt54g3g-2.4-squashfs.bin
1839136 2008-05-22 05:58 openwrt-wrt54gs-2.4-squashfs.bin
1839136 2008-05-22 05:58 openwrt-wrt54gs_v4-2.4-squashfs.bin
1839136 2008-05-22 05:58 openwrt-wrtsl54gs-2.4-squashfs.bin

The binary images appear "real" and the one which I tested (wrt54g v2) works just fine on my test router.

I think I am close to having the kind of WiKi I was looking for in the first place. To "freeze" the predictible nature of this setup I would like to make sure that the svn sources do not change.

I will bzip the tree and integrated into the ISO with a simple script to explode it and voila. I believe this is almost identical to the VMware approach which is wonderful except the Ubuntu VMware image stopped compiling the trunk sources at some point in time during svn changes. Either svn got too "new" or the older Ubuntu version got too "old" for the sources.

~B

Who would like a link to a VMWare machine running ubuntu with all the relevant bits n bobs in place?

(Last edited by adyb on 2 Aug 2008, 18:33)

Sure, that would be very helpful!

I'll try and have this ready for Monday, if not sooner.

To continue on from an off topic post here I decided to post in this thread.

Devs, as you can see compiling needs to be standardized.  Also, downloading sources every time you compile is not ideal.
I know there are more posts on the subject, but this is one that illustrates the need for defining a standard source directory.  How about making /usr/src/OpenWrt/ or /home/username/OpenWrt/downloads/ a placeholder for source tarballs?

Thanks to dgi, I've found the most comprehensive method for compiling so far is thus:

svn co https://svn.openwrt.org/openwrt/trunk/
cd trunk
make menuconfig
make package/symlinks #includes all packages including LuCI
make menuconfig #again
make

Compiling instructions are here:
https://dev.openwrt.org/wiki/GetSource


Quick and dirty for 8.09.2:

svn co svn://svn.openwrt.org/openwrt/tags/8.09.2
cd 8.09.2
make menuconfig         #choose your platform, then exit making sure to save changes
make package/symlinks   #includes all packages including LuCI
make menuconfig         #choose the packages you want to install
make V=99

Quick and dirty for trunk:

svn co svn://svn.openwrt.org/openwrt/trunk/
cd trunk
make menuconfig         #choose your platform, then exit making sure to save changes
make package/symlinks   #includes all packages including LuCI
make menuconfig         #choose the packages you want to install
make V=99

Example for a specific directory and build:

svn co svn://svn.openwrt.org/openwrt/trunk/ WR1043ND_19840 -r19840

(Last edited by KillaB on 25 Feb 2010, 00:47)

The discussion might have continued from here.