aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/tiny.mk
Commit message (Collapse)AuthorAgeFilesLines
* ath79: adjust ath79/tiny Senao APs to 4k blocksizeMichael Pratt2021-04-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ath79/tiny kernel config has CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y from commit 05d35403b211ccb9bf20e2b3c0b7a30c82c6d6a2 Because of this, these changes are required for 2 reasons: 1. Senao devices in ath79/tiny with a 'failsafe' partition and the tar.gz sysupgrade platform and a flash chip that supports 4k sectors will fail to reboot to openwrt after a sysupgrade. the stored checksum is made with the 64k blocksize length of the image to be flashed, and the actual checksum changes after flashing due to JFFS2 space being formatted within the length of the rootfs from the image example: 0x440000 length of kernel + rootfs (from sysupgrade.bin) 0x439000 offset of rootfs_data (from kernel log) 2. for boards with flash chips that support 4k sectors: saving configuration over sysupgrade is not possible because sysupgrade.tgz is appended at a 64k boundary and the mtd parser starts JFFS2 at a 4k boundary. for boards with flash chips that do not support 4k sectors: partitioning with 4k boundaries causes a boot loop from the mtd parser not finding kernel and rootfs. Also: Some of the Senao boards that belong in ath79/tiny, for example ENH202, have a flash chip that does not support 4k sectors (no SECT_4K symbol in upstream source). Because of this, partitioning must be different for these devices depending on the flash chip model detected by the kernel. Therefore: this creates 2 DTSI files to replace the single one with 64k partitioning for 4k and 64k partitioning respectively. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: remove 'fakeroot' for Senao devicesMichael Pratt2021-04-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using the same custom kernel header magic in both OKLI lzma-loader, DTS, and makefile this hack is not necessary anymore However, "rootfs" size and checksum must now be supplied by the factory.bin image through a script that is accepted by the OEM upgrade script. This is because Senao OEM scripts assume a squashfs header exists at the offset for the original "rootfs" partition which is actually the kernel + rootfs in this implementation, and takes size value from the header that would be there with hexdump, but this offset is now the uImage header instead. This frees up 1 eraseblock previously used by the "fakeroot" partition for bypassing the OEM image verification. Also, these Senao devices with a 'failsafe' partition and the tar-gz factory.bin platform would otherwise require flashing the new tar-gz sysupgrade.bin afterward. So this also prevents having to flash both images when starting from OEM or 'failsafe' the OEM upgrade script verifies the header magic numbers, but only the first two bytes. Example: [ "${magic_word_kernel}" = "2705" ] && [ "${magic_word_rootfs}" = "7371" -o "${magic_word_rootfs}" = "6873" ] && errcode="0" therefore picked the magic number 0x73714f4b which is 'sqOK' Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: rename 'engenius' Makefile definitions to 'senao'Michael Pratt2021-02-241-7/+10
| | | | | | | | | | | | | | | | These recipes and definitions can apply to devices from other vendors with PCB boards or SDK produced by Senao not only the brand Engenius possible examples: Extreme Networks, WatchGuard, OpenMesh, Fortinet, ALLNET, OCEDO, Plasma Cloud, devolo, etc. so rename all of these items and move DEVICE_VENDOR from common to generic/tiny.mk Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: move small-flash Engenius boards to tinyMichael Pratt2021-01-071-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | This moves some of the Engenius boards from generic to tiny: - EAP350 v1 - ECB350 v1 - ENH202 v1 For these, factory.bin builds are already failing on master branch because of the unique situation for these boards: - 8 MB flash - an extra "failsafe" image for recovery - TFTP does not work (barely possible with 600 MTU) - bootloader loads image from a longer flash offset - 1 eraseblock each needed for OKLI kernel loader and fake rootfs - using mtd-concat to make use of remaining space... The manual alternative would be removing the failsafe partition. However this comes with the risk of extremely difficult recovery if a flash ever fails because TFTP on the bootloader is bugged. Signed-off-by: Michael Pratt <mcpratt@pm.me> [improve commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: use common device definition for Buffalo devicesAdrian Schmutzler2020-09-161-7/+2
| | | | | | | | | | The Buffalo devices in ath79 share their image generation code, so let's create a shared Device definition for them. Since most of them use BUFFALO_HWVER := 3, this is moved as default to the shared definition as well. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: Do not build buffalo_whr-g301n by defaultHauke Mehrtens2020-05-211-0/+1
| | | | | | The squashfs partition is getting too big. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* treewide: omit IMAGE_SIZE argument from check-sizeSungbo Eo2020-03-211-2/+2
| | | | | | | | | 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: Do not build dlink_dir-615-e4 by defaultHauke Mehrtens2019-12-231-0/+1
| | | | | | | The factory image for the dlink_dir-615-e4 is getting too big which makes the full ath79 tiny build fail, deactivate it by default. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath79: rename ATH_SOC to SOCAdrian Schmutzler2019-12-201-3/+3
| | | | | | | This replaces ATH_SOC by the newly introduced common SOC device variable. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: harmonize line breaks in image MakefilesAdrian Schmutzler2019-12-201-5/+9
| | | | | | | | | | | | | | | | This harmonizes the line wrapping in image Makefile device definitions, as those are frequently copy-pasted and are a common subject of review comments. Having the treatment unifying should reduce the cases where adjustment is necessary afterwards. Harmonization is achieved by consistently (read "strictly") applying certain rules: - Never put more than 80 characters into one line - Fill lines up (do not break after 40 chars because of ...) - Use one tab for indent after wrapping by "\" - Only break after pipe "|" for IMAGE variables Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add D-Link DIR-615 E4Paul Fertser2019-12-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - FCC ID: KA2IR615E3 - SoC: MIPS32 24K 400 MHz Atheros AR7240 - RAM: 32 MiB DDR SDRAM ESMT M13S2561616A-5T - Flash: 4 MiB NOR SPI Macronix MX25L3208E - Wireless: AR9287 2.4 GHz 802.11n 2T2R, 2x RP-SMA connectors - Ethernet: 5x 100BASE-TX Fast Ethernet - LEDs: 9x GPIO, 1x ath9k - Buttons: 2x tactile switches - UART: 3.3 V, 115200 8n1 - USB: simple hardware modification required, 1x USB 1.1 Full Speed Partitioning notes: Vendor firmware (based on CameoAP99) defines two additional partitions: "mac" @0x3b0000, size 0x10000 and "lp" @0x3c0000, size 0x30000. The "mac" partition stores LAN MAC address and hardware board name. However, the vendor firmware uses addresses from "nvram" partition, and the board name is used only for informational purposes in the Web interface (included in the pages' header), not affecting the firmware image check. The "lp" partition is supposed to contain a "language pack" (which can be used to add an additional language support to the Web interface) and is flashed separately, using the vendor firmware upgrade page. Since these partitions are absolutely useless for OpenWrt and overwriting them doesn't prevent downgrading to obsolete vendor firmware, this patch appends the valueable space to "firmware". Installation instructions: - Upgrade from OpenWrt ar71xx with "sysupgrade -f -n" or - Upload as a firmware update via the vendor Web-interface or - Connect UART and use "loady" to upload and run OpenWrt initramfs image, then sysupgrade from it (TFTP client doesn't work) or - Before powering up hold "reset" button and keep it pressed for about 15 seconds after, then access fail safe Web server on 192.168.0.1 (the old uIP TCP/IP protocol stack is not compatible with modern Linux, the kernel, so you'll need to use some other OS to do this). Can be performed without a Web-browser too: curl http://192.168.0.1/cgi/index \ -F Send=@openwrt-ath79-tiny-dlink_dir-615-e4-squashfs-factory.bin Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* treewide: remove kmod-usb-core from DEVICE_PACKAGESAdrian Schmutzler2019-10-061-1/+1
| | | | | | | | | | | | | | | | | | | This removes _all_ occurrences of kmod-usb-core from DEVICE_PACKAGES and similar variables. This package is pulled as dependency by one of the following packages in any case: - kmod-usb-chipidea - kmod-usb-dwc2 - kmod-usb-ledtrig-usbport - kmod-usb-ohci - kmod-usb2 - kmod-usb2-pci - kmod-usb3 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [remove kmod-usb-core from EnGenius ESR600] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: split DEVICE_TITLE in multiple variablesPaul Spooren2019-07-041-2/+4
| | | | | | | | | | | | | | This allows the definition of DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT. All three are merged together to look the same as the current DEVICE_TITLE. Also, if DEVICE_TITLE is set it's directly used as a *fallback* for devices which weren't upgraded yet. This is based on the work of @sudhanshu16. The motivation is to create JSON files based on provided metadata, needing clear differentiation between vendor, model and revision. Signed-off-by: Paul Spooren <mail@aparcar.org>
* ath79: modify mtd partitions for Buffalo BHR-4GRV2INAGAKI Hiroshi2018-11-261-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: add support for PQI Air PenYuheiOKAWA2018-10-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoC: AR9330 (or AR9331 revision?) Ethernet x1, Wireless 2.4G, uSD card slot x1. USB Power, include Li-Po Battery. Flash 8MiB. (factory is dual image) 1. write image is use half 4MiB size from factory. write initramfs image to mtd6 and mtd7. 2. change next boot setting. next is mtd6 boot. echo -ne "\x01" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0 3. rewrite sysupgrade image. change next boot setting. next is mtd4. echo -ne "\x00" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0 OEM mtd. dev: size erasesize name mtd0: 00040000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00010000 00010000 "ART" mtd3: 00010000 00010000 "NVRAM" mtd4: 00140000 00010000 "uImage" mtd5: 00280000 00010000 "rootfs" mtd6: 00140000 00010000 "uImage2" mtd7: 00280000 00010000 "rootfs2" mtd8: 00010000 00010000 "CONF" Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>
* ath79: add hwver parameter to buffalo-tagINAGAKI Hiroshi2018-10-071-1/+1
| | | | | | | In order to be able to set the value of "hardware version" other than "3", I added the "hwver" parameter. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ath79: add support for Buffalo WZR-HP-AG300HBernhard Frauendienst2018-09-101-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WZR-HP-AG300H is a dual band router based on Qualcom Atheros AR7161 rev 2 Specification: - 680 MHz CPU (Qualcomm Atheros AR7161) - 128 MiB RAM (2x Samsung K4H511638G-LCCC) - 32 MiB Flash (2x Winbond 25Q128BVFG) - WiFi 5 GHz a/n (Atheros AR9220) - WiFi 2.4 GHz b/g/n (Atheros AR9223) - 1000Base-T WAN (Atheros AR7161) - 4x 1000Base-T Switch (Atheros AR8316) - 1x USB 2.0 - 3 Buttons (AOSS/WPS, Reset, USB Eject) - 2 Slide switches (Router (on/off/auto), Movie Engine (on/off)) - 9 LEDs (Power green, WLAN 2GHz green, WLAN 2GHz amber, WLAN 5GHz green, WLAN 5GHz LED amber, Router green, Diag red, Movie Engine blue, USB green) It is already supported by the ar71xx target. For more information on the device visit the wiki: <https://openwrt.org/toh/buffalo/wzr-hp-ag300h> Serial console: - The UART Header is next to Movie Engine Switch. - Pinout is RX - TX - GND - 3.3V (Square Pad is 3.3V) - The Serial setting is 115200-8-N-1. Installation of OpenWRT from vendor firmware: - Connect to the Web-interface at http://192.168.11.1 - Go to “Administration” → “Firmware Upgrade” - Upload the OpenWrt factory image Tested: - Ethernet (LAN, WAN) - WiFi - Installation - via TFTP rescue - via factory image - on firmware v1.77 (28-05-2012) - on pro firmware v24SP2 r30356 (26-03-2018) - via sysupgrade from ar71xx (wlan devices don't work because of new names) - via sysupgrade from itself - Buttons - LEDS - USB (Power control and device recognition) Signed-off-by: Bernhard Frauendienst <openwrt@nospam.obeliks.de>
* ath79: add support for Buffalo WHR-G301NINAGAKI Hiroshi2018-08-161-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WHR-G301N is a 2.4 GHz 11n router, based on Atheros AR7240. Ported from ar71xx target. Specification: - Atheros AR7240 - 32 MB of RAM - 4 MB of Flash - 2.4 GHz 2T2R wifi - 5x 10/100 Mbps Ethernet - 9x LEDs, 4x keys - LED: 8x gpio-leds, 1x ath9k-leds - key: 2x buttons, 1x slide switch - UART header on PCB - Vcc, GND, TX, RX from LEDs side - 115200n8 Flash instruction using factory image: 1. Connect the computer to the LAN port of WHR-G301N 2. Connect power cable to WHR-G301N and turn on it 3. Access to "http://192.168.11.1/" and open firmware update page ("ファーム更新") 4. Select the OpenWrt factory image and click execute ("実行") button 5. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [fix the SUPPORTED_DEVICES to be compatible with the ar71xx image] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: add support for Buffalo BHR-4GRV2INAGAKI Hiroshi2018-08-091-0/+18
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>