User Tools

Site Tools


midge:building

Building

Host packages needed for building

  • Debian (etch)
# 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

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

2. Change into the unpacked tree

cd trunk/openwrt-midge

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.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

make

For a more verbose build process type

make V=99

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.

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

trunk/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -o hello hello.c

Because there is never enough space in the flash strip the resulting executable

trunk/openwrt/staging_dir_mipsel/mipsel-linux-uclibc/bin/strip hello

To have this program installed with your firmware, copy it into the tree

cp hello trunk/openwrt/target/linux/image/adm5120/base-files/sbin/

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)