Commit Graph

121 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Daniel Golle d80d1b6c42 imagebuilder: don't rewrite package list output
No longer rewrite opkg list output in package_list function, remove
the awk call in the pipe (which was intended for a single specific
use-case).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Daniel Golle 1b555e1d2b imagebuilder: clean package_list
commit 19ac879954 (imagebuilder: add package_list function) introduced
a new function 'package_list' to the imagebuilder Makefile.
Unfortunately the package list was poluted by stdout noise of the
Makefile itself as well as opkg. Redirect those outputs to stderr to
make sure that the package_list returned doesn't contain progress
info output but really only packages.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Paul Spooren 19ac879954 imagebuilder: add package_list function
The imagebuilder can now list all available packages by using make
package_list. This is usefull for scripts to retrieve a list of all
packages with versions (and size)

Signed-off-by: Paul Spooren <paul@spooren.de>
[daniel@makrotopia.org: fixed commit message]
7 years ago
Jo-Philipp Wich 37e7a1734f imagebuilder: fix bundling of DTS sources
Refer to LINUX_KARCH instead of ARCH when bundling DTS files in the image
builder tarball.

While we're at it, also dereference symbolic links when copying as some
kernel architectures contain symbolic links in their DTS directories.

This fixes aarch64 imagebuilders such as brcm2708/bcm2710 ones in particular
as the kernel refers to "aarch64" as "arm64" internally.

Ref: https://forum.lede-project.org/t/lede-image-builder-problem/3680

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Felix Fietkau 9467ce42da build: get rid of host.mk
Defined required host related variables in toplevel.mk instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9dcb921d90 build: add buildbot specific config option for setting defaults
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>
7 years ago
Jo-Philipp Wich 0d1765b4ba imagebuilder: make submake invocations less verbose
Use silent make invocations for sub-makes like build_image or checksum to
avoid bloating the IB output with non-status info.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Jo-Philipp Wich 7d57db4d9b build: introduce STAGING_DIR_IMAGE
Introduce a new location STAGING_DIR_IMAGE which is intended to be used by
bootloader iamges and similar image-related artifacts.

This directory is guaranteed to be persistent across kernel upgrades which
might involve a removal of KERNEL_BUILD_DIR and is guranteed to be bundled
with the image builder.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Jo-Philipp Wich 6cb8e30837 imagebuilder: properly escape single quotes in device titles
The name "Plat'Home OpenBlocks AX3" causes the imagebuilders "make info"
command to fail with:

    bash: -c: line 0: syntax error near unexpected token `('
    bash: -c: line 0: `echo;  [...]'
    Makefile:99: recipe for target '_call_info' failed

Properly escape single quotes to avoid breaking the echo commands.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Felix Fietkau 619c8fa922 imagebuilder: remove existing debug kernel image
Reduces tarball size and improves build time

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau d1514e8f84 imagebuilder: remove existing root filesystem images
Reduces tarball size and improves build time

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jo-Philipp Wich 72d751cba9 build: rework library bundling
Rework the bundle-libraries.sh implementation to use a more robust approach
for executing host binaries through the shipped ELF loader and libraries.

The previous approach relied on symlinks pointing to a wrapper script which
caused various issues, especially with multicall binaries as the original
argv[0] name was not preserved through the ld.so invocation. Another down-
side was the fact that the actual binaries got moved into another directory
which caused executables to fail looking up resources with paths relative
to the executable location.

The new library wrapper implements the following improvements:

 - Instead of symlinks pointing to a common wrapper, each ELF executable
   is now replaced by a unqiue shell script which retains the original
   program name getting called

 - Instead of letting ld.so invoke the ELF executable directly, launch
   the final ELF binary through a helper program which fixes up the argv[0]
   argument for the target program

 - Support sharing a common location for the bundled libraries instead of
   having one copy in each directory containing wrapped binaries

Finally modify the SDK build to wrap the staging_dir and toolchain binaries
which allows to use the SDK on systems with a different glibc version.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Daniel Engberg 636a069c42 target/imagebuilder: Switch to xz compression instead of bz2
Switch to xz compression instead of using bz2.
Saves about 20% of total size (ar71xx)

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Daniel Dickinson 71370d2c55 target/{sdk,imagebuild}: Fix for symlink-tree
With symlink tree some directories are just symlinked which
means IB and SDK end up with a symlink instead of an actual
directory; this fixes the missing files by dereferencesing
the directories instead of copying the symlinks.

Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
8 years ago
Jo-Philipp Wich 27854a0a84 build: add checksum target
Add a new "checksum" make target which generates an sha256sums file over the
image files produced in bin/targets/ and automatically call it during make
world after the package index generation.

The advantage of this new target is that it is guaranteed to run after the
images, the SDK and the ImageBuilder archives have been generated to ensure
that they all end up in the checksum file. Fixes FS#51.

Uses sed to postprocess the OpenSSL digest output into an sha256sum command
compatible format.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 37e82e4e42 build: remove obsolete variables from opkg command
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 8265fdcc4d imagebuilder: strip DEVICE_ prefix from profiles (FS#55)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 9ae952cf8c build: split scripts/metadata.pl into target-metadata.pl and package-metadata.pl
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Alexander Couzens 2e980479c1 IB/SDK/toolchain: use lower cases filenames
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Alexander Couzens 4a7c653400 IB/SDK/toolchain: use VERSION_DIST_SANITIZED instead of VERSION_DIST
VERSION_DIST can contains spaces which produces problems when used as file name

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Daniel Dickinson 9fd8e55132 imagebuilder: Fix sorting package list breaks opkg dependency handling for provides
When imagebuild sorts package lists it breaks opkg's ability to realize
that a providers for a Provides has already been installed, when the sort
results in the provider being later in the list of packages that a package
which depends on a Provides (and hence the provider is not yet installed
for opkg to realize the provider was available doesn't not handle the case
of a package that is to be installed satisfying a dependency, only one that
is already installed (or which it schedules to be installed, which in the
absence of an installed provider is whichever provider happens to be the
default)

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
8 years ago
Felix Fietkau f4c4d501e4 build: remove profile kernel/build system config override support
It has been unused for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 80f4988da3 target/imagebuilder: fix using new device profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Alexander Couzens 009a069ec0 imagebuilder: rename OpenWrt into LEDE
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Jo-Philipp Wich b9466382b5 imagebuilder: use correct package directory when bundling kmods and libc
The libc and kernel package files moved since the introduction of shared
packages and the changed output directory layout. This causes the generated
ImageBuilder archive to lack the necessary "libc" and "kernel" meta packages,
leading to opkg install errors later on.

Use the FeedPackageDir macro to figure out the proper source directory to use.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich da46d2b228 imagebuilder: fix standalone operation
Fix standalone ImageBuilders after the package layout rework.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 0a0bfc8507 images imagebuilder: Allow to add sanitized extra name
For final output image names allow user to add an
extra string (which is sanitized).  This is particularly
useful with ImageBuilder where you may generate multiple
images from the same base and for the same board,
with different package selections and additional files
(via FILES=).

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>

SVN-Revision: 48083
8 years ago
Felix Fietkau d69efa4e15 targets: Use configured distribution name for SDK, IB, and Toolchain tarball names
We allow to configure the version distribution name;
let's also use it for the tarballs (SDK, ImageBuilder,
and SDK).

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>

SVN-Revision: 48081
8 years ago
Jo-Philipp Wich fb3fb9b6c1 imagebuilder: store package lists in cache directory
Force opkg to store the downloaded repository indizes into the cache
directory as well, this way the IB can be used in an offline setting
once all required files have been cached.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46912
9 years ago
Felix Fietkau add0c00c96 imagebuilder: run build prereq checks before building image to set up host commands properly
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46840
9 years ago
John Crispin 096b3759a9 build: Prevent more gzip timestamps
To improve reproducibility, prevent the inclusion of timestamps
in the gzip header.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 46361
9 years ago
Jo-Philipp Wich 11f05afd26 imagebuilder: create cache directory if needed (#18629)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45866
9 years ago
Jo-Philipp Wich e91342e285 IB: make CONFIG_IB_STANDALONE the default
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45800
9 years ago
Jo-Philipp Wich 3c5357d6ef feeds: use common macro "FeedSourcesAppend" to populate opkg configurations
This introduces a common macro to assemble the correct url templates to
avoid code duplication and have the feed config handling in a central place.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45799
9 years ago
Jo-Philipp Wich 6c21bcaa65 IB: use online repositories
Change the IB packaging to only embed libc, kernel and kmod packages by default
and generate repositories.conf to refer to the remote package repositories.

Introduce a new config option CONFIG_IB_STANDALONE which restores the old
behaviour of building self contained IB archives.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45772
9 years ago
Jo-Philipp Wich 65ec08d1b0 imagebuilder: align filename with SDK
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44313
9 years ago
Jo-Philipp Wich 188032c8e3 imagebuilder: don't pregenerate package index, strip host binaries
The package index is generated on first use anyway, therefore it makes no
sense to continue shipping it.

Also sstrip the bundled host binaries when packing the IB to save some
additional space.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44293
9 years ago
Jo-Philipp Wich 2adab34c20 imagebuilder: use FreeBSD compatible tar invocation
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44288
9 years ago
Jo-Philipp Wich dffaf94d44 imagebuilder: fail with error if the passed profile name does not exist
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43916
9 years ago
Jo-Philipp Wich 15d8db1f8c build: add version number to filenames
This commit introduces a new option CONFIG_VERSION_FILENAMES which causes
OpenWrt to embed the version number in generated image files, SDK- and
ImageBuilder archives.

The option is enabled by default if CONFIG_VERSIONOPT is set.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43869
9 years ago
Felix Fietkau 0b1c89f6fe target/imagebuilder: remove obsolete !TARGET_ROOTFS_INITRAMFS dependency
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43128
10 years ago
John Crispin 44249f71a8 postinst trigger: the new postinst trigger broke IB
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42571
10 years ago
Felix Fietkau 7632358add imagebuilder: remove postinst files before generating image
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42339
10 years ago
Jo-Philipp Wich a720dd209f build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate
repositories for each enabled package feed instead of one monolithic one.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42002
10 years ago
John Crispin caa671d873 imagebuilder: fix typo that copied grub to the wrong folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41824
10 years ago
John Crispin 941dab02d5 imagebuilder: copy dts folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41790
10 years ago
John Crispin 68e8614009 imagebuilder: x86 fails to build inside the imagebuilder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41580
10 years ago
Felix Fietkau 897b2e4b98 target/imagebuilder: add missing package index (fixes #16675)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40968
10 years ago
Jo-Philipp Wich 69a6fd0190 imagebuilder: bundle dtc (#12953, #14741)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 40767
10 years ago
Felix Fietkau 96bb7c123b build: consistently use 'depends on' instead of 'depends'
make the syntax more compatible with kernel menuconfig

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 36351
11 years ago