7390 as alien on 7340

Above made it into Trunk! Nice. Thanks Cuma/Olistudent (are you the same person or two different people?)


I tested, (cleaned up my own mods, update, build clean, build) and it all works identical to my own mods.


I did notice the trunk mod tried to also replace the web-config page:
Code:
cp -a ${FILESYSTEM_TK_DIR}/usr/www/all/wlan/wlan_settings.lua ${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua

I actually had tried that myself already also. It does not work. for two reasons. The simple reason is: Source directory should be "avme" rather then "all". Also I would advise to also replace radiochannel. So you'd get:

Code:
cp -a ${FILESYSTEM_TK_DIR}/usr/www/avme/wlan/wlan_settings.lua ${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua 
cp -a ${FILESYSTEM_TK_DIR}/usr/www/avme/wlan/radiochannel.lua ${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiohcannel.lua

However: those also do not work. Or rather, they work, but the LUA pages have variable replacement values that mismatch on whereever the 7390 variables are stored. You get many "Luacgi Parse ERROR in file /usr/www/all//wlan/wlan_settings.lua line 556: no replacement found" errors when the pages are replaced like this.

So unless if you also happen to know how or where to fix those variables (like [[{?1706:539?}]] inside the LUA files) it may be best to not replace the wlan pages.

Thanks
 
Zuletzt bearbeitet:
Well, this seems to do the trick on the WLAN pages. Everything looks nice and seems to work.

Code:
echo2 "copying 7340 wlan files"
cp -a ${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/wlan* ${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/
#7340 difference: 2.4 OR 5 GHz Wlan

echo2 "patching wlan_settings.lua"
cp -a ${FILESYSTEM_TK_DIR}/usr/www/avme/wlan/wlan_settings.lua ${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua
modsed "s/1706:98/1706:863/g"  "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua"
modsed "s/1706:660/1706:329/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua"
modsed "s/1706:191/1706:639/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua"
modsed "s/1706:914/1706:786/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua"
modsed "s/1706:913/1706:458/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua"
modsed "s/1706:852/1706:146/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/wlan_settings.lua"

echo2 "patching radiochannel.lua"
cp -a ${FILESYSTEM_TK_DIR}/usr/www/avme/wlan/radiochannel.lua ${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiochannel.lua
modsed "s/6447:231/6447:234/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiochannel.lua"
modsed "s/6447:161/6447:815/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiochannel.lua"
modsed "s/6447:873/6447:720/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiochannel.lua"
modsed "s/6447:210/6447:454/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiochannel.lua"
modsed "s/6447:284/6447:11/g"  "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiochannel.lua"
modsed "s/6447:132/6447:791/g" "${FILESYSTEM_MOD_DIR}/usr/www/all/wlan/radiochannel.lua"

I hope it works on the next AVM update also, but I suspect it does. After all, most replacement strings are identical between the two builds I have, so they probably will stay the same.

I think the 5GHz n+a may even work now, but I cannot test.
 
A slight warning to other 7340 users out there:

I found that LAN2 port does not work anymore after applying the alien 7390.
Even after flashing back an original 7340, it did not work. Also not when playing with the ports options (1000 or 100 speed)
I had to do a factory reset with an non-alien 7340 before LAN2 worked again.

Not sure if it can be solved. I did not notice this before because I was using one LAN port anyway, going to a switch in my office room.

It seems that while the 7390 has a proper switch, the AR8316, the 7340 has 2 "Vitesse PHY Chips". In retrospect, maybe I am lucky even one of the LAN ports works.
 
Zuletzt bearbeitet:
I got the LAN2 port to work also. I can manually fix it by changing ar7.cfg

But to make a proper fix, I need some help, my "sed" powers are too weak:

To get LAN2 to work, I made the following change to ar7.cfg:
(to add the various eth1 items)

Code:
....
        ethinterfaces {
                name = "eth0";
                dhcp = no;
                ipaddr = 192.168.178.1;
                netmask = 255.255.255.0;
                dstipaddr = 0.0.0.0;
                dhcpenabled = yes;
                dhcpstart = 0.0.0.0;
                dhcpend = 0.0.0.0;
                no_dnsd_static = no;
        } {
                name = "eth0:0";
                dhcp = no;
                ipaddr = 169.254.1.1;
                netmask = 255.255.0.0;
                dstipaddr = 0.0.0.0;
                dhcpenabled = yes;
                dhcpstart = 0.0.0.0;
                dhcpend = 0.0.0.0;
                no_dnsd_static = no;
        } [B][COLOR="#B22222"]{
                name = "eth1";
                dhcp = no;
                ipaddr = 192.168.181.1;
                netmask = 255.255.255.0;
                dstipaddr = 0.0.0.0;
                dhcpenabled = yes;
                dhcpstart = 0.0.0.0;
                dhcpend = 0.0.0.0;
                no_dnsd_static = no;
        }[/COLOR][/B] {
                name = "wlan";
 ....
        brinterfaces {
                name = "lan";
                dhcp = no;
                ipaddr = 192.168.178.1;
                netmask = 255.255.255.0;
                dstipaddr = 0.0.0.0;
                interfaces = "eth0", [B][COLOR="#B22222"]"eth1", [/COLOR][/B]"ath0", "ath1", "wdsup0", "wdsup1",
                             "wdsup2", "wdsup3", "wdsup4", "wdsdw0",
                             "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
                dhcpenabled = yes;
                dhcpstart = 0.0.0.0;
                dhcpend = 0.0.0.0;
                no_dnsd_static = no;
        } {
 ....
        pppoefw {
                interfaces = "lan", "usbrndis", "eth0", [B][COLOR="#B22222"]"eth1", [/COLOR][/B]"wlan";
                nofirewall = yes;
                dnsfilter_for_active_directory = yes;
                hostuniq_filter = "";
                dpconfig {
....

I am fairly convinced that to solve it properly, during the build we should make similar changes to the "filesystem/etc/default.Fritz_Box_7390/avme/ar7.cfg" template configuration file. I could replace it completely with the 7340 version, but there are other things different in the file and that would break WDS and maybe the firewall.

Code:
ar7cfg {
        mode = dsldmode_bridge;
        ethmode = ethmode_bridge;
        ethinterfaces {
                name = "eth0";
                ipaddr = 192.168.178.1;
                netmask = 255.255.255.0;
        } [B][COLOR="#A52A2A"]{
                name = "eth1";
                ipaddr = 192.168.181.1;
                netmask = 255.255.255.0;
        }[/COLOR][/B] {
                name = "wlan";
                interfaces = "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
                ipaddr = 192.168.182.1;
                netmask = 255.255.255.0;
        }
        brinterfaces {
                name = "lan";
                ipaddr = 192.168.178.1;
                netmask = 255.255.255.0;
                interfaces = "eth0", [B][COLOR="#A52A2A"]"eth1", [/COLOR][/B]"ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
        }
        dslinterface {
                name = "dsl";
                ipaddr = 192.168.179.1;
                netmask = 255.255.255.255;
                dstipaddr = 192.168.179.1;
        }
        pppoefw {
                interfaces = "lan", "usbrndis", "eth0", [B][COLOR="#A52A2A"]"eth1", [/COLOR][/B]"wlan";
                dpconfig {
                        security = dpsec_host;
....
(I guess we could also get rid of the ath1 elements, since only one radio is present, but they do not seem to be a problem)


For now, I can get my freetz to work by manually tweaking the ar7.cfg, but if any of the more experienced developers can point out how to "sed" these tweaks, that would be great.

Thanks

PS: For reference to any helping hand, here are the non-modified original files from "filesystem/etc/default.Fritz_Box_73x0/avme/ar7.cfg"
Anhang anzeigen ar7_7340.cfg.txt Anhang anzeigen ar7_7390.cfg.txt
 
Zuletzt bearbeitet:
I will try to make a patch or script for this issue.
 
Also, but not related to the LAN2 stuff above, I trying to compile the german 7390 onto 7340. And at this moment, it is not yet working anyway. Getting into a boot loop.

It is a somewhat dangerous/advanced to do this, as you also have to change the build from avme to avm, and as there is no way to boot after this change, and you cannot apply a recovery build (there are no German recovery builds for 7340), so you have to use ruKernel tool apply it, and also to recover from it.

I repeat: If you mess this up, you cannot recover using an original AVM recovery build!

BTW: ruKernel tool only works when connected to LAN2 port (the one closest to the power socket). This is probably because both ports are not connected to a switch, but programmed individually.


These are the patches I made to enable this (if I remember all of them):
Code:
~/freetz-trunk$ diff -c Config.in build7340/Config.in 
*** Config.in	2013-07-09 14:50:34.286648234 +0200
--- build7340/Config.in	2013-07-09 14:47:41.970654215 +0200
***************
*** 357,362 ****
--- 357,363 ----
  		FREETZ_TYPE_7270 || \
  		FREETZ_TYPE_7330 || \
  		FREETZ_TYPE_7390 && FREETZ_TYPE_LANG_EN || \
+ 		FREETZ_TYPE_7390 && FREETZ_TYPE_LANG_DE || \
  		FREETZ_TYPE_7570
  	default n
  	help

Code:
~/freetz-trunk$ diff -C 2 patches/scripts/100-7340_7390.sh build7340/100-7340_7390.sh 
*** patches/scripts/100-7340_7390.sh	2013-07-09 14:50:33.562648258 +0200
--- build7340/100-7340_7390.sh	2013-07-09 14:45:18.662659091 +0200
***************
*** 20,23 ****
--- 20,33 ----
  done
  
+ echo2 "Determining 7340 alien branding"
+ if [ -e "${FILESYSTEM_MOD_DIR}/usr/www/avme" ]; then
+    BRANDING="avme"
+ fi
+ if [ -e "${FILESYSTEM_MOD_DIR}/usr/www/avm" ]; then
+    BRANDING="avm"
+ fi
+ echo2 "Source branding: avme ; Target branding: ${BRANDING}"
+ 
+ 
  echo2 "copying 7340 webif files"
  files="css/default/images/kopfbalken_mitte.gif"
***************
*** 25,33 ****
  files+=" html/de/images/DectFBoxIcon.png"
  for i in $files; do
! 	cp -a "${FILESYSTEM_TK_DIR}/usr/www/avme/$i" "${FILESYSTEM_MOD_DIR}/usr/www/avme/$i"
  done
  
  echo2 "copying 7340 wlan files"
! cp -a ${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/wlan* ${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/
  #7340 difference: 2.4 OR 5 GHz Wlan
  
--- 35,45 ----
  files+=" html/de/images/DectFBoxIcon.png"
  for i in $files; do
! #	cp -a "${FILESYSTEM_TK_DIR}/usr/www/avme/$i" "${FILESYSTEM_MOD_DIR}/usr/www/avme/$i"
! 	cp -a "${FILESYSTEM_TK_DIR}/usr/www/avme/$i" "${FILESYSTEM_MOD_DIR}/usr/www/${BRANDING}/$i"
  done
  
  echo2 "copying 7340 wlan files"
! #cp -a ${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/wlan* ${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/
! cp -a ${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/wlan* ${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/${BRANDING}/
  #7340 difference: 2.4 OR 5 GHz Wlan

Thanks
 
Zuletzt bearbeitet:
Could you please try this patch? It hope it is sufficient to patch the "default" ar7.cfg, which contains only the basic settings (not dns/dhcp etc.).

The ar7.cfg present on the box should allready contain the "eth1" entries and a "factory reset" shoud now build with the eth1 settings.
If you are sure the ath1 settings are not needed, it would be easier just to copy the 7340-ar7.cfg, there are no other differences here:

Code:
joerg@joerg-desktop:~/freetz-trunk$ diff -ur build/original/filesystem/etc/default.Fritz_Box_7390/avme/ar7.cfg  build/.tk/original/filesystem/etc/default.Fritz_Box_7340/avme/ar7.cfg
--- build/original/filesystem/etc/default.Fritz_Box_7390/avme/ar7.cfg	2013-04-18 12:24:40.000000000 +0200
+++ build/.tk/original/filesystem/etc/default.Fritz_Box_7340/avme/ar7.cfg	2013-04-25 12:20:10.000000000 +0200
@@ -6,8 +6,12 @@
                 ipaddr = 192.168.178.1;
                 netmask = 255.255.255.0;
         } {
+                name = "eth1";
+                ipaddr = 192.168.181.1;
+                netmask = 255.255.255.0;
+        } {
                 name = "wlan";
-                interfaces = "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
+                interfaces = "ath0", "wdsup1", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
                 ipaddr = 192.168.182.1;
                 netmask = 255.255.255.0;
         }
@@ -15,7 +19,7 @@
                 name = "lan";
                 ipaddr = 192.168.178.1;
                 netmask = 255.255.255.0;
-                interfaces = "eth0", "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
+                interfaces = "eth0", "eth1", "ath0", "wdsup1", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
         }
         dslinterface {
                 name = "dsl";
@@ -24,7 +28,7 @@
                 dstipaddr = 192.168.179.1;
         }
         pppoefw {
-                interfaces = "lan", "usbrndis", "eth0", "wlan";
+                interfaces = "lan", "usbrndis", "eth0", "eth1", "wlan";
                 dpconfig {
                         security = dpsec_host;
                         lowinput {
joerg@joerg-desktop:~/freetz-trunk$

So you might also use "simple" patch (=copy) ;-)
 

Anhänge

  • fix_7340_ar7cfg.patch.txt
    1.2 KB · Aufrufe: 3
  • simple_fix_7340_ar7cfg.patch.txt
    747 Bytes · Aufrufe: 3
I am sorry, but I feel this is not exactly what I meant.

Firstly, this is a patch file, and I would not know how to best include it into the 100-7340_7390.sh script. It would require a separate new file (the patch file) to be included in the build and the 100-7340_7390.sh to call this extra patch file. But this seem to be different then what I see commonly used in these scripts, they use the modsed command instead.


And more importantly: this seems to merely patch the 7340-original to become a 7390-original.
Easier to copy it then. But that would possibly break other 7390 functions and not be compatible with future AVM updates. What I feel is needed is to merge more targeted:

Example;

The 7390 line
Code:
interfaces = "eth0", "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
should not simply be changed into the 7340 line
Code:
interfaces = "eth0", "eth1", "ath0", "wdsup1", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
as that would loose the "wdsup*" values. Instead only the "eth1" item should be added, making
Code:
interfaces = "eth0", "eth1" "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";

Otherwise probably some WDS function would fail. And it needs to be compatible with future 7390 builds, some more values could be changes as part of AVM updates. So a patch is indeed too broad, and some clever more targeted sed seems more suited.
 
Maybe it is not clear what I meant?
The "diff" only shows the differences between original 7390 and 7340 default-ar7.cfg's. The differences are only related to WLAN, so I thought it might work just to copy the ar7.cfg from 7340 (second patch).

The first attatched patch will do what (I thought) you wanted to achieve: Insert eth1 exactly as you did into the ar7.cfg of the 7390.
See the differences:
Code:
joerg@joerg-desktop:~/freetz-trunk$ diff -ur build/original/filesystem/etc/default.Fritz_Box_7390/avme/ar7.cfg  build/modified/filesystem/etc/default.Fritz_Box_7340/avme/ar7.cfg --- build/original/filesystem/etc/default.Fritz_Box_7390/avme/ar7.cfg	2013-04-18 12:24:40.000000000 +0200
+++ build/modified/filesystem/etc/default.Fritz_Box_7340/avme/ar7.cfg	2013-07-09 19:53:21.407759071 +0200
@@ -6,6 +6,10 @@
                 ipaddr = 192.168.178.1;
                 netmask = 255.255.255.0;
         } {
+                name = "eth1";
+                ipaddr = 192.168.181.1;
+                netmask = 255.255.255.0;
+        } {
                 name = "wlan";
                 interfaces = "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
                 ipaddr = 192.168.182.1;
@@ -15,7 +19,7 @@
                 name = "lan";
                 ipaddr = 192.168.178.1;
                 netmask = 255.255.255.0;
-                interfaces = "eth0", "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
+                interfaces = "eth0", "eth1", "ath0", "ath1", "wdsup0", "wdsup1", "wdsup2", "wdsup3", "wdsup4", "wdsdw0", "wdsdw1", "wdsdw2", "wdsdw3", "wdsdw4";
         }
         dslinterface {
                 name = "dsl";
@@ -24,7 +28,7 @@
                 dstipaddr = 192.168.179.1;
         }
         pppoefw {
-                interfaces = "lan", "usbrndis", "eth0", "wlan";
+                interfaces = "lan", "usbrndis", "eth0", "eth1", "wlan";
                 dpconfig {
                         security = dpsec_host;
                         lowinput {
joerg@joerg-desktop:~/freetz-trunk$

So, just apply the patch and it should (hopefully) create an image with a working default ar7.cfg:

Code:
patch -p0 <  fix_7340_ar7cfg.patch.txt
(inside freetz directory)

you might also add the commands by hand to patches/scripts/100-7340_7390.sh , if you like?!?
Code:
# patch loading of bitfile
if isFreetzType LANG_EN; then
	modsed "s/bitfile.bit/bitfile_isdn.bit/" "${FILESYSTEM_MOD_DIR}/etc/init.d/S17-isdn"
	modsed 's#^\(modprobe Piglet_noemif.*\)#\1 piglet_potsbitfile=/lib/modules/bitfile_pots\.bit\${HWRevision_BitFileCount} piglet_bitfilemode=`/bin/testvalue /var/flash/telefon_misc 4 2638`#g' \
	  "${FILESYSTEM_MOD_DIR}/etc/init.d/S17-isdn"
fi

[B]# patch ar7.cfg to include eth1
echo2 "applying ar7.cfg patch"
modsed '/interfaces =/ s/"eth0"/"eth0", "eth1"/' "${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg"
awk -v eth1="$(sed -n '/name = "eth[1]"/,/} {/ p' "${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg")" \
	'{if (/name = "wlan/){print eth1; print$0}else{print $0}}' \
	"${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg" > \
	"${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/ar7.tmp"
mv  "${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/ar7.tmp" \
	"${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg"[/B]

# patch install script to accept firmware from 7390
echo2 "applying install patch"
modsed "s/iks_16MB_xilinx_4eth_2ab_isdn_nt_te_pots_wlan_usb_host_dect_64415/iks_16MB_xilinx_2eth_2ab_isdn_te_pots_wlan_usb_host_dect_63350/g" "${FIRMWARE_MOD_DIR}/var/install"
 
Zuletzt bearbeitet:
I am still not digging the patch, but the sed/awk is interesting, I will study how they work and then test.

Thanks
 
Great, it works. So thats how you pre-filter a line with sed, how you can use awk. Thanks.

I build with your sed/awk example (with some estetic changes to match cuma's style), build/installed the image. LAN2 worked. Did a Factory Reset, LAN2 still worked. So the new ar7 generated from the modified template ar7 is good. Restored old config: LAN2 continued to work.

Thanks

This is the sed/awk that I inserted into the 100-7340_7390.sh script, just before the 'patching rc.conf' section.
Please note it also has the ${BRANDING} parameter described a few posts back, so either replace ${BRANDING} with avme, or include the change of a few posts back that fills this variable:

Code:
....

# patch ar7.cfg to include eth1/LAN2 port
sedfile="${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/[B][COLOR="#800000"]${BRANDING}[/COLOR][/B]/ar7.cfg"
echo1 "patching ${sedfile##*/}"
modsed '/interfaces =/ s/"eth0"/"eth0", "eth1"/' $sedfile
awk -v eth1="$(sed -n '/name = "eth[1]"/,/} {/ p' "${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg")" \
        '{if (/name = "wlan"/){print eth1; print $0}else{print $0}}' \
        $sedfile > $sedfile.tmp
mv  $sedfile.tmp $sedfile


echo2 "patching rc.conf"
...
 
Bump

it may have been missed, and I do not want to push unneeded, but above post with code from MaxMuster's example was tested and solves the issue with LAN2 port not working, so probably should make it into trunk. (with $BRANDING replaced by avme)
 
If I got it right, you did some other changes, too.
Could you please just post the diff to the actual svn?

Code:
svn diff 
# if this is ok and shows all the changes you might want to redirect it into a file to attach:
svn diff > diff_7340_alien.txt
 
Ok. But in fact those 'other changes' have no relevance on the LAN2 port, but on my preparing for cross-language alien-compile.
They do not hurt, those extra ${BRANDING} variable related changes can also go into trunk if you want, as long as you stick to english (avme) branding it is all the same:

Code:
Index: 100-7340_7390.sh
===================================================================
--- 100-7340_7390.sh    (revision 10874)
+++ 100-7340_7390.sh    (working copy)
@@ -19,16 +19,28 @@
        cp -a "${FILESYSTEM_TK_DIR}/lib/modules/$i" "${FILESYSTEM_MOD_DIR}/lib/modules/$i"
 done
 
+echo2 "Determining 7340 alien branding"
+if [ -e "${FILESYSTEM_MOD_DIR}/usr/www/avme" ]; then
+   BRANDING="avme"
+fi
+if [ -e "${FILESYSTEM_MOD_DIR}/usr/www/avm" ]; then
+   BRANDING="avm"
+fi
+echo2 "Source branding: avme ; Target branding: ${BRANDING}"
+
+
 echo2 "copying 7340 webif files"
 files="css/default/images/kopfbalken_mitte.gif"
 files+=" html/de/images/kopfbalken.gif"
 files+=" html/de/images/DectFBoxIcon.png"
 for i in $files; do
-       cp -a "${FILESYSTEM_TK_DIR}/usr/www/avme/$i" "${FILESYSTEM_MOD_DIR}/usr/www/avme/$i"
+#      cp -a "${FILESYSTEM_TK_DIR}/usr/www/avme/$i" "${FILESYSTEM_MOD_DIR}/usr/www/avme/$i"
+       cp -a "${FILESYSTEM_TK_DIR}/usr/www/avme/$i" "${FILESYSTEM_MOD_DIR}/usr/www/${BRANDING}/$i"
 done
 
 echo2 "copying 7340 wlan files"
-cp -a ${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/wlan* ${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/
+#cp -a ${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/wlan* ${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/
+cp -a ${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/wlan* ${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/${BRANDING}/
 #7340 difference: 2.4 OR 5 GHz Wlan
 
 sedfile="${HTML_LANG_MOD_DIR}/wlan/wlan_settings.lua"
@@ -55,6 +67,16 @@
   s/6447:132/6447:791/g" \
   $sedfile
 
+# patch ar7.cfg to include eth1/LAN2 port
+sedfile="${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/${BRANDING}/ar7.cfg"
+echo1 "patching ${sedfile##*/}"
+modsed '/interfaces =/ s/"eth0"/"eth0", "eth1"/' $sedfile
+awk -v eth1="$(sed -n '/name = "eth[1]"/,/} {/ p' "${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg")" \
+       '{if (/name = "wlan"/){print eth1; print $0}else{print $0}}' \
+       $sedfile > $sedfile.tmp
+mv  $sedfile.tmp $sedfile
+
+
 echo2 "patching rc.conf"
 modsed "s/CONFIG_ETH_COUNT=.*$/CONFIG_ETH_COUNT=\"2\"/g" "${FILESYSTEM_MOD_DIR}/etc/init.d/rc.conf"
 modsed "s/CONFIG_JFFS2=.*$/CONFIG_JFFS2=\"y\"/g" "${FILESYSTEM_MOD_DIR}/etc/init.d/rc.conf"


a cleaner 'simulated diff' without the cross-language experiment would be:

Code:
Index: 100-7340_7390.sh
===================================================================
--- 100-7340_7390.sh    (revision 10874)
+++ 100-7340_7390.sh    (working copy)
@@ -55,6 +67,16 @@
   s/6447:132/6447:791/g" \
   $sedfile
 
+# patch ar7.cfg to include eth1/LAN2 port
+sedfile="${FILESYSTEM_MOD_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg"
+echo1 "patching ${sedfile##*/}"
+modsed '/interfaces =/ s/"eth0"/"eth0", "eth1"/' $sedfile
+awk -v eth1="$(sed -n '/name = "eth[1]"/,/} {/ p' "${FILESYSTEM_TK_DIR}/etc/default.Fritz_Box_7340/avme/ar7.cfg")" \
+       '{if (/name = "wlan"/){print eth1; print $0}else{print $0}}' \
+       $sedfile > $sedfile.tmp
+mv  $sedfile.tmp $sedfile
+
+
 echo2 "patching rc.conf"
 modsed "s/CONFIG_ETH_COUNT=.*$/CONFIG_ETH_COUNT=\"2\"/g" "${FILESYSTEM_MOD_DIR}/etc/init.d/rc.conf"
 modsed "s/CONFIG_JFFS2=.*$/CONFIG_JFFS2=\"y\"/g" "${FILESYSTEM_MOD_DIR}/etc/init.d/rc.conf"

Thanks
 
Ok, its in (r10880 and 10881).
 
Just a FYI to potential alien users: while the option is in the new trunk with the OS 6.01, building the alien seems to cause boot-loop.
I'll try to dig a little deeper, but be warned.
 
Hi guys

I managed to solve the OS 6.01 boot-loop. It was due to some incorrect references in Config.in resulting the build to use a avm base in spite of the fact English (thus avme) was clearly chosen. Please someone put these correct references into Config.in, so 7390-on-alien-7340 no longer boot-loops.
Code:
...
                default "FRITZ.Box_Fon_WLAN_7390.84.05.22.image"                        if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 && FREETZ_TYPE_LANG_DE && FREETZ_TYPE_FIRMWARE_05_2X
                default "FRITZ.Box_Fon_WLAN_7390.84.05.53.image"                        if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 && FREETZ_TYPE_LANG_DE && FREETZ_TYPE_FIRMWARE_05_5X
                default "FRITZ.Box_Fon_WLAN_7390.AnnexB.84.06.01.image"                 if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 [COLOR="#B22222"][B]&& FREETZ_TYPE_LANG_DE &&[/B][/COLOR] FREETZ_TYPE_FIRMWARE_06_XX
                default "FRITZ.Box_Fon_WLAN_7390.en-de-es-it-fr.84.05.22.image"         if FREETZ_TYPE_FIRMWARE_FINAL && (FREETZ_TYPE_7390 || FREETZ_TYPE_7340_7390) && FREETZ_TYPE_LANG_EN && FREETZ_TYPE_FIRMWARE_05_2X
                default "FRITZ.Box_Fon_WLAN_7390.en-de-es-it-fr.84.05.51.image"         if FREETZ_TYPE_FIRMWARE_FINAL && (FREETZ_TYPE_7390 || FREETZ_TYPE_7340_7390) && FREETZ_TYPE_LANG_EN && FREETZ_TYPE_FIRMWARE_05_5X
                default "FRITZ.Box_Fon_WLAN_7390.en-de-es-it-fr.84.06.01.image"         if FREETZ_TYPE_FIRMWARE_FINAL && (FREETZ_TYPE_7390 || FREETZ_TYPE_7340_7390) && FREETZ_TYPE_LANG_EN && FREETZ_TYPE_FIRMWARE_06_XX
...
                default "FRITZ.Box_Fon_WLAN_7340.en-de-es-it-fr.99.05.22.image"     if FREETZ_TYPE_7340_7390 &&  FREETZ_TYPE_FIRMWARE_05_2X
                default "FRITZ.Box_Fon_WLAN_7340.en-de-es-it-fr.99.05.51.image"     if FREETZ_TYPE_7340_7390 [COLOR="#B22222"][B]&&  FREETZ_TYPE_FIRMWARE_05_5X
                default "FRITZ.Box_Fon_WLAN_7340.en-de-es-it-fr.99.06.01.image"     if FREETZ_TYPE_7340_7390 &&  FREETZ_TYPE_FIRMWARE_06_XX[/B][/COLOR]
...
                default "d887def011101bdc6836d8a84b17b62e"  if FREETZ_TYPE_7340_7390 && FREETZ_TYPE_FIRMWARE_05_2X
                default "f45ea0dc486e48a98962915693501900"  if FREETZ_TYPE_7340_7390 [COLOR="#B22222"][B]&& FREETZ_TYPE_FIRMWARE_05_5X
                default "85fa531563e5020818e6f40319093a39"  if FREETZ_TYPE_7340_7390 && FREETZ_TYPE_FIRMWARE_06_XX[/B][/COLOR]
...

Mind you, the build does throw this warning:

Code:
installing and stripping modules
  fuse.ko ......................   24.05 Kb 
  generating modules.dep
[COLOR="#B22222"][B]unresolved symbol mcfw_set_avm_pa_dev_info in file /lib/modules/2.6.28.10/kernel/drivers/dsld/kdsldmod.ko
unresolved symbol cpmac_fusiv_if_rx2 in file /lib/modules/2.6.28.10/kernel/fusiv_src/kernel/drivers/ethdriver/ethdriver_lkm.ko
unresolved symbol is_pid_wan in file /lib/modules/2.6.28.10/kernel/net/avm_pa/avm_pa_fusiv.ko
WARNING: Unresolved symbols detected, not all AVM-features may work.
No current sources by AVM? Error in kernel's .config?[/B][/COLOR]
  kernel modules installed: 82 entries in modules.dep and 82 .ko-files found.
  removing empty kernel module directories
    kernel/drivers/speedtest
installing packages
  syslogd-cgi-0.2.3 ............    3.13 Kb

This may also explain why the device is not responding to neither eth nor wlan. (minor detail ;))
Looking at the LED's, I would say the device is otherwise working well. Unreachable, but otherwise OK.

Any idea's, let me know. In the mean time I'll hook up a ttl serial later to see if I can find more info myself.
 
Zuletzt bearbeitet:
PS: in patch format, on top of 11509:

Code:
$ diff -ur Config.in Config.in.OS6 
--- Config.in	2014-01-03 07:59:17.775019844 +0100
+++ Config.in.OS6	2014-01-03 08:05:51.755002279 +0100
@@ -1714,7 +1714,7 @@
 		default "FRITZ.Box_7390_84.05.51.image"                                 if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 && FREETZ_TYPE_FIRMWARE_EWE
 		default "FRITZ.Box_Fon_WLAN_7390.84.05.22.image"                        if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 && FREETZ_TYPE_LANG_DE && FREETZ_TYPE_FIRMWARE_05_2X
 		default "FRITZ.Box_Fon_WLAN_7390.84.05.53.image"                        if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 && FREETZ_TYPE_LANG_DE && FREETZ_TYPE_FIRMWARE_05_5X
-		default "FRITZ.Box_Fon_WLAN_7390.AnnexB.84.06.01.image"                 if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 && FREETZ_TYPE_FIRMWARE_06_XX
+		default "FRITZ.Box_Fon_WLAN_7390.AnnexB.84.06.01.image"                 if FREETZ_TYPE_FIRMWARE_FINAL && FREETZ_TYPE_7390 && FREETZ_TYPE_LANG_DE && FREETZ_TYPE_FIRMWARE_06_XX
 		default "FRITZ.Box_Fon_WLAN_7390.en-de-es-it-fr.84.05.22.image"         if FREETZ_TYPE_FIRMWARE_FINAL && (FREETZ_TYPE_7390 || FREETZ_TYPE_7340_7390) && FREETZ_TYPE_LANG_EN && FREETZ_TYPE_FIRMWARE_05_2X
 		default "FRITZ.Box_Fon_WLAN_7390.en-de-es-it-fr.84.05.51.image"         if FREETZ_TYPE_FIRMWARE_FINAL && (FREETZ_TYPE_7390 || FREETZ_TYPE_7340_7390) && FREETZ_TYPE_LANG_EN && FREETZ_TYPE_FIRMWARE_05_5X
 		default "FRITZ.Box_Fon_WLAN_7390.en-de-es-it-fr.84.06.01.image"         if FREETZ_TYPE_FIRMWARE_FINAL && (FREETZ_TYPE_7390 || FREETZ_TYPE_7340_7390) && FREETZ_TYPE_LANG_EN && FREETZ_TYPE_FIRMWARE_06_XX
@@ -1941,7 +1941,8 @@
 		default "FRITZ.Box_Fon_WLAN_7320.100.05.22.image"                   if FREETZ_TYPE_7320_7330 &&  FREETZ_TYPE_FIRMWARE_05_2X
 		default "FRITZ.Box_Fon_WLAN_7320.100.05.51.image"                   if FREETZ_TYPE_7320_7330 && !FREETZ_TYPE_FIRMWARE_05_2X
 		default "FRITZ.Box_Fon_WLAN_7340.en-de-es-it-fr.99.05.22.image"     if FREETZ_TYPE_7340_7390 &&  FREETZ_TYPE_FIRMWARE_05_2X
-		default "FRITZ.Box_Fon_WLAN_7340.en-de-es-it-fr.99.05.51.image"     if FREETZ_TYPE_7340_7390 && !FREETZ_TYPE_FIRMWARE_05_2X
+		default "FRITZ.Box_Fon_WLAN_7340.en-de-es-it-fr.99.05.51.image"     if FREETZ_TYPE_7340_7390 &&  FREETZ_TYPE_FIRMWARE_05_5X
+		default "FRITZ.Box_Fon_WLAN_7340.en-de-es-it-fr.99.06.01.image"     if FREETZ_TYPE_7340_7390 &&  FREETZ_TYPE_FIRMWARE_06_XX
 		default "FRITZ.Box_Fon_WLAN_7570_vDSL.en-de-fr.75.04.91.image"      if FREETZ_TYPE_7570_7270
 		default "Sinus_W_500V.27.04.27.image"                               if FREETZ_TYPE_W500V_7150
 		default "fritz.box_fon_wlan_7141.40.04.37.image"                    if FREETZ_TYPE_W501V
@@ -1965,6 +1966,7 @@
 		default "46ba02c2d2ae486133b97f93de5a0a11"  if FREETZ_TYPE_7320_7330 && FREETZ_TYPE_FIRMWARE_05_5X
 		default "d887def011101bdc6836d8a84b17b62e"  if FREETZ_TYPE_7340_7390 && FREETZ_TYPE_FIRMWARE_05_2X
 		default "f45ea0dc486e48a98962915693501900"  if FREETZ_TYPE_7340_7390 && FREETZ_TYPE_FIRMWARE_05_5X
+		default "85fa531563e5020818e6f40319093a39"  if FREETZ_TYPE_7340_7390 && FREETZ_TYPE_FIRMWARE_06_XX
 		default "caa18aa1888a6b4990fccaf386d1d86a"  if FREETZ_TYPE_7570_7270
 		default "939d8a39d2ac9256a770e2714e812a5c"  if FREETZ_TYPE_W500V_7150
 		default "c49167da6dca42cdb34fbffbaf2c4097"  if FREETZ_TYPE_W501V

PS: anyone knows how to get the BBcode [ code][ /code] to avoid linewrapping? In the preview(vorschau), it does not linewrap and looks nice with horizontal scroll, but the actual post above wraps and looks less nice. Is that a problem with the forums ccs?
 
Zuletzt bearbeitet:
Thanks!
( ... but I still have to get a console attached to the RS232 port)
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.