aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mkits.sh
Commit message (Collapse)AuthorAgeFilesLines
* scripts/mkits.sh: replace forgotten '-' with ${REFERENCE_CHAR}Daniel Golle2022-03-271-1/+1
| | | | | | | | Cosmetical change to improve style in mkits.sh. Fixes: fd679086473 ("scripts: mkits.sh: Allow legacy @ mode for dts creation") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit e89c85249e311e9a376d07cda33c9dc39b12a906)
* scripts: mkits.sh: Allow legacy @ mode for dts creationDamien Mascord2021-09-231-10/+13
| | | | | | | | | | | | | | | | | | commit 5ec60cbe9d94 ("scripts: mkits.sh: replace @ with - in nodes") broke support for Meraki MR32 and this patch makes the replacement configurable allowing for specifying the @ or - or whatever character that is desired to retain backwards compatibility with existing devices. For example, this patch includes the fix for the Meraki MR32 in target/linux/bcm53xx/image for meraki_mr32: DEVICE_DTS_DELIMITER := @ DEVICE_DTS_CONFIG := config@1 Fixes: 5ec60cbe9d94 ("scripts: mkits.sh: replace @ with - in nodes") Signed-off-by: Damien Mascord <tusker@tusker.org> [Added tags, checkpatch.pl fixes, noted that this is for old stuff] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* scripts/mkits.sh: Fix the hash algorithm paramterYonghyu Ban2021-07-181-2/+2
| | | | | | | | | | | The mkits.sh script help message states hash algorithm can be specified using the -H command-line option, but it does not work currently due to a bug in the script. This patch fixes this problem by changing the option from -S to -H and specify getopts parameter after it Signed-off-by: Yonghyu Ban <yonghyu@empo.im>
* scripts/mkits.sh: add support for adding DT overlay blobs to imageDaniel Golle2021-03-171-2/+56
| | | | | | | | | | | | Allow adding multiple device tree overlay blobs to an image and generate configurations for each of them. This is useful on boards with modern U-Boot which allow e.g. user- configurable peripherals ("shields") in that way. Note that currently, each generated configuration adds exactly one overlay on top of the base image, ie. adding multiple overlays at the same time is not yet supported. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts: mkits.sh: replace @ with - in nodesRobert Marko2021-03-051-8/+8
| | | | | | | | | | | | | | | U-boot will reject the nodes with @ for the address since commit: https://gitlab.denx.de/u-boot/u-boot/-/commit/79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4 This in turn will cause the failure to boot with OpenWrt generated images. So, to rectify that simply replace @ with -. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cover also newly added rootfs@1 and initrd@1 nodes) Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* image: allow building FIT and uImage with ramdiskDaniel Golle2021-02-241-1/+27
| | | | | | | | | | | | | 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>
* image: add support for building FIT image with filesystemDaniel Golle2021-02-241-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow for single (external-data) FIT image to hold kernel, dtb and squashfs. In that way, the bootloader verifies the system integrity including the rootfs, because what's the point of checking that the hash of the kernel is correct if it won't boot in case of squashfs being corrupted? Better allow bootloader to check everything needed to make it at least up to failsafe mode. As a positive side effect this change also makes the sysupgrade process on nand potentially much easier as it is now. In short: mkimage has a parameter '-E' which allows generating FIT images with 'external' data rather than embedding the data into the device-tree blob itself. In this way, the FIT structure itself remains small and can be parsed easily (rather than having to page around megabytes of image content). This patch makes use of that and adds support for adding sub-images of type 'filesystem' which are used to store the squashfs. Now U-Boot can verify the whole OS and the new partition parsers added in the Linux kernel can detect the filesystem sub-images, create partitions for them, and select the active rootfs volume based on the configuration in FIT (passing configuration via device tree could be implemented easily at a later stage). This new FIT partition parser works for NOR flash (on top of mtdblock), NAND flash (on top of ubiblock) as well as classic block devices (ie. eMMC, SDcard, SATA, NVME, ...). It could even be used to mount such FIT images via `losetup -P` on a user PC if this patch gets included in Linux upstream one day ;) Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts: mkits.sh make it possible to specify fdt@#Christian Lamparter2020-09-251-4/+8
| | | | | | | | | | | | | | Some bootloaders are really keen on just one special fdt in a multi-image fit image. This is a problem, because currently this is fixed to "fdt@1". This patch introduces a new device variable: DEVICE_FDT_NUM that allows to specify the right fdt number. If the value is absent "1" will be chosen. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* scripts/mkits.sh: fix use of printfAdrian Schmutzler2020-07-111-2/+3
| | | | | | | | | | | Due to a line break, printf was accidentally called with three arguments instead of two, causing a different output than before. Fix it by splitting the printf command into two lines. Fixes: 907053193a1c ("scripts/mkits.sh: replace echo -e with printf") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* scripts/mkits.sh: fix remaining shellcheck warningPetr Štetiar2020-07-111-1/+1
| | | | | | | | | | Fixes following shellcheck warning: In scripts/mkits.sh line 19: "-k kernel [-D name -d dtb] -o its_file" "$(basename $0)" ^-- SC2086: Double quote to prevent globbing and word splitting. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* scripts/mkits.sh: switch from bash to shRosen Penev2020-07-111-1/+1
| | | | | | This no longer needs bash. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* scripts/mkits.sh: fix improper string and array concatenationRosen Penev2020-07-111-1/+1
| | | | | | Found with shellcheck. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* scripts/mkits.sh: add missing quotesRosen Penev2020-07-111-2/+2
| | | | | | Found with shellcheck. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* scripts/mkits.sh: replace echo -e with printfRosen Penev2020-07-111-12/+12
| | | | | | echo flags are not POSIX. printf does the same with added \n. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* scripts/mkits.sh: replace legacy backticks with $()Rosen Penev2019-12-311-2/+2
| | | | | | | | | | This replaces deprecated backticks by more versatile $(...) syntax. Found with shellcheck. Signed-off-by: Rosen Penev <rosenp@gmail.com> [adjust commit title and message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build: make device tree arg really optional in mkits.shJohann Neuhauser2019-09-191-5/+4
| | | | | | | | | If no device tree is given there is no node generated, but the configuration does still include the name of the missing node. This will result in a successful build fit image, but bootm does throw a error message if we want to boot the bad configuration. Signed-off-by: Johann Neuhauser <jneuhauser@dh-electronics.com>
* build: Allow to change the FIT config section nameSven Eckelmann2018-03-171-4/+6
| | | | | | | | Some devices only boot when a special config is found in the image and completely ignore the default entry during the selection. These devices can now use the variable DEVICE_DTS_CONFIG in their device image definition. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* scripts: avoid hard-coded paths in scriptsIblis Lin2016-04-281-1/+1
| | | | Signed-off-by: Iblis Lin <e196819@hotmail.com>
* build: make device-tree arg optional in mkits.shFelix Fietkau2015-05-101-19/+21
| | | | | | | | | | | | mkits.sh help currently shows dtb file as optional, but generates an invalid its file when this option is unspecified. We're fixing this problem by removing the use of the sed command and just including variables instead. Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> SVN-Revision: 45659
* build: move mkits.sh script to more common placeLuka Perkov2013-10-161-0/+115
Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 38430