#!/bin/bash #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # only executed if productname is changed if [ ! -e "${SRC}"/etc/default.${CONFIG_PRODUKT} ]; then echo -e "\033[1m${SORCE_PRODUKT} ---> ${CONFIG_PRODUKT}\033[0m " echo2 " -- move contents of OEM directory:" echo2 " move /etc/default.${SORCE_PRODUKT} --> /etc/default.${CONFIG_PRODUKT}" mkdir -m 755 "${SRC}/etc/default.${CONFIG_PRODUKT}" "$TAR" -c -C "${SRC}/etc/default.${SORCE_PRODUKT}" . | "$TAR" -x -C "${SRC}/etc/default.${CONFIG_PRODUKT}" rm -fr "${SRC}"/etc/default.${SORCE_PRODUKT} fi if [ "${OEM}" == "tcom" ]; then #use OEM tcom cp -fdrp "${SRC}/etc/default.${CONFIG_PRODUKT}/${OEMLINK}" "${SRC}/etc/default.${CONFIG_PRODUKT}/tcom" cp -fdrp "${SRC}/etc/default.${CONFIG_PRODUKT}/${OEMLINK}/strings.tab" --target-directory="${SRC}/etc/default.${CONFIG_PRODUKT}/tcom" # use tcom defaults from tcom firmware cp -fdrp "${DST}/etc/default.${CONFIG_PRODUKT}/tcom" --target-directory="${SRC}/etc/default.${CONFIG_PRODUKT}" echo "-- OEM tcom is in use, IP adress of Box is as with T-com Firmware!" fi #copy second source internet dsl menue [ ${USE_SOURCE2_DSLMNUE} = "y" ] && $sh2_DIR/copy_dsl_tab_pages_SRC2 "${SRC}" "${SRC_2}" #use scond source web GUI echo2 "New WEB GUI will be modified" [ ${USE_SOURCE2_WEBMNUE} = "y" ] && $sh2_DIR/copy_www_SRC2 "${SRC}" "${SRC_2}" #ATA only---> if [ ${ATA_ONLY} = "n" ]; then #add DSL driver depending on the settings made #/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko: # "vinax_driver" #Attention! Vinax uses additional /dev/vinax device entrys, they are generated via /tools/device_table.txt (makedevice option) echo "/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko:" >>"${SRC}"/lib/modules/$KernelVersion/modules.dep cp -fdrp "${DST}"/dev --target-directory="${SRC}" #this copy is onliy usable if run as root [ -d "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax ] || mkdir "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax [ "${FORCE_TCOM_KDSLDMOD}" = "y" ] && cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/dsld [ "${FORCE_TCOM_PCMLINK}" = "y" ] && cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/ubik2/pcmlink.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char/ubik2 cp -fdrp "${DST}"/lib/modules/$KernelVersion/modules.symbols --target-directory="${SRC}"/lib/modules/$KernelVersion #cp -fdrp "${DST}"/lib/modules/$KernelVersion/modules.dep --target-directory="${SRC}"/lib/modules/$KernelVersion cp -fdrp "${DST}"/lib/modules/$KernelVersion/modules.alias --target-directory="${SRC}"/lib/modules/$KernelVersion cp -fdrp "${DST}"/usr/sbin --target-directory="${SRC}"/usr cp -fdrp "${DST}"/lib/modules/vinax* --target-directory="${SRC}"/lib/modules &&\ echo "-- VINAX DSL driver was taken from the original base firmware!" [ -f "${SRC}"/usr/share/ctlmgr/libvdsl.so ] || cp -fdrp "${DST}"/usr/share/ctlmgr/libvdsl.so --target-directory="${SRC}"/usr/share/ctlmgr [ -f "${SRC}"/usr/share/ctlmgr/libtr064.so ] || cp -fdrp "${DST}"/usr/share/ctlmgr/libtr064.so --target-directory=${SRC}/usr/share/ctlmgr [ -e "${DST}"/lib/modules/fw_dcrhp_1150_ap.bin ] && cp -fdrp "${DST}"/lib/modules/fw_dcrhp_1150_ap.bin --target-directory="${SRC}"/lib/modules &&\ echo "-- fw_dcrhp_1150_ap.bin was taken from the original base firmware" [ -e "${DST}"/lib/modules/microvoip-dsl.bin ] && cp -fdrp "${DST}"/lib/modules/microvoip-dsl.bin --target-directory="${SRC}"/lib/modules &&\ echo "-- microvoip-dsl.bin was taken from the original base firmware" #use WLAN (not usabele leds to reboots) [ "${FORCE_TCOM_WLANTIAP}" = "y" ] && cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/net/wireless/avm_wlan/wlan/tiap.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/net/wireless/avm_wlan/wlan #WPA #cp -fdrp "${DST}"/usr/bin/wpa_authenticator --target-directory="${SRC}"/usr/bin # copy igdd if not exisant [ -e "${SRC}"/sbin/igdd ] || cp -fdrp "${DST}"/sbin/igdd --target-directory="${SRC}"/sbin if [ ${SAVE_TCOM_DSL} = "y" ]; then cp -a "${DST}"/lib/modules/vinax* --target-directory=./addon/tmp/W721/squashfs-root/lib/modules &&\ echo "-- TCOM DSL driver saved to: ./addon/tmp/W721!" cp -a "${DST}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/vinax cp -a "${DST}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld cp -a "${DST}"/lib/modules/$KernelVersion/modules.symbols --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion # cp -a "${DST}"/lib/modules/$KernelVersion/modules.dep --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion cp -a "${DST}"/lib/modules/$KernelVersion/modules.alias --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion cp -a "${DST}"/usr/sbin --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/usr cp -a "${DST}"/usr/share/ctlmgr/libvdsl.so --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/usr/share/ctlmgr cp -a "${DST}"/usr/share/ctlmgr/libtr064.so --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/usr/share/ctlmgr cp -a "${DST}"/lib/modules/fw_dcrhp_1150_ap.bin --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules cp -a "${DST}"/lib/modules/microvoip-dsl.bin --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules fi /lib/modules/2.6.13.1-ohio/kernel/drivers/net/wireless/avm_wlan/wlan/tiap.ko if [ -d ${SRC_2}/lib/modules ]; then MODULESDEP_DIR="$(find ${SRC_2}/lib/modules -name modules.dep)" # find file MODULESDEP_DIR=${MODULESDEP_DIR%%/modules.dep*} # von links bis zu /modules.dep export KernelVersion2=${MODULESDEP_DIR##*/} # von rechts bis zum letzten / echo2 " -- AVM Kernel version off source 3 is: $KernelVersion2" fi if [ ${SAVE_SRC2_DSL} = "y" ]; then cp -av "${SRC_2}"/lib/modules/vinax* --target-directory=./addon/tmp/W721 &&\ echo "-- AVM DSL driver saved to: ./addon/tmp/W721!" cp -a "${SRC_2}"/lib/modules/$KernelVersion2/kernel/drivers/vinax/drv_vinax.ko --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/vinax cp -a "${SRC_2}"/lib/modules/$KernelVersion2/kernel/drivers/dsld/kdsldmod.ko --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld cp -a "${SRC_2}"/lib/modules/$KernelVersion2/modules.symbols --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion # cp -a "${SRC_2}"/lib/modules/$KernelVersion2/modules.dep --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion cp -a "${SRC_2}"/lib/modules/$KernelVersion2/modules.alias --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion cp -a "${SRC_2}"/usr/sbin --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/usr cp -a "${SRC_2}"/usr/share/ctlmgr/libvdsl.so --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/usr/share/ctlmgr cp -a "${SRC_2}"/usr/share/ctlmgr/libtr064.so --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/usr/share/ctlmgr cp -a "${SRC_2}"/etc/init.d/rc.vdsl.sh --target-directory="${SRC}"${HOMEDIR}/addon/tmp/W721/squashfs-root/etc/init.d cp -a "${SRC_2}"/lib/modules/fw_dcrhp_1150_ap.bin --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules cp -a "${SRC_2}"/lib/modules/microvoip-dsl.bin --target-directory=${HOMEDIR}/addon/tmp/W721/squashfs-root/lib/modules fi if [ ${USE_SRC2_DSL} = "y" ]; then cp -a "${SRC_2}"/lib/modules/$KernelVersion2/kernel/drivers/vinax/drv_vinax.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax [ "${FORCE_TCOM_KDSLDMOD}" = "y" ] || cp -a "${SRC_2}"/lib/modules/$KernelVersion2/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/dsld cp -a "${SRC_2}"/lib/modules/$KernelVersion2/modules.symbols --target-directory="${SRC}"/lib/modules/$KernelVersion cp -a "${SRC_2}"/lib/modules/$KernelVersion2/modules.dep --target-directory="${SRC}"/lib/modules/$KernelVersion cp -a "${SRC_2}"/lib/modules/$KernelVersion2/modules.alias --target-directory="${SRC}"/lib/modules/$KernelVersion cp -a "${SRC_2}"/usr/sbin --target-directory="${SRC}"/usr [ -f "${SRC}"/usr/share/ctlmgr/libvdsl.so ] || cp -a "${SRC_2}"/usr/share/ctlmgr/libvdsl.so --target-directory="${SRC}"/usr/share/ctlmgr [ -f "${SRC}"/usr/share/ctlmgr/libtr064.so ] || cp -a "${SRC_2}"/usr/share/ctlmgr/libtr064.so --target-directory=${SRC}/usr/share/ctlmgr #take vdsl from source 3 if present cp -a "${SRC_2}"/lib/modules/vinax* --target-directory="${SRC}"/lib/modules &&\ #cp -fdpr "${SRC_2}"/etc/init.d/rc.vdsl.sh --target-directory="${SRC}"/etc/init.d &&\ echo "-- vinax driver was taken from the original base firmware!" [ -e "${SRC_2}"/lib/modules/fw_dcrhp_1150_ap.bin ] && cp -fdrp "${SRC_2}"/lib/modules/fw_dcrhp_1150_ap.bin --target-directory="${SRC}"/lib/modules &&\ echo "-- fw_dcrhp_1150_ap.bin was taken from 2nd AVM firmware" [ -e "${SRC_2}"/lib/modules/microvoip-dsl.bin ] && cp -fdrp "${SRC_2}"/lib/modules/microvoip-dsl.bin --target-directory="${SRC}"/lib/modules &&\ echo "-- microvoip-dsl.bin was taken from 2nd AVM firmware" fi [ "${USE_OWN_DSL}" = "y" ] && cp -fdrp ./addon/tmp/W721/squashfs-root/* --target-directory="${SRC}" &&\ echo "-- VINAX DSL driver was taken from local directory ./addon/tmp/W721" if [ "${SAVE_SRC2_KDSLDMOD}" = "y" ]; then mkdir -p ./addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory=./addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld &&\ echo "-- 2nd AVM Firmware kdslmod driver saved to: ./addon/tmp/W721" fi [ "${FORCE_SRC2_KDSLDMOD}" = "y" ] && cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/dsld &&\ echo "-- kdslmod driver was taken from 2nd AVM source." if [ "${FORCE_OWN_KDSLDMOD}" = "y" ] && ! [ -f ./addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko ]; then echo " --> You must save kdsld driver form 2nd AVM source before" && sleep 10 && exit 1 fi [ "${FORCE_OWN_KDSLDMOD}" = "y" ] && cp -fdrp ./addon/tmp/W721/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}/lib/modules/$KernelVersion/kernel/drivers/dsld" &&\ echo "-- kdslmod driver was taken from local directory ./addon/tmp/W721" # ther are no newer and compatibel drivers up to now #[ "${FORCE_VINAX_DRV}" = "y" ] && cp -fdrp ${HOMEDIR}/addon/tmp/modules/vinax/drv_vinax.ko --target-directory="${SRC}/lib/modules/$KernelVersion/kernel/drivers/vinax" &&\ #echo " -- PPPoA compatible VINAX DSL driver is in use!" #[ "${FORCE_KDSLD_DRV}" = "y" ] && cp -fdrp ${HOMEDIR}/addon/tmp/modules/dsld/kdsldmod.ko --target-directory="${SRC}/lib/modules/$KernelVersion/kernel/drivers/dsld" &&\ #echo " -- PPPoA compatible KDSLDMOD driver is in use!" #---- CPYPSEC="y" if [ "${COPY_TCOM_BIN}" = "y" ]; then cp -fdrp "${DST}"/usr/bin --target-directory="${SRC}"/usr cp -fdrp "${DST}"/usr/sbin --target-directory="${SRC}"/usr # cp -fdrp "${DST}"/usr/www/cgi-bin --target-directory="${SRC}"/usr/www # cp -fdrp "${DST}"/usr/share --target-directory="${SRC}"/usr #libuser.so # for file in libfon.so libmini.so libtamconf.so libtelcfg.so libtr064.so libtr069.so libvdsl.so libvpnstat.so libwlan.so ; do # file="${DST}"/usr/share/ctlmgr/$file # if [ -f "$file" ]; then # cp -fdrp "$file" --target-directory="${SRC}"/usr/share/ctlmgr # fi # done cp -fdrp "${DST}"/bin --target-directory="${SRC}" cp -fdrp "${DST}"/sbin --target-directory="${SRC}" cp -fdrp "${DST}"/lib --target-directory="${SRC}" cp -fdrp "${DST}"/dev --target-directory="${SRC}" cp -fdpr "${DST}"/etc/init.d/rc.dsl.sh --target-directory="${SRC}"/etc/init.d # cp -fdpr "${DST}"/etc/init.d/rc.S --target-directory="${SRC}"/etc/init.d #copy all modules #cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel # --> add rc.S #cp -fdpr ${HOMEDIR}/addon/tmp/squashfs-root/* --target-directory="${SRC}" #CPYPSEC="n" # <-- else #add entrys in modules.sybols sed -i -e '/ alias symbol:pcmlink_ul_dspfwversion_pcmrouter pcmlink/a\ alias symbol:pcmlink_ul_closeslots pcmlink\ alias symbol:pcmlink_ul_linkhandle_to_handle pcmlink\ alias symbol:pcmlink_ul_openslots pcmlink' "${SRC}"/lib/modules/$KernelVersion/modules.symbols sed -i -e '/modprobe tiatm/a\ echo "MODE = vdsl" > \/dev\/avm_power' "${SRC}/etc/init.d/rc.dsl.sh" fi sed -i -e '/rc.dsl.sh start/a\ . /etc/init.d/rc.vdsl.sh' "${SRC}/etc/init.d/rc.S" [ ${USE_OWN_DSL} = "y" ] && cp -fdrp ${HOMEDIR}/addon/tmp/W721/squashfs-root/* --target-directory="${SRC}" &&\ echo "-- DSL driver was taken from local directory ./addon/tmp/W721!" #sed -i -e '/modprobe ${pcm_link} ${pcm_link_params}/d' "${SRC}/etc/init.d/rc.S" #DSL skripts---> #copy VDSL Skript cp -fdpr "${DST}"/etc/init.d/rc.vdsl.sh --target-directory="${SRC}"/etc/init.d #Annex sed -i -e "s/DSL_Mode=\"VB\"/DSL_Mode=\"V$ANNEX\"/" "${SRC}/etc/init.d/rc.vdsl.sh" #sed -i -e "s/annex=B/annex=$ANNEX/" "${SRC}/etc/init.d/rc.dsl.sh" #Annex default sed -i -e "s/VNX_Mode=\"VB\"/VNX_Mode=\"V$ANNEX\"/" "${SRC}/etc/init.d/rc.vdsl.sh" #ATM Parameter sed -i -e 's/dsl_pipe sarcs 0 0 0 1 32 1/dsl_pipe sarcs 0 0 0 $VPI $VCI 1/' "${SRC}/etc/init.d/rc.vdsl.sh" sed -i -e 's/dsl_pipe sarrts 0 0 1 1 32/dsl_pipe sarrts 0 0 1 $VPI $VCI/' "${SRC}/etc/init.d/rc.vdsl.sh" sed -i -e '/DSL_Mode="V/a\ #VPI/VCI Config aus ar7cfg holen\ local VCI=`echo ar7cfg.vccs.VCI | ar7cfgctl -s`\ local VPI=`echo ar7cfg.vccs.VPI | ar7cfgctl -s`\ echo ===============\ echo Starting Vinax\ echo ===============\ echo VPI: $VPI\ echo VCI: $VCI' "${SRC}/etc/init.d/rc.vdsl.sh" #not in use --> #if there is still no option within the menus 7570 rc.vdsl.sh is not used! #sed -i -e "s/dsl_pipe sarcs 0 0 0 1 32 1/dsl_pipe sarcs 0 0 0 $VPI $VCI 1/" "${SRC}/etc/init.d/rc.vdsl.sh" #sed -i -e "s/dsl_pipe sarrts 0 0 1 1 32/dsl_pipe sarrts 0 0 1 $VPI $VCI/" "${SRC}/etc/init.d/rc.vdsl.sh" #case $KAPSELUNG in # "0") # VNX_PPP="dslencap_pppoe" # ;; # "1") # VNX_PPP="dslencap_pppoa_llc" # ;; # "2") # VNX_PPP="dslencap_pppoa" # ;; # *) echo "Unknown PPP Mode, Using default Mode PPPoE." # ;; #esac # encapsulation is only usable with 7570 modules but this modules are incompatible with 7170 filrmware #[ "${KAPSELUNG}" != "" ] && sed -i -e "s/local ppp_conf=.*$/local ppp_conf=${VNX_PPP}/" "${SRC}/etc/init.d/rc.vdsl.sh" #VNX_PPP=0 #default is PPPoE #[ "${KAPSELUNG}" != "" ] && sed -i -e "s/VNX_PPP=0/VNX_PPP=${VNX_PPP}/" "${SRC}/etc/init.d/rc.vdsl.sh" #<-- #set DSLMOD [ "${DSLMOD}" != "" ] && sed -i -e "s/local DSLMODE=.*$/local DSLMODE=${DSLMOD}/" "${SRC}/etc/init.d/rc.vdsl.sh" # still not usabele with PPPoA becaus we would need drv_vianx.co for 2.6.13.1.ohio kernelversion if [ "${USE_SRC2_VINAX_ADSLFW}" = "y" ] || [ "${ANNEX}" = "A" ]; then if ! [ -f "${SRC_2}"/lib/modules/vinax_fw_adsl_${ANNEX}.bin ]; then echo echo echo " Annex ${ANNEX} VINAX driver missing! Select 7570 firmware as 3rd firmware!" sleep 20 exit 0 else rm -fr "${SRC}"/lib/modules/vinax_fw_*.bin cp "${SRC_2}"/lib/modules/vinax_fw_adsl_${ANNEX}.bin "${SRC}"/lib/modules/vinax_fw_adsl.bin cp "${SRC_2}"/lib/modules/vinax_fw_vdsl.bin "${SRC}"/lib/modules/vinax_fw_vdsl.bin sed -i -e "s/dsl_pipe lllcs 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 01E0 0 -1 -1 -1 -1 -1 1/dsl_pipe lllcs 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 0 -1 -1 -1 -1 -1 1/" "${SRC}/etc/init.d/rc.vdsl.sh" sed -i -e "s/dsl_pipe lllcs 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 0/dsl_pipe lllcs 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 0 -1 -1 -1 -1 -1 0/" "${SRC}/etc/init.d/rc.vdsl.sh" # following line ends in sementation fault #[ -f "${SRC_2}"/etc/init.d/rc.vdsl.sh ] && cp -fdprv "${SRC_2}"/etc/init.d/rc.vdsl.sh --target-directory="${SRC}"/etc/init.d &&\ sed -i -e "s/vinax_fw_adsl_\${ANNEX}.bin/vinax_fw_adsl.bin/" "${SRC}/etc/init.d/rc.vdsl.sh" sed -i -e 's/drv_vinax major_number=253 vnx_ppp_mode=$VNX_PPP vnx_vpi=$VPI vnx_vci=$VCI/drv_vinax major_number=253 vinax_fw_version=0x953a02/' "${SRC}/etc/init.d/rc.vdsl.sh" ### Still not usabele with PPPoA because we would need drv_vianx.co for 2.6.13.1.ohio kernelversion, use the following three lines if kernelversion is correct ### [ -f "${SRC_2}"/lib/modules/$KernelVersion2/kernel/drivers/vinax/drv_vinax.ko ] && cp -fdrpv "${SRC_2}"/lib/modules/$KernelVersion2/kernel/drivers/vinax/drv_vinax.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax ### sed -i -e 's/drv_vinax major_number=253/drv_vinax major_number=253 vnx_ppp_mode=$VNX_PPP vnx_vpi=$VPI vnx_vci=$VCI/' "${SRC}/etc/init.d/rc.vdsl.sh" ### sed -i -e 's/vinax_fw_version=0x953a02//' "${SRC}/etc/init.d/rc.vdsl.sh" #### [ ! -L "${SRC}/lib/modules/$KernelVersion2" ] && ln -s "/lib/modules/$KernelVersion" "${SRC}/lib/modules/$KernelVersion2" fi fi #VDSL would not start if wrong HWrevision is in use, so it only can be set in ATA mod #But pluginsupport needs AVM HWrevision to setup the download URL for plugins #dont think it is needed, but for safty sed -i -e '/CONFIG_VDSL=/a\ export CONFIG_VINAX="y"' "${SRC}/etc/init.d/rc.conf" #<---DSL skripts #else #remove ADSL #dont start dsl (not usable - tiatm is not starting) #sed -i -e 's|/etc/init.d/rc.dsl.sh start||' "${SRC}/etc/init.d/rc.S" #rm -f "${SRC}"/lib/modules/microvoip-dsl.bin #<-- ATA only fi #remove some unused files echo2 " -- removing files for further image size reduction:" $sh_DIR/remove_files_503_721.sh ${SRC} rm -rf $VERBOSE ${SRC}/lib/libacsrpc* | sed "s/.*\//\t'/" # pcmlink boot error, da modul nicht kompatibel ist rm -f "${SRC}"/lib/modules/c55* #workaround for HWRevision if [ "${ENFORCE_HWREVISION}" != "y" ]; then if [ -f "${SRC}/sbin/start_plugin.sh" ]; then sed -i -e "/url=\"\`\/sbin\/pluginurl\`\"/i\ export HWRevision=\"$FBHWRevision\"" "${SRC}/sbin/start_plugin.sh" sed -i -e "/url=\"\`\/sbin\/pluginurl\`\"/a\ export HWRevision=\"$HWID\"" "${SRC}/sbin/start_plugin.sh" fi fi sed -i -e "s|hardware=\${HWRevision}|hardware=${FBHWRevision}|" "${SRC}/etc/init.d/rc.conf" #tests sed -i -e '/export ANNEX_TEST/a\ if [ "$STATUS_TEST" != "0" ]; then\ /usr/bin/dsl_info.sh /&\ fi' "${SRC}/etc/init.d/rc.S" #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ echo "-- Matching Versions: $AVM_VERSION-$AVM_SUBVERSION - $TCOM_VERSION-$TCOM_SUBVERSION" if [ ${FORCE_TCOM_PIGLET} = "y" ]; then [ -d "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/Piglet_noemf ] && PIGLET="Piglet_noemif" [ -d "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/Piglet ] && PIGLET="Piglet" rm -fr "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char/Piglet rm -fr "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char/Piglet_noemif cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/$PIGLET --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char fi #xilix W721 driver must be for the hardware in use rm -fr "${SRC}"/lib/modules/microvoip_isdn_top.bit1 [ -e "${DST}"/lib/modules/microvoip_isdn_top.bit ] && cp -fdrp "${DST}"/lib/modules/microvoip_isdn_top.bit --target-directory="${SRC}"/lib/modules &&\ echo "-- Xilinx bitfile was taken from the original base firmware" [ -e "${DST}"/lib/modules/bitfile.bit ] && cp -fdrp "${DST}"/lib/modules/bitfile.bit "${SRC}"/lib/modules/microvoip_isdn_top.bit &&\ echo "-- Xilinx bitfile was taken from the original base firmware" # dont add if rc.S is coppyed if [ "$CPYPSEC" == "y" ]; then #adapt parameters for Piglet bitfile it is 7170 firmware $sh_DIR/patch_pigletsection.sh "${SRC}" "${DST}" #if section was not set correct it must be 7113 firmware, not needed becaus 7113 firmware is also not the clue grep -q "piglet_enable_switch=3" "${SRC}/etc/init.d/rc.S" || sed -i -e '/piglet_bitfile=/a \ piglet_bitfile=/lib/modules/microvoip_isdn_top.bit${HWRevision_BitFileCount}\ piglet_load_params="\\\ piglet_width_running=1 \\\ piglet_usb_power_bit=-1 \\\ piglet_disable_test=1 \\\ piglet_cs=5 \\\ piglet_reset_bit=-2 \\\ piglet_bitfile_offset=0 \\\ piglet_bitfile_write=-1 \\\ piglet_bitfile_revbytes=1 \\\ piglet_enable_button2=1 \\\ "\ if [ "$HWRevision_BitFileCount" = "1" ] ; then\ piglet_load_params="$piglet_load_params piglet_enable_switch=3"\ fi\ modprobe Piglet piglet_bitfile=$piglet_bitfile $piglet_load_params' "${SRC}/etc/init.d/rc.S" sed -i -e '/modprobe Piglet_noemif piglet_bitfile=$piglet_bitfile piglet_potsbitfile=$piglet_potsbitfile $piglet_load_params/d' "${SRC}/etc/init.d/rc.S" #echo "--------------------------------------------------------------------------------------------------------------------------------------------------" #remove dect and usb #x# sed -i -e '/mknod .var.flash.aura-usb c/d' "${SRC}/etc/init.d/rc.S" sed -i -e '/mknod .var.flash.dect_misc c/d' "${SRC}/etc/init.d/rc.S" sed -i -e '/mknod .var.flash.dect_eeprom c/d' "${SRC}/etc/init.d/rc.S" sed -i -e '/mknod .var.flash.dmgr_handset_user c/d' "${SRC}/etc/init.d/rc.S" #x# sed -i -e '/mknod .var.flash.configd c/d' "${SRC}/etc/init.d/rc.S" sed -i -e "/dect_misc/,/dmgr_handset_user/d" "${SRC}/etc/init.d/rc.S" #remove USB config sed -i -e "/#### USB-Host Config ####/,/#### USB-Client Config ####/d" "${SRC}/etc/init.d/rc.S" #remove DECT config sed -i -e "s/copy_dect_defaults()/copy_dect()/" "${SRC}/etc/init.d/rc.S" sed -i -e "/modprobe dect_io/d" "${SRC}/etc/init.d/rc.S" #sleep 10 fi #enable button sed -i -e 's/piglet_enable_button=2/piglet_enable_button=3/' "${SRC}/etc/init.d/rc.S" #Annex A is not usable up to now #patch annex parameter $sh_DIR/patch_annex.sh "${SRC}" #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # set led definition if [ -f "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/led_module.ko ] && [ ${FORCE_TCOM_LEDDRIVER} = "y" ]; then cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/led_module.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char cp -fdrp "${DST}"/lib/libled* --target-directory="${SRC}"/lib cp -fdrp "${DST}"/bin/led* --target-directory="${SRC}"/bin cp -fr "${DST}"/bin/update_led_on ${SRC}/bin/update_led_on cp -fr "${DST}"/bin/update_led_off ${SRC}/bin/update_led_off echo "-- LED driver was taken from the original base firmware!" fi $sh_DIR/patch_leddefinition.sh "${SRC}" "${DST}" # add missing gives $sh_DIR/add_vdslscale.sh "${SRC}" # 721 $sh_DIR/patch_config_rc.conf.sh "${SRC}" "${DST}" 721 # add language timezone country $sh_DIR/add_multi_settings.sh #remove menus [ ${REMOVE_MENU_ITEM} = "y" ] && $sh_DIR/rmv_menus.sh "${SRC}" "${FBMOD}" #Add buchsend button to fon bookpage [ "${ADD_PHONESEND}" = "y" ] && $sh_DIR/patch_fonbuch.sh "${SRC}" # skripts for startig ftp on USB #cp -fdpr ./addon/tmp/jp --target-directory="${SRC}" echo "********************************************************************************" #if this is not corrected no webintaface is present with most firmwares sed -i -e "s|HWRevision_ATA=0|HWRevision_ATA=1|" "${SRC}/etc/init.d/rc.conf" #remove kids and help if [ "${REMOVE_KIDS}" = "y" ]; then $sh_DIR/rmv_kids.sh "${SRC}" rm -fr ${SRC}/usr/www/kids rm -rf ${SRC}/bin/usermand rm -fr ${SRC}/lib/modules/$KernelVersion/kernel/drivers/userman fi [ "${REMOVE_HELP}" = "y" ] && $sh_DIR/rmv_help.sh "${SRC}" #echo2 "Removing files for further image size reduction:" #$sh_DIR/remove_files_721.sh ${SRC} #remove programme menu entry DIRI="${SRC}/usr/www/${OEMLINK}/html/de/menus" for FILE in `ls "${DIRI}"/*`; do sed -i -e "/'software','extern'/d" $FILE done #copy tcom ar7.cfg to avm and set Vlan7 as defoult [ "${FORCE_VLAN7}" = "y" ] && $sh_DIR/add_vlan_in_ar7.cfg.sh