Commit Graph

40 Commits

Author SHA1 Message Date
Adrian Schmutzler
f9f464aa20 treewide: call check-size before append-metadata
sysupgrade metadata is not flashed to the device, so check-size
should be called _before_ adding metadata to the image.

While at it, do some obvious wrapping improvements.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Paul Spooren <mail@aparcar.org>
2021-07-11 12:13:31 +08:00
AmadeusGhost
6e017db719 ipq806x: m520: add gpio-led sys support
Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
2021-06-15 23:21:04 +08:00
Lauro Moreno
02e44e044a ipq806x: add support for Askey RT4230W REV6
This adds support for the Askey RT4230W REV6
(Branded by Spectrum/Charter as RAC2V1K)

At this time, there's no way to reinstall the stock firmware so don't install
this on a router that's being rented.

Specifications:

    Qualcomm IPQ8065
    1 GB of RAM (DDR3)
    512 MB Flash (NAND)
    2x Wave 2 WiFi cards (QCA9984)
    5x 10/100/1000 Mbps Ethernet (Switch: QCA8337)
    1x LED (Controlled by a microcontroller that switches it between red and
        blue with different patterns)
    1x USB 3.0 Type-A
    12V DC Power Input
    UART header on PCB - pinout from top to bottom is RX, TX, GND, 5V
    Port settings are 115200n8

More information: https://forum.openwrt.org/t/askey-rac2v1k-support/15830
https://deviwiki.com/wiki/Askey_RAC2V1K

To check what revision your router is, restore one of these config backups
through the stock firmware to get ssh access then run
"cat /proc/device-tree/model".
https://forum.openwrt.org/t/askey-rac2v1k-support/15830/17
The revision number on the board doesn't seem to be very consistent so that's
why this is needed. You can also run printenv in the uboot console and if
machid is set to 177d, that means your router is rev6.

Note: Don't install this if the router is being rented from an ISP. The defined
partition layout is different from the OEM one and even if you changed the
layout to match, backing up and restoring the OEM firmware breaks /overlay so
nothing will save and the router will likely enter a bootloop.

How to install:

Method 1: Install without opening the case using SSH and tftp

    You'll need:
    RAC2V1K-SSH.zip:
https://github.com/lmore377/openwrt-rt4230w/blob/master/RAC2V1K-SSH.zip
    initramfs and sysupgrade images

    Connect to one of the router's LAN ports

    Download the RAC2V1K-SSH.zip file and restore the config file that
corresponds to your router's firmware (If you're firmware is newer than what's
in the zip file, just restore the 1.1.16 file)

    After a reboot, you should be able to ssh into the router with username:
"4230w" and password: "linuxbox" or "admin". Run the following commannds
     fw_setenv ipaddr 10.42.0.10 #IP of router, can be anything as long as
it's in the same subnet as the server
     fw_setenv serverip 10.42.0.1# #IP of tftp server that's set up in next
steps
     fw_setenv bootdelay 8
     fw_setenv bootcmd "tftpboot initramfs.bin; bootm; bootipq"

    Don't reboot the router yet.

    Install and set up a tftp server on your computer

    Set a static ip on the ethernet interface of your computer (use this for
serverip in the above commands)

    Rename the initramfs image to initramfs.bin, and host it with the tftp
server

    Reboot the router. If you set up everything right, the router led should
switch over to a slow blue glow which means openwrt is booted. If for some
reason the file doesn't get loaded into ram properly, it should still boot to
the OEM firmware.
    After openwrt boots, ssh into it and run these commands:
    fw_setenv bootcmd "setenv mtdids nand0=nand0 && setenv mtdparts
 mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi
read 0x44000000 kernel 0x6e0000 && bootm"
    fw_setenv bootdelay 2

    After openwrt boots up, figure out a way to get the sysupgrade file onto it
(scp, custom build with usb kernel module included, wget, etc.) then flash it
with sysupgrade. After it finishes flashing, it should reboot, the light should
start flashing blue, then when the light starts "breathing" blue that means
openwrt is booted.

