User Tools

Site Tools


doc:howtobuild:single.package

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howtobuild:single.package [2013/01/06 18:14]
laird
doc:howtobuild:single.package [2015/04/15 12:24] (current)
bazz [Kernel Modules]
Line 3: Line 3:
 Useful e.g. if you want to upgrade a package without reflashing the router, etc. Useful e.g. if you want to upgrade a package without reflashing the router, etc.
  
-Follow [[doc:​howto:​obtain.firmware.compile|Building OpenWrt]] up to the point when you have to ''​make menuconfig''​. ​Select ​the target, then check the package you want to build, and also its dependencies. If you don't know them, you can ask the router. Let's assume we want to build ''​nano'':​ run ''​opkg info nano'':​+Follow [[doc:​howto:​obtain.firmware.compile|Building OpenWrt]] up to the point when you ''​make menuconfig''​. ​ In here, select ​the target ​platform, then tick the package you want to build, and also its dependencies. ​ If the package isn't ticked, the below commands will succeed without actually building the package.  ​If you don't know the dependencies, you can ask the router. Let's assume we want to build ''​nano'':​ run ''​opkg info nano'':​
  
 <​code>​ <​code>​
Line 40: Line 40:
  
 Done! You will find your coveted package in the ''​bin/''​ directory. Done! You will find your coveted package in the ''​bin/''​ directory.
 +
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | If you get errors about not finding opkg in the staging directory, compile and install package/​base-files. |
 +
 +==== Package Maintenance on Self-Compiled Kernel from Latest Snapshot ====
 +The problem we face when using the Latest snapshot, is that opkg quickly becomes incompatible with the snapshot as it moves forward in time. The idea is to use the feeds script with -a flag to prep all possible packages.. then when you want to install packages down the road, you go into make menuconfig, set the packages you want as modules <M>. then do make package/​compile to compile them as IPK files to the bin directory. Then you can scp them to the router /tmp for instance, and opkg install them. Sometimes opkg complains about MD5 mismatch with remote, or kernel version mismatch. Use opkg override flags if you must, --force-depends and/or --force-checksum
 +
 +==== Kernel Modules ====
 +You are here because make package/​[kernel-module] will not work. So here's how I figured out to do it. In my case, I have already compiled the kernel once before. So I have the toolchain etc built already.. Not sure how you would go about doing it on a fresh trunk without having to compile everything. You can try the above commands to compile the toolchain.
 +
 +<​code>​make menuconfig</​code>​
 +
 +In the menuconfig, select your module such that an <M> appears, save and exit.
 +
 +<​code>​make package/​compile</​code>​
 +And then the ipk is in the bin/​[arch]/​packages directory. You can scp it to the router and use opkg install, for example.
 +
 +
doc/howtobuild/single.package.1357492468.txt.bz2 · Last modified: 2013/01/06 18:14 by laird