#!/bin/bash #KernelVersion="2.6.19.2" #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # 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 #Attention! Vinax uses aditional /dev/vinax device entrys the are generateed via /tools/device_table.txt (makedevice option) cp -fdrp "${DST}"/dev --target-directory="${SRC}" #this copy is only usable if run as root [ "${FORCE_TCOM_KDSLDMOD}" = "y" ] && cp -fdrp $VERBOSE "${DST}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/dsld | sed "s/.*\//\tuse original '/" [ "${FORCE_TCOM_PCMLINK}" = "y" ] && cp -fdrp $VERBOSE "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/ubik2/pcmlink.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char/ubik2 | sed "s/.*\//\tuse original '/" [ "${FORCE_TCOM_USRMAN}" = "y" ] && cp -frp $VERBOSE "${DST}/lib/modules/$KernelVersion/kernel/drivers/userman/userman_mod.ko" "${SRC}/lib/modles/$KernelVersion/kernel/drivers/userman/userman_mod.ko" | sed "s/.*\//\tuse original '/" if [ "${TYPE_AVM_7570_XX}" = "y" ]; then echo2 "-- 3nd firmware is 7570 type" if [ "${SAVE_TCOM_DSL}" = "y" ]; then cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko ./addon/tmp/W920/squashfs-root/lib/modules/vinax/drv_vinax.ko &&\ echo "-- VINAX drv_vinax.ko driver saved to: ./addon/tmp/W920/..." fi if [ "${SAVE_SRC2_DSL}" = "y" ]; then cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko ./addon/tmp/W920/squashfs-root/lib/modules/vinax/drv_vinax.ko &&\ echo "-- VINAX drv_vinax.ko driver saved to: ./addon/tmp/W920/..." fi if [ "${USE_SRC2_DSL}" = "y" ]; then cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko "${SRC}/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko" &&\ echo "-- VINAX drv_vinax.ko driver was taken from 2nd AVM firmware" elif [ "${USE_OWN_DSL}" = "y" ]; then cp -fdrp ./addon/tmp/W920/squashfs-root/lib/modules/vinax/drv_vinax.ko "${SRC}/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko" &&\ echo "-- VINAX drv_vinax.ko driver was taken from the original base firmware" elif [ "${FORCE_TCOM_DSL}" = "y" ]; then cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko "${SRC}/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko" &&\ echo "-- VINAX drv_vinax.ko driver was taken from the original base firmware" fi else # "vinax_fw_adsl.bin" "vinax_fw_vdsl.bin" #remove 7270 DSL if ! [ -e "${SRC}/etc/init.d/S11-piglet" ]; then # temp workarou rm -fr "${SRC}"/lib/modules/dsp_ur8 rm -fr "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/dsl # "vinax_driver" [ -d "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax ] || mkdir "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax [ -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 cp -fdrp "${DST}"/lib/modules/$KernelVersion/modules.symbols --target-directory="${SRC}"/lib/modules/$KernelVersion cp -fdrp "${DST}"/lib/modules/$KernelVersion/modules.alias --target-directory="${SRC}"/lib/modules/$KernelVersion cp -u "${DST}"/usr/sbin/* --target-directory="${SRC}"/usr/sbin 2> /dev/null cp -fdrp "${DST}"/lib/modules/vinax* --target-directory="${SRC}"/lib/modules &&\ echo "-- 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 else echo "-- temporary woarkaround for ATA only" fi if [ "${SAVE_TCOM_DSL}" = "y" ]; then cp -fdrp "${DST}"/lib/modules/vinax* --target-directory=./addon/tmp/W920/squashfs-root/lib/modules &&\ echo "-- TCOM DSL driver saved to: ./addon/tmp/W920" cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/vinax cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld cp -fdrp "${DST}"/lib/modules/$KernelVersion/modules.symbols --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion cp -fdrp "${DST}"/lib/modules/$KernelVersion/modules.alias --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion cp -fdrp "${DST}"/usr/sbin/dsl* --target-directory=./addon/tmp/W920/squashfs-root/usr/sbin cp -fdrp "${DST}"/usr/sbin/vinax* --target-directory=./addon/tmp/W920/squashfs-root/usr/sbin cp -fdrp "${DST}"/usr/share/ctlmgr/libvdsl.so --target-directory=./addon/tmp/W920/squashfs-root/usr/share/ctlmgr cp -fdrp "${DST}"/usr/share/ctlmgr/libtr064.so --target-directory=./addon/tmp/W920/squashfs-root/usr/share/ctlmgr fi if [ "${SAVE_SRC2_DSL}" = "y" ]; then cp -fdrp "${SRC_2}"/lib/modules/vinax* --target-directory=./addon/tmp/W920 &&\ echo "-- AVM DSL driver saved to: ./addon/tmp/W920" cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/vinax cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/modules.symbols --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/modules.alias --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion cp -fdrp "${SRC_2}"/usr/sbin/dsl* --target-directory=./addon/tmp/W920/squashfs-root/usr/sbin cp -fdrp "${SRC_2}"/usr/sbin/vinax* --target-directory=./addon/tmp/W920/squashfs-root/usr/sbin cp -fdrp "${SRC_2}"/usr/share/ctlmgr/libvdsl.so --target-directory=./addon/tmp/W920/squashfs-root/usr/share/ctlmgr cp -fdrp "${SRC_2}"/usr/share/ctlmgr/libtr064.so --target-directory=./addon/tmp/W920/squashfs-root/usr/share/ctlmgr fi if [ "${USE_SRC2_DSL}" = "y" ]; then cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax [ "${FORCE_TCOM_KDSLDMOD}" = "y" ] || cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/dsld cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/modules.symbols --target-directory="${SRC}"/lib/modules/$KernelVersion cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/modules.alias --target-directory="${SRC}"/lib/modules/$KernelVersion cp -u "${SRC_2}"/usr/sbin/* --target-directory="${SRC}"/usr/sbin 2> /dev/null [ -f "${SRC}"/usr/share/ctlmgr/libvdsl.so ] || cp -fdrp "${SRC_2}"/usr/share/ctlmgr/libvdsl.so --target-directory="${SRC}"/usr/share/ctlmgr [ -f "${SRC}"/usr/share/ctlmgr/libtr064.so ] || cp -fdrp "${SRC_2}"/usr/share/ctlmgr/libtr064.so --target-directory=${SRC}/usr/share/ctlmgr cp -fdrp "${SRC_2}"/lib/modules/vinax* --target-directory="${SRC}"/lib/modules &&\ echo "-- DSL driver was taken from 2nd AVM firmware" fi fi [ "${USE_OWN_DSL}" = "y" ] && cp -fdrp ./addon/tmp/W920/squashfs-root/* --target-directory="${SRC}" &&\ echo "-- VINAX DSL driver was taken from local directory ./addon/tmp/W920" if [ "${SAVE_SRC2_KDSLDMOD}" = "y" ]; then mkdir -p ./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory=./addon/tmp/W920/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld &&\ echo "-- 2nd AVM Firmware kdslmod.ko driver saved to: ./addon/tmp/W920" 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.ko driver was taken from 2nd AVM source." if [ "${FORCE_OWN_KDSLDMOD}" = "y" ] && ! [ -f ./addon/tmp/W920/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/W920/squashfs-root/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}/lib/modules/$KernelVersion/kernel/drivers/dsld" &&\ echo "-- kdslmod.ko driver was taken from local directory ./addon/tmp/W920" [ "${FORCE_VINAX_DRV_77}" = "y" ] && cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko --target-directory="${SRC}/lib/modules/$KernelVersion/kernel/drivers/vinax" &&\ echo "-- drv_vinax.ko was taken from 1st source (base firmware)." [ "${FORCE_KDSLD_DRV_77}" = "y" ] && cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/dsld/kdsldmod.ko --target-directory="${SRC}/lib/modules/$KernelVersion/kernel/drivers/dsld" &&\ echo "-- kdsldmod.ko was taken from 1st source (base firmware)." rm -rf "${SRC}"/lib/modules/*_488.hex if [ "${SAVE_SRC2_DECTDRIVER}" = "y" ]; then mkdir -p ./addon/tmp/W920/squashfs-root/lib/modules cp -fdrp "${SRC_2}"/lib/modules/dectfw_firstlevel.hex --target-directory=./addon/tmp/W920/squashfs-root/lib/modules &&\ cp -fdrp "${SRC_2}"/lib/modules/dectfw_secondlevel.hex --target-directory=./addon/tmp/W920/squashfs-root/lib/modules &&\ echo "-- 2nd AVM Firmware DECT driver saved to: ./addon/tmp/W920" fi [ "${FORCE_DST_DECTDRIVER}" = "y" ] && cp -fdrp "${DST}"/lib/modules/dectfw_firstlevel.hex --target-directory="${SRC}"/lib/modules &&\ cp -fdrp "${DST}"/lib/modules/dectfw_secondlevel.hex --target-directory="${SRC}"/lib/modules &&\ echo "-- DECT driver was taken from 1st source (base firmware)." [ "${FORCE_SRC2_DECTDRIVER}" = "y" ] && cp -fdrp "${SRC_2}"/lib/modules/dectfw_firstlevel.hex --target-directory="${SRC}"/lib/modules &&\ cp -fdrp "${SRC_2}"/lib/modules/dectfw_secondlevel.hex --target-directory="${SRC}"/lib/modules &&\ echo "-- DECT driver was taken from 2nd AVM source." [ "${FORCE_OWN_DECTDRIVER}" = "y" ] && cp -fdrp ./addon/tmp/W920/squashfs-root/lib/modules/dectfw_firstlevel.hex --target-directory="${SRC}"/lib/modules &&\ cp -fdrp ./addon/tmp/W920/squashfs-root/lib/modules/dectfw_secondlevel.hex --target-directory="${SRC}"/lib/modules &&\ echo "-- DECT driver was taken from local directory ./addon/tmp/W920" if `cat "${SRC}/etc/init.d/rc.S" | grep -q '_488.hex' ` && ! [ -f "${SRC}"/lib/modules/dectfw_firstlevel.hex ]; then echo "You must use dect driver form 2nd AVM source or one that was saved before" && sleep 10 && exit 1 fi #v3 dect fix grep -q "488" "${SRC}/etc/init.d/rc.S" && \ echo "-- 7270v3 firmware" && \ cp -fdrp "${DST}"/lib/modules/wlan_eeprom_hw0.bin --target-directory="${SRC}"/lib/modules && \ echo "-- use wlan_eeprom_hw0.bin from 1st firmware" && \ cp -fdrp "${DST}"/lib/modules/c55fw.hex --target-directory="${SRC}"/lib/modules && \ echo "-- use c55fw.hex from 1st firmware" && \ sed -i -e 's|_488.hex|.hex|' "${SRC}/etc/init.d/rc.S" sed -i -e '/piglet_use_pll3_clk=1 \\/d' "${SRC}/etc/init.d/rc.S" sed -i -e 's|piglet_enable_button=2|piglet_enable_button=3|' "${SRC}/etc/init.d/rc.S" sed -i -e '/piglet_bitfilemode=/d' "${SRC}/etc/init.d/rc.S" sed -i -e 's|piglet_potsbitfile=$piglet_potsbitfile ||' "${SRC}/etc/init.d/rc.S" #disable 7270 led controll sed -i -e 's|led-ctrl festnetz_led_disable|echo "festnetz_led_disable removed"|' "${SRC}/etc/init.d/rc.S" sed -i -e 's|led-ctrl dect_led_enable|echo "dect_led_enable removed"|' "${SRC}/etc/init.d/rc.S" #not 7570 only---> if ! [ "7570" == "${TYPE_LABOR_TYPE:0:4}" ]; then #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 ## Default: ggfs. notweniger pcmlink-Treiber wird von modprobe automatisch ## ueber kernel-dependencys ermittelt und vor dem isdn-treiber gestartet ## sed -i -e '/modprobe ${pcm_link} ${pcm_link_params}/d' "${SRC}/etc/init.d/rc.S" ## rm -fr "${SRC}"/lib/modules/c55fw.hex #DSL skripts---> #copy VDSL Skript cp -fdpr "${DST}"/etc/init.d/rc.vdsl.sh --target-directory="${SRC}"/etc/init.d if [ -e "${SRC}/etc/init.d/S11-piglet" ]; then echo "/kernel/drivers/vinax/drv_vinax.ko:" >> "${SRC}"/lib/modules/$KernelVersion/modules.dep #copy VDSL Skript #cp -fdpr "${DST}"/etc/init.d/rc.vdsl.sh --target-directory="${SRC}"/etc/init.d sed -i -e 's|piglet_dectmode=0x100 ||' "${SRC}/etc/init.d/S11-piglet" #Attention! Vinax uses aditional /dev/vinax device entrys the are generateed via /tools/device_table.txt (makedevice option) ## Fritz_Box_7570 - hw920 ## DECT-Anlage braucht den 96 MHz Takt NICHT (250E): 'piglet_use_pll3_clk=1' entfällt, da fpga den 96 MHz Takt aus dem DECT Takt selbst erzeugt. ########################################################################################## #sed -i -e 's|piglet_use_pll3_clk=1|piglet_enable_button=3|' "${SRC}/etc/init.d/S11-piglet" sed -i -e 's|piglet_use_pll3_clk=1||' "${SRC}/etc/init.d/S11-piglet" #v3 dect fix sed -i -e 's|_488.hex|.hex|g' "${SRC}/etc/init.d/S11-piglet" ##xilix W920 driver must be for the hardware in use sed -i -e 's|bitfile.bit|microvoip_isdn_top.bit|' "${SRC}/etc/init.d/S11-piglet" sed -i -e 's|microvoip_isdn.bit|microvoip_isdn_top.bit|' "${SRC}/etc/init.d/S11-piglet" else echo "/lib/modules/$KernelVersion/kernel/drivers/vinax/drv_vinax.ko:" >> "${SRC}"/lib/modules/$KernelVersion/modules.dep #include vdsl skript sed -i -e 's|/etc/init.d/rc.dsl.sh start|\. /etc/init.d/rc.vdsl.sh|' "${SRC}/etc/init.d/rc.S" #diffence in rc.dsl.sh sed -i -e 's|dsl_ur8|tiatm|' "${SRC}/etc/init.d/rc.dsl.sh" sed -i -e '/modprobe tiatm/a\ echo "MODE = vdsl" > \/dev\/avm_power' "${SRC}/etc/init.d/rc.dsl.sh" #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 #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" #xilix W920 driver must be for the hardware in use sed -i -e 's|bitfile.bit|microvoip_isdn_top.bit|' "${SRC}/etc/init.d/rc.S" sed -i -e 's|microvoip_isdn.bit|microvoip_isdn_top.bit|' "${SRC}/etc/init.d/rc.S" sed -i -e 's|bitfile_isdn.bit|microvoip_isdn_top.bit|' "${SRC}/etc/init.d/rc.S" fi rm -f "${SRC}"/lib/modules/microvoip_isdn_top.bit rm -f "${SRC}"/lib/modules/bitfile.bit # 7240 rm -f "${SRC}"/lib/modules/bitfile_pots.bit rm -f "${SRC}"/lib/modules/bitfile_isdn.bit [ -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" #patch annex parameter #remove FON3 menus [ ${REMOVE_MENU_ITEM} = "y" ] && $sh_DIR/rmv_menus.sh "${SRC}" "${FBMOD}" # add missing gifs $sh_DIR/add_vdslscale.sh "${SRC}" $sh_DIR/patch_leddef_7270.sh "${SRC}" "${DST}" $sh_DIR/patch_annex.sh "${SRC}" fi #not 7570 only <--- $sh_DIR/add_ppp_setting.sh #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ echo "-- Matching Versions: $AVM_VERSION-$AVM_SUBVERSION - $TCOM_VERSION-$TCOM_SUBVERSION" [ ${FORCE_TCOM_PIGLET} = "y" ] &&\ cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/char/Piglet_noemif/Piglet_noemif.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char/Piglet_noemif &&\ echo "-- Xilinx Piglet_noemif.ko driver was taken from the original base firmware" #Fon driver [ ${FORCE_TCOM_FON} = "y" ] && cp -fdrp "${DST}"/lib/modules/$KernelVersion/kernel/drivers/isdn/isdn_fon5/zzz/* --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/isdn/isdn_fon5/zzz #enable button sed -i -e 's/piglet_enable_button=2/piglet_enable_button=3/' "${SRC}/etc/init.d/rc.S" #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # 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 if [ -f "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/char/led_module.ko ] && [ "${FORCE_SRC2_LEDDRIVER}" = "y" ]; then cp -fdrp "${SRC_2}"/lib/modules/$KernelVersion/kernel/drivers/char/led_module.ko --target-directory="${SRC}"/lib/modules/$KernelVersion/kernel/drivers/char cp -fdrp "${SRC_2}"/lib/libled* --target-directory="${SRC}"/lib cp -fdrp "${SRC_2}"/bin/led* --target-directory="${SRC}"/bin cp -fr "${SRC_2}"/bin/update_led_on ${SRC}/bin/update_led_on cp -fr "${SRC_2}"/bin/update_led_off ${SRC}/bin/update_led_off echo "-- LED driver was taken from AVM source 2 firmware" fi ## fix led-errormessage in fw-update process #[ -f "${SRC}/bin/update_led_on" ] && sed -i -e 's|/var/led|/dev/led|' "${SRC}/bin/update_led_on" #[ -f "${SRC}/bin/update_led_off" ] && sed -i -e 's|/var/led|/dev/led|' "${SRC}/bin/update_led_off" # 920 #there is still no option within the menus #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 #[ "${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" #Annex default #sed -i -e "s/VNX_Mode=\"VB\"/VNX_Mode=\"V$ANNEX\"/" "${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" #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 #woarkaround v1 Firmware ##echo "FBIMG: $FBIMG" echo $FBIMG | grep -q "v1" && \ [ "$FBHWRevision" == "139" ] && export FBHWRevision="122" if [ "${ENFORCE_HWREVISION}" != "y" ]; then echo "-- download plugin URL uses Hardware Revision Number: $FBHWRevision" #workaround for HWRevision 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 else sed -i -e "s|VINAX_IRQ=10|VINAX_IRQ=9|" "${SRC}/etc/init.d/rc.vdsl.sh" fi sed -i -e "s|hardware=\${HWRevision}|hardware=${FBHWRevision}|" "${SRC}/etc/init.d/rc.conf" #copy second source internet dsl menue [ ${USE_SOURCE2_DSLMNUE} = "y" ] && $sh2_DIR/copy_dsl_tab_pages_SRC2 "${SRC}" "${SRC_2}" echo2 "-- New WEB GUI will be modified" #use scond source web GUI [ ${USE_SOURCE2_WEBMNUE} = "y" ] && $sh2_DIR/copy_www_lua_SRC2 #Add buchsend button to fon bookpage [ "${ADD_PHONESEND}" = "y" ] && $sh_DIR/patch_fonbuch.sh "${SRC}" ## skripts for startig ftp on USB if [ "$TYPE_HN_7570_8_16" != "y" ] && [ "$SPMOD" == "757H" ]; then #remove more ATA_ONLY="y" [ -f "${SRC}/lib/modules/c55fw.hex" ] && rm -f "${SRC}"/lib/modules/c55fw.hex &&\ echo "-- c55fw.hex driver was removed" [ -f "${SRC}/lib/modules/dectfw_firstlevel.hex" ] && rm -f "${SRC}"/lib/modules/dectfw_firstlevel.hex &&\ echo "-- dectfw_firstlevel.hex driver was removed" [ -f "${SRC}/lib/modules/dectfw_secondlevel.hex" ] && rm -f "${SRC}"/lib/modules/dectfw_secondlevel.hex &&\ echo "-- dectfw_secondlevel.hex driver was removed" fi if [ ${ATA_ONLY} = "y" ]; then #remove (V)ADSL sed -i -e 's|/etc/init.d/rc.dsl.sh start||' "${SRC}/etc/init.d/rc.S" sed -i -e 's|. /etc/init.d/rc.vdsl.sh||' "${SRC}/etc/init.d/rc.S" if ! [ -e "${SRC}/etc/init.d/S11-piglet" ]; then # temp workaround rm -fr "${SRC}"/lib/modules/dsp_ur8 fi [ -f "${SRC}/lib/modules/vinax_fw_vdsl.bin" ] && rm -f "${SRC}"/lib/modules/vinax_fw_vdsl.bin &&\ echo "-- VDSL driver was removed" [ -f "${SRC}/lib/modules/vinax_fw_adsl.bin" ] && rm -f "${SRC}"/lib/modules/vinax_fw_adsl.bin &&\ echo "-- DSL Annex B driver was removed (old version)" [ -f "${SRC}/lib/modules/vinax_fw_adsl_B.bin" ] && rm -f "${SRC}"/lib/modules/vinax_fw_adsl_B.bin &&\ echo "-- DSL Annex B driver was removed" [ -f "${SRC}/lib/modules/vinax_fw_adsl_A.bin" ] && rm -f "${SRC}"/lib/modules/vinax_fw_adsl_A.bin &&\ echo "-- DSL Annex A driver was removed" rm -fr "${SRC}"/lib/modules/$KernelVersion/kernel/drivers/vinax fi #wrap dsld and ar7cfg.lib [ "${WRAP_DSLD}" = "y" ] && . $sh_DIR/wrap_dsld.sh # remove SNR part - rename Tab, if not Multiannex remove SNR tab $sh_DIR/patch_dslinformation_page.sh "${SRC}" # replace feedback tab with vdsl profile page $sh_DIR/add_vdslprofilepage.sh "${SRC}" # add kapselung and annex settings page if missing # must be bevore VLAN settings because oem of authform is altered in some cases $sh_DIR/patch_config_rc.conf.sh "${SRC}" "${DST}" 920 #add_multi_settings.sh must be after patch_config_rc.conf.sh $sh_DIR/add_multi_settings.sh # patch some VLAN settings, and authform $sh_DIR/add_vlan_settings.sh "${SRC}" ## patch default dsl route to 169.254.2.1 ##[ "${FORCE_OLD_DSL_ROUTE}" = "y" ] && $sh_DIR/set_dslroute.sh "${SRC}" #remove kids and help [ "${REMOVE_KIDS}" = "y" ] && $sh_DIR/rmv_kids.sh "${SRC}" [ "${REMOVE_HELP}" = "y" ] && $sh_DIR/rmv_help.sh "${SRC}" #save space [ "${REMOVE_ANNEX_B_DSL_DRIVER}" = "y" ] && [ -f "${SRC}/lib/modules/vinax_fw_adsl_B.bin" ] && rm -f "${SRC}"/lib/modules/vinax_fw_adsl_B.bin &&\ echo "-- DSL Annex B driver was removed from ${SORCE_PRODUKT}!" #save space [ "${REMOVE_ANNEX_A_DSL_DRIVER}" = "y" ] && [ -f "${SRC}/lib/modules/vinax_fw_adsl_A.bin" ] && rm -f "${SRC}"/lib/modules/vinax_fw_adsl_A.bin &&\ echo "-- DSL Annex A driver was removed from ${SORCE_PRODUKT}!" if ! [ -e "${SRC}/etc/init.d/S11-piglet" ]; then # temp workaround [ ${ATA_ONLY} != "y" ] && ! [ -f ${SRC}/lib/modules/vinax_fw_vdsl.bin ] && echo "VINAX vdsl driver is missing!" && sleep 10 && exit 1 [ ${ATA_ONLY} != "y" ] && ! [ -f ${SRC}/lib/modules/vinax_fw_adsl.bin ] && ! [ -f ${SRC}/lib/modules/vinax_fw_adsl_A.bin ] && ! [ -f ${SRC}/lib/modules/vinax_fw_adsl_B.bin ] && echo "VINAX adsl driver is missing!" && sleep 10 && exit 1 fi #fix ADSL interface accsess restrictions sed -i -e "/ \/etc\/init.d\/rc.conf/a\ \[ -f \/var\/flash\/ar7.cfg \] \&\& sed -i -e 's|ifacectl|hprio|' \/var\/flash\/ar7.cfg \&\& cat \/var\/flash\/ar7.cfg | grep ifacectl \&\& echo '---- Not fixed ADSL ---'" "${SRC}/etc/init.d/rc.S" #--- [ -f "${SRC}"/lib/libpng.so.3.32.0 ] || cp -fdrp "${DST}"/lib/libpng.so.3.32.0* --target-directory=${SRC}/lib 2> /dev/null [ -f "${SRC}"/lib/libexif.so.12.3.0 ] || cp -fdrp "${DST}"/lib/libexif.so.12.3.0* --target-directory=${SRC}/lib 2> /dev/null [ -f "${SRC}"/lib/libsqlite3-3.6.16.so.0.8.6 ] || cp -fdrp "${DST}"/lib/libsqlite* --target-directory=${SRC}/lib 2> /dev/null echo "********************************************************************************" [ "${AVM_V_MINOR}" = "89" ] && $sh_DIR/patch_lua_aura.sh #echo "AVM minorversion: $AVM_V_MINOR"