| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.
While at it, fix the executable flag on a few of these files.
This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hardware
--------
SoC: NXP P1020 (2x e500 @ 800MHz)
RAM: 256M DDR3 (Micron)
FLASH: 32M NOR (Spansion S29GL128S)
BTN: 1x Reset
WiFi: 1x Atheros AR9590 2.4 bgn 3x3
2x Atheros AR9590 5.0 an 3x3
ETH: 1x Gigabit Ethernet (Atheros AR8033)
LED: System (green/red) - Radio{0,1} (green)
LAN (connected to PHY)
- GE blue
- FE green
Serial is a Cisco-compatible RJ45 next to the ethernet port.
115200-N-8 are the settings for OS and U-Boot.
Installation
------------
1. Grab the OpenWrt initramfs, rename it to 01C8A8C0.img. Place it in
the root directory of a TFTP server and serve it at
192.168.200.200/24.
2. Connect to the serial port and boot the AP. Stop autoboot in U-Boot
by pressing Enter when prompted. Credentials are identical to the one
in the APs interface. By default it is admin / new2day.
3. Set the bootcmd so the AP can boot OpenWrt by executing
$ setenv boot_openwrt "setenv bootargs;
cp.b 0xee000000 0x1000000 0x1000000; bootm 0x1000000"
$ setenv bootcmd "run boot_openwrt"
$ saveenv
If you plan on going back to the vendor firmware - the bootcmd for it
is stored in the boot_flash variable.
4. Load the initramfs image to RAM and boot by executing
$ tftpboot 0x1000000 192.168.200.200:01C8A8C0.img; bootm
5. Make a backup of the "firmware" partition if you ever wish to go back
to the vendor firmware.
6. Upload the OpenWrt sysupgrade image via SCP to the devices /tmp
folder.
7. Flash OpenWrt using sysupgrade.
$ sysupgrade -n /tmp/openwrt-sysupgrade.bin
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes TP-Link TL-WDR4900 v1 MAC address assignment.
Previously, the MAC addrss was read for the ethernet from the "config"
partition. However, the content of this partition is dependent on the
firmware which was previously installed on the device.
Switch the MAC address source to the U-Boot partition, where the MAC
address is always present at a fixed partition. The partition was
previously already used for the WiFi MAC-addresses.
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
| |
This unifies MAC address patch functions and moves them to a
common script. While those were implemented differently for
different targets, they all seem to do the same. The number of
different variants is significantly reduced by this patch.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves the almost identical calibration data extraction
functions present multiple times in several targets to a single
library file /lib/functions/caldata.sh.
Functions are renamed with more generic names to merge different
variants that only differ in their names.
Most of the targets used find_mtd_chardev, while some used
find_mtd_part inside the extraction code. To merge them, the more
abundant version with find_mtd_chardev is used in the common code.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[rebase on latest master; add mpc85xx]
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes size and offset set for WiFi caldata extraction and
MAC address adjustment to hexadecimal notation.
This will be much clearer for the reader when numbers are big, and
will also match the style used for mtd-cal-data in DTS files.
Since dd cannot deal with hexadecimal notation, one has to convert
back to decimal by simple $(($hexnum)).
Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the offsets for the MAC address location in
mtd_get_mac_binary* and mtd_get_mac_text to hexadecimal notation.
This will be much clearer for the reader when numbers are big, and
will also match the style used for mtd-mac-address in DTS files.
(e.g. 0x1006 and 0x5006 are much more useful than 4102 and 20486)
Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
|
|
|
|
|
|
| |
stage2 passes image path to platform_do_upgrade() as an argument so it
can be simply accessed using $1
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CPU: FSL P1020 (2x 800MHz E500 PPC)
RAM: 1GB DDR3
FLASH: 256MiB NAND
WiFi: 2x Atheros AR9382 2x2:2 abgn
ETH: 2x BCM54616S - 1x BCM53128 8-port switch
LED: 5x LEDs (Power, WiFi1, WiFi2, N/D, SYS)
BTN: 1x RESET
Installation
------------
1. Download initrams kernel image, dtb binary and sysupgrade image.
2. Place initramfs kernel into tftp root directory. Rename to
"panda-uimage-factory".
3. Place dtb binary into tftp root directory. Rename to "panda.fdt".
4. Start tftp server on 192.168.100.8/24.
5. Power up the device with the reset button pressed. It will download
the initrams and dtb via tftp and boot into OpenWRT in RAM.
6. SSH into the device and remove the factory partitions.
> ubirmvol /dev/ubi0 --name=kernel1
> ubirmvol /dev/ubi0 --name=rootfs1
> ubirmvol /dev/ubi0 --name=devicetree1
You will have around 60 MiB of free space with that.
You can also delete "kernel2", "devicetree2", "rootfs2" and "storage"
respectively in case you do not want to go back to the vendor firmware.
7. Modify the U-Boot bootcmd to allow for booting OpenWRT
> fw_setenv bootcmd_owrt "ubi part ubi && ubi read 0x1000000 kernel
&& bootm 0x1000000"
> fw_setenv bootargs_owrt "setenv bootargs console=ttyS0,115200
ubi.mtd=3,2048"
> fw_setenv bootcmd "run bootargs_owrt; run bootcmd_owrt"
8. Transfer the sysupgrade image via scp into the /tmp directory.
9. Upgrade the device
> sysupgrade -n /tmp/<imagename>
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the target-specific diag.sh script. This way, the
generic one is used for the target, which uses DT-aliases to specify the
LEDs used.
This way, we are also able to use different LEDs to indicate different
states. We use green status LEDs for indicating boot and a running
system. Where possible, the red status LED is used to indicate failsafe
mode and a running upgrade.
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hardware
========
CPU: Freescale P1010 PowerPC
RAM: 128M DDR3
NAND: 128MiB
ETH: RTL8211F SGMII PHY
RTL8367B 5-port RGMII switch
(not connected to SoC - unmanaged)
WiFi: SparkLan WPEA-121N
- Atheros AR9382 2T2R abgn
USB: 1x USB 2.0
LED: System, Router, Internet, Tunnel controllable
LAN1-4, WAN, Power non-controllable
BTN: None
Installation
============
1. Power on the device while attached to the Console port.
2. Halt the U-Boot by pressing Enter when prompted.
3. Set the correct bootcmd for booting OpenWRT:
> setenv bootargs_owrt "setenv bootargs console=ttyS0,115200"
> setenv bootcmd "run bootargs_owrt;
nand read 0x1000000 0x300000 0x800000;
bootm 0x1000000;"
> saveenv
5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a
TFTP server root-directory served on 192.168.1.2/24. Connect your
computer to one of the LAN-ports.
4. Boot OpenWRT initramfs image with
> run bootargs_owrt; tftpboot 0x1000000 192.168.1.2:kernel.bin;
bootm 0x1000000;
6. (Optional)
Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case
you ever want to go back to the vendor firmware.
7. Create Ubi Volume on mtd4 by executing
> ubiformat /dev/mtd4 -y
8. Transfer OpenWRT sysupgrade image to the device via SCP and install it
with
> sysupgrade -n <openwrt-image-file>
Back to Stock
=============
If you want to go back to the stock firmware, here is the bootcmd of the
vendor firmware:
> setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5;
nand read 0xc00000 0x00300000 0x100000;
nand read 0x1000000 0x00400000 0x00800000;
bootm 0x1000000 - 0xc00000
Set it via 'setenv' from the U-Boot shell and don't forget to save it
using 'saveenv'!
After this, boot the OpenWRT initramfs image just like you would for
installation. Write back the three vendor partitions using mtd. Reboot
the device afterwards.
Signed-off-by: David Bauer <mail@david-bauer.net>
[refresh and reorder patches]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
PCI paths of the WLAN devices have changed between kernel 4.4 and 4.9;
migrate config so existing wifi-iface definitions don't break.
This is implemented as a hotplug handler rather than a uci-defaults script
as the migration script must run before the 10-wifi-detect hotplug handler.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
|
|
|
|
|
|
|
| |
The watchdog kill command was meant for busybox watchdog. Busybox watchdog
was replaced by the procd watchdog mid 2013 with commit df7ce9301a25
("busybox: disable the watchdog utility by default"), which makes the kill
command obsolete since quite some time.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
| |
Append and enforce image metadata. Remove the device specific image
checks, they are replaced by image metadata.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the values populated by the generic board detect function. The
first compatible from the device tree source file will be the board
name in userspace. The model property from the device tree source file
will be the model name.
Change the board name where used in the userspace and drop the target
specific board detect, to use the generic one.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
initramfs is not the proper name for this, as it stores a boot ramdisk
and not a filesystem. Update the name to reflect it's usage correctly.
If CMDLINE_OVERRIDE is enabled, the chosen bootargs aren't used at all.
Drop them from the device tree source file to not cause confusion.
Remove the noinitrd bootarg. Due to the empty ramdisk this parameter
isn't required any longer:
[ 0.000000] Initrd not found or empty - disabling initrd
Use the LEDE mtd-mac-address* device tree properties to set the interfaces
MAC-Addresses.
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following adds the Aerohive HiveAP-330 Access Point to LEDE under
the mpc85xx/p1020 subtarget.
Hardware:
- SoC: Freescale P1020NSE2DFB
- NAND: Intel JS28F512M29EWH 64MB
- Memory: 2x ProMOS V59C1G01168QBJ3 128MB (Total of 256MB)
- 2.4GHz WiFi: Atheros AR9390-AL1A
- 5.0GHz WiFi: Atheros AR9390-AL1A
- Eth1: Atheros AR8035-A PoE
- Eth2: Atheros AR8035-A
- TPM: Atmel AT97SC3204
- LED Driver: TI LP5521
Flashing:
1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter a
password of administrator or AhNf?d@ta06 if prompted.
2. Once in U-Boot, tftp boot the initramfs image:
dhcp;
tftpboot 0x1000000 192.168.1.101:lede-
mpc85xx-p1020-hiveap-330-initramfs.zImage;
tftpboot 0x6000000 192.168.1.101:lede-mpc85xx-p1020-hiveap-330.fdt;
bootm 0x1000000 - 0x6000000;
3. Once booted, scp over the sysupgrade file and sysupgrade the device
to flash LEDE to the NAND.
sysupgrade /tmp/lede-mpc85xx-p1020-hiveap-330-sysupgrade.img
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
|
|
|
|
|
|
| |
They are not used any longer.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
| |
Use the generic function instead ot the target specific ones.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For targets using the generic board detection and board specific
settings in diag.sh, the board name is still unset at the time the
set_state() provided by diag.sh is called by 10_indicate_preinit.
Change the execution order to ensure the boardname is populated before
required the first time. Do the target specific board detection as
early as possible, directly followed by the generic one to allow a
seamless switch to the generic function for populating /tmp/sysinfo/.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
|
| |
- quote the interface name
- remove call of not existing function
- remove the proto if it's the default proto
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48645
|
|
|
|
|
|
|
|
|
| |
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47867
|
|
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47753
|
|
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47744
|
|
|
|
|
|
|
|
|
|
| |
This removes calls to ucidef_set_interfaces_lan_wan() and
ucidef_set_interfaces_lan() on boards where all relevant info can be
inferred from the switch definition.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47722
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes uci-defaults-new.sh, config_generate and all relevant board.d
files in order combine ucidef_add_switch() and ucidef_add_switch_ports() into
a single function.
Also removes now superfluous enable and reset arguments.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47721
|
|
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47681
|
|
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47680
|
|
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47676
|
|
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47540
|
|
|
|
|
|
|
|
|
| |
This also changes the MAC address to one of the adresses actually used by the
stock firmware on one of the ethernet interfaces.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
SVN-Revision: 45599
|
|
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 44305
|
|
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 44304
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new argument is used right after starting regular preinit (which
happens if failsafe wasn't triggered). The main purpose of "preinit"
argument is to indicate that failsafe can be triggered, however we were
missing a way to inform user that we don't wait for a trigger anymore.
With this change it's clear when failsafe mode can be triggered.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 43715
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works around a bootloader issue where every device
has the same lan/wan-mac 00:04:9f:ef:01:01 - with this patch
we read the macs from config-partition during initial network
setup. We have 9 valid macs stored in the partition, the
1st two are used for the radios, 3 and 4 are now used for WAN/LAN.
on an already setup / running device we can get the real macs with
. /lib/functions.sh
. /lib/functions/system.sh
echo "LAN = $(mtd_get_mac_binary config 338)"
echo "WAN = $(mtd_get_mac_binary config 344)"
see:
https://dev.openwrt.org/ticket/14714
from the ticket / user klondike:
U-Boot passed this commit https://gitorious.org/0xlab-kernel/u-boot/commit/ecd1a09b81f2ed6e6ba7bd1d0bfb0cc3d0ea2ad0
http://u-boot.10912.n7.nabble.com/U-Boot-PATCH-mpc83xx-remove-hardcoded-network-addresses-from-config-files-td44372.html
I suppose to prevent this particular issue, but the WDR4900 may be using an old bootloader still affected.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I have been checking the contents of the dtb on the flash, this particular bit is quite revealing:
ethernet@b0000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
device_type = "network";
model = "eTSEC";
compatible = "fsl,etsec2";
fsl,num_rx_queues = <0x8>;
fsl,num_tx_queues = <0x8>;
local-mac-address = [00 00 00 00 00 00];
^^^^^^^^^^^^^^^^^
interrupt-parent = <0x2>;
phy-handle = <0x3>;
phy-connection-type = "rgmii-id";
ptimer-handle = <0x4>;
queue-group@0 {
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0xb0000 0x1000>;
rx-bit-map = <0xff>;
tx-bit-map = <0xff>;
interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
};
};
I also have been checking the live device map to find this:
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b0000/local-mac-address
00000000 00 04 9f ef 01 01 |......|
00000006
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b1000/local-mac-address
*
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b2000/local-mac-address
*
My conclussion is that U-Boot most likely finds the device and (as no valid MAC-address is provided)
falls back to the default MAC provided by the old code, the kernel then receives thee modified
device map from U-Boot and assumes this is the correct MAC for the device despite it obviously isn't.
This can be seen at
target/linux/mpc85xx/patches-3.10/140-powerpc-85xx-tl-wdr4900-v1-support.patch
The enetaddr is filled up by using the device tree data by the process_boot_dtb
function and used by the platform_fixups function to set the eth0 address
(by calling dt_fixup_mac_address_by_alias("ethernet0", enetaddr); ).
But instead we should be used the device address which to my understanding is
provided in the mtd.
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
SVN-Revision: 43074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
SVN-Revision: 40915
|
|
|
|
|
|
|
|
| |
/lib/functions/system.sh
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40411
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default inittab uses "askconsole" which is implemented by procd
and uses the console provided by the kernel command line.
Hence, this platform specific workaround is not necessary anymore.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39367
|
|
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37000
|
|
|
|
|
|
|
|
| |
for us
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 36999
|
|
|
|
|
|
|
|
|
| |
This makes the WDR4900 accessible via ethernet in
failsafe mode.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 36322
|
|
|
|
|
|
| |
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35733
|
|
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35626
|