| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Now that $UPGRADE_BACKUP is set conditionally there is no need to check
the $UPGRADE_OPT_SAVE_CONFIG anymore. All conditions can be simplified.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a858db313687ddfa6ed1ddba76bd74844a7b89dc)
|
|
|
|
|
|
|
|
|
|
|
| |
It's a variable set by procd that should replace hardcoded
/tmp/sysupgrade.tgz.
This change requires the most recent procd with the commit 0f3c136
("sysupgrade: set UPGRADE_BACKUP env variable").
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 641f6b6c26cb9ab5e1198810015e5f4b2b5b34ad)
|
|
|
|
|
|
|
|
|
|
| |
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>
(cherry picked from commit 8b4bc7abe073489a3595eeb2d81818852319c148)
[rmilecki: dropping ARGV without this change broke sysupgrade]
Fixes: 6ac62c4b6cae ("base-files: don't set ARGV and ARGC")
|
|
|
|
|
|
|
|
| |
That was a result of accidentally running "sed" twice on some files.
Fixes: 9b9412d55cca ("treewide: replace remaining (not working now) $SAVE_CONFIG uses")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 1078de96e315f3cc2675b2c5935009e8c6159ad4)
|
|
|
|
|
|
|
|
| |
This var has been replaced by the $UPGRADE_OPT_UPGRADE_OPT_SAVE_CONFIG
Fixes: f25d164aca80 ("base-files: pass "save_config" option to the "sysupgrade" method")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 5797fe84a3b508483f7d82e177157c1bf2f342d9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jjPlus JA76PF2 (marketed as IntellusPro2) is a network embedded board.
Specification
SoC: Atheros AR7161
RAM: 64 MB DDR
Flash: 16 MB SPI NOR
Ethernet: 2x 10/100/1000 Mbps AR8316
LAN (CN11), WAN/PoE (CN6 - close to power barrel
connector, 48 V)
MiniPCI: 2x
LEDS: 4x, which 3 are GPIO controlled
Buttons: 2x GPIO controlled
Reset (SW1, closer to ethernet ports), WPS (SW2)
Serial: 1x (only RX and TX are wired)
baud: 115200, parity: none, flow control: none
Currently there is one caveat compared to ar71xx target images as the
MAC addresses are random on every reboot. To remedy this one needs to
store the WAN MAC address in RedBoot configuration. OpenWrt on first
boot, after flashing, will read out the address and assign proper ones
to both WAN and LAN ports. It is iportant to NOT keep the old
configuration when doing sysupgrade from ar71xx.
Upgrading from OpenWrt ar71xx image
1. Connect to serial port,
2. Download OpenWrt sysupgrade image to /tmp directory and flash it
with:
sysupgrade -n <openwrt_sysupgrade_image_name>
3. After writing new image OpenWrt will reboot, now interrupt boot
process and enter RedBoot (bootloader) command line by pressing
Ctrl+C,
4. Enter following commands (replace variable accordingly),
set_mac (to view MAC addresses)
alias ethaddr <wan_port_mac_adress>
(confirm storing the value by inputting y and pressing Enter)
reset
5. Now board should restart and boot OpenWrt with proper MAC addresses.
Installation
1. Prepare TFTP server with OpenWrt initramfs image,
2. Connect to WAN ethernet port,
3. Connect to serial port,
4. Power on the board and enter RedBoot (bootloader) command line by
pressing Ctrl+C,
5. Enter following commands (replace variables accordingly):
set_mac (to view MAC addresses)
alias ethaddr <wan_port_mac_address>
(confirm storing the value by inputting y and pressing Enter)
ip_adress -l <board_ip_adress>/24 -h <tftp_server_ip_adress>
load -r -b 0x80060000 <openwrt_initramfs_image_name>
exec -c ""
6. Now board should boot OpenWrt initramfs image,
7. Download OpenWrt sysupgrade image to /tmp directory and flash it
with:
sysupgrade <openwrt_sysupgrade_image_name>
8. Wait few minutes, after the D2 LED will stop blinking, the board
is ready for configuration.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PR [1] introducing initial support for Ubiquiti RouterStation boards,
Mathias Kresin suggested to replace the combined sysupgrade image with
tarball generated by sysupgrade-tar.sh. This would simplify deployment
of sysupgrade as the kernel size (needed to update FIS partition) could
be simply calculated on the fly instead of reading value from combined
image header. Unfortunately this would break sysupgrade compatibility
between ar71xx image and ath79 image. Therefore this commit creates
migration path to use new sysuprade image, it adds code to accept both
of them at this moment. The plan is to keep it until new stable version
is released. Then the image recipe should be changed to new format and
compatibility code for old image removed.
1. https://github.com/openwrt/openwrt/pull/1237
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit modifies mtd partitions define for Buffalo BHR-4GRV2 and
move it to generic subtarget.
In Buffalo BHR-4GRV2, "kernel" partition is located behined "rootfs"
partition in the stock firmware. This causes the size of the kernel
to be limited by the fixed value.
0x50000 0xe80000 0xff0000
+-------------------------------+--------------+
| rootfs | kernel |
| (14528k) | (1472k) |
+-------------------------------+--------------+
After ar71xx was updated to Kernel 4.14, the kernel size of BHR-4GRV2
exceeded the limit, and it breaks builds on official buildbot.
Since this issue was also confirmed in ath79, I modified the mtd
partitions to get rid of that limitation.
0x50000 0xff0000
+----------------------------------------------+
| firmware |
| (16000k) |
+----------------------------------------------+
However, this commit breaks compatibility with ar71xx firmware, so I
dropped "SUPPORTED_DEVICES += bhr-4grv2".
This commit requires new flash instruction instead of the old one.
Flash instruction using initramfs image:
1. Connect the computer to the LAN port of BHR-4GRV2
2. Set the IP address of the computer to 192.168.12.10
3. Rename the OpenWrt initramfs image to
"bhr4grv2-uImage-initramfs-gzip.bin" and place it into the TFTP
directory
4. Start the tftp server on the computer
5. While holding down the "ECO" button, connect power cable to
BHR-4GRV2 and turn on it
6. Flashing (orange) diag LED and release the finger from the button,
BHR-4GRV2 downloads the intiramfs image from TFTP server and boot
with it
7. On the initramfs image, create "/etc/fw_env.config" file with
following contents
/dev/mtd1 0x0 0x10000 0x10000
8. Execute following commands to add environment variables for
u-boot
fw_setenv ipaddr 192.168.12.1
fw_setenv serverip 192.168.12.10
fw_setenv ethaddr 00:aa:bb:cc:dd:ee
fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
9. Perform sysupgrade with squashfs-sysupgrade image
10. Wait ~150 seconds to complete flashing
And this commit includes small fix; BHR-4GRV2 has QCA9557 as a SoC,
not QCA9558.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a shared ar7161_ubnt_routerstation.dtsi as well as two other
.dts files that utilize it, ar7161_ubnt_routerstation.dts and
ar7161_ubnt_routerstation-pro.dts.
The modifications to generic-ubnt.mk, config-default, and base-files
necessary for image generation, parsing RedBoot FIS partitions, network
configuration, and sysupgrade are also included.
This reintroduces vital bits from platform_do_upgrade_combined() and its
supporting functions to /lib/upgrade/platform.sh, which were previously
removed from ath79 in 3e9d9f62258f80298710441e0db557e59e152dcf "ath79:
sysupgrade: drop unused platform checks". The new function is called
"routerstation_do_upgrade" and will *only* work for the RouterStation
series of boards. It does however retain the ability to downgrade (e.g.
from master -> 17.01.x using sysupgrade -F).
All hardware is functional including the AR8216 switch (for the Pro),
wireless via ath5k/ath9k using the miniPCI slots, flash, USB, button,
and LED.
Switch and LAN/WAN configuration is the same as it is with the
equivalent ar71xx targets. MAC addresses are assigned based upon the
content stored in the RedBoot config partition.
Flashing via both sysupgrade and TFTP has been confirmed to work. Also,
the initramfs images are now raw .bin files instead of being wrapped in
a uImage (as they currently are in ar71xx), which makes them bootable
with RedBoot.
One notable difference to ar71xx is the inclusion of the RedBoot
"fconfig" utility (analogous to U-Boot’s fw_printenv/fw_setenv) in
DEVICE_PACKAGES. The FIS partitions are probed using the RedBoot MTD
parser’s DT binding, whose proper usage is mutually exclusive to
defining a separate fixed-partitions node for "RedBoot config". This
config partition contains the board's base MAC address. The lack of a
hard-coded flash location means that the mtd-mac-address property cannot
be used in the .dts, so instead fconfig is used to read the MAC
addresses from flash in userspace during first boot.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Buffalo BHR-4GRV2 is a wired router, based on Qualcomm Atheros
QCA9558.
Ported from ar71xx target.
Specification:
- Qualcomm Atheros QCA9558
- 64 MB of RAM
- 16 MB of Flash
- 5x 10/100/1000 Ethernet
- QCA8337N
- 4x LEDs, 2x keys
- UART header on PCB
- Vcc, TX, RX, GND from LED side
- 115200n8
Flash instruction using factory image:
1. Connect the computer to the LAN port of BHR-4GRV2
2. Connect power cable to BHR-4GRV2 and turn on it
3. Access to "http://192.168.12.1/" and open firmware update
page ("ファームウェア更新")
4. Select the OpenWrt factory image and click update ("更新実行")
button
5. Wait ~120 seconds to complete flashing
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds dts for qca956x and also support for Phicomm K2T
The qca965x.dtsi adds nearly all the necessary components.
Both ath9k AHB and PCIe worked well.
The Phicomm K2T uses MTD partition 'config' to store the mac addresses in
JSON format. To extract these fields correctly, a script is introduced:
/lib/functions/k2t.sh
This script provides a helper function to extract mac addresses, and is used
in three places.
Hardware spec of Phicomm K2T:
CPU: QCA9563
DRAM: 64MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337
WiFi 5.8GHz: QCA9886
Flash instruction:
Apply sysupgrade.bin via serial console:
tftp 0x80000000 sysupgrade.bin && erase 0x9f090000 +$filesize && cp.b $fileaddr 0x9f090000 $filesize
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
|
|
|
|
|
|
| |
Add metadata to images and make the metdata mandatory.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
| |
None of the variables are used at the moment.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
| |
None of these checks are used at the moment and most of them aren't
required if the image metadata validation is used.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
This target aims to replace ar71xx mid-term. The big part that is still
missing is making the MMIO/AHB wifi work using OF. NAND and mikrotik
subtargets will follow.
Signed-off-by: John Crispin <john@phrozen.org>
|