aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/image
Commit message (Collapse)AuthorAgeFilesLines
* target: use SPDX license identifiers on MakefilesAdrian Schmutzler2021-02-101-4/+2
| | | | | | Use SPDX license tags to allow machines to check licenses. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: provide global default for SUPPORTED_DEVICESAdrian Schmutzler2021-01-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* apm821xx: Netgear WNDR4700 limit kernel lzma dictionaryWiktor Stasiak2020-12-221-2/+1
| | | | | | | | | | | | | | | | | WNDR4700 uboot has an issue with decompressing kernel with default dictionary size (-d23 which is about 8MB). Limiting lzma dictionary lowers memory footprint and allows device to boot the kernel. The highest bootable dictonary size is 18, choosing 16 for an extra safety margin. Kernel size befor and after: -d23: 2663665 Bytes -d16: 2892757 Bytes Kernel size increased by 230kB (9%) Fixes: FS#3258 Signed-off-by: Wiktor Stasiak <wiktor.stasiak@gmail.com>
* treewide: use wpad-basic-wolfssl as defaultPetr Štetiar2020-08-201-1/+1
| | | | | | | | | | | | | | | In order to support SAE/WPA3-Personal in default images. Replace almost all occurencies of wpad-basic and wpad-mini with wpad-basic-wolfssl for consistency. Keep out ar71xx from the list as it won't be in the next release and would only make backports harder. Build-tested (build-bot settings): ath79: generic, ramips: mt7620/mt76x8/rt305x, lantiq: xrx200/xway, sunxi: a53 Signed-off-by: Petr Štetiar <ynezz@true.cz> [rebase, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* apm821xx: disable WNDR4700 5.4 imageChristian Lamparter2020-07-311-0/+1
| | | | | | | | | | | | | | | The compressed image that the buildbots are building is too large for the netgear uboot and it crashes and soft-bricks the device. | Uncompressing Kernel Image ... | LZMA: uncompress or overwrite error 1 - must RESET board to recover The whole target likely needs to be switched zImage which is a major hassle due to powerpc's legacy bootwrapper setup as compared to ARM. So for now, disable the device. Reported-by: Wiktor Stasiak (FS#3258) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: derive DEVICE_DTS from device nameAdrian Schmutzler2020-07-213-6/+1
| | | | | | | | | | | The DEVICE_DTS variable always matches the device definition name, just with "_" replaced by "-". Thus, create a DEVICE_DTS definition in Device/Default and drop all the individual statements. If necessary in the future, local DEVICE_DTS will still overwrite that default. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* apm821xx: move device definitions to subfilesAdrian Schmutzler2020-06-113-158/+152
| | | | | | | | | | | | With several subtargets, the image/Makefile becomes crowded after a while. Many targets have moved their device definitions to $subtarget.mk files to have them more organized, let's do this here as well. While at it, also move subtarget-specific build recipes. Cc: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Christian Lamparter <chunkeey@gmail.com>
* treewide: drop DEVICE_TYPE when used as device variableAdrian Schmutzler2020-06-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | DEVICE_TYPE is a target/subtarget variable, and it does not have any effect when set in a device definition. It can only be set in a target's or subtarget's Makefile. Consequently, having it set anyway is misleading, so this drops all cases. This effectively reverts the following commits: 7a1497fd601d ("apm821xx: MBL: set DEVICE_TYPE to NAS") 5b4765c93a1b ("gemini: Classify Raidsonic NAS IB-4220-B as a NAS") cdc6de460bb4 ("gemini: D-Link DNS-313 is a NAS") For the following commit, the variable was set when adding device support: 27b2f0fc0fc5 ("kirkwood: add support for Iomega Storcenter ix2-200") Cc: Christian Lamparter <chunkeey@gmail.com> Cc: Sungbo Eo <mans0n@gorani.run> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* apm821xx: wndr4700: add preliminary drivetemp sensorChristian Lamparter2020-03-221-1/+1
| | | | | | | | | | | | | | | | | | This patch prepares the WNDR4700 to use the HDD sensor for the thermal zone. While the kernel's thermal.txt device-tree binding documentation files talks about supporting multiple sensors for a zone. This sadly is NOT the case. Even the most current upstream kernels (5.6-rc) supports just >one< sensor per zone: (driver/base/of-thermal.c:886) | * REVIST: for now, the thermal framework supports only | * one sensor per thermal zone. Thus, we are considering | * only the first two values as slope and offset. I do hope that this warning will prevent others wasteing time on trying to figure out why their multi-sensor thermal-zones definitions are not working as specified. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* 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>
* 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>
* apm821xx: mbl_gen_hdd_img.sh: switch to /bin/shRosen Penev2019-12-311-1/+1
| | | | | | | | Nothing here needs bash. Signed-off-by: Rosen Penev <rosenp@gmail.com> [add prefix to commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: replace backticks by $(...) in gen_*_img.sh scriptsAdrian Schmutzler2019-09-291-1/+1
| | | | | | | | This replaces deprecated backticks by more versatile $(...) syntax. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [decapitalized patch subject at submitter's request] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: remove unnecessary kernel paddingRussell Senior2019-09-211-2/+1
| | | | | | | | | | | | | | | | | | The allocation of LEBs to ubi volumes is handled by the sysupgrade script: package/base-files/files/lib/upgrade/nand.sh and the ubimkvol and or ubirsvol command. Therefore, padding of the kernel blob is not needed at all, so use cat instead of dd. The BLOCKSIZE variable was only used in the dd command. In any case, 63k made no sense for the way BLOCKSIZE was being used. 63k (64512) does make sense for DTB_SIZE because of the offsets expected by u-boot given extant u-boot-env variables. Tested on Meraki MR24. Signed-off-by: Russell Senior <russell@personaltelco.net>
* apm821xx: image: remove unused kernel.dtb from IMAGESYousong Zhou2019-09-151-1/+1
| | | | | | | It's a leftover from 2271967f ("apm821xx: utilize build ARTIFACTs") Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> Acked-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: split up DEVICE_TITLEMoritz Warning2019-08-021-6/+11
| | | | | | Splits up DEVICE_TITLE into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT. Signed-off-by: Moritz Warning <moritzwarning@web.de>
* apm821xx: MBL: set DEVICE_TYPE to NASChristian Lamparter2019-03-251-0/+1
| | | | | | The MyBook Live is a NAS. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: MBL: fix kernel/apollo3g.dtb artifact buildChristian Lamparter2019-01-051-1/+1
| | | | | | | | The name for the artifact should have been apollo3g.dtb and not kernel.dtb. Fixes: 908bdbfce9f9 ("apm821xx: utilize build ARTIFACTs") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: sata: boot-part feature integrationChristian Lamparter2019-01-011-3/+4
| | | | | | | | | | | | This patch adds the boot-part feature to the apm82181 sata target. This makes it possible to configure the boot partition size with the generic CONFIG_TARGET_KERNEL_PARTSIZE symbol. Please note: For people using custom images: Just like with CONFIG_TARGET_ROOTFS_PARTSIZE changing the value can cause sysupgrade to repartition the device! Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: use bin file extension for sysupgrade-tar imagesChristian Lamparter2019-01-011-8/+8
| | | | | | | Use the file extension bin for sysupgrade-tar images with metadata to unify the file extension across the target/tree. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: utilize build ARTIFACTsChristian Lamparter2019-01-011-3/+5
| | | | | | | | | | | The exported kernel dtbs can be build as artifacts. This way, the MyBook Live's DTB is not generated twice. While at it, give the artifacts their proper name. For the wndr4700 use the "device-tree" partition name and for the MyBook Live: "apollo3g.dtb" to match the mbl_boot.scr. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: fix MBL DUO SUPPORTED_DEVICES compat idChristian Lamparter2018-12-291-1/+1
| | | | | | | | The MyBook Live DUO used "wd,mybooklive-duo" as the first compatible string and not "wd_mybooklive-duo". Fixes: 9b47aa93c76 ("apm821xx: unify My Book Live Single + Duo images") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: switch MyBook Live's recovery images to multi-fileChristian Lamparter2018-12-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the MyBook Live's recovery image to utilize the multi-image method which integrates the device-tree binary directly into the image. The new initramfs can be loaded through the MyBook Live's U-boot in the following way: => setenv ipaddr 192.168.1.1 => setenv serverip 192.168.1.2 => sata init; run addtty; tftp $kernel_addr_r wd_mybooklive-initramfs.bin; bootm Waiting for PHY auto negotiation to complete... done ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0) Using ppc_4xx_eth0 device TFTP from server 192.168.1.2; our IP address is 192.168.1.1 Filename 'wd_mybooklive-initramfs.bin'. Load address: 0x1000000 Loading: ################################################ [...] done [...] Booting kernel from Legacy Image at 01000000 ... Image Name: initramfs Image Type: PowerPC Linux Multi-File Image (gzip compressed) [...] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: switch MX60(W)'s recovery images to multi-image methodChristian Lamparter2018-12-221-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the past, the MX60(W)'s recovery images always had problems with the size restriction and never really worked without manual intervention. But starting with 4.19, the MX60(W)'s kernel image outgrew the allocated space for sysupgrade images as well. Hence This patch reworks the initramfs, which allows the device to ease up on the impossible tight kernel size requirements for the sysupgrade creation and packaging. And as a result, the now orphaned special ramdisk setup is removed in the process. This new initramfs can be loaded through the MX60(W) U-boot in the following way: => setenv bootargs console=ttyS0,$baudrate => tftpboot $meraki_loadaddr meraki_mx60-initramfs-kernel.bin [...] Load address: 0x800000 Loading: ################################################ [...] done [...] => bootm $fileaddr \## Booting kernel from Legacy Image at 00800000 ... ... Updated Flashing instructions for new installations which integrates the new recovery method. Users of existing installations that only want to sysupgrade don't need to update their existing u-boot env. => setenv owrt_load1 ubi read \${meraki_loadaddr} kernel => setenv owrt_load2 ubi read \${meraki_loadaddr} recovery => setenv lede_bootkernel bootm \${meraki_loadaddr_kernel} - \${meraki_loadaddr_fdt} => setenv owrt_bootkernel bootm \${meraki_loadaddr} => setenv owrt_bootargs setenv bootargs console=ttyS0,\${baudrate} rootfstype=squashfs mtdoops.mtddev=oops => setenv owrt_boot run meraki_ubi owrt_bootargs\; run owrt_load1 meraki_checkpart lede_bootkernel\; run owrt_load2 owrt_bootkernel => setenv bootcmd run owrt_boot => saveenv For more information and the latest flashing guide: please visit the OpenWrt Wiki Page for the MR60: <https://openwrt.org/toh/meraki/mx60#flashing> Signed-off-by: Chris Blake <chrisrblake93@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: shuffle helper scripts to the frontChristian Lamparter2018-11-261-83/+82
| | | | | | | In a patch for the ath79, Mathias Kresin mentioned that helper scripts should be in front of the device targets. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: add support for the Netgear WNDAP620 and WNDAP660Christian Lamparter2018-11-261-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Netgear WNDAP620 and WNDAP660, they are similar devices, but due to the LAN LED configuration, the switch setup and WIFI configuration each gets a different device target. Hardware Highlights WNDAP620: CPU: AMCC PowerPC APM82181 at 1000 MHz DRAM: 128 MB, 2 x 64 MiB DDR2 Hynix H5PS5162GF CPU: AMCC PowerPC APM82181 at 1000 MHz FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY - Only 1 GBit Port (POE) Wifi: Atheros AR9380 minipcie - Dual-Band - 3x3:3 Serial: console port with RJ45 Interface (9600-N-8-1) LEDS: Power, LAN-Activity, dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs Button: Soft Reset Button Antennae: 3 internal dual-band antennae + 3 x RSMA for external antennaes Hardware Highlights WNDAP660: CPU: AMCC PowerPC APM82181 at 1000 MHz + 2 Heatsinks DRAM: 256 MB, 2 x 128 MiB DDR2 FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY (POE) Wifi1: Atheros AR9380 minipcie - Dual-Band - 3x3:3 Wifi2: Atheros AR9380 minipcie - Dual-Band - 3x3:3 Serial: console port with RJ45 Interface (9600-N-8-1) LEDS: Power, LAN-Activity, 2x dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs Button: Soft Reset Button Antennae: 6 internal dual-band antennae + 3 x RSMA for external antennaes Flashing requirements: - needs a tftp server at 192.168.1.10/serverip. - special 8P8C(aka RJ45)<->D-SUB9 Console Cable ("Cisco Console Cable"). Note: Both WNDAP6x0 have a MAX3232 transceivers, hence no need for any separate CMOS/TTL level shifters. External Antenna: The antennae mux is controlled by GPIO 11 and GPIO14. Valid Configurations: = Config# = | = GPIO 11 = | = GPIO 14 = | ===== Description ===== 1. | 1 / High | 0 / Low | Use the internal antennae (default) 2. | 0 / Low | 1 / High | Use the external antennae The external antennaes are only meant for the 2.4 GHz band. One-way Flashing instructions via u-boot: 0. connect the serial cable to the RJ45 Console Port Note: This requires a poper RS232 and not a TTL/USB adaptor. 1. power up the AP and interrupt the u-boot process at 'Hit any key to stop autoboot' 2. setup serverip and ipaddr env settings Enter the following commands into the u-boot shell # setenv ipaddr 192.168.1.1 # setenv serverip 192.168.1.10 3. download the factory.img image to the AP Enter the following commands into the u-boot shell # tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-squashfs-factory.img 4. verfiy image integrity Enter the following commands into the u-boot shell # crc32 $fileaddr $filesize If the calculated crc32 checksum does not match, go back to step 3. 5. flash the image Enter the following commands into the u-boot shell # nand erase 0x110000 0x1bd0000 # nand write ${kernel_addr_r} 0x110000 ${filesize} 6. setup uboot environment Enter the following commands into the u-boot shell # setenv bootargs # setenv fileaddr # setenv filesize # setenv addroot 'setenv bootargs ${bootargs} root=/dev/ubiblock0_0' # setenv owrt_boot 'nboot ${kernel_addr_r} nand0 0x110000; run addroot; run addtty; bootm ${kernel_addr_r}' # setenv bootcmd 'run owrt_boot' # saveenv 7. boot # run bootcmd Booting initramfs instructions via u-boot: Follow steps 0 - 2 from above. 3. boot initramfs Enter the following commands into the u-boot shell # tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-initramfs-kernel.bin # run addtty # bootm ${kernel_addr_r} Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* treewide: use wpad-basic for not small flash targetsMathias Kresin2018-10-161-1/+1
| | | | | | | | | | | | Add out of the box support for 802.11r and 802.11w to all targets not suffering from small flash. Signed-off-by: Mathias Kresin <dev@kresin.me> Mathias did all the heavy lifting on this, but I'm the one who should get shouted at for committing. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* apm821xx: MBL: load kernel/dtb from SATA 0:1 firstFreddy Leitner2018-08-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | This remedies an issue with the MBL Duo if both disks are inserted and contain OpenWrt. kernel and dtb would be loaded from SATA 1:1 while rootfs (/dev/sda2) would be mounted on SATA 0:1. Such a mix&match would obviously only work if both OpenWrt versions/ builds are identical, and especially fail after sysupgrade upgraded the system disk on SATA 0:1. The fallback to SATA 1:1 needs to be kept for MBL Single (only has SATA 1:1) and MBL Duo with one disk inserted on SATA 1:1. To speed up booting in those cases, the unneccesarily doubled "sata init" will only be called once. (In theory it could be omitted completely since the on-flash boot script already initializes SATA to load the on-disk boot script.) Tested on MBL Duo (all possible combination of disks) and MBL Single Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Freddy Leitner <hello@square.wf>
* apm821xx: split MBL's rootfs.img.gz into a sysupgrade and factory imageChristian Lamparter2018-07-301-2/+3
| | | | | | | | | | | | | | | @vahid-dan reported a issue with extracting the rpi images with Gnome's Archive Manager: "Ubuntu Archive Manager cannot extract the file and it just throws a general error message: "An error occurred while extracting files". <https://forum.lede-project.org/t/corrupted-pre-built-v18-06-0-rc2-image-for-rpi> The MBL's rootfs.img.gz image is generated in much the same way. Hence this patch preemptively splits the rootfs.img.gz image into a sysupgrade and a factory image. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: build squashfs-rootfs images for the MBLChristian Lamparter2018-07-303-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for squashfs as the root filesystem. advantages: - migrate from a existing -ext4 installation and back with the sysupgrade utility - existing partition layout will not be lost during switch - slightly smaller image size as compared to the -ext4 image. disadvantages: - needs f2fs + tools. This is because fstools rootdisk.c decides based on the partition size (currently root partitions > 100 MiB) f2fs is used as the rootfs_data filesystem. - rootfs_data is placed into the rootfs partition after the squashfs. This makes it difficult for tools that expect a /dev/sda${X} device. It also makes it difficult for data recovery tools as they might not expect to find a embedded partition or will be slightly confused. ... or will not support f2fs. For people with existing build configurations: make sure to include mkf2fs and f2fsck packages into the image. Otherwise the new -squashfs image will only boot from the ram-overlay. Note: All overlay data (configurations/all installed packages/...) will be placed in inside the rootfs partition (i.e. /dev/sda2) just after the squashfs image. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: unify My Book Live Single + Duo imagesChristian Lamparter2018-07-191-18/+5
| | | | | | | | | | | | | | By takimata: "Come to think of it, an MBL Single board boots up just fine on an MBL Duo image, and the MBL Single board identifies completely identical to the MBL Duo (Board: Apollo-3G - APM82181 Board, 2*SATA, 1*USB). I wonder if there is any downside to just using the MBL Duo firmware on a MBL Single. I wonder if the two firmwares could even be unified." <https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/9> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: don't select swconfig for the MR24Christian Lamparter2018-05-181-1/+1
| | | | | | | | | | The swconfig package is part of the DEFAULT_PACKAGES list in the apm821xx's nand subtarget. It's enabled by default because the MX60(W) and WNDR4700 need it for their initramfs. However the package is not necessary for the MR24's sysupgrade image, as the MR24 does not have a switch. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* build: consolidate fake uImage header build commandsMathias Kresin2018-04-201-1/+1
| | | | | | | | | | | Merge the two existing functions and use a parameter for the type header field. It updates the syntax of the former mpc85xx fake ramdisk header command to be compatible with mkimage from u-boot 2018.03 and fixes the build error spotted by the build bot. Signed-off-by: Mathias Kresin <dev@kresin.me>
* apm821xx: increase WNDR4700's dtb+kernel partition to 3.5 MiBChristian Lamparter2018-03-301-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans and reworks the WNDR4700 dts to increase the now combined dtb+kernel partition to 3.5 MiB. This has become necessary due to the switch to GCC 7.3 and the ever increasing kernel binary size. The dtb+kernel partition was combined in order to finally fix the problem with out-of-sync device-trees. From now on, the kernel and device-tree will always be updated together. Upgrade Note: Existing installations will have to use the TFTP firmware recovery option in order to install the update. Affected users are advised to make a backup of their existing configuration prior to running sysupgrade: <https://openwrt.org/docs/guide-user/installation/generic.backup#backup_openwrt_configuration> Due to the repartitioning of the NAND, the generated backup should be placed on either the internal HDD, an attached USB-Stick or on another PC (externally). To manually trigger the firmware recovery, the reset button has to be pressed (and hold) during boot. U-boot will enter the "Upgrade Mode" and starts a tftpserver listening on 192.168.1.1 for a tftp client from one of the four LAN/Ethernet ports to connect and upload the new system: (enable tftp binary mode!). openwrt-apm821xx-nand-netgear_wndr4700-squashfs-factory.img Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: switch MR24's initramfs to multi-image methodChristian Lamparter2018-03-301-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent change to switch to gcc 7.3 broke the image generation code, as the kernel would no longer fit into KERNEL_SIZE. This patch fixes the issue by reworking the initramfs creation and packaging, which will get rid of the KERNEL_SIZE check in the process. This new initramfs can be loaded through the MR24 U-boot in the following way: => setenv ipaddr 192.168.1.1 => setenv bootargs console=ttyS0,$baudrate => tftpboot c00000 192.168.1.2:meraki_mr24-initramfs-kernel.bin [...] Load address: 0xc00000 Loading: ################################################ [...] done Bytes transferred = 5952544 (5ad420 hex) => bootm $fileaddr \## Booting kernel from Legacy Image at 00c00000 ... ... For more information and the latest flashing guide: please visit the OpenWrt Wiki Page for the MR24: <https://openwrt.org/toh/meraki/mr24#flashing> Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* build: replace uses of OpenWrt with $(VERSION_DIST)Felix Fietkau2018-02-051-1/+1
| | | | | | This makes the distribution name more configurable. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* apm821xx: convert to device-tree board detectionChristian Lamparter2017-12-211-3/+6
| | | | | | | | | | | | | This patch converts all apm821xx devices to the device-tree board-detection method. All instances of the legacy boardnames (mbl,mr24,...) are converted to "vendor,device" identifier. The custom board-detection code in apm821xx.sh is removed as it no longer serves any purpose. Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: enable metadata for packagingChristian Lamparter2017-12-211-4/+7
| | | | | | | | | | This patch enables metadata-supported image verification for all apm821xx supported devices. Since this method comes with a built-in image verification tool (fwtool), the previous image checks can be removed. Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: align device names with vendor_device formatChristian Lamparter2017-12-211-10/+10
| | | | | | | | | | Currently, the device name handle does not include the manufacturer. This can make it hard do differentiate between products from different vendors that have the same product name. As the handle is used to derive the image name. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: dts: rename devices dts files to include the manufacturerChristian Lamparter2017-12-211-5/+5
| | | | | | | | | | | This patch rename all the DT source files in order to match upstream's "manufacturer-device.dts" format. Please note that the DEVICE_DTB isn't changed. This is because the u-boot of the MyBook Live defines the fdt_file variable to be "apollo3g/apollo3g.dtb". Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: replace DEVICE_{PROFILE|NAME} with BOARD_NAMEChristian Lamparter2017-12-211-10/+6
| | | | | | | | | | | | | | | | | | | | | This patch sets the BOARD_NAME variable on each affected apm821xx device. The existing DEVICE_PROFILE and DEVICE_NAME assignments are deprecated as they no longer serve any purpose. The BOARD_NAME variable is used by the sysupgrade-tar method to specifiy a directory overwrite for the sysupgrade-$dir directory in the generated tar file. Keeping the original boardname in this context will be necessary for targets that utilize the sysupgrade-tar method. Otherwise, sysupgrade on an previous installation will not recognize the newly generated images. This step is necessary since an upcoming patch realigns the existing shortname for a device with a proper "manufacturer_device" identifier. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: explicitly build the rootfs.img.gz targetChristian Lamparter2017-12-211-2/+2
| | | | | | | | | | | | | | | The commit 87b668765e1 ("image: when using the new image build code, gzip ext4 images by default") forced that all targets that select the ext4 as the root filesystem to always compress the generated rootfs. This is fine, but this method doesn't not allow to append the metadata on a per-target base. Therefore this patch changes the rootfs image production rule to generate the gzip step manually. This way the metadata can be appended at a later date. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* merge: targets: update image generation and targetsZoltan HERPAI2017-12-081-1/+1
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* apm821xx: Merge the Cisco Meraki MX60 & MX60WChris Blake2017-04-261-7/+1
| | | | | | | | | Both of these boards share the same DTS, and hardware. The only difference would be the PCI-E slot, and ath9k card found on the MX60W. Due to the similarities, it would be more efficient to merge these profiles. Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* apm821xx: Add default packages to NAND targetChris Blake2017-04-261-6/+5
| | | | | | | | | This moves core router packages to the NAND target, to ensure they are applied to all images. This change is being done due to an issue found when flashing the MX60W image, which came without these when built as a multi image. Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* build: get rid of host.mkFelix Fietkau2017-02-261-1/+0
| | | | | | Defined required host related variables in toplevel.mk instead Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: centralize fakeroot codeJoseph C. Lehner2017-02-041-18/+2
| | | | | | | | | | | | | This patch moves the fakeroot code required by some devices to `image-commands.mk`. Create the fakeroot on the fly by using the undocumented -s (skip copy) parameter of mkimage. Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com> [remove unused NETGEAR_KERNEL_MAGIC, remove workarounds to have a dummy rootfs for mkimage] Signed-off-by: Mathias Kresin <dev@kresin.me>
* image: when using the new image build code, gzip ext4 images by defaultFelix Fietkau2017-01-131-1/+0
| | | | | | | | | This reduces the amount of hacks in the makefile code. Remove the apm821xx code to do the same - it was broken and left both compressed and uncompressed images in $(BIN_DIR) Signed-off-by: Felix Fietkau <nbd@nbd.name>
* apm821xx: make it possible to update the dtb partition on the WNDR4700Christian Lamparter2016-11-241-5/+6
| | | | | | | | | | | | | | | | | | | | Currently, the device-tree partition is marked as read-only. Hence, userspace tools like mtd can't write into the partition. This however will be necessary in case the DTB needs to be updated. This patch also adds the kernel.dtb image, so the compiled DTB is exported as a file and available in the binary directory along the firmware images. Note: the u-boot does expects the dtb to be a uimage. To update the dtb manually: 1. copy the generated dtb to the router. 2. mtd erase /dev/mtd2 3. mtd write wndr4700.dtb /dev/mtd2 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: Add support for the Cisco Meraki MX60/MX60WChris Blake2016-11-211-0/+32
| | | | | | | | | | | | | | | | | | | This patch adds support for the Cisco Meraki MX60/MX60W Security Appliance. Flashing information can be found at https://github.com/riptidewave93/LEDE-MX60 Specs are as follows: AppliedMicro APM82181 SoC at 800MHz 1GiB NAND - Samsung K9K8G08U0D 512MB DDR RAM - 4x Nanya NT5TU128M8GE-AC Atheros AR8327-BL1A Gigabit Ethernet Switch 1x USB 2.0 Port More info can be found at https://wiki.openwrt.org/toh/meraki/mx60 Cc: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Chris Blake <chrisrblake93@gmail.com>