2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
11 LINUX_KERNEL_MD5SUM
:=38f4d0830e95a20f4bfed17622d5557c
14 include $(INCLUDE_DIR
)/kernel.mk
16 ATM_FIRMWARE_VERSION
:=0.4
17 ATM_FIRMWARE_DIR
=sangam-atm-firmware-
$(ATM_FIRMWARE_VERSION
)
19 $(eval
$(call KMOD_template
,SANGAM_ATM_A
,sangam-atm-annex-a
,\
20 $(MODULES_DIR
)/kernel
/drivers
/atm
/tiatm.o \
21 ,CONFIG_MIPS_SANGAM_ATM
,kmod-atm
,60,tiatm
, \
22 $(CP
) $(BUILD_DIR
)/$(ATM_FIRMWARE_DIR
)/ar0700xx_a.bin
$$(I_SANGAM_ATM_A
)/lib
/modules
/ar0700xx.bin \
25 $(eval
$(call KMOD_template
,SANGAM_ATM_B
,sangam-atm-annex-b
,\
26 $(MODULES_DIR
)/kernel
/drivers
/atm
/tiatm.o \
27 ,CONFIG_MIPS_SANGAM_ATM
,kmod-atm
,60,tiatm
, \
28 $(CP
) $(BUILD_DIR
)/$(ATM_FIRMWARE_DIR
)/ar0700xx_b.bin
$$(I_SANGAM_ATM_B
)/lib
/modules
/ar0700xx.bin \
31 $(eval
$(call KMOD_template
,CPMAC
,cpmac
,\
32 $(MODULES_DIR
)/kernel
/drivers
/net
/avalanche_cpmac
/avalanche_cpmac.o \
33 ,CONFIG_MIPS_AVALANCHE_CPMAC
,,10,avalanche_cpmac
))
35 include $(INCLUDE_DIR
)/kernel-build.mk
38 $(LINUX_DIR
)/.patched
: $(LINUX_DIR
)/.unpacked
39 [ -d ..
/generic-
$(KERNEL
)/patches
] && $(PATCH
) $(LINUX_DIR
) ..
/generic-
$(KERNEL
)/patches
40 [ -d .
/patches
] && $(PATCH
) $(LINUX_DIR
) .
/patches
41 @
$(CP
) config
$(LINUX_DIR
)/.config
45 ###############################################
46 # ATM firmware for the DSL modem
47 ###############################################
49 DOWNLOAD_SITE
=http
://openwrt.org
/downloads
/downloads
50 # extracted from netgear DG834B V1.0.5 GPL release
51 ATM_FIRMWARE_FILE
=$(ATM_FIRMWARE_DIR
).
tar.gz
52 ATM_FIRMWARE_MD5SUM
=8bfcb31109796502d66b11baaeb2fba6
54 $(DL_DIR
)/$(ATM_FIRMWARE_FILE
):
55 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(ATM_FIRMWARE_FILE
) $(ATM_FIRMWARE_MD5SUM
) $(DOWNLOAD_SITE
)
57 download
: $(DL_DIR
)/$(ATM_FIRMWARE_FILE
)
58 $(LINUX_DIR
)/.unpacked
: $(DL_DIR
)/$(ATM_FIRMWARE_FILE
)
59 $(LINUX_DIR
)/.depend_done
: $(LINUX_DIR
)/.drivers-unpacked
60 $(LINUX_DIR
)/.modules_done
: $(LINUX_DIR
)/.drivers-unpacked
62 $(LINUX_DIR
)/.drivers-unpacked
: $(LINUX_DIR
)/.unpacked
63 -mkdir
-p
$(BUILD_DIR
)
64 zcat
$(DL_DIR
)/$(ATM_FIRMWARE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
67 linux-dirclean
: drivers-clean
70 rm -rf
$(BUILD_DIR
)/$(ATM_FIRMWARE_DIR
)