aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* treewide: simplify inclusion of subtarget image filesAdrian Schmutzler2020-06-111-12/+8
| | | | | | | | | | | | | | Many target use a repetitive if-include scheme for their subtarget image files, though their names are consistent with the subtarget names. This patch removes these redundant conditions and just uses the variable for the include where the target setup allows it. For sunxi, this includes a trivial rename of the subtarget image Makefiles. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: omit IMAGE_SIZE argument from check-sizeSungbo Eo2020-03-211-1/+1
| | | | | | | | | Now that check-size uses IMAGE_SIZE by default, we can skip the argument from image recipes to reduce redundancy. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [do not touch ar71xx] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add mikrotik subtargetRoger Pueyo Centelles2020-03-171-0/+3
| | | | | | | | | | | | | | | | | This commit creates the ath79/mikrotik subtarget in order to support MikroTik devices based on Qualcomm Atheros MIPS SoCs. MikroTik devices need a couple of specific features: the split MiNOR firmware MTD format, which is not used by other devices, and the 4k sector erase size on SPI NOR storage, which can not be added to the ath79/generic and ath79/nand subtargets now. Additionally, the commit moves the two MikroTik devices already in the generic and nand subtargets to this new one. Tested on the RB922 board and the wAP AC router. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* build: image: move IMAGE_SIZE to image.mkSungbo Eo2020-03-111-1/+1
| | | | | | | | | | IMAGE_SIZE is widely used in many targets. Declare it in the default template to clean up redundant code. This also prevents deriving IMAGE_SIZE unintentionally from the previously defined device. While at it, remove duplicate KERNEL_SIZE declaration. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ath79: move lzma-loader to the end of available RAMAdrian Schmutzler2020-01-231-1/+0
| | | | | | | | | | | | | | | | | | | | | In certain cases, the uncompressed initramfs image will overwrite the lzma-loader, which is currently only 10 MB away from kernel image start. To prevent this, change LZMA_TEXT_START to 24 MB, so loader and compressed image have 8 MB at the end of RAM and uncompressed image has 24 MB available. This is only enabled for ath79 at the moment, as there we can be sure that all devices have 32+ MB RAM and TARGET_INITRAMFS_COMPRESSION_LZMA is not enabled there. Despite, since lzma-loader is currently build specifically for ath79 anyway, there is no need to re-specify LOADADDR and LZMA_TEXT_START in image/Makefile, so the values are set directly in image/lzma-loader/Makefile and the overwrite in image/Makefile is removed. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: rename ATH_SOC to SOCAdrian Schmutzler2019-12-201-3/+2
| | | | | | | This replaces ATH_SOC by the newly introduced common SOC device variable. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: revert erroneous second addition of files for WNDR4300Adrian Schmutzler2019-11-031-1/+0
| | | | | | | | | | | | | There are two recent commits stating to add support for Netgear WNDR4300, where the second one seems to be just leftover from an earlier patch having been rebased. Since the first patch already provides support in the most recent state, just revert the second one. This reverts commit cd87272eb241b1ea7955c1631ad2bb8d38e9fae9. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Netgear WNDR4300Michal Cieslakiewicz2019-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ath79 support for Netgear WNDR4300. Router was previously supported by ar71xx target only. Note: device requires 'ar934x-nand' driver in kernel. Specification ============= * Description: Netgear WNDR4300 * Loader: U-boot * SOC: Atheros AR9344 (560 MHz) * RAM: 128 MiB * Flash: 128 MiB (NAND) - U-boot binary: 256 KiB - U-boot environment: 256 KiB - ART: 256 KiB - POT: 512 KiB - Language: 2 MiB - Config: 512 KiB - Traffic Meter: 3 MiB - Firmware: 25 MiB - ART Backup: 256 KiB - Reserved: 96 MiB * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8327) * Wireless: - 2.4 GHz b/g/n (internal) - 5 GHz a/n (AR9580) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN 2G (green) - WLAN 5G (blue) - 4 x LAN (amber/green) - USB (green) - WPS (amber/green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 2.5A * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Note about partitioning: firmware partition offset (0x6c0000) is hardcoded into vendor's u-boot, so this partition cannot be moved and resized to include Netgear-specific flash areas (pot, language, config, traffic_meter) not used by OpenWrt. Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_nand=y CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
* ath79: add support for PISEN WMB001NChuanhong Guo2019-08-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: AR9341 - RAM: 64M - Flash: 16M - Ethernet: 1 * FE port - WiFi: ar934x-wmac - Sound: WM8918 DAC 1 * 3.5mm headphone jack 2 * RCA connectors for speakers 1 * SPDIF out - USB: 1 * USB2.0 port Flash instruction: Upload generated factory image via vendor's web interface. Notes: A. Audio stuff: 1. Since AR934x, all pins for peripheral blocks can be mapped to any available GPIOs. We currently don't have a PCM/I2S driver for AR934x so pinmux for i2s and SPDIF are bound to i2c gpio node. This should be moved into I2S node when a PCM/I2S driver is available. 2. The i2c-gpio node is for WM8918. DT binding for it can't be added currently due to a missing clock from I2S PLL. B. Factory image: Image contains a image header and a tar.gz archive. 1. Header: A 288 byte header that has nothing to do with appended tarball. Format: 0x0-0x7 and 0x18-0x1F: magic values 0x20: Model number string 0xFC: Action string. It's either "update" or "backup" 0x11C: A 1 byte checksum. It's XOR result of 0x8-0x11B Firmware doesn't care about the rest of the header as long as checksum result is correct. The same header is used for backup and update routines so the magic values and model number can be obtained by generating a backup bin and grab values from it. 2. Tarball: It contains two files named uImage and rootfs, which will be flashed into corresponding mtd partition. Writing a special utility that can only output a fixed binary blob is overkill so factory image header is placed under image/bin instead. C. LED The wifi led has "Wi-Fi" marked on the case but vendor's firmware used it as system status indicator. I did the same in this device support patch. D. Firmware Factory u-boot is built without 'savenv' support so it's impossible to change kernel offset. A 2MB kernel partition won't be enough in the future. OKLI loader is used here to migrate this problem: 1. add OKLI image magic support into uImage parser. 2. build an OKLI loader, compress it with lzma and add a normal uImage header. 3. flash the loader to where the original kernel supposed to be. 4. create a uImage firmware using OKLI loader. 5. flash the created firmware to where rootfs supposed to be. By doing so, u-boot will start OKLI loader, which will then load the actual kernel at 0x20000. The kernel partition is 2MB, which is too much for our loader. To save this space, "mtd-concat" is used here: 1. create a 64K (1 erase block) partition for OKLI loader and create another partition with the left space. 2. concatenate rootfs and this partition into a virtual flash. 3. use the virtual flash for firmware partition. Currently OKLI loader is flashed with factory image only. sysupgrade won't replace it. Since it only has one function and it works for several years, its unlikely to have some bugs that requires a replacement. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: add support for Buffalo BHR-4GRV2INAGAKI Hiroshi2018-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: add Netgear WNR612 v2Zoltan HERPAI2018-06-261-0/+1
| | | | | | | | | | | | | | | Netgear WNR612 v2: - cpu Atheros AR7240 (Python) @400MHz - flash 4MB - ram 32MB - ethernet 10/100: 1xwan + 2xlan (only two) - radio AR9285 As there is a rebranded WNR612v2 called ON Networks N150R, add a dtsi which includes all device support, and add a separate dts for the device only (with a separate one for the subsequent N150R). Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* ath79: add initial nand support for gl-ar300mMarty E. Plummer2018-06-181-0/+3
| | | | Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
* ath79: lzma-loader: sync with ar71xx targetMatthias Schiffer2018-06-061-1/+2
| | | | | | | | | | | | | | Import all improvements made in the lzma-loader since development on the ath79 target started. This also reverts fe594bf90d09 ("ath79: fix loader-okli, lzma-loader"), as is obsoleted by 2ad60168b6af ("ar71xx: lzma-loader: move padding workaround to gzip step"). Likely, many of the changes should be ported to the ramips lzma-loader as well, but I don't have a device to test this. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ath79: add tiny subtargetAlex Maclean2018-06-011-0/+3
| | | | Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* ath79: remove unused copy-file build stepMatthias Schiffer2018-05-171-3/+0
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ath79: add and enforce image metadataMathias Kresin2018-05-171-1/+3
| | | | | | Add metadata to images and make the metdata mandatory. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: cleanup image build codeMathias Kresin2018-05-171-10/+5
| | | | | | | | | | Remove recipes for not yet migrated boards. Drop variables which aren't required due to the switch to devicetree like boardname. Drop the legacy image build code. Boards added to this target shouldn't use the legacy image build code anyway. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: Ubiquiti Airmax M: add relocate-kernel to invalidate cacheMatthias Schiffer2018-05-081-0/+13
| | | | | | Apply ar71xx fix for broken Ubiquiti bootloader to ath79 as well. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ath79: add new OF only target for QCA MIPS siliconJohn Crispin2018-05-071-0/+66
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>