aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/base-files/lib
Commit message (Collapse)AuthorAgeFilesLines
* brcm47xx: sysupgrade: drop useless shift in platform.shRafał Miłecki2015-06-061-1/+0
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45913 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: extract TRX from image on the flyJohn Crispin2015-06-051-7/+8
| | | | | | | | | | Extracting TRX to separated file in /tmp/ requires extra RAM which may not be available on some chepaer devices. Instead of that lets pass a proper extracting command to the default_do_upgrade. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45901 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: fix handling absolute paths in sysupgrade (for vendor formats)Rafał Miłecki2015-04-171-2/+2
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45472 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: rework vendor fw handling to don't duplicate upgrade callsRafał Miłecki2015-04-161-14/+10
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45470 3c298f89-4303-0410-b956-a3cf2f4a3e73
* otrx: change command line API to start with a modeRafał Miłecki2015-04-141-3/+3
| | | | | | | | This will allow adding more modes without options conflict. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45443 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: verify also standard TRX images during sysupgradeRafał Miłecki2015-04-091-0/+4
| | | | | | | | It allows detecting data corruption for plain TRX as well. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45318 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: fix WRT300N devices magics for sysupgrade checkRafał Miłecki2015-04-091-1/+2
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45317 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: switch to the otrx for verifying TRX imagesRafał Miłecki2015-04-091-16/+2
| | | | | | | | This adds checking CRC32 of provided firmware image. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45316 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: image: share function checking TRX in provided firmwareRafał Miłecki2015-03-311-6/+18
| | | | | | | | This will allow us to calculate crc32 in a shared code. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45202 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: fix checking cross-vendors firmware imagesRafał Miłecki2015-03-311-48/+41
| | | | | | | | | This change won't allow installing e.g. Netgear firmware on Linksys device. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45174 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: display all errors (not just the 1st one) when checking imageRafał Miłecki2015-03-311-10/+8
| | | | | | | | This way people forcing upgrade will know what may go wrong. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45172 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: recognize more device specific firmwaresRafał Miłecki2015-03-311-0/+34
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45171 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: compare provided firmware magic with device magicRafał Miłecki2015-03-301-2/+34
| | | | | | | | | This makes sysupgrade reject firmware images for different devices. Right now only support for 2 sample devices is implemented. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45170 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: support for flashing CHK and CyberTAN imagesRafał Miłecki2014-12-301-5/+28
| | | | | | | | | | This will allow simple sysupgrade-s including simpler reverting to the original firmware. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43799 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: verify if CHK/CyberTAN contains valid TRXRafał Miłecki2014-12-301-1/+16
| | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43798 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: extract magics from specific upgrade images (and still reject them)Rafał Miłecki2014-12-151-1/+17
| | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43718 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: detect (and still reject for now) CyberTAN fw formatRafał Miłecki2014-12-151-0/+12
| | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43714 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: use separated function in upgrade to detect file typeRafał Miłecki2014-12-151-3/+22
| | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43708 3c298f89-4303-0410-b956-a3cf2f4a3e73
* scripts: fix wrong usage of '==' operatorJohn Crispin2014-10-141-1/+1
| | | | | | | | | | | | | | [base-files] shell-scripting: fix wrong usage of '==' operator normally the '==' is used for invoking a regex parser and is a bashism. all of the fixes just want to compare a string. the used busybox-ash will silently "ignore" this mistake, but make it portable/clean at least. this patch does not change the behavior/logic of the scripts. Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42911 3c298f89-4303-0410-b956-a3cf2f4a3e73
* target/linux/*/base-files/lib/upgrade/platform.sh - wrong check for ARGCJohn Crispin2014-06-021-1/+1
| | | | | | | | | | | | | | | | | | | ARGC is a 'C-ism', but not known/valid in shell-syntax - insert the correct var $# (=number of args) here. under normal conditions this had no impact, but we should at least correct it. the error was observable like this: root@box:~ [ -e "/etc/functions.sh" ] && . /etc/functions.sh root@box:~ [ -e "/lib/functions.sh" ] && . /lib/functions.sh root@box:~ . /lib/upgrade/platform.sh root@box:~ . /lib/upgrade/common.sh root@box:~ platform_check_image /tmp/myfirmware.bin ash: bad number root@box:~ echo $? 0 Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40915 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: fix network failsafe indicationHauke Mehrtens2014-01-123-75/+18
| | | | | | | | | | | Remove the code used on the old switch driver. The Ethernet drive is loaded as a module and needs some time to get up therefor we added some wait function. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39254 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: use "firmware" partition nameHauke Mehrtens2013-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some time ago, after switching to the mainline bcm47xxpart driver following patch has been applied: commit 03cef8725d2062335ffc3de50fc037b294fd458c Author: hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> Date: Sat Apr 6 22:22:26 2013 +0000 brcm47xx: use old partition names again for kernel 3.8 This fixes sysupgrade. The partition names are used all over the Internet in various howtos. Thank you russell for spotting this problem. I propose to revert this change and make sysupgrade use "firmware" instead. This makes brcm47xx compatible with widely used ar71xx and after all "firmware" sounds like a much better name for... the firmware. This change doesn't affect "sysupgrade" usage, because it never takes a partition name as a parameter. This change only affects users using mtd tool directly. Hopefully there are not many howtos using "mtd" command. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38973 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: fix switch handlingHauke Mehrtens2013-07-144-34/+35
| | | | | | | | | | | | | | | | | This fixes some problems with the switch handling * It now send the messages again to indicate a button for failsafe mode should be pressed * it does not leak packages between wan and lan any more * the switch works again in normal mode The Ethernet connection has to be up when the switch driver switch-robo is insmoded therefor we just do it again. Explicitly set enable_vlan to prevent leaking packages. This should close #13869, #13868 and #13716 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37286 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: do not load the kernel modules needed for Ethernet manuallyHauke Mehrtens2013-07-142-15/+0
| | | | | | | | add the boot flag to make the kernel modules needed for Ethernet and diag load on startup. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37284 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: do not change nvram without user interactionHauke Mehrtens2013-07-141-14/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37281 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: proc gets mounted without this patchHauke Mehrtens2013-07-131-5/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37272 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: remove obsolete hotplug stuffHauke Mehrtens2013-07-131-7/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37271 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: dont manually insmod switch driversJohn Crispin2013-06-211-4/+0
| | | | | | Signed-off-by: John Crispin <bloic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36993 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: do not use vlan0 any more.Hauke Mehrtens2013-02-202-3/+3
| | | | | | | | | | The Broadcom switch driver says that vlan0 should not be used with any switch other than bcm5325. This makes OpenWrt always use vlan1 and vlan2 instead. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35704 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: improve cpuport detection for filesafeHauke Mehrtens2013-02-161-13/+9
| | | | | | | | | Do not try to load bcm57xx.ko any more this is not needed for kernel 2.6 and 3.X Ask the switch driver where the CPU port is. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35624 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Add Failsafe support for Linksys E3000V1 / WRT610NV2Hauke Mehrtens2013-02-041-0/+1
| | | | | | | | | | | | | | Adds specification of the correct cpu_port for Linksys E3000V1 and WRT610NV2 in /lib/preinit/05_init_interfaces_brcm. The list of devices will need to be expanded. Is there a way to determine the correct cpu_port to use in a generic sense; for instance, if "/proc/switch/eth0/port/8" exists, or if "/sys/class/net/eth0/device/driver/module/drivers/bcma:bgmac" exists? Could a similar method be used in "/etc/init.d/netconfig"? Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35491 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: load pps_core and ptp before tg3 to make the interface available ↵Hauke Mehrtens2013-01-271-0/+2
| | | | | | for failsafe. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35341 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: add bgmac driverHauke Mehrtens2013-01-031-0/+1
| | | | | | | | | | This Ethernet driver is in early development stage and still has some problems. This was working on my bcm4716 based device. Thanks to Rafał Miłecki <zajec5@gmail.com> for writing this driver. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34995 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: build b44 as a moduleHauke Mehrtens2013-01-031-0/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34994 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: run ifup before starting the switchHauke Mehrtens2013-01-031-2/+2
| | | | | | | In addition check_module is not needed, nobody checks the return value. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34993 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Do not use deprecated path to functions.sh (/etc/functions.sh -> ↵Mirko Vogt2012-12-191-1/+1
| | | | | | /lib/functions.sh) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34793 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Do not overload mount-call - trying to reduce confusionMirko Vogt2012-12-191-1/+1
| | | | | | | | | | | The behaviour of calling 'mount' differed depending on whether it called the busybox-mount, the mount of util-linux, the mount defined in /lib/functions.sh and /lib/functions/boot.sh /etc/preinit even included /lib/functions.sh and /lib/functions/boot.sh, both re-defining 'mount'. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34792 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: improve suppressing printing if a module was found in preinit ↵Hauke Mehrtens2012-12-141-1/+1
| | | | | | | | | function. Thank you Bastian Bittorf git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34680 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: suppress printing if a module was found in preinit function.Hauke Mehrtens2012-12-131-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34653 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: in kernel 3.6.8 and later tg3 depends on hwmon.koHauke Mehrtens2012-12-131-0/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34652 3c298f89-4303-0410-b956-a3cf2f4a3e73
* brcm47xx: whitespace cleanupsHauke Mehrtens2012-11-257-16/+7
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34329 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [brcm47xx]: activate failsafe on all ports of the switch and not just port 0.Hauke Mehrtens2012-09-251-1/+1
| | | | | | | | | | | | Sometimes the port 0 was the WAN port or there could be some device where the port 0 is not wired to an actual Ethernet port. Now telnet in failsafe will listen on all ports of the switch so user do not have to search for the correct port any more. This change will make the switch leak traffic between the WAN and the LAN port, but you should not use failsafe while connected to a untrusted network. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33544 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [brcm47xx]: target (base-files): Fixed failsafe mode by adding back insmod diagDaniel Dickinson2010-07-151-0/+8
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22186 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add back the base-files/image code from brcm-2.4 to brcm47xxFelix Fietkau2010-06-268-0/+148
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21945 3c298f89-4303-0410-b956-a3cf2f4a3e73