aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/image
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* apm821xx: add back end-of-UBI marker for the WNDR4700 and MR24Christian Lamparter2016-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch "build: drop UBI EOF marker from images by default" (commit d27bce8d28eb129af0abd9c80a7756301b7d588a) removed the end-of-UBI marker. Without this marker, the boards will panic during boot: [ 1.683458] ubi0: attaching mtd4 [ 1.696181] ubi0 warning: scan_peb: valid VID header but corrupted EC header at PEB 31 [ 1.704367] ubi0 error: scan_peb: bad image sequence number 549886691 in PEB 32, expected 184585623 [ 1.713377] Erase counter header dump: [ 1.717110] magic 0x55424923 [ 1.720843] version 1 [ 1.723797] ec 0 [ 1.726752] vid_hdr_offset 512 [ 1.729880] data_offset 2048 [ 1.733094] image_seq 549886691 [ 1.736740] hdr_crc 0x92ba8130 [ 1.740472] erase counter header hexdump: [ 1.744493] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22 [ 1.751528] UBI error: cannot attach mtd4 [ 1.755373] hctosys: unable to open rtc device (rtc0) [ 1.761130] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 [ 1.768604] Please append a correct "root=" boot option; here are the available partitions: [...] [ 1.856992] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 1.866519] Rebooting in 1 seconds..Auto calibration --- Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* switch to the new usbport LED triggerRafał Miłecki2016-10-191-2/+2
| | | | | | | This makes init.d script handle existing UCI entries using the new trigger. It also switches all targets to use its package. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* apm821xx: replace recovery image for the MBL with initramfsChristian Lamparter2016-10-132-112/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch "images: bump default rootfs size to 256 MB" a1f83bad606411a561e8e60110c71232b1a28aa2 caused a crash during boot for the recovery images. This is because both variants of the MyBook Live only have 256MB of RAM and for the recovery option, the ext4 rootfs was simply stored in the RAMDISK. This patch replaces recovery image for the MBL with an initramfs kernel. In order to boot the initramfs (for recovery or development): 0. copy the initramfs and device tree into tftp's server directory # cp *-initramfs-kernel.bin to /tftp-server/mbl.bin # cp *-ext4-kernel.dtb to /tftp-server/fdt.bin 1. Connect the MyBook Live (Duo) serial port. (Warning! Use a 3.3v level shifter). 2. Hit Enter during u-boot and insert these three lines: # setenv serverip 192.168.1.254; setenv ipaddr 192.168.1.1; # tftp ${kernel_addr_r} mbl.bin; tftp ${fdt_addr_r} fdt.bin # run addtty addmisc; bootm ${kernel_addr_r} - ${fdt_addr_r} Where 192.168.1.254 is your TFTP server. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* image: specify max image size in Kilobyte/MegabyteMathias Kresin2016-09-041-2/+2
| | | | | | Use the k and m unit suffix to be consistent with the blocksize. Signed-off-by: Mathias Kresin <dev@kresin.me>
* image: use k as unit suffix for blocksizeMathias Kresin2016-09-041-2/+2
| | | | | | | Use k as unit suffix for kilobyte to have a the same unit regardless of the used filesystem. Signed-off-by: Mathias Kresin <dev@kresin.me>
* apm821xx: image: add support for k unit suffix to boot-imgMathias Kresin2016-09-081-1/+1
| | | | Signed-off-by: Mathias Kresin <dev@kresin.me>
* apm821xx: add size check for initramfs kernel for the Meraki MR24Christian Lamparter2016-09-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Russell Senior reported an issue with the MR24 initramfs kernels: > ## Booting kernel from Legacy Image at 00c10000 ... > Image Name: POWERPC LEDE Linux-4.4.19 > Created: 2016-08-31 11:57:05 UTC > Image Type: PowerPC Linux Kernel Image (gzip compressed) > Data Size: 2155723 Bytes = 2.1 MiB > Load Address: 00000000 > Entry Point: 00000000 > Verifying Checksum ... OK >Wrong Ramdisk Image Format >Ramdisk image is corrupt or invalid For the MR24, the kernel is uploaded to 0x10000. The ramdisk starts at 0x200000. This leaves the kernel with just 0x1f0000 bytes = 1984kb. This patch adds a size check so the image creation script will abort instead of producing a unbootable initramfs image. A separate patch "apm821xx: Fix initramfs image for the Meraki MR24" which fixed the reported issue was submitted earlier. Cc: Russell Senior <russell@personaltelco.net> Cc: Chris Blake <chrisrblake93@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: Fix initramfs image for the Meraki MR24riptidewave932016-09-051-1/+1
| | | | | | | When gzip is used, our kernel is too large and this causes the ramdisk to be at the wrong offset. Fix by moving to lzma. Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* apm821xx: fix IB image buildingJo-Philipp Wich2016-08-011-6/+10
| | | | | | | Change the image build code to generate the DTB files as part of the kernel build phase in order to fix the image build in the ImageBuilder environment. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* image: add a helper variable for getting kernel/rootfs from within image ↵Felix Fietkau2016-07-311-4/+4
| | | | | | Build/* templates Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: rename sysupgrade-nand to sysupgrade-tarJo-Philipp Wich2016-07-291-2/+2
| | | | | | | Now that the "sysupgrade-nand" step is used by non-NAND targets as well, rename it to "sysupgrade-tar" to make it more generic. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* apm821xx: use lzma compression for the initramfs imagesChristian Lamparter2016-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | The MR24's u-boot takes it sweet time decompressing the LZMA-packed initramfs image. A user reported that compared to the old gzip method in v2: it "takes a ton longer to decompress like 4\x the old boot time for decompression". This patch also fixes a issue with the WNDR4700's initramfs image getting to big and causing the following u-boot crash during the decompression: "Uncompressing Multi-File Image ... Error: inflate() returned -5 out-of-mem or overwrite error - must RESET board to recover" This patch fixes both issues by reverting the MR24's initramfs compression method back to gzip. And choosing to compress the initramfs within the initramfs image as LZMA by default. Cc: chrisrblake93@gmail.com Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: rework image build code for MyBook LiveFelix Fietkau2016-07-221-11/+13
| | | | | | | Eliminate redundant mkfs calls, preparation for upcoming image build core rework Signed-off-by: Felix Fietkau <nbd@nbd.name>
* apm821xx: add DEVICE_DTS_DIR variable, remove redundant DEVICE_VARS entryFelix Fietkau2016-07-221-1/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* apm821xx: add missing default profiles for subtargetsFelix Fietkau2016-07-221-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720Christian Lamparter2016-07-221-1/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720 hardware highlights: CPU: AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz) Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits) 32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory Board: AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG DRAM: 256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3) NAND: 128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64) ETH: Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN) USB: 2 x 3.0 (Renesas uPD720202K8-711-BAA-A, firmware not included) SATA: 1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA). WLAN1: Atheros AR9380 5GHz 802.11an 3:3x3 WLAN2: Atheros AR9581 2.4GHz 802.11bgn 3:3x3 SDCARD: GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 host) I2C: GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor) TC654 (i2c-0 @ 0x1b - Dual PWM fan Speed controller) WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! INFO: Since this device only has a NAND chip. I opted for going with root.squashfs in a UBI volume. There's no squashfs/jffs2 image. This target produces three images. a. netgear factory image This image can be used to flash the Netgear WNDR4700 via the firmware recovery mechanism and the web admin site. The bootloader can be instructed to do a firmware recovery via the # fw_recovery command. It will start a tftp server and listen on 192.168.1.1 (the ipaddr variable in u-boot) for incoming, binary tftp clients. The firmware recovery mechanism is also started if any of the flash content which contains the kernel, device-tree definitions or the (fake)rootfs fails to verify or load. b. sysupgrade.tar image for sysupgrade An sysupgrade will replace the entire current LEDE installation with a newer version. This does include the kernel and the ubi rootfs partition. The configuration can be carried over automatically as well if desired. simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run: root@lede:~# sysupgrade sysupgrade.tar and let it reboot. Note: The devicetree flash area is NOT updated. Until the devicetree definition is stable, this can lead to all sorts of hardware detection problems! So make sure, if you experience issues: try the fw_recovery. If you are unsure whenever this affects you: test if you can reproduce your issue with the initramfs method. As it will always have up-to-date device-tree definitions. c. initramfs image for TFTP (for development and testing) To use the initramfs method, follow the following steps: 1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin" file to to the root directory of your TFTP server. 2) rename it to wndr4700.bin 3) On the WNDR4700 - Hit Enter during u-boot and insert: # tftp 400000 wndr4700.bin; run addtty; bootm 400000 - This will boot the LEDE image. Note: The default tftp server is 192.168.1.7, if you want to change it: # setenv serverip 192.168.8.7; Note2: The default address for the WNDR4700 is 192.168.1.1: # setenv ipaddr 192.168.8.8; Note: Connect you tftp server on the last LAN port (not the WAN) Note: The firmware for the USB 3.0 Host chip is not included anymore. Therefore the two USB 3.0 ports will not work without the uPD7070x-firmware package installed. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>