aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/target-metadata.pl
Commit message (Collapse)AuthorAgeFilesLines
* base-files: add eMMC sysupgrade supportEnrico Mioso2021-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Adds generic support for sysupgrading on eMMC-based devices. Provide function emmc_do_upgrade and emmc_copy_config to be used in /lib/upgrade/platform.sh instead of redundantly implementing the same logic over and over again. Similar to generic sysupgrade on NAND, use environment variables CI_KERNPART, CI_ROOTPART and newly introduce CI_DATAPART to indicate GPT partition names to be used. On devices with more than one MMC block device, CI_ROOTDEV can be used to specify the MMC device for partition name lookups. Also allow to select block devices directly using EMMC_KERN_DEV, EMMC_ROOT_DEV and EMMC_DATA_DEV, as using GPT partition names is not always an option (e.g. when forced to use MBR). To easily handle writing kernel and rootfs make use of sysupgrade.tar format convention which is also already used for generic NAND support. Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> CC: Li Zhang <li.zhang@gl-inet.com> CC: TruongSinh Tran-Nguyen <i@truongsinh.pro>
* base-files: rename 'sdcard' to 'legacy-sdcard'Daniel Golle2021-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While an image layout based on MBR and 'bootfs' partition may be easy to understand for users who are very used to the IBM PC and always have the option to access the SD card outside of the device (and hence don't really depend on other recovery methods or dual-boot), in my opinion it's a dead end for many desirable features on embedded systems, especially when managed remotely (and hence without an easy option to access the SD card using another device in case things go wrong, for example). Let me explain: * using a MSDOS/VFAT filesystem to store kernel(s) is problematic, as a single corruption of the bootfs can render the system into a state that it no longer boots at all. This makes dual-boot useless, or at least very tedious to setup with then 2 independent boot partitions to avoid the single point of failure on a "hot" block (the FAT index of the boot partition, written every time a file is changed in bootfs). And well: most targets even store the bootloader environment in a file in that very same FAT filesystem, hence it cannot be used to script a reliable dual-boot method (as loading the environment itself will already fail if the filesystem is corrupted). * loading the kernel uImage from bootfs and using rootfs inside an additional partition means the bootloader can only validate the kernel -- if rootfs is broken or corrupted, this can lead to a reboot loop, which is often a quite costly thing to happen in terms of hardware lifetime. * imitating MBR-boot behavior with a FAT-formatted bootfs partition (like IBM PC in the 80s and 90s) is just one of many choices on embedded targets. There are much better options with modern U-Boot (which is what we use and build from source for all targets booting off SD cards), see examples in mediatek/mt7622 and mediatek/mt7623. Hence rename the 'sdcard' feature to 'legacy-sdcard', and prefix functions with 'legacy_sdcard_' instead of 'sdcard_'. Tested-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* base-files: add generic sdcard upgrade methodStijn Tintel2021-08-071-0/+1
| | | | | | | | Add a generic sdcard upgrade method instead of duplicating code in yet another target, and add a feature flag to only install this upgrade method in targets that set this flag. Copied from mvebu. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts/target-metadata.pl: order features alphabeticallyStijn Tintel2021-08-071-23/+23
| | | | | | We generaly do this in many other places, so let's do it here also. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* include/image*: add support for device-tree overlaysDaniel Golle2021-03-171-0/+1
| | | | | | | | | | | Add new target feature 'dt-overlay' which makes DTC keep the symbol names in the generated dtb. Make sure additional DT overlay sources specified by the new device variable DEVICE_DTS_OVERLAY get compiled together with the main DTS (currently overlays got to be in the same folder). Let Build/fit pass the generated DT overlay blobs to mkits.sh. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* treewide: fix spelling 'seperate' -> 'separate'Daniel Golle2021-02-281-1/+1
| | | | | | | This popular spelling mistake was also introduced by myself lately. Fix it everywhere. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* image: allow building FIT and uImage with ramdiskDaniel Golle2021-02-241-0/+1
| | | | | | | | | | | | | Instead of embedding the initrd cpio archive into the kernel, allow for having an external ramdisk added to the FIT or uImage. This is useful to overcome kernel size limitations present in many stock bootloaders, as the ramdisk is then loaded seperately and doesn't add to the kernel size. Hence we can have larger ramdisks to host ie. installers with all binaries to flash included (or a web-based firmware selector). In terms of performance and total size the differences are neglectible. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts: target-metadata don't add PROFILES twicePaul Spooren2021-01-141-1/+2
| | | | | | | | | | | | | | | Since 4ee3cf2b5a profiles with alternative vendor names may appear multiple times in `tmp/.targetinfo` or `.targetinfo` (for ImageBuilders). The `target-metadata.pl` script adds these profiles then twice to `PROFILE_NAMES` and the ImageBuilder show the profile twice when running `make info`. This patch removes duplicate profile IDs and only adds them once to `.profiles.mk`. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: define PWM_SUPPORT arch feature flagChristian Lamparter2020-09-251-0/+1
| | | | | | | | | | As the PWM has its own sub-system in the Linux kernel, I think it should be handled in the same way as GPIO, RTC, PCI... This patch introduces a specific feature flag "pwm" and the "leds-pwm" kernel module as the first customer. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* build: add option to mark devices as BROKENAdrian Schmutzler2020-07-301-0/+2
| | | | | | | | | | | By specifying "BROKEN := 1" or "BROKEN := y" for a device, it will be hidden (and deselected) by default. By that, it provides a stronger option to "disable" a device beyond just using DEFAULT := n. To make these devices visible, just enable the BROKEN option in developer settings as already implemented for targets and packages. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build: allow overriding default selection state for devicesJonas Gorski2019-08-131-1/+1
| | | | | | | | | | | | | | | | | | | Allow overriding the default selection state for Devices, similar to setting a default for packages. E.g. by setting DEFAULT to n, they won't be selected by default anymore when enabling all device in the multi device profile. This allows preventing images being built by the default config for known broken devices, devices without enough RAM/flash, or devices not working with a certain kernel versions. This does not prevent the devices from being manually selected or images being built by the ImageBuilder. These devices often still have worth with a reduced package-set, or as a device for regression testing, when no better device is available. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* build: add a config option for enabling a testing version of the target kernelFelix Fietkau2019-05-111-5/+12
| | | | | | | If the target supports a newer kernel version that is not used by default yet, it can be enabled with this option Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: switch default target from ar71xx to ath79Kevin Darbyshire-Bryant2019-04-111-1/+1
| | | | | | | | | | | | | ar71xx is in the process of being deprecated as a target accepting new devices. The replacement target for the same hardware is DTS based ath79. Switch the default build target selection from ar71xx to ath79. This is intended to encourage DTS takeup & support for ath79 and longer term will also aid kernel upstream support. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* IB: fix generating .profile.mk for profiles without metadataDaniel Golle2019-03-271-1/+1
| | | | | | Fixes d6fa04a437 ("IB: include SUPPORTED_DEVICES in 'make info' output") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* IB: include SUPPORTED_DEVICES in 'make info' outputDaniel Golle2019-03-111-0/+3
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ib: display whether profile comes with image metadataDaniel Golle2019-03-061-0/+1
| | | | | | | | Having image metadata (and signature) appended is a condition for semi-automated sysupgrade, hence IB needs to be able to tell which images will end up with metadata. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* build: add support for enabling the rootfs/boot partition size option via ↵Felix Fietkau2018-09-031-0/+2
| | | | | | target feature Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts: only generate config from feature flag if fully matchHauke Mehrtens2017-03-201-31/+31
| | | | | | | | | Without this change the code checked if the string was contained in the feature option and not if the string matches the complete word. This only removes the nand option from the omap24xx target, the other changes are only removing options which were added twice. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* build: add buildbot specific config option for setting defaultsFelix Fietkau2017-02-141-1/+4
| | | | | | | | | | This can be used to tweak the buildbot behavior without having to change buildbot's configuration. It will also allow us to add more aggressive clean steps (e.g. on toolchain changes), which would break developers' workflows if enable by default. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts: case insensitive sort device namesKarl Palsson2016-10-151-2/+6
| | | | | | | | | | | | When selecting devices from the Target Devices menu, the brand choices of naming makes it confusing to find particular devices by name, as the sorting is case sensitve. AirTight came after ALFA, and devolo and jjPlus both came after Zyxel. This does _not_ apply to the Target Profile list, as that includes "Default - all profiles" inside the profile list. Signed-off-by: Karl Palsson <karlp@etactica.com>
* scripts: add help text for some generated KConfigsKarl Palsson2016-10-151-0/+17
| | | | | | | TARGET_MULTI_PROFILE and TARGET_PER_DEVICE_ROOTFS get some help text to try and clarify their behaviour. Signed-off-by: Karl Palsson <karlp@etactica.com>
* image: allow specifying additional packages for device-specific rootfsMatthias Schiffer2016-09-241-1/+12
| | | | | | | | Add a new option to each device in multi-profile mode, allowing to provide a list of packages to add or remove. In case of added packages, the user must take care that these are selected to be built. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* kernel: add plan 9 fs packageMatteo Croce2016-08-111-0/+1
| | | | | | | 9pfs is used by kvm to share files between host and guest, add proper config option to enable it. Signed-off-by: Matteo Croce <matteo.croce@canonical.com>
* build: add option to enable all profilesFelix Fietkau2016-07-291-0/+4
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add support for per-device rootfs based on device profile packgesFelix Fietkau2016-07-291-3/+29
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* tools: add kernel2minor utility for Mikrotik devicesSergey Sergeev2016-07-051-0/+1
| | | | | | | | This patch adds support of Mikrotik yaffs2 filesystem image for kernel file and tools/kernel2minor package. We neede this to boot kernel through RouterBoot on new Mikrotik NOR flash devices. Signed-off-by: Sergey Sergeev <adron@yapic.net>
* config: add a small_flash featureJohn Crispin2016-06-131-0/+1
| | | | | | this causes KALLSYMS to be off by default Signed-off-by: John Crispin <john@phrozen.org>
* build: implement support for selecting multiple device profilesFelix Fietkau2016-06-071-0/+46
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: split scripts/metadata.pl into target-metadata.pl and package-metadata.plFelix Fietkau2016-06-071-0/+329
Signed-off-by: Felix Fietkau <nbd@nbd.name>