Commit Graph

227 Commits

Author SHA1 Message Date
Stijn Tintel
4237ba7d6f base-files: add generic sdcard upgrade method
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>
2021-08-07 12:09:16 +08:00
Stijn Tintel
bc335784f0 scripts/target-metadata.pl: order features alphabetically
We generaly do this in many other places, so let's do it here also.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-08-07 12:08:59 +08:00
Tianling Shen
329a4e184e
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-07-27 19:42:59 +08:00
Yonghyu Ban
50c08d2207 scripts/mkits.sh: Fix the hash algorithm paramter
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>
2021-07-19 12:12:26 +08:00
Tianling Shen
819db9dc2b
scripts/download.pl: re-add aliyun mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-07-15 22:40:00 +08:00
Tianling Shen
1857f8d863
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-07-14 14:53:12 +08:00
Ansuel Smith
8699f787e0 scripts: check if dl directory exist in dl_cleanup script
Check if the provided dl directory exist and return on error.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-07-06 23:06:50 +08:00
Tianling Shen
5313c26aab
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-21 20:49:40 +08:00
Paul Spooren
a481251f47
build,json: fix generation with empty profiles
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>
(cherry picked from commit fd0d9909bf)
2021-06-21 20:35:32 +08:00
Tianling Shen
a3325e5051
download.pl: add some mirrors disabled by default
To avoid abuse, these mirrors will not be used until you enable them
manually.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-19 18:30:22 +08:00
AmadeusGhost
4b33d667e8 download.pl: refresh mirrors list
Since there are so many useless actions, just to catch up with
the 'new update' ...
2021-06-19 18:08:10 +08:00
AmadeusGhost
76b990208f
download.pl: add more mirrors for SourceForge
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-19 00:46:41 +08:00
Tianling Shen
1bb600e635
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-18 00:03:43 +08:00
Moritz Warning
2cf729818b
build: preserve profiles.json between builds
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>
(cherry picked from commit a463b96241)
2021-06-17 20:53:42 +08:00
Tianling Shen
636a2b539b
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-17 20:47:12 +08:00
李国
9eddf65670
x86: generate EFI platform bootable images
Add EFI platform bootable images for x86 platforms. These images can
also boot from legacy BIOS platform.

EFI System Partition need to be fat12/fat16/fat32 (not need to load
filesystem drivers), so the first partition of EFI images are not ext4
filesystem any more.

GPT partition table has an alternate partition table, we did not
generate it. This may cause problems when use these images as qemu disk
(kernel can not find rootfs), we pad enough sectors will be ok.

Signed-off-by: 李国 <uxgood.org@gmail.com>
[part_magic_* refactoring, removed genisoimage checks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit a6b7c3e672)
2021-06-17 20:13:41 +08:00
AmadeusGhost
f2a7cf7ae7 Merge Mainline 2021-06-08 23:28:46 +08:00
Karel Kočí
f3e47345b1 scripts/feeds: generate index after all feeds are updated
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>
2021-06-08 23:16:09 +08:00
Tianling Shen
cb4554e221
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-31 18:55:44 +08:00
Paul Spooren
2c11e3e346 scripts: config.guess: update to 2021-05-24
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>
2021-05-29 23:21:13 +08:00
Tianling Shen
ae7e394924
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-27 21:32:11 +08:00
Tianling Shen
f6ef5a895c
scripts/download: update mirror url
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-26 22:17:21 +08:00
Tianling Shen
d22b2ce758
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-13 23:01:12 +08:00
Leonardo Mörlein
2a821d862c
build: introduce $(MKHASH)
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>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-13 22:49:42 +08:00
Tianling Shen
5e4d6e8c8e
scripts/download.pl: correct mirrors path for current branch
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-21 14:21:21 +08:00
AmadeusGhost
5680bfc347 Merge Mainline 2021-04-21 10:50:08 +08:00
Tianling Shen
1b76d7006b
scripts/download.pl: only call our own mirror when failed to download
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-19 01:36:37 +08:00
Tianling Shen
29b53e375a
scripts/download.pl: add aliyun(cn) mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-19 00:15:44 +08:00
Tianling Shen
e46eaffee2
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-17 00:17:46 +08:00
Tianling Shen
9961791b9e
scripts/download.pl: remove unavailable mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-17 00:12:02 +08:00
Tianling Shen
4f53a26f06
scripts/download.pl: update mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-13 21:33:25 +08:00
John Doe
4e84824d42
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-29 18:08:36 +08:00
Tianling Shen
3364f9a63d
scripts/download.pl: re-order mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 22:16:38 +08:00
Tianling Shen
8cb43623b1
scripts/download.pl: correct branch name of self-hosted mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 21:33:50 +08:00
AmadeusGhost
b9ae8b7c93 Merge Mainline 2021-03-26 20:28:03 +08:00
Paul Spooren
5ec2e9b8c7 build,json: 3rd fixup of default_packages
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>
2021-03-26 20:00:19 +08:00
Paul Spooren
d28cf096e3 build,json: fixup fixup of arch_packages
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>
2021-03-25 23:38:15 +08:00
Paul Spooren
65ca8a8b72 build,json: fixup missing arch_packages
Fix 7f4c2b1 "build,json: fix duplicates in default_packages" which
removed duplicate default packages but also removed the package
architecture from the profiles.json.

If DUMP=1 is set, the `ARCH_PACKAGES` is no longer exported and
therefore empty. Fix this by running make twice, once with DUMP=1 and
once without.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-25 23:36:48 +08:00
Tianling Shen
903bd12b2b
scripts/download.pl: add self-hosted mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 23:32:35 +08:00
Tianling Shen
1a8c4210ee
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 18:11:53 +08:00
Tianling Shen
49e3204f02
Revert "treewide: add mirrors for GitHub Codeload"
This reverts commit 9796619efc.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 16:58:11 +08:00
Tianling Shen
66a13ba4b4
Revert "treewide: add mirrors for GitHub Archives"
This reverts commit 19980fd5b9.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 16:58:11 +08:00
Tianling Shen
c1f500e1bd
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 09:29:58 +08:00
Tianling Shen
a53b7d6d62
scripts/download.pl: add download mirrors hosted by SuLingGG
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 23:21:13 +08:00
Tianling Shen
46991afe7c
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 22:06:22 +08:00
Tianling Shen
9f898e3336
download.pl: fix path to mirror 182.140.223.146
Closes: #327

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 17:10:15 +08:00
Paul Spooren
e2ce5345c8 build,json: fix duplicates in default_packages
Calling without the DUMP=1 argument causes the target specific Makefile
to be "included" again which adds the target specific packages twice,
once on the actual run and once included from `include/target.mk`.

This led to duplicate package entries, causing confusion in downstream
projects using the generated JSON files.

While at it, apply `black` style to Python script.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-21 23:36:45 +08:00
Tianling Shen
bca6199163
Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-19 17:31:52 +08:00
Daniel Golle
d6476932fa include/image*: add support for device-tree overlays
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>
2021-03-18 23:23:45 +08:00
Daniel Golle
82546f9d06 scripts/mkits.sh: add support for adding DT overlay blobs to image
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>
2021-03-18 23:18:54 +08:00