OpenWrt Forum Archive

Topic: Installing a new build system

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

Hello,

I am interested in doing some work on the usb/ip module in OpenWRT, and I want to set up a build system to support this. My plan is to install everything needed on a machine dedicated exclusively to building OpenWRT (actually to a new hard drive in an existing machine).

The wiki contains some instructions: http://wiki.openwrt.org/doc/howto/buildroot.exigence

Are these instructions appropriate and reasonably up-to-date for setting up a build system on my host? Are there other resources I should read before commencing?

If I am generally on the right track, I have one other question:

   Debian seems to be the first choice for an OS, but I've got more time on Ubuntu - how important is this?

Thank you

P.S. there does not seem to be a link on the how-to wki page (http://wiki.openwrt.org/doc/howto/start) to the OpenWRT build system installation instructions (http://wiki.openwrt.org/doc/howto/buildroot.exigence ). Consequently, the build system instructions may be overlooked.

I haven't built a system since "git" replaced "svn" for downloading the openWrt files, but otherwise, http://wiki.openwrt.org/doc/howto/buildroot.exigence looks appropriate to me.

There should be no problem with using Ubuntu--that is what I have used.

I have always used Ubuntu. Has worked OK the past five years.

So far, things have gone well. I'm submitting this post to provide feedback on the instructions here, and to ask for some advice:
http://wiki.openwrt.org/doc/howto/buildroot.exigence

I.  I encountered an issue in Step 3:

./scripts/feeds install -a

  threw a build dependency:

Build dependency: Please install GNU 'awk'

I chose the following option:

$ sudo apt-get install gawk

That seemed to make it happy, it completed the process with no further complaints:

Installing all packages from feed packages.
Installing all packages from feed luci.
Installing all packages from feed routing.
Installing all packages from feed telephony.
Installing all packages from feed management.
Installing all packages from feed targets.

II.  That brings me to Step 4, which is a multiple choice question. Unfortunately, I am clueless re the implications. Could someone offer advice on a good choice?

You run all three of these:
make defconfig
make prereq
make menuconfig

In "make menuconfig" you choose which packages (of hundreds) you want your firmware to include.

Then, unless things have changed in the year or more since I last did this, you run "make V=99" to compile the firmware. The "V=99" will be more verbose regarding error messages if the compile is not successful. If your processor has multiple cores, you can also add "-j 2" or "-j 4" (for instance) for 2 or 4 jobs, e.g., "make V=99 -j 4".

(Last edited by lizby on 12 Oct 2015, 00:56)

lizby wrote:

You run all three of these:
make defconfig
make prereq
make menuconfig

OK, that's good to know; the written guidance says to run one of them.

In "make menuconfig" you choose which packages (of hundreds) you want your firmware to include.

Any guidance available for this? For example a list of packages currently used for a specific target? Or, do I do this the hard way, and just (for example) go through the list with package list from my 6416A, selecting on that basis? 

Then, unless things have changed in the year or more since I last did this, you run "make V=99" to compile the firmware. The "V=99" will be more verbose regarding error messages if the compile is not successful. If your processor has multiple cores, you can also add "-j 2" or "-j 4" (for instance) for 2 or 4 jobs, e.g., "make V=99 -j 4".

Where is the "architecture" specification input for a build? For example, for ARM xyz, or MIPS 123?

Thanks!

Well, for instance, with a Gl.inet with stock openWrt firmware downloaded, these are the packages I have installed in one instance:

opkg update
opkg install nano picocom kmod-usb-serial kmod-usb-serial-pl2303 kmod-usb-serial-ch341 kmod-usb-serial-cp210x
opkg install coreutils-stty lua luasocket wireless-tools ser2net usbutils
opkg install kmod-usb-storage block-mount kmod-scsi-generic kmod-nls-cp437 kmod-nls-iso8859-1 kmod-fs-vfat kmod-fs-ext4

To build your own firmware, you would find these packages in "menuconfig" and check them. You also select the architecture in menuconfig. I would be sure to select the option to save the menuconfig setting to a file.

List of available packages is here: http://downloads.openwrt.org/chaos_calm … /packages/

From there go up one level and you can look at base, luci, management, packages, routing, telephony.

(Last edited by lizby on 12 Oct 2015, 13:09)

To complement the previous answers:
both "make manuconfig" and "make defconfig" run "make prereq" in order to check that your build host has all the needed packages installed at the host. So, it is enough to run one of them. Typical lists of the needed packages can be found at: http://wiki.openwrt.org/doc/howto/build … tallations

"make menuconfig" also runs commands matching "make defconfig" as part of its process. So, running make menuconfig should be enough.

Your router defines the "architecture" as it has a certain type of processor etc. Check the Openwrt wiki page for your router. E.g I have WNDR3700, so I need ar71xx as the architecture. Go to make menuconfig, select first the architeture and then the correct router from the device list. That sets all the needed default packages needed for the router.

And V=99 is deprecated (since some 2 years), although it still works. Current option is V=s

That's perfect - thank you both. Unfortunately, I won't be able to try these hints until I return from my un-scheduled travel, but I'll follow up then.

The discussion might have continued from here.