aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* scripts/gen_image_generic.sh: fix order of files in EFI bootfsDaniel Golle2022-04-151-2/+19
| | | | | | | | | | | | | mtools recursive copy (mcopy -s ...) is using READDIR(3) to iterate over the directory entries, hence they end up in the FAT filesystem in traversal order which breaks reproducibility (rather than being added to the FAT filesystem in a reproducible order). Implement recursive copy in gen_image_generic.sh in Shell code instead, as in that way we can force files to be copied in reproducible order. Fixes: aece8f5ae8 ("scripts/gen_image_generic.sh: generate reproducible EFI filesystem") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 4d289ae7e63893f90957b77962c6b60574d35441)
* scripts/gen_image_generic.sh: generate reproducible EFI filesystemDaniel Golle2022-04-151-2/+3
| | | | | | | | | | Generate FAT filesystem for EFI boot in a reproducible way: * use '--invariant' option of mkfs.fat * set timestamps of all files to SOURCE_DATE_EPOCH * make sure files are ordered locale-independent Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit aece8f5ae8d15e5e79b8e34a176895209709afb6)
* scripts/gen_image_generic.sh: make ext4 bootfs reproducibleDaniel Golle2022-04-151-1/+1
| | | | | | | | Set fixed timestamp for kernel other files in /boot filesystem. This should help making x86 *combined* images reproducible. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 068ea2cde04e2666fb05731cea941bccfaeddc25)
* scripts: make sure sort-order is independent from localeDaniel Golle2022-04-061-1/+1
| | | | | | | | | Set LC_ALL=C environment variable when calling 'sort' as the sort order otherwise depends on the locale set. Fixes: 56ce110b73 ("scripts: make sure conffiles are sorted") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 1d77dca3b32dd883bcc2213675cf21111ac1beca)
* build: store sha256_unsigned in JSONPaul Spooren2022-04-061-4/+12
| | | | | | | | | | | | | Introduce `sha256_unsigned` which is a checksum of the image _before_ a signature is attached. This is helpful to compare image reproducibility. Since the `.sha256sum` file is located in the $(KDIR) folder, switch $(BIN_DIR) with $(KDIR) to simplify the code. The value of $(BIN_DIR) itself is not stored inside the resulting JSON file, so it can be replaced. Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 8822a8d850ba2df69b81289758959bb90643a696)
* scripts: make sure conffiles are sortedPaul Spooren2022-04-061-1/+2
| | | | | | | | | | It may happen that conffiles are in different order on different builds. Make sure they have the same order by sorting them. FIX: #9612 Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 56ce110b73970bcd65d309440baada84c8e1504b)
* 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)
* toolchain: binutils: add support for version 2.38Rui Salvaterra2022-03-091-1/+2
| | | | | | | | | | | | While at it, also fix the download.xs4all.nl and add ftp.gnu.org to the GNU mirrors, as it seems to be updated faster. Deleted (upstreamed): 600-Close_the_file_descriptor.patch [1] [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5a98fb7513b559e20dfebdbaa2a471afda3b4742 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mkhash: fix build errors on FreeBSD 13.0Georgi Valkov2022-03-051-1/+1
| | | | | | | | | | | | | | be64enc, be16dec, and be32dec are declared on FreeBSD 13.0, in /usr/include/sys/endian.h so we should not declare them. Fixes the following error during feeds update: staging_dir/host/bin/mkhash: No such file or directory gcc scripts/mkhash.c scripts/mkhash.c:111:1: error: redefinition of 'be64enc' 111 | be64enc(void *buf, uint64_t u) Signed-off-by: Georgi Valkov <gvalkov@abv.bg>
* check-toolchain-clean.sh: workaround stray rebuildsPetr Štetiar2022-02-281-2/+7
| | | | | | | | | | | | | | | | It seems, that there are currently some unhandled corner cases in which `.toolchain_build_ver` results in empty file and thus forcing rebuilds, even if the toolchain was build correctly just a few moments ago. Until proper fix is found, workaround that by checking for this corner case and simply populate `.toolchain_build_ver` file. While at it, improve the UX and display version mismatch, so it's more clear what has forced the rebuild: "Toolchain build version changed (11.2.0-1 != ), running make targetclean" References: https://gitlab.com/ynezz/openwrt/-/jobs/2133332533/raw Signed-off-by: Petr Štetiar <ynezz@true.cz>
* check-toolchain-clean.sh: fix shellcheck warningsPetr Štetiar2022-02-281-1/+1
| | | | | | | | | | | Fixes following complaints and suggestions: In scripts/check-toolchain-clean.sh line 2: eval `grep CONFIG_GCC_VERSION .config` ^-- SC2046 (warning): Quote this to prevent word splitting. ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* scripts/diffconfig.sh: ensure config/conf is builtEneas U de Queiroz2022-02-261-0/+1
| | | | | | | | | diffconfig.sh runs ./scripts/config/conf, but it does not get built with 'make {menu,x,n}config. Call 'make ./scripts/config/conf' to ensure it's been built before running it, aborting in case of failure. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>[removed Fixes: due revert]
* Revert "scripts/diffconfig.sh: ensure config/conf is built"Petr Štetiar2022-02-241-1/+0
| | | | | | | | | | | | | This reverts commit c0849c1d9c17ba96a37b67363b5551c065e9f50d as it seems to introduce regression in config.buildinfo files produced at least by buildbots: $ curl -s https://downloads.openwrt.org/snapshots/targets/ath79/generic/config.buildinfo | head -2 make[3]: Entering directory '/builder/shared-workdir/build' make[3]: Leaving directory '/builder/shared-workdir/build' References: https://github.com/openwrt/openwrt/issues/9297#issuecomment-1049719381 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* scripts/diffconfig.sh: ensure config/conf is builtEneas U de Queiroz2022-02-221-0/+1
| | | | | | | | diffconfig.sh runs ./scripts/config/conf, but it does not get built with 'make {menu,x,n}config. Call 'make ./scripts/config/conf' to ensure it's been built befpre running it. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* build: scripts/config - update to kconfig-v5.14Eneas U de Queiroz2022-02-1928-3932/+3219
| | | | | | | | | | | | | | | | | | | | | | | | | | Functional Changes ---------- ------- - make 'imply' not impose any restrictions: allow symbols implied by y to become m - change "modules" from sub-option to first-level attribute Bugfixes -------- - nconf: fix core dump when searching in empty menu - nconf: stop endless search loops - xconfig: fix content of the main widget - xconfig: fix support for the split view mode Other Changes ----- ------- - highlight xconfig 'comment' lines with '***' - xconfig: navigate menus on hyperlinks - xconfig: drop support for Qt4 - improve host ncurses detection Update the 'option modules' usage to just 'modules' in Config.in. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* feeds: use git-src-full to allow Git versioningPaul Spooren2022-02-151-2/+2
| | | | | | | | | | | | | | | Both $(AUTORELEASE) and $(PKG_SRC_VERSION) (from luci.git) use the Git log to determine releases and package timestamps. Feeds are shallow cloned by default, resulting in an incomplete Git log and therefore different local package versions than offered upstream. This commits sets the default feeds to use `src-git-full` to solve that. Add fixes from "2b1d92f: scripts/feeds: silence git warning by selecting pull style" to `src-git-full` Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: store source_date_epoch as integerPaul Spooren2022-02-141-1/+1
| | | | | | | | | The value is retreived from a env variable which defaults to be read as a string. However the SOURCE_DATE_EPOCH is a unix timestamp aka integer. Fix this to allow downstream tools to parse the value directly. Signed-off-by: Paul Spooren <mail@aparcar.org>
* scripts/feeds: install targets to target/linux/feeds and support overridingFelix Fietkau2022-01-241-8/+26
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts/feeds: fix installing targets without explicitly specifying the feedFelix Fietkau2022-01-241-0/+2
| | | | | | Add similar code to what is done on packages Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: drop use of whichAnsuel Smith2022-01-174-5/+14
| | | | | | | | | | | | | | Ubuntu started to flag which as deprecated and it seems which is not really standard and may vary across Distro. Drop the use of which and use the standard 'command -v' for this simple task. Which is still present in the prereq if some package/script still use which. A utility script called command_all.sh is implemented that will just mimic the output of which -a. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* scripts: dump-target-info print kernel versionsPaul Spooren2021-12-291-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | This commits adds the ability to print Kernel versions of all targets/subtargets. If a testing Kernel is set print that version as well. Example output: apm821xx/nand 5.10 apm821xx/sata 5.10 arc770/generic 5.4 archs38/generic 5.4 armvirt/32 5.10 armvirt/64 5.10 at91/sam9x 5.10 at91/sama5 5.10 ath25/generic 5.4 ath79/generic 5.4 5.10 ath79/mikrotik 5.4 5.10 --- %< --- This should help to get a quick update on the state of Kernels. Signed-off-by: Paul Spooren <mail@aparcar.org>
* 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>
* scripts: ubinize-image: make rootfs optionalRobert Marko2021-11-281-20/+23
| | | | | | | | | | | | Currently ubinize-image script always expects the rootfs image to be passed and a volume for it created. So, to allow only ubinizing a kernel for example which the MikroTik hAP ac3 and other new NAND devices from MikroTik require make rootfs an optional parameter like kernel. Signed-off-by: Robert Marko <robimarko@gmail.com>
* toolchain: add a version that can be bumped to force toolchain/target rebuildFelix Fietkau2021-11-161-0/+9
| | | | | | | | This can be used to ensure that the compiled code is up to date, when something important changes in the toolchain. A recent example of this is the gcc 11 fix for a code miscompilation issue Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts/env: fix env for git conf init.defaultBranch not set to "master"Arne Zachlod2021-11-131-1/+1
| | | | | | | | | Since version 2.28, git has a config option init.defaultBranch to set the name of the first branch created with git init. The env script expects this name to be "master". This commit sets the initial branch name to "master" instead of using the git configured one. Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
* scripts: fix various typosJosh Soref2021-10-319-14/+14
| | | | | | | | | This only affects typos in comments or user-facing output. Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> [only picks changes to scripts, drop "commandline" replacement, fix case for "arbitrary", improve commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* scripts: eva_ramboot.py: remove unused importJan-Niklas Burfeind2021-10-301-1/+0
| | | | | | | concludes: commit e7bc8984d9ca ("scripts: make eva_ramboot.py offset configurable") Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
* base-files, metadata: support additional group membershipDaniel Golle2021-10-281-1/+7
| | | | | | | | | | | | Some packages may require additional group membership for the system user added by that package. Allow defining additional groups as third member of the ':'-separated tuple, allowing to specify multiple ','-separated groups with optional GID. Example: USERID:=foouser=1000:foogroup=1000:addg1=1001,addg2=1002,addg3 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* Revert "ethtool: update to v5.14"Hans Dedecker2021-10-231-1/+1
| | | | | | This reverts commit 7630001427fa266fa61da0b2533e2c1054eababe Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ethtool: update to v5.14Hans Dedecker2021-10-231-1/+1
| | | | | | Update to newly released version 5.14 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* scripts/rstrip.sh: do not strip .o files with STRIP_KMODFelix Fietkau2021-10-111-0/+1
| | | | | | Fixes packaging of eBPF modules Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts: package-metadata add pkgmanifestjson callPaul Spooren2021-09-231-0/+36
| | | | | | | | | | The new `pkgmanifestjson` call prints all package manifest of a feed in JSON format. This function can be used to print an overview of packages information used for downstream tooling. The script is entirely based on Petrs work on dependency visualisation. Signed-off-by: Paul Spooren <mail@aparcar.org>
* scripts: store maintainer in package metadataPaul Spooren2021-09-231-0/+1
| | | | | | | The maintainer could be usable for downstream tooling, so start storing it in the metadata. Signed-off-by: Paul Spooren <mail@aparcar.org>
* 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: handle gcc and linux in dl_cleanup scriptAnsuel Smith2021-09-221-2/+2
| | | | | | | | | | | Handle gcc and linux with a special regex that set their progname with their major version. This way every minor version can be cleared. The build cleanup logic can be tweaked later to clean the entire toolchain and target dir with a different gcc version. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [reformat commit message] Signed-off-by: Paul Spooren <mail@aparcar.org>
* scripts: format dl_cleanup to black format python styleAnsuel Smith2021-09-221-199/+230
| | | | | | Forma dl_cleanup python script to black style. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* scripts: add missing regex for dl_cleanup scriptAnsuel Smith2021-09-221-0/+8
| | | | | | | | | | | | | | | Regex xxx-YYYY-MM-DD-GIT_SHASUM was missing. Add the new regex to improve and better find outdated package. This also fix a bug where some bug were incorrectly detected as packagename-yyyy-mm-dd instead of packagename due to them be parsed by the wrong parser Example: openwrt-keyring-2021-02-20-49283916.tar.xz Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [added example in commit message] Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: store artifacts in JSONPaul Spooren2021-09-141-10/+14
| | | | | | | | | | | | | Multiple profiles create artifacts, these should be stored in the JSON file as well, allowing downstream tooling to show those files, too. Artifacts don't have specific filesystems so only the fields `name`, `type` and `sha256` are available. Rename env variable names from IMAGE_ to FILE_ prefixes to reflect that images, kernels and artifacts are added with the same command. Signed-off-by: Paul Spooren <mail@aparcar.org>
* 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>
* 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: check if dl directory exist in dl_cleanup scriptAnsuel Smith2021-07-051-0/+5
| | | | | | Check if the provided dl directory exist and return on error. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* build,json: fix generation with empty profilesPaul Spooren2021-06-201-1/+1
| | | | | | | | If the image generation doesn't add any profiles to the output the *profile merge* will fail. To avoid that set an empty profile as fallback. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: preserve profiles.json between buildsMoritz Warning2021-06-161-9/+23
| | | | | | | | | | | | | Keep other profiles.json content if the data belongs to the current build version. Also useful for the ImageBuilder, which builds for a single model each time. Without this commit the profiles.json would only contain the latest build profile information. Signed-off-by: Moritz Warning <moritzwarning@web.de> [improve commit message] Signed-off-by: Paul Spooren <mail@aparcar.org>
* scripts/feeds: generate index after all feeds are updatedKarel Kočí2021-06-071-44/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This separates index update from feed update. The result is that all requested feeds are first updated and only then indexed. The reason for this change is to prevent errors being reported and potentially invalid index being generated thanks to cross feeds dependency. The feeds script pulls in default all feeds as they come and on install prefers packages from first feeds (unless special feed is requested). Thus order of feeds in some way specifies preferences. This is handy for downstream distributions as they can simply override any package from upstream feeds by placing their feed before them. This removes need to patch or fork upstream feeds. The problem is that such feed most likely depends in some way also on subsequent feeds. The most likely feeds are 'packages' or 'luci'. The example would be Python package that needs 'python.mk' from 'packages' feed. Ordering custom feed after dependent feeds is sometimes just not possible because of preference requirement described before. The solution is to just first pull all feeds and generate indexes only after that. In the end this ensures that index is generated correctly at first try without any error. In terms of code this removes 'perform_update' argument from 'update_feed' as with index update removal the update is the only action performed in that subroutine. Thus this moves condition to 'update' subroutine. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
* scripts: config.guess: update to 2021-05-24Paul Spooren2021-05-292-498/+788
| | | | | | | | | | | | This script hasn't seen an update in multiple years, update it to the latest version provided upstream. Both `config.guess` and `config.sub` are copied from upstream[1] and not modified. The full changelog is available within the upstream repository[1]. [1]: https://git.savannah.gnu.org/git/config.git Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: introduce $(MKHASH)Leonardo Mörlein2021-05-135-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, it was assumed that mkhash is in the PATH. While this was fine for the normal build workflow, this led to some issues if make TOPDIR="$(pwd)" -C "$pkgdir" compile was called manually. In most of the cases, I just saw warnings like this: make: Entering directory '/home/.../package/gluon-status-page' bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found [...] While these were only warnings and the package still compiled sucessfully, I also observed that some package even fail to build because of this. After applying this commit, the variable $(MKHASH) is introduced. This variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the correct path. Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
* build,json: 3rd fixup of default_packagesPaul Spooren2021-03-251-18/+5
| | | | | | | | | | | | | | | | | | | | This became a bit of a tragedy, caused by a corner cases which wasn't put into account during testing. DEFAULT_PACKAGES are defined in target/linux/<target>/Makefile but also in target/linux/<target>/<subtarget>/target.mk. The latter was no longer imported when using DUMP=1, however not using DUMP=1 while running the Makefile in target/linux/<target>/ caused duplicate packages in the list. As a solution, which should have been used from day 0, `make` runs in target/linux/ without DUMP=1, resulting in no duplicate packages and all inclusions from include/target.mk, linux/target/<target>/{Makefile, <subtarget>/target.mk} While at it, sort the list of default packages. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build,json: fixup fixup of arch_packagesPaul Spooren2021-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit "1bf2b3fe90 build,json: fixup missing arch_packages" fixes the missing package architecture locally but runs $(TOPDIR)/Makefile rather than a target specific one. While this works on local builds just fine, it causes the buildbots to add garbage to the `arch_packages` variable: cd \"/builder/shared-workdir/build\"; git log --format=%h -1 toolchain > /builder/shared-workdir/build/tmp/.ver_check\ncmp -s /builder/shared-workdir/build/tmp/.ver_check /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp/.ver_check || { \\\n\trm -rf /builder/shared-workdir/build/build_dir/target-x86_64_musl /builder/shared-workdir/build/staging_dir/target-x86_64_musl /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl /builder/shared-workdir/build/build_dir/toolchain-x86_64_gcc-8.4.0_musl; \\\n\tmkdir -p /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp; \\\n\tmv /builder/shared-workdir/build/tmp/.ver_check /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp/.ver_check; \\\n}\nx86_64 Only the last line contains the desired string. Future investigation should check why the build system prints this to stdout rather than stderr. Signed-off-by: Paul Spooren <mail@aparcar.org>