Method 2: Install with serial access (Do this if something fails and you can't
boot after using method 1)

    You'll need:
    initramfs and sysupgrade images
    Serial access:
https://openwrt.org/inbox/toh/askey/askey_rt4230w_rev6#opening_the_case

    Install and set up a tftp server

    Set a static ip on the ethernet interface of your computer

    Download the initramfs image, rename it to initramfs.bin, and host it with
the tftp server

    Connect the wan port of the router to your computer

    Interrupt U-Boot and run these commands:
    setenv serverip 10.42.0.1 (You can use whatever ip you set for the computer)
    setenv ipaddr 10.42.0.10 (Can be any ip as long as it's in the same subnet)
    setenv bootcmd "setenv mtdids nand0=nand0 &&
set mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware
&& ubi read 0x44000000 kernel 0x6e0000 && bootm"

    saveenv
    tftpboot initramfs.bin
    bootm

    After openwrt boots up, figure out a way to get the sysupgrade file onto it
(scp, custom build with usb kernel module included, wget, etc.) then flash it
with sysupgrade. After it finishes flashing, it should reboot, the light should
start flashing blue, then when the light starts "breathing" blue that means
openwrt is booted.

Signed-off-by: Lauro Moreno <lmore377@gmail.com>
[add entry in 5.10 patch, fix whitespace issues]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-06 23:34:22 +08:00
AmadeusGhost
3ff11b8cc8 ipq806x: sync upstream source code 2021-05-31 17:26:19 +08:00
Daniel Golle
72e7d9cf49 ipq806x: work-around borked QCA SDK bootloader
The bootloader of many ipq806x boards seems to require the config node
of the FIT image to be 'config@1' (or a secific different value).
This requirement used to be implicitely satisfied because OpenWrt used
to also call the configuration node inside a FIT image 'config@1'.
However, as recent U-Boot now prohibits the use of the '@' symbol as
part of node names, this was changed by
commit 5ec60cbe9d ("scripts: mkits.sh: replace @ with - in nodes")
Explicitely restore the default name of the configuration node to
'config@1' on ipq806x.
(ipq807x is unaffected as DEVICE_DTS_CONFIG default is set
"config@hk01" in target/linux/ipq807x/image/Makefile)

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-07 12:06:39 +08:00
Adrian Schmutzler
0e2815c5c6
treewide: provide global default for SUPPORTED_DEVICES
The majority of our targets provide a default value for the variable
SUPPORTED_DEVICES, which is used in images to check against the
compatible on a running device:

  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))

At the moment, this is implemented in the Device/Default block of
the individual targets or even subtargets. However, since we
standardized device names and compatible in the recent past, almost
all targets are following the same scheme now:

  device/image name:  vendor_model
  compatible:         vendor,model

The equal redundant definitions are a symptom of this process.

Consequently, this patch moves the definition to image.mk making it
a global default. For the few targets not using the scheme above,
SUPPORTED_DEVICES will be defined to a different value in
Device/Default anyway, overwriting the default. In other words:
This change is supposed to be cosmetic.

This can be used as a global measure to get the current compatible
with: $(firstword $(SUPPORTED_DEVICES))
(Though this is not precisely an achievement of this commit.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-29 15:20:43 +08:00
CN_SZTL
9c42babb3e
Merge Mainline
Droped changes for ipq40xx.
2020-09-16 13:42:04 +08:00
AmadeusGhost
1e4accd9bd ipq40xx: sync upstream source code 2020-09-16 11:38:38 +08:00
AmadeusGhost
fe141dc248 ipq806x: sync upstream source code 2020-08-14 12:00:20 +08:00
AmadeusGhost
19f408b239 ipq806x: m520: enable tca1116 chips from chilauhe 2020-06-25 22:36:19 +08:00
AmadeusGhost
ce149a86b9 ipq806x/4.19: fix error dts for m520
Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-04-15 09:35:18 +08:00
AmadeusGhost
fb56108243 ipq806x: add i2c devices support for m520
This commit enable lm75 and pcf8563 for m520.

Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
2020-03-12 21:38:09 +08:00
AmadeusGhost
464fb0c122
ipq806x: add support for ruijie_rg-mtfi-m520 (#3025)
Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-02-11 17:26:50 +08:00
AmadeusGhost
c7cfa84287
ipq806x: switch to ath10k-ct (#2854) 2020-01-30 01:40:13 +08:00
LEAN-ESX
38f64e0960 ipq806x: revert to kernel 4.14 2019-12-28 17:53:52 -08:00
LEAN-ESX
70e66b06b1 kernel: bump to 4.9.207, 4.14.160, 4.19.91 2019-12-24 23:57:52 -08:00
coolsnowwolf
953744494a ipq806x: switch to ath10k 2019-05-12 16:16:34 +08:00
coolsnowwolf
347daa04b2 Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
coolsnowwolf
96bab7c8f9 Revert "ipq806x: add support for Buffalo WXR-2533DHP"
This reverts commit a3057c7d65.
2018-12-31 11:33:21 +08:00
coolsnowwolf
a3057c7d65 ipq806x: add support for Buffalo WXR-2533DHP 2018-12-27 09:47:51 +08:00
coolsnowwolf
f10d9502fe use ath10k and firmware instead of ath10k-ct 2018-10-19 22:51:37 +08:00
coolsnowwolf
3687b871e5 ipq806x:fix EA8500 vlan issue and drop 4.9 kernel support 2018-10-12 13:05:17 +08:00
coolsnowwolf
a2f8e14276 mac80211: make ath10k the default ath10k-ct 2018-09-28 11:00:40 +08:00
coolsnowwolf
4d1bf340d1 wireless drivers upgreade to 4.19-rc4-1. fix many MTK driver issue. ath10k change to ath10k-ct 2018-09-26 23:33:12 +08:00
coolsnowwolf
806f5db174 sync with OpenWrt trunk 2018-09-07 13:43:55 +08:00
coolsnowwolf
9ba04fd0d7 sync with OpenWrt v18.06.1 stable new R8.1 version 2018-08-23 17:40:23 +08:00
coolsnowwolf
8fe0636b8a Merge branch 'master' of github.com:lede-project/source 2018-04-23 18:50:49 +08:00
coolsnowwolf
e1f392235d fix IPQ806x support (R7500v2 R7800) etc 2018-04-23 15:11:20 +08:00
coolsnowwolf
2af3d2eb0d fix ipq806x image error 2018-04-10 17:02:16 +08:00
coolsnowwolf
7e464f4ef5 switch ipq806x to kernel 4.14 2018-04-10 16:31:13 +08:00
coolsnowwolf
280da421a3 revert ubifs support 2018-01-26 22:34:06 +08:00
coolsnowwolf
5888dc95bd add RT-ACRH17 pcie drivers full support with new DTD 2018-01-24 15:48:45 +08:00
coolsnowwolf
ae33ef74dc merge ipq806x to trunk update 2018-01-24 14:12:48 +08:00
coolsnowwolf
a75d5c7bfb add 2.4G wireless support for ASUS RT-ACRH17 2018-01-13 22:51:36 +08:00
coolsnowwolf
f067e41e8f Revert "add ASUS RT-ACRH17 wireless support"
This reverts commit d196cfe831.
2018-01-09 20:43:48 +08:00
coolsnowwolf
d196cfe831 add ASUS RT-ACRH17 wireless support 2018-01-09 17:26:16 +08:00
coolsnowwolf
80fa1493bf fix web flash for RT-ACRH17 2017-11-02 22:07:40 +08:00
coolsnowwolf
2175fb410c add init support for Asus RT-ACRH17 2017-10-23 13:10:30 +08:00
coolsnowwolf
03efb03919 Merge branch 'master' of https://github.com/lede-project/source 2017-09-12 01:07:20 +08:00
coolsnowwolf
97a4ffcc12 update source 2017-09-06 19:19:45 +08:00