User Tools

Site Tools


projects:openwrt:devel:image

Building an image

Everything as normal user (non-root).

Hint: Work in “screen”.

Getting the tools

apt-get install gcc binutils patch bzip2 flex bison make gettext pkg-config unzip libz-dev automake1.4
wget http://downloads.openwrt.org/kamikaze/7.09/kamikaze_7.09.tar.bz2
bunzip2 kamikaze_7.09.tar.bz2
tar xvf kamikaze_7.09.tar

Kernelpatches

wget ftp://ham2.cc.fer.hr/pub/users/9a4gl/9a4gl-ax25-2423-20040109.patch
cp 9a4gl-ax25-2423-20040109.patch kamikaze_7.09/target/linux/brcm-2.4/patches/014-9a4gl-ax25-2423-20040109.patch

Comment by DL9SAU:

kernel 2.4.x
------------

the ax25 stack in kernel 2.4.x has great problems which may cause an
kernel oops, which may leave the ax25 stack unusable.
a symptom may be, that with "netstat -an" the (previously connected)
ax25 sessions with SRC and DST call are shown in LISTEN state.
if things go worse, the kernel oopses, when the kernel "walks" through
the list of ax25 connections (ax25_cb); which is the case when issuing
a command like "netstat".

When using kernel 2.4.x, i deeply advice to apply the 9a4gl patches:
ftp://ham2.cc.fer.hr/pub/users/9a4gl/ (the latest patch is
9a4gl-ax25-2423-20040109.patch).

It applies to the latest kernel 2.4.x release.
Unfortunately, it will never bevome part of an official release,
because there are any new releases planed for this branch.

Kernel Modules

vi kamikaze_7.09/package/kernel/modules/network.mk
define KernelPackage/ax25-dg8ngn
  TITLE:=AX25 support DG8NGN mod
  DESCRIPTION:=Kernel modules for AX25 support DG8NGN mod
  SUBMENU:=$(NSMENU)
  KCONFIG:=$(CONFIG_AX25)
  FILES:= \
        $(LINUX_DIR)/net/ax25/ax25.$(LINUX_KMOD_SUFFIX) \
        $(LINUX_DIR)/drivers/net/hamradio/mkiss.$(LINUX_KMOD_SUFFIX) \
        $(LINUX_DIR)/net/netrom/netrom.$(LINUX_KMOD_SUFFIX) \
        $(LINUX_DIR)/net/rose/rose.$(LINUX_KMOD_SUFFIX) \
        $(LINUX_DIR)/drivers/net/hamradio/6pack.$(LINUX_KMOD_SUFFIX) \
        $(LINUX_DIR)/drivers/net/hamradio/bpqether.$(LINUX_KMOD_SUFFIX) \
        $(LINUX_DIR)/drivers/net/slip.$(LINUX_KMOD_SUFFIX)
  AUTOLOAD:=$(call AutoLoad,80,ax25 mkiss)
endef
$(eval $(call KernelPackage,ax25-dg8ngn))

Kernel 2.6:

        $(LINUX_DIR)/lib/crc16.$(LINUX_KMOD_SUFFIX)
  AUTOLOAD:=$(call AutoLoad,80,ax25 crc16 mkiss)

Kernel Config

vi kamikaze_7.09/target/linux/brcm-2.4/config/default (delete corresponding lines with "# CONFIG_<ax25stuff> is not set")
CONFIG_AX25=m
CONFIG_AX25_DAMA_SLAVE=y
CONFIG_AX25_LINSV=y
# CONFIG_AX25_MTU1580 is not set
CONFIG_6PACK=m
CONFIG_BPQETHER=m
CONFIG_NETROM=m
CONFIG_ROSE=m
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y

Kernel 2.6:

vi kamikaze_7.09/target/linux/brcm47xx-2.6/config/default
CONFIG_CRC16=m

Editing ipkg.conf

vi kamikaze_7.09/package/base-files/files/etc/ipkg.conf
src dg8ngn http://db0fhn-i.ampr.org/openwrt/$S/packages
src release http://downloads.openwrt.org/kamikaze/7.09/$S/packages
src packages http://downloads.openwrt.org/kamikaze/packages/$A
dest root /
dest ram /tmp

Build configuration

cd kamikaze_7.09
make menuconfig
Kernel modules ---> Network Support ---> <*> kmod-ax25
Libraries ---> <M> libncurses
--> exit and save config

“mkiss”-module has been modified on Kernel 2.6. It depends on “crc16” which is not needed on Kernel 2.4.

Building

make V=99 >make.log 2>&1

Flashing

cd bin
"copy openwrt-brcm-2.4-2.4-squashfs.trx on router in /tmp"
-compilemachine-> "cp openwrt-brcm-2.4-2.4-squashfs.trx ~/public_html"
-router-> cd /tmp
-router-> "wget http://<hostname>/~<user>/openwrt-brcm-2.4-2.4-squashfs.trx"
-router-> "mtd erase nvram"
-router-> "mtd -e linux -r write openwrt-brcm-2.4-squashfs.trx linux"
projects/openwrt/devel/image.txt · Last modified: 2014/01/12 13:17 by jann