My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
CompilingCustomFirmware  
HowTo Compile Custom Firmware 1.9.2.7-rtn
ru , en
Updated Mar 3, 2012 by themiron.ru

1. Required software

  • Linux with the following packages installed
    • standard compilation software
    • libncurses-dev
    • gawk
    • g++
    • flex
    • bison
    • zlib development
    • subversion

2. Download the additional tools/sources

3. Unpack the archives and prepare the building tree

  1. Unpacking (replace the path /whatever-you-want with the one, where your building tree will be located),
  2. mkdir -p /opt/brcm
    mkdir -p /whatever-you-want/broadcom/src/linux
    tar -C /opt/brcm -jxvf hndtools-mipsel-uclibc-4.4.6-K26-r3826.tar.bz2
    ln -sf /opt/brcm/hndtools-mipsel-uclibc-4.4.6-K26 /opt/brcm/hndtools-mipsel-uclibc
    tar -C /whatever-you-want/broadcom/src/linux -jxvf linux-2.6.22.19.tar.bz2
    ln -sf linux-2.6.22.19 /whatever-you-want/broadcom/src/linux/linux-2.6
  3. Checking out firmware sources
  4. svn checkout http://wl500g.googlecode.com/svn/trunk/ /whatever-you-want/broadcom/src/1.9.2.7-rtn
  5. Add the path to the toolchain (it can be introduced to the personal ~/.profile for convenience)
  6. $ export PATH=$PATH:/opt/brcm/hndtools-mipsel-uclibc/bin

4. Building

  1. Preparation of the sources
  2. $ cd /whatever-you-want/broadcom/src/1.9.2.7-rtn
    $ make kernel
    $ make
  3. Model selection
  4. $ cd /whatever-you-want/broadcom/src/gateway
    $ make menuconfig
    • select one or more models from Router Models menu
    • exit & save new configuraton
  5. Compiling
  6. $ cd /whatever-you-want/broadcom/src/gateway
    $ make
    $ make install
  7. Firmware image and extra kernel modules resides under /whatever-you-want/broadcom/src/gateway/mipsel-uclibc/

5. Sources update from SVN

  • In case of you want to refresh sources SVN, and don't want to rebuild an all tree, update algorithm will be complicated:
    • If kernel patches updated/added, you should
      • unarchive entire kernel sources (see. paragraph 3.1)
      • reapply patches & refresh kernel config
      • $ cd /whatever-you-want/broadcom/src/1.9.2.7-rtn
        $ make kernel
        $ cd /whatever-you-want/broadcom/src/gateway
        $ make koldconf
    • If packages only updated, then following is enough
    • $ cd /whatever-you-want/broadcom/src/1.9.2.7-rtn
      $ rm -rf /whatever-you-want/broadcom/src/gateway
      $ make
  • Follow paragraph 4.2 of HowTo.
  • Mostly precision update also possible, but it requires knowledge of development tools such as patch, make etc., and they cannot be described in this HowTo.
Powered by Google Project Hosting