From ecccdfb45e27df5d9ee6deba57fb4fa28131a59d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 18 Dec 2009 08:44:40 +0100 Subject: enable pppoa and fix dsl driver - fix dsl driver crash, sync is now successful - add ppp ppp over atm --- mk/image.mk | 4 +- package/ppp/Config.in | 12 +++--- package/ppp/Makefile | 6 +++ package/sangam-atm/patches/patch-tn7atm_h | 8 +++- package/sangam-atm/patches/patch-tn7dsl_c | 69 ++++++++++++++++++++++++------- target/ag241/Makefile | 4 +- target/linux/config/Config.in.network | 16 +++---- 7 files changed, 84 insertions(+), 35 deletions(-) diff --git a/mk/image.mk b/mk/image.mk index 1b92da0df..a41e41482 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -70,8 +70,8 @@ ${BIN_DIR}/${ROOTFSSQUASHFS}: ${TARGET_DIR} -nopad -noappend -root-owned $(MAKE_TRACE) cat ${BIN_DIR}/${ADK_TARGET}-${ARCH}-kernel ${BUILD_DIR}/root.squashfs > \ ${BUILD_DIR}/${ROOTFSSQUASHFS} - # padding of images is required - dd if=${BUILD_DIR}/${ROOTFSSQUASHFS} of=${BIN_DIR}/${ROOTFSSQUASHFS} \ + # padding of images is required, foxboard only? + #dd if=${BUILD_DIR}/${ROOTFSSQUASHFS} of=${BIN_DIR}/${ROOTFSSQUASHFS} \ bs=4063232 conv=sync $(MAKE_TRACE) imageclean: diff --git a/package/ppp/Config.in b/package/ppp/Config.in index 0969ae40a..68b5c4d66 100644 --- a/package/ppp/Config.in +++ b/package/ppp/Config.in @@ -5,12 +5,12 @@ config ADK_PACKAGE_PPP default n select ADK_KPACKAGE_KMOD_PPP -#config ADK_PACKAGE_PPP_MOD_PPPOA -# prompt "ppp-mod-pppoa................... PPPoA (PPP over ATM) plugin" -# tristate -# default n -# select ADK_KPACKAGE_KMOD_PPPOATM -# depends on ADK_PACKAGE_PPP +config ADK_PACKAGE_PPP_MOD_PPPOA + prompt "ppp-mod-pppoa................... PPPoA (PPP over ATM) plugin" + tristate + default n + select ADK_KPACKAGE_KMOD_PPPOATM + depends on ADK_PACKAGE_PPP config ADK_PACKAGE_PPP_MOD_PPPOE prompt "ppp-mod-pppoe................... PPPoE (PPP over Ethernet) plugin" diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 295c19b0e..350095cb6 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -39,6 +39,7 @@ XAKE_FLAGS+= CC="${TARGET_CC}" \ SUB_INSTALLS-y:= SUB_INSTALLS-m:= SUB_INSTALLS-${ADK_PACKAGE_PPP_MOD_PPPOE}+= mod-pppoe-install +SUB_INSTALLS-${ADK_PACKAGE_PPP_MOD_PPPOA}+= mod-pppoa-install SUB_INSTALLS-${ADK_PACKAGE_PPP_MOD_RADIUS}+= mod-radius-install SUB_INSTALLS-${ADK_PACKAGE_PPP_MOD_CHAT}+= mod-chat-install SUB_INSTALLS-${ADK_PACKAGE_PPP_MOD_PPPDUMP}+= mod-pppdump-install @@ -81,6 +82,11 @@ mod-pppoe-install: ${INSTALL_BIN} $(WRKINST)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \ ${IDIR_PPP_MOD_PPPOE}/usr/lib/pppd/$(PKG_VERSION) +mod-pppoa-install: + ${INSTALL_DIR} ${IDIR_PPP_MOD_PPPOA}/usr/lib/pppd/$(PKG_VERSION) + ${INSTALL_BIN} $(WRKINST)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \ + ${IDIR_PPP_MOD_PPPOA}/usr/lib/pppd/$(PKG_VERSION) + mod-chat-install: ${INSTALL_DIR} ${IDIR_PPP_MOD_CHAT}/usr/sbin ${CP} ${WRKINST}/usr/sbin/chat ${IDIR_PPP_MOD_CHAT}/usr/sbin/ diff --git a/package/sangam-atm/patches/patch-tn7atm_h b/package/sangam-atm/patches/patch-tn7atm_h index e26e0441a..fd9ca3db1 100644 --- a/package/sangam-atm/patches/patch-tn7atm_h +++ b/package/sangam-atm/patches/patch-tn7atm_h @@ -1,5 +1,5 @@ --- sangam-atm-1.0.orig/tn7atm.h 2006-04-05 07:33:06.000000000 +0200 -+++ sangam-atm-1.0/tn7atm.h 2009-12-17 19:15:08.310494800 +0100 ++++ sangam-atm-1.0/tn7atm.h 2009-12-17 23:42:04.069784991 +0100 @@ -19,7 +19,8 @@ //#include "mips_support.h" #include @@ -48,3 +48,9 @@ #ifdef CONFIG_LED_MODULE #ifndef BASE_PSP_7X #include +@@ -275,4 +245,4 @@ typedef struct + #define PHYS_TO_K1(X) (PHYS_ADDR(X)|K1BASE) + #endif + +-#endif __TN7ATM_H ++#endif diff --git a/package/sangam-atm/patches/patch-tn7dsl_c b/package/sangam-atm/patches/patch-tn7dsl_c index 8a06dcfe1..dfbc994ff 100644 --- a/package/sangam-atm/patches/patch-tn7dsl_c +++ b/package/sangam-atm/patches/patch-tn7dsl_c @@ -1,5 +1,5 @@ --- sangam-atm-1.0.orig/tn7dsl.c 2007-01-04 09:04:14.000000000 +0100 -+++ sangam-atm-1.0/tn7dsl.c 2009-12-17 19:22:19.372420289 +0100 ++++ sangam-atm-1.0/tn7dsl.c 2009-12-17 23:40:56.457448616 +0100 @@ -94,7 +94,6 @@ * 1/02/07 JZ CQ11054: Data Precision and Range Changes for TR-069 Conformance * UR8_MERGE_END CQ11054* @@ -82,7 +82,17 @@ //kthread_t overlay_thread; /* end of module wide declars */ -@@ -323,6 +353,14 @@ static int tn7dsl_proc_snr_print (char * +@@ -309,8 +339,7 @@ static void tn7dsl_chng_modulation(void* + static unsigned int tn7dsl_set_modulation(void* data, int flag); + static void tn7dsl_ctrl_fineGain(int value); + static void tn7dsl_set_fineGainValue(int value); +-static int dslmod_sysctl (ctl_table * ctl, int write, struct file *filp, +- void *buffer, size_t * lenp); ++static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer, size_t * lenp, loff_t *ppos); + static void tn7dsl_register_dslss_led(void); + void tn7dsl_dslmod_sysctl_register(void); + void tn7dsl_dslmod_sysctl_unregister(void); +@@ -323,6 +352,14 @@ static int tn7dsl_proc_snr_print (char * #define gDot1(a) ((a>0)?(a%10):((-a)%10)) // UR8_MERGE_END CQ11054* @@ -97,7 +107,7 @@ int os_atoi(const char *pStr) { int MulNeg = (*pStr == '-' ? -1 : 1); -@@ -359,39 +397,6 @@ void dprintf (int uDbgLevel, char *szFmt +@@ -359,39 +396,6 @@ void dprintf (int uDbgLevel, char *szFmt #endif } @@ -137,7 +147,7 @@ // * UR8_MERGE_START CQ10640 Jack Zhang int tn7dsl_dump_dsp_memory(char *input_str) //cph99 { -@@ -441,101 +446,79 @@ unsigned int shim_osGetCpuFrequency(void +@@ -441,101 +445,79 @@ unsigned int shim_osGetCpuFrequency(void return CpuFrequency; } @@ -302,7 +312,15 @@ } int shim_osLoadDebugFWImage(unsigned char *ptr) -@@ -2845,98 +2828,82 @@ static int tn7dsl_set_dsl(void) +@@ -2834,7 +2816,6 @@ static int tn7dsl_set_dsl(void) + int value; + int i, offset[2]={4,11},oamFeature=0; + char tmp[4]; +- char dspVer[10]; + + // OAM Feature Configuration + dslhal_api_dspInterfaceRead (pIhw, (unsigned int) pIhw->pmainAddr, 2, +@@ -2845,98 +2826,82 @@ static int tn7dsl_set_dsl(void) (unsigned int *) &offset, (unsigned char *) &oamFeature, 4); @@ -436,7 +454,7 @@ tn7dsl_generic_read(2, offset); dslReg &= dslhal_support_byteSwap32(0xFFFFFF00); -@@ -2954,46 +2921,47 @@ static int tn7dsl_set_dsl(void) +@@ -2954,46 +2919,47 @@ static int tn7dsl_set_dsl(void) // maximum bits per carrier ptr = NULL; ptr = prom_getenv("maximum_bits_per_carrier"); @@ -495,7 +513,7 @@ for(i=0;i<8;i++) { tmp[0]=ptr[i*2]; -@@ -3018,26 +2986,26 @@ static int tn7dsl_set_dsl(void) +@@ -3018,26 +2984,26 @@ static int tn7dsl_set_dsl(void) } ptr = NULL; ptr = prom_getenv("eoc_vendor_revision"); @@ -528,7 +546,7 @@ } return 0; -@@ -3064,6 +3032,7 @@ int tn7dsl_init(void *priv) +@@ -3064,6 +3030,7 @@ int tn7dsl_init(void *priv) int high_precision_selected = 0; // UR8_MERGE_END CQ11054* @@ -536,7 +554,7 @@ /* * start dsl */ -@@ -3081,7 +3050,7 @@ int tn7dsl_init(void *priv) +@@ -3081,7 +3048,7 @@ int tn7dsl_init(void *priv) * backward compatibility. */ cp = prom_getenv("DSL_BIT_TMODE"); @@ -545,7 +563,7 @@ { printk("%s : env var DSL_BIT_TMODE is set\n", __FUNCTION__); /* -@@ -3110,9 +3079,9 @@ int tn7dsl_init(void *priv) +@@ -3110,9 +3077,9 @@ int tn7dsl_init(void *priv) // UR8_MERGE_START CQ11054 Jack Zhang cp = prom_getenv("high_precision"); @@ -557,21 +575,40 @@ } if ( high_precision_selected) { -@@ -3442,7 +3411,7 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -3419,8 +3386,7 @@ unsigned int tn7dsl_get_memory(unsigned + + + +-static int dslmod_sysctl(ctl_table *ctl, int write, struct file * filp, +- void *buffer, size_t *lenp) ++static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) + { + char *ptr; + int ret, len = 0; +@@ -3432,7 +3398,7 @@ static int dslmod_sysctl(ctl_table *ctl, + char mod_req[16] = { '\t' }; + char fst_byt; + +- if (!*lenp || (filp->f_pos && !write)) ++ if (!*lenp || (!*ppos && !write)) + { + *lenp = 0; + return 0; +@@ -3442,7 +3408,7 @@ static int dslmod_sysctl(ctl_table *ctl, */ if(write) { - ret = proc_dostring(ctl, write, filp, buffer, lenp); -+ ret = proc_dostring(ctl, write, buffer, lenp, filp); ++ ret = proc_dostring(ctl, write, buffer, lenp, ppos); switch (ctl->ctl_name) { -@@ -3528,14 +3497,14 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -3528,14 +3494,14 @@ static int dslmod_sysctl(ctl_table *ctl, else { len += sprintf(info+len, mod_req); - ret = proc_dostring(ctl, write, filp, buffer, lenp); -+ ret = proc_dostring(ctl, write, buffer, lenp, filp); ++ ret = proc_dostring(ctl, write, buffer, lenp, ppos); } return ret; } @@ -583,7 +620,7 @@ , {0} }; -@@ -3558,8 +3527,7 @@ void tn7dsl_dslmod_sysctl_register(void) +@@ -3558,8 +3524,7 @@ void tn7dsl_dslmod_sysctl_register(void) if (initialized == 1) return; @@ -593,7 +630,7 @@ /* * set the defaults -@@ -4821,4 +4789,4 @@ int tn7dsl_proc_PMDus(char* buf, char ** +@@ -4821,4 +4786,4 @@ int tn7dsl_proc_PMDus(char* buf, char ** } #endif //NO_ADV_STATS #endif //TR69_PMD_IN diff --git a/target/ag241/Makefile b/target/ag241/Makefile index e1c5b47a5..730b06bfa 100644 --- a/target/ag241/Makefile +++ b/target/ag241/Makefile @@ -31,10 +31,10 @@ kernel-install: tools-compile ifeq ($(FS),squashfs) imageinstall: $(BIN_DIR)/$(ROOTFSSQUASHFS) - @if [ $$(stat --format=%s ${BUILD_DIR}/${ROOTFSSQUASHFS}) -gt 4063233 ];then \ + @if [ $$(stat --format=%s ${BUILD_DIR}/${ROOTFSSQUASHFS}) -gt 3801088 ];then \ echo 'Image is too big!'; \ else \ - ${CP} ${BUILD_DIR}/${ROOTFSSQUASHFS} $(BIN_DIR)/$(ROOTFSSQUASHFS); \ + ${CP} ${BUILD_DIR}/${ROOTFSSQUASHFS} ${BIN_DIR}/${ROOTFSSQUASHFS}; \ echo The image file is $(ROOTFSSQUASHFS); \ echo 'You can flash the image via tftp:'; \ echo 'tftp 192.168.1.1'; \ diff --git a/target/linux/config/Config.in.network b/target/linux/config/Config.in.network index 05995b8b2..cf3b2a278 100644 --- a/target/linux/config/Config.in.network +++ b/target/linux/config/Config.in.network @@ -193,14 +193,14 @@ config ADK_KPACKAGE_KMOD_PPP_MPPE See http://pptpclient.sourceforge.net/ for information on configuring PPTP clients and servers to utilize this method. -#config ADK_KPACKAGE_KMOD_PPPOATM -# prompt "kmod-pppoatm.................... PPPoA (PPP over ATM) kernel support" -# tristate -# default n -# depends on ADK_KPACKAGE_KMOD_PPP -# select ADK_KPACKAGE_KMOD_ATM -# help -# Support for PPP over ATM +config ADK_KPACKAGE_KMOD_PPPOATM + prompt "kmod-pppoatm.................... PPPoA (PPP over ATM) kernel support" + tristate + default n + depends on ADK_KPACKAGE_KMOD_PPP + select ADK_KPACKAGE_KMOD_ATM + help + Support for PPP over ATM config ADK_KPACKAGE_KMOD_PPPOE prompt "kmod-pppoe...................... PPPoE (PPP over Ethernet) kernel support" -- cgit v1.2.3