Commit Graph

119 Commits

Author SHA1 Message Date
Paul Spooren
f20e414b79
build: refactor JSON info files to profiles.json
JSON info files contain machine readable information of built profiles
and resulting images. These files were added in commit 881ed09ee6
("build: create JSON files containing image info").

They are useful for firmware wizards and script checking for
reproducibility.

Currently all JSON files are stored next to the built images, resulting
in up to 168 individual files for the ath79/generic target.

This patch refactors the JSON creation to store individual per image
(not per profile) files in $(BUILD_DIR)/json_info_files and create an
single overview file called `profiles.json` in the target directory.

Storing per image files and not per profile solves the problem of
parallel file writes. If a profiles sysupgrade and factory image are
finished at the same time both processes would write to the same JSON
file, resulting in randomly broken outputs.

Some target like x86/64 do not use the image code yet, resulting in
missing JSON files. If no JSON info files were created, no
`profiles.json` files is created as it would be empty anyway.

As before, this creation is enabled by default only if `BUILDBOT` is set.

Tested via buildroot & ImageBuilder on ath79/generic, imx6 and x86/64.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[json_info_files dir handling in Make, if case refactoring]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-11-14 23:29:53 +08:00
W. Michael Petullo
6cfb0c0d1d
refpolicy: add variant that builds modular policy
This adds a variant of refpolicy that builds the modular form of the
policy. While this requires more memory on the target device, along with
some tricks to deal with OpenWrt's volatile /var directory, it is useful
for experiementing with SELinux policy.

Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-12 11:12:23 +08:00
Daniel Golle
fa77e887a0 config: clean up SELinux options
In order to make it easier for users to build with SELinux, have a
single option in 'Global build settings' to enable all necessary
kernel features, userland packages and build-system hooks.
Also add better descriptions and help messages while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-17 11:50:46 +08:00
Daniel Golle
9f75eb9e31 config: add option for dssp selinux policy
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-09 11:31:26 +08:00
LGA1150
84bfad692c
build: enable ccache by default 2020-10-04 21:45:07 +08:00
Daniel Golle
62f07912ed config: prepare for choice of SELinux policy
Only 'targeted' from refpolicy is supported for now.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-09-29 11:34:13 +08:00
Paul Spooren
5f626eedad
config: add KERNEL_LSM symbol
The LSM (Linux security mechanism) list is the successor of the now
legacy *major LSM*. Instead of defining a single security mechanism the
LSM symbol is a comma separated list of mechanisms to load.

Until recently OpenWrt would only support DAC (Unix discretionary access
controls) which don't require an additional entry in the LSM list. With
the newly introduced SELinux support the LSM needs to be extended else
only a manual modified Kernel cmdline (`security=selinux`) would
activate SELinux.

As the default OpenWrt Kernel config sets DAC as default security
mechanism, SELinux is stripped from the LSM list, even if
`KERNEL_DEFAULT_SECURITY_SELINUX` is activated. To allow SELinux without
a modified cmdline this commit sets a specific LSM list if
`KERNEL_SECURITY_SELINUX` is enabled.

The upstream Kconfig adds even more mechanisms
(smack,selinux,tomoyo,apparmor), but until they're ported to OpenWrt,
these can be ignored.

To compile SELinux Kernel support but disable it from loading, the
already present options `KERNEL_SECURITY_SELINUX_DISABLE` or
`KERNEL_SECURITY_SELINUX_BOOTPARAM` (with custom cmdline `selinux=0`)
can be used. Further it's possible to edit `/etc/selinux/config`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-04 16:11:44 +08:00
Thomas Petazzoni
28212bbd55 kernel: add options needed for SELinux
This adds a number of options to config/Config-kernel.in so that
packages related to SELinux support can enable the appropriate Linux
kernel support.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[rebase; add ext4, F2FS, UBIFS, and JFFS2 support; add commit message]
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-08-31 11:33:32 +08:00
Thomas Petazzoni
dab20a746b build: add support for SELinux to include/image.mk
This allows the build process to prepare a squashfs filesystem for use
with SELinux.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[rebase, add commit message]
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-08-31 11:12:54 +08:00
Yuan Tao
b0ab79f1b6 config: kernel: fix missed CGROUP_HUGETLB symbol
The symbol KERNEL_CGROUP_HUGETLB is always used whenever KERNEL_CGROUPS is enabled.
The absence of this notation will cause the user to be asked to enter this parameter the first time it is compiled.

Signed-off-by: Yuan Tao <ty@wevs.org>
2020-08-24 11:36:40 +08:00
AmadeusGhost
7f210212d9 ipq40xx: sync upstream crypto patches 2020-08-21 22:46:23 +08:00
Felix Fietkau
f37d0b447f
build: make prefix mapping of debug information optional
Remapping the local build path in debug information makes debugging
using ./scripts/remote-gdb harder, because files no longer refer to the full
path on the build host.

For local builds, debug information does not need to be reproducible,
since it will be stripped out of packages anyway.

For buildbot builds, it makes sense to keep debug information reproducible,
since the full path is not needed (nor desired) anywhere.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-07 17:54:48 +08:00
CN_SZTL
fce99c706d
target/generic: add missing symbol in kernel 4.9 2020-08-03 01:53:13 +08:00
Stijn Tintel
5a62b7af32
kernel: fix missing TRANSPARENT_HUGEPAGE symbols
Enabling KERNEL_TRANSPARENT_HUGEPAGE exposes 2 missing symbols:
* CONFIG_READ_ONLY_THP_FOR_FS
* TRANSPARENT_HUGEPAGE_ALWAYS
* TRANSPARENT_HUGEPAGE_MADVISE

The first one was added in 5.4, and is marked experimental there so just
disable it in the generic config.

For the latter two, we should not force the user to use either of them,
so add them as build-configurable kernel options.

Fixes: d1a8217d87 ("kernel: clean-up build-configurable kernel config symbols")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2020-08-03 00:28:36 +08:00
Daniel Golle
b076023aed
kernel: add menuconfig entry for kernel CONFIG_CGROUP_NET_CLASSID
It was removed from target defaults though it didn't exist in the
build-systems kernel configuration options. Add it there.

Fixes: d1a8217d87 ("kernel: clean-up build-configurable kernel config symbols")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-08-03 00:25:48 +08:00
Daniel Golle
34e28b29a0
kernel: clean-up build-configurable kernel config symbols
Don't explicitely disable options in target/linux/generic/config-* if
they are already controlled in config/Config-kernel.in.
Add a bunch of new symbols  and prepare defaults for using only unified
hierarchy (ie. cgroup2). Update symbol dependencies while at it

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-08-03 00:25:11 +08:00
CN_SZTL
876540ebc1
config/images: enable console by default 2020-07-25 00:06:47 +08:00
Hauke Mehrtens
a76f4760b1
build: Remove dependency of user space stack cookies from kernel
Currently the user space stack cookies work well also when the kernel
stack cookies are not activated. This is handled completely in user
space and does not need kernel support.

This dependency was probably needed some years ago when the libc did not
support stack cookies.

Reviewed-by: Ian Cooper <iancooper@hotmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-24 20:00:50 +08:00
AmadeusGhost
9bfbdcb765 Merge Lean's source 2020-06-28 17:50:37 +08:00
Javier Marcet
7e9a5bc399 kernel: rename CONFIG_NETPRIO_CGROUP to CONFIG_CGROUP_NET_PRIO
This has been changed in kernel 3.14.

Signed-off-by: Javier Marcet <javier@marcet.info>
2020-06-27 12:38:01 +08:00
coolsnowwolf
378ca0f03e x64: add EFI Image boot from emmc SSD support 2020-06-23 23:44:27 +08:00
Ian Cooper
6ca48b8591 toolchain: remove gcc libssp and use libc variant
Removes the standalone implementation of stack smashing protection
in gcc's libssp in favour of the native implementation available
in glibc and uclibc. Musl libc already uses its native ssp, so this
patch does not affect musl-based toolchains.

Stack smashing protection configuration options are now uniform
across all supported libc variants.

This also makes kernel-level stack smashing protection available
for x86_64 and i386 builds using non-musl libc.

Signed-off-by: Ian Cooper <iancooper@hotmail.com>
2020-06-18 08:06:20 +08:00
AmadeusGhost
ed025d9baa config: enable ext4 rootfs and gzip
Also disable for x86 by default
2020-04-01 16:08:54 +08:00
AmadeusGhost
8ba4d0d346 bcm27xx: fix error patch
This commit fix efc4ae1
2020-03-11 08:28:42 +08:00
AmadeusGhost
c024328960 config-4.19: refresh default config
This commit revert 'config: refresh default config for Raspberry Pi',
and enable ext4 rootfs for target_bcm27xx.
2020-03-05 17:53:53 +08:00
CN_SZTL
14609a8f8a
Merge Lean's source 2020-02-21 02:50:38 +08:00
coolsnowwolf
9f8000a6d6 sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
CN_SZTL
25a9d6c304
Merge Lean's source 2020-02-18 13:05:42 +08:00
AmadeusGhost
dcc9b1d8f7
bcm27xx: fix wireless dependence (#3161) 2020-02-18 12:15:28 +08:00
CN_SZTL
6be9370273
Merge Lean's source 2020-02-17 11:21:21 +08:00
AmadeusGhost
61341499df
brcm2708: rename target to bcm27xx (#3098)
Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-02-17 10:36:14 +08:00
coolsnowwolf
0653ca192e disable ipkg sign check 2020-02-04 00:34:50 +08:00
CN_SZTL
5893c0d03c
Merge Lean's source 2020-02-03 14:13:23 +08:00
coolsnowwolf
ecea39f109 Revert "files: sync from openwrt v19.07 (#2690)"
This reverts commit 2289184a62.
2020-02-03 12:33:25 +08:00
CN_SZTL
951a74ad69
opkg: bump to latest git HEAD (#2914)
* opkg: bump to latest git HEAD

Signed-off-by: CN_SZTL <cnsztl@gmail.com>

* config: add option for opkg
2020-02-03 12:00:39 +08:00
CN_SZTL
e6abd4e3ba
Merge Lean's source 2020-02-01 17:10:56 +08:00
AmadeusGhost
2289184a62
files: sync from openwrt v19.07 (#2690) 2020-02-01 16:50:37 +08:00
CN_SZTL
be84b7e4ef
config: fix libcxx settings 2020-01-27 22:06:40 +08:00
LEAN-ESX
6c5dcf4fb8 buildsystem: Make PIE ASLR option tristate 2020-01-17 10:55:30 -08:00
CN_SZTL
c6fe53a995
buildsystem: Make PIE ASLR option tristate 2020-01-15 02:00:14 +08:00
CN_SZTL
83e1c33c6b
Merge Lean's source 2020-01-13 13:02:30 +08:00
AmadeusGhost
5e942cf804 update some packages to latest version (#2760) 2020-01-13 09:47:13 +08:00
CN_SZTL
cf62f3f2b2
Merge Lean's source 2019-10-29 12:46:36 +08:00
LEAN-ESX
4d696d393e ipq40xx: Qualcomm HW Crypto Engine fixes 2019-10-28 21:23:00 -07:00
LEAN-ESX
b6c3b13659 kernel: default disable KERNEL_NAMESPACES to reduce kernel size 2019-10-28 19:47:55 -07:00
CN_SZTL
46fba6cc69
Merge Lean's source 2019-10-26 21:00:31 +08:00
coolsnowwolf
586ff91baa
Update Config-kernel.in 2019-10-26 17:49:48 +08:00
CN_SZTL
f3aa0eac48
Merge Lean's source 2019-10-26 07:44:31 +08:00
coolsnowwolf
a27bc59099
Update Config-kernel.in 2019-10-26 01:15:00 +08:00
CN_SZTL
e0bca8c036
Merge https://github.com/coolsnowwolf/lede into dev 2019-10-21 13:22:31 +08:00