aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/image/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* mediatek: switch to use seperate ramdisk for initramfs imagesDaniel Golle2021-02-251-1/+1
| | | | | | | | | | | | | | | | | | MediaTek targets always use U-Boot's modern uImage.FIT format which allows bundling several blobs into a single file including hashes, descriptions and more. In fact, we are already using that to bundle the Flattened Device Tree blob with the kernel on this and many other targets. In the same fashion, we can now make use of the newly introduced support for building seperate ramdisk to uImage.FIT with a dedicated initrd blob checked and loaded by U-Boot instead of embedding the cpio archive into the kernel itself. This allows for having larger ramdisks, choosing ramdisk compression independently of kernel compression (while only kernel is decompressed by the bootloader) and for more easily replacing or modifying the filesystem contained in an initramfs image. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* 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>
* mediatek: remove condition in Device/DefaultAdrian Schmutzler2020-07-251-11/+7
| | | | | | | | | | | | | | | | The current condition with part of the variables set dependent on the subtarget in Device/Default isn't really nice to read and also defeats the purpose of having a default node. This removes the special settings for mt7623 and moves them to the individual devices, which is not much of a problem as there are actually just two of them and they partly use different settings anyway. While at it, slightly adjust the order of variables and wrap some long lines. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: make emmc image generation work on mt7622John Crispin2020-06-071-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: fix image buildingJohn Crispin2020-05-041-24/+2
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: add mt7629 subtarget with rfb imageChuanhong Guo2019-11-041-3/+11
| | | | | | | | | | base-files are added into subtarget directory like what's done recently in ath79. For this subtarget, metadata checks are enforced and a SUPPORTED_DEVICE is added to generate proper metadata. Since we only have mt7629 support in 4.19, override KERNEL_PATCHVER in target.mk for now. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: fix parallel build issues in image build codeJo-Philipp Wich2018-07-171-10/+4
| | | | | | | | | Drop the parallel-unsafe custom Build/dtb macro and use the .dtb artifacts produced by the generic image build code. Also remove unused .dtb references in the mt7623 subtarget. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* mediatek: Add support for the UniElec U7623-02Kristian Evensen2018-06-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the MT7623A-based UniElec U7623-02 router, with eMMC storage and 512MB RAM. The router can be delivered with NAND Flash and more memory, but I only have access to the one configuration. The DTS is structured in such a way that adding support for more/different storage/memory should be straight forward. The device has the following specifications: * MT7623A (quad-core, 1.3 GHz) * 512MB RAM (DDR3) * 8GB storage (eMMC 4.5) * 2x normal miniPCIe slots * 1x miniPCIe slot that is connected via an internal USB OTG port * 5x 1Gbps Ethernet (MT7530 switch) * 1x UART header * 1x USB 3.0 port * 1x SATA 3.0 * 1x 40P*0.5mm FPC for MIPI LCD * 1x SIM slot * 12x LEDs (2 GPIO controlled) * 1x reset button * 1x DC jack for main power (12V) The following has been tested and is working: * Ethernet switch * miniPCIe slots (tested with Wi-Fi cards) * USB 3.0 port * sysupgrade * reset button Not working: * The miniPCIe connected via USB OTG. For the port to work, some MUSB glue must be added. I am currently in the process of porting the glue from the vendor SDK. Not tested: * SATA 3.0 * MIPI LCD Installation: The board ships with u-boot, and the first installation needs to be done via the bootloader using tftp. Step number one is to update the MBR of the eMMC, as the one that ships with the device is broken. Since the device can ship with different storage sizes, I will not provide the exact steps for creating a valid MBR. However, I have made some assumptions about the disk layout - there must be one 8MB recovery partition (FAT32) and a partition for the rootfs (Linux). The board loads the kernel from block 0xA00 (2560) and I have reserved 32MB for the kernel (65536 blocks). I have aligned the partitions on the erase block size (4096 byte), so the recovery partition must start on block 69632 and end on 86016 (16385 sectors). The rootfs is assumed to start on sector 90112. In order to install the mbr, you run the following commands from the u-boot command line: * tftpboot ${loadaddr} <name of mbr file> * mmc device 0 * mmc write ${loadaddr} 0x00 1 Run the following commands to install + boot OpenWRT: * tftpboot ${loadaddr} openwrt-mediatek-mt7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc.bin.gz * run boot_wr_img * run boot_rd_img * bootm Recovery: In order to recover the router, you need to follow the installation steps above (no need to replace MBR). Notes: * F2FS is used as the overlay filesystem. * The device does not ship with any valid MAC address, so a random address has to be generated. As a work-around, I write the initial random MAC to a file on the recovery partition. The MAC of the WAN interface is set to the MAC-address contained in this file on each boot, and the address of the LAN-interfaces are WAN + 1. The MAC file is kept across sysupgrade/firstboot. My approach is slightly different than what the stock image does. The first fives bytes of the MAC addresses in the stock image are static, and then the last byte is random. I believe it is better to create fully random MAC addresses. * In order to support the miniPCIe-slots, I needed to add missing pcie-nodes to mt7623.dtsi. The nodes are just c&p from the upstream dtsi. * One of the USB3.0 phys (u3phy2) on the board can be used as either USB or PCI, and one of the wifi-cards is connected to this phy. In order to support switching the phy from USB to PCI, I needed to patch the phy-driver. The patch is based on a rejected (at least last time I checked) PCI-driver submitted to the linux-mediatek mailing list. * The eMMC is configured to boot from the user area, and according to the data sheet of the eMMC this value can't be changed. * I tried to structure the MBR more nicely and use for example a FAT32-parition for the kernel, so that we don't need to write/read from some offset. The bootloader does not support reading from FAT32-paritions. While the command (fatload) is there, it just throws an error when I try to use it. * I will submit and hope to get the DTS for the device accepted upstream. If and when that happens, I will update the patches accordingly. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* mediatek: add mt7622 subtargetJohn Crispin2018-05-241-0/+16
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: backport upstream mediatek patchesJohn Crispin2018-05-241-1/+33
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: move mt7623 support into a 32bit subtargetJohn Crispin2017-08-011-45/+1
| | | | | | this is in preparation for adding the new 64bit mt7622 support. Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: fix sysupgrade on eMMC boardsJohn Crispin2017-05-031-6/+7
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: fix sysupgrade board detectionJohn Crispin2017-04-241-2/+5
| | | | | | | boardnames were changed with the recent target update. the sysupgrade board detection was not updated properly. Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: add support for the NAND-ePHY boardJohn Crispin2017-04-241-0/+4
| | | | | | This is the same as the NAND board but gmac1 is wired to an external phy. Signed-off-by: John Crispin <john@phrozen.org>
* medaitek: convert the NAND target to UBIJohn Crispin2016-06-171-5/+6
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: update patchesJohn Crispin2016-05-231-3/+8
| | | | | | | * fixes NAND * adds latest ethernet patches Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: sync and patches add support for several boardsJohn Crispin2016-04-281-6/+19
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 49263
* mediatek: bump to v4.4John Crispin2016-03-211-2/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 49064
* mediatek: add support for the new MT7623 Arm SoCJohn Crispin2015-11-021-0/+28
the support is still WIP. next steps are to make the pmic and ethernet work. this is the first commit to make sure nothing gets lost. Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 47354