This shows you the differences between two versions of the page.
— |
projects:openwrt:devel:image [2014/01/12 13:17] (current) jann created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Building an image ===== | ||
+ | Everything as normal user (non-root). | ||
+ | |||
+ | Hint: Work in "screen". | ||
+ | |||
+ | ===== Getting the tools ===== | ||
+ | <code> | ||
+ | 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 | ||
+ | </code> | ||
+ | |||
+ | ===== Kernelpatches ===== | ||
+ | <code> | ||
+ | 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 | ||
+ | </code> | ||
+ | Comment by DL9SAU: | ||
+ | <code> | ||
+ | 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. | ||
+ | </code> | ||
+ | |||
+ | ===== Kernel Modules ===== | ||
+ | <code> | ||
+ | vi kamikaze_7.09/package/kernel/modules/network.mk | ||
+ | </code> | ||
+ | <file> | ||
+ | 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)) | ||
+ | </file> | ||
+ | |||
+ | Kernel 2.6: | ||
+ | <file> | ||
+ | $(LINUX_DIR)/lib/crc16.$(LINUX_KMOD_SUFFIX) | ||
+ | AUTOLOAD:=$(call AutoLoad,80,ax25 crc16 mkiss) | ||
+ | </file> | ||
+ | |||
+ | |||
+ | ===== Kernel Config ===== | ||
+ | <code> | ||
+ | vi kamikaze_7.09/target/linux/brcm-2.4/config/default (delete corresponding lines with "# CONFIG_<ax25stuff> is not set") | ||
+ | </code> | ||
+ | <file> | ||
+ | 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 | ||
+ | </file> | ||
+ | |||
+ | Kernel 2.6: | ||
+ | <code> | ||
+ | vi kamikaze_7.09/target/linux/brcm47xx-2.6/config/default | ||
+ | </code> | ||
+ | <file> | ||
+ | CONFIG_CRC16=m | ||
+ | </file> | ||
+ | |||
+ | ===== Editing ipkg.conf ===== | ||
+ | <code> | ||
+ | vi kamikaze_7.09/package/base-files/files/etc/ipkg.conf | ||
+ | </code> | ||
+ | <file> | ||
+ | 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 | ||
+ | </file> | ||
+ | |||
+ | ===== Build configuration ===== | ||
+ | <code> | ||
+ | cd kamikaze_7.09 | ||
+ | make menuconfig | ||
+ | Kernel modules ---> Network Support ---> <*> kmod-ax25 | ||
+ | Libraries ---> <M> libncurses | ||
+ | --> exit and save config | ||
+ | </code> | ||
+ | |||
+ | "mkiss"-module has been modified on Kernel 2.6. It depends on "crc16" which is not needed on Kernel 2.4. | ||
+ | |||
+ | ===== Building ===== | ||
+ | <code> | ||
+ | make V=99 >make.log 2>&1 | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ===== Flashing ===== | ||
+ | <code> | ||
+ | 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" | ||
+ | </code> | ||
+ | |||
+ | ===== Links ===== | ||
+ | [[http://downloads.openwrt.org/docs/buildroot-documentation.html|BuildRoot-documentation]] | ||