User Tools

Site Tools


midge:building

Differences

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

Link to this comparison view

midge:building [2018/04/09 15:36] (current)
Line 1: Line 1:
 +===== Building =====
 +
 +=== Host packages needed for building ===
 +  * **Debian** (etch)
 +<code sh>
 +# Base packages:
 +apt-get install make gcc g++ patch flex bison sudo pkg-config libc6-dev zlib1g-dev libncurses5-dev libssl-dev
 +
 +# Optional packages:
 +apt-get install automake autoconf sharutils libtool libglib2.0-0 libglib2.0-dev python gettext
 +</​code>​
 +
 +
 +
 +===== Howto build one's own firmware =====
 +
 +This is a very basic description on howto build a ''​midge''​ firmware image which will run on a BR6104KP router/​printserver.
 +
 +1. You can download latest tar.bz2 archive
 +   * tar.bz2
 +     - download fresh tar.bz2 from http://​midge.vlad.org.ua/​src/​
 +
 +2. Change into the unpacked tree <​code>​cd trunk/​openwrt-midge</​code>​
 +
 +3. Configure the package
 +  cp target/​linux/​adm5120-2.4/​openwrt-config-midge-lite .config
 +  make menuconfig
 +  * select ADM5120
 +  * squashfs-lzma
 +
 + These options should already be selected.[[http://​uk.bestessays.com/​|custom essay]]
 +
 +4. Build all. During this step all the tools for the toolchain will be downloaded automatically. This will take a while.
 +
 +For a silent build type simply type <​code>​make</​code>​
 +For a more verbose build process type <​code>​make V=99</​code>​
 +
 +If you get an error while compiling the package pppoe, go back to 3., deselect pppoe-client under OpenWrt Package Selection an type make again.
 +
 +If you get an error because your kernel or your squashfs is too large, increment the size in ''​make menuconfig DEVELOPER=1 --> ​ Kernel Config'',​ but remember that we have only 2MB flash and after you increase kernel or squashfs size there is less space for [[flash_save|flash save]].
 +
 +Some packages require flex and/or bison. Therefore, if you get an error like "flex missing"​ or "​bison:​ command not found",​ install flex and bison and type make
 +again.
 +
 +5. install ''​openwrt-adm5120-2.4-squashfs.bin.csys''​ firmware image with the bootloader (after compile can be found in ''​bin''​ subdirectory)
 +
 +6. boot new image
 +
 +7. install w/ ipkg
 +
 +//USB stuff removed there. Please look at [[usb]] for it.//
 +
 +===== Crosscompiler =====
 +After you build successfull your own firmware you have a crosscompiler,​ which you can use to build own programs for the ADM5120 target.
 +
 +==== Small projects ====
 +Use the crosscompiler from your toolchain standalone
 +<​code>​
 +trunk/​openwrt/​staging_dir_mipsel/​bin/​mipsel-linux-uclibc-gcc -o hello hello.c
 +</​code>​
 +Because there is never enough space in the flash strip the resulting executable
 +<​code>​
 +trunk/​openwrt/​staging_dir_mipsel/​mipsel-linux-uclibc/​bin/​strip hello
 +</​code>​
 +To have this program installed with your firmware, copy it into the tree
 +<​code>​
 +cp hello trunk/​openwrt/​target/​linux/​image/​adm5120/​base-files/​sbin/​
 +</​code>​
 +
 +==== Large projects ====
 +Read in trunk/​openwrt/​docs/​buildroot-documentation.html in your tree.
  
midge/building.txt · Last modified: 2018/04/09 15:36 (external edit)