Commit Graph

150 Commits

Author SHA1 Message Date
Khem Raj
febd004e6b klibc: Fix build with kernel 5.19 headers
Backport relevant patch.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-19 00:03:59 -07:00
Khem Raj
8204ee52de klibc: Upgrade to 2.0.10
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-10 08:48:30 -07:00
Yi Zhao
ee4b6b2113 grubby: fix syntax for ALTERNATIVE
ALTERNATIVE_${PN} -> ALTERNATIVE:${PN}

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-06-30 13:39:27 -04:00
Khem Raj
cafbd12a64 ubi-utils-klibc: Disable lzo compression by default
This is still available if needed, however its obsolete and lzo has been
removed from oe-core, if needed add meta-oe to layer mix and enable this
in packageconfigs

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-05-28 10:51:07 -07:00
Khem Raj
6a52b84dbc klibc: Recognise --dyld-prefix clang option
This is added when usrmerge is enabled in distro

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-25 10:44:14 -07:00
Yi Zhao
fcdafe933c dracut: upgrade 055 -> 056
* Add a patch to fix musl build:
  src/install/util.c:30:19: error: missing binary operator before token "("
     30 | #if __GLIBC_PREREQ(2, 30) == 0
        |                   ^
  make: *** [Makefile:57: src/install/util.o] Error 1

* Pass "-fPIC" to CFLAGS to fix build warning with musl build:
  WARNING: dracut-1_056-r0 do_package_qa: QA Issue: dracut: ELF binary
  /usr/lib/dracut/dracut-install has relocations in .text [textrel]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-06 20:25:33 -04:00
Khem Raj
42f365246d recipes: Update LICENSE variable to use SPDX license identifiers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-04 17:41:45 -08:00
Khem Raj
f2df270179 recipes: Use new CVE_CHECK_IGNORE variable
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-21 18:12:04 -08:00
Yi Zhao
b639c25d9a dracut: upgrade 051 -> 055
* Rename recipe name from dracut_git to dracut_055
* Refresh 0001-util.h-include-sys-reg.h-when-libc-glibc.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-18 09:01:51 -08:00
Hongxu Jia
0e93a3d7ee grubby: fix conflict with debianutils
Both of recipe grubby and debianutils provides installkernel,
use update-alternative to resolve the conflict

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-11 17:51:55 -08:00
Richard Purdie
b402a3076f recipes: Update SRC_URI branch and protocols
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:49 -07:00
Martin Jansa
c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
hayashi.satoshi@fujitsu.com
9aabe2b4ee dracut: add CVE-2010-4176 to allowlist
CVE-2010-4176 affects only using plymouth-pretrigger.sh script on Fedora.

Signed-off-by: Satoshi Hayashi <hayashi.satoshi@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-06-15 08:48:50 -07:00
Khem Raj
aac5dfe6dd klibc: Add clang's -rtlib to known options
This helps in ensuring that we always link klibc apps with libgcc as
compiler-rt does not work for klibc due to missing libssp functions e.g.
__stack_chk_guard and __stack_chk_guard which it expects in libc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2021-06-10 19:43:02 -07:00
Khem Raj
98bad06526 klibc: Fix x86_64 build with binutils 2.36+
this patch is already on klibc mailing list

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2021-02-07 00:14:59 -08:00
Khem Raj
b178b1a11d ubi-utils-klibc: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2021-02-06 11:16:23 -08:00
Khem Raj
16dd9dfe3f klibc: Upgrade to 2.0.8 release
Adjust klcc to work with clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2021-02-04 23:46:45 -08:00
Yi Zhao
419f7e31f5 dracut: upgrade 049 -> 051
Drop the following patches which have been merged upstream:
  0001-dracut.sh-improve-udevdir.patch
  0001-set-viriable-_drv-not-local.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-01-04 14:48:29 -08:00
Khem Raj
fdf7bd0de2 ubi-utils-klibc: Remove trailing slash from S
This slash is redundant and removing it could help pseudo maintain its database

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-10-13 11:37:35 -07:00
Khem Raj
000c6a181e klibc: Compile with -fcommon
gcc 10 defaults to -fno-common, but klibc does not build with
-fno-common, it will need some work to get there, until then use
-fcommon explicitly

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-13 22:32:07 -07:00
Khem Raj
bd2ad24d7b recipes: Make powerpc64le overrides
The existing conditions for ppc64/be are applicable for le as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-19 02:20:59 -08:00
Khem Raj
69bc6ff2fb klibc: Apply -no-integrated-as on mips/clang
Fixes build error

| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux-musl/klibc/2.0.7-r0/klibc-2.0.7/usr/klibc/syscalls.pl: usr/klib
c/syscalls/typesize.bin: magic number not found

...

| usr/klibc/sigsuspend.c:8:10: fatal error: 'klibc/havesyscall.h' file not found
| #include <klibc/havesyscall.h>
|          ^~~~~~~~~~~~~~~~~~~~~
| 1 error generated.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2019-12-14 21:10:18 -08:00
Adrian Bunk
5a4d3da0c5 klibc: Upgrade 2.0.6 -> 2.0.7
Patches applied upstream removed.

Use the release tarball.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-10-28 15:26:42 -07:00
Khem Raj
ab3072ee4c klibc: Fix build with 5.2+ kernel headers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-09-03 16:02:03 -07:00
Changqing Li
00582ff496 grubby: support usrmerge
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-08-30 06:45:52 -07:00
Khem Raj
38f6350def grubby: Add bash to rdeps
Fixes
ERROR: QA Issue: /sbin/new-kernel-pkg contained in package grubby requires /bin/bash, but no providers found in RDEPENDS_grubby? [file-rdeps]

I wonder if new-kernel-pkg should be packaged at all, but dracut might
need to be cleaned first to not need it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-08-17 12:41:58 -07:00
Khem Raj
806fbbf817 klibc: Disable bcmp builtin for clang on glibc as well
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-08-17 12:20:48 -07:00
Khem Raj
11bc2775af klibc: Pass -fno-builtin-bcmp with musl/clang combo
clang would emit bcmp built-in for musl bases system
but here we do not link in musl C library, so its best
to disable it

Fixes
git/usr/klibc/memmem.c:38: undefined reference to `bcmp'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2019-08-08 10:01:45 -07:00
Khem Raj
3c5db8fc61 klcc-cross: Recognise --unwindlib clang option
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2019-08-03 12:31:16 -07:00
Hongxu Jia
4d45ebe7ad dracut: fix generated initramfs boot failure under bash 5
If shebang is set to /bin/sh and /bin/sh is a symlink to /bin/bash,
bash turn on posix mode.

Since bash is upgraded to 5.0, it follows 'IEEE 1003.2 POSIX Shell
Standard', to implement 'functions do not have local traps or options,
and it is not possible to define local variables'

For more detail, see variables.c:push_posix_temp_var in the following commit
http://git.savannah.gnu.org/cgit/bash.git/commit/?id=d233b485e83c3a784b803fb894280773f16f2deb

The IEEE 1003.2 POSIX Shell Standard:
https://www.cs.ait.ac.th/~on/O/oreilly/unix/ksh/appa_02.htm

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-06-21 06:22:19 -07:00
Hongxu Jia
9fce979252 dracut: fix udevdir not found
In commit [9d1b81c dracut.sh: improve udevdir and systemdutildir
fallback logic], it checked a common binary `collect' to localte
udevdir.

While upgrading systemd to 241, it dropped binary `collect'.
[a168792c2d]

So check binary `ata_id' to instead.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-04-06 08:22:22 -07:00
Khem Raj
9d8943fd2e klibc: Upgrade to 2.0.6 release
Drop staging related patches which are not needed anymore

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2019-03-14 07:24:03 -07:00
André Draszik
88f2b979ca meta-initramfs: remove True option to getVar calls (again)
A couple have still been missed in the past despite multiple
attempts at doing so (or simply have re-appeared?).

Search & replace made using the following command:
    sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \
        -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \
             | cut -d':' -f1 \
             | sort -u)

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-01-13 10:28:01 -08:00
Khem Raj
2a3c90d2ab klibc: Fix build with clang
Newer versions of clang optimize the calls to use unlocked variants of
these functions

Fixes
| capabilities.c:(.text+0xb4): undefined reference to `fread_unlocked'
| arm-yoe-linux-gnueabi-ld.bfd: capabilities.c:(.text+0x11a): undefined
reference to `fwrite_unlocked'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2018-12-09 16:53:16 -08:00
Andrea Adami
981aa87a23 klibc: fix build for mipsel and mips64el with security flags enabled
Fix relocations like:
| mipsel-oe-linux-musl-ld.bfd: usr/klibc/libc.a(kill.o):
 relocation R_MIPS_26 against `__syscall_common' can not be used when making a shared object; recompile with -fPIC

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-04 17:51:35 -08:00
Hong Liu
d6bd1edc2b dracut: 048->049
Upgrade dracut from 048 to 049.

Signed-off-by: Hong Liu <hongl.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-10-16 21:23:47 -07:00
Andrea Adami
aa19346e44 klibc-static-utils: really fix build for x86 with security flags enabled
There were some shared binaries built together with the static ones and this
was leading to the infamous:

 i586-oe-linux-musl-ld.bfd: discarded output section: `.got.plt'

Fix this by purging the Kbuild files.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-10-10 08:49:36 -07:00
Andrea Adami
db89a0df16 klibc.inc: lazy assign GCCPIE in case security_flags.inc was not included
fix build error (GCCPIE is unset):

EXTRA_KLIBCAFLAGS=${SECURITY_CFLAGS} -Wa,--noexecstack
EXTRA_KLIBCLDFLAGS=${@-z relro -z now -pie if  else } -z noexecstack
| make: invalid option -- 'z'
| make: invalid option -- ' '

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-25 22:24:15 -07:00
Andrea Adami
94f4f52101 klibc-utils: remove the two static binaries (kinit and gzip)
The shared utils can be built with security flags enabled.
This breaks however build of kinit and gzipm both static.

Remove them from this recipe.

Fix QA Issue:
 'klibc-utils-gzip/bin/gzip' has relocations in .text [textrel]
 'klibc-utils-kinit/bin/kinit' has relocations in .text [textrel]

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-17 22:21:42 -07:00
Andrea Adami
ed34bf11ab klibc-static-utils: fix textrel, disable security flags for the static utils
Fix
WARNING: klibc-static-utils-2.0.4-r0 do_package_qa:
 QA Issue: ELF binary 'X' has relocations in .text [textrel]

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-17 22:21:36 -07:00
Andrea Adami
a06c29be2f klibc: fix build with GCC and -pie for mips, mips64, aarch64
The MCONFIG makefiles for mips/mips64 do disable pic so we do not insist
linking it with -pie.

For aarch64 we have to readd the -Os optimization to avoid

 | usr/dash/shell.h:103:25: error:
 '-mgeneral-regs-only' is incompatible with floating-point argument

as committed (c296fb707a klibc: Pass Optimization with KLIBCOPTFLAGS)
but reverted (76bc58e932 klibc: Fix build with security flags) trying to
fix the i386 build (see ld.bfd: discarded output section: `.got.plt').
This latter issue was fixed for i386 passing -pie to the linker.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-15 07:37:11 -07:00
Andrea Adami
a95dde2868 klibc: fix build on i386 with GCC and security flags enabled
ld fails if distro's security-flags are enabled:
Inject the SECURITY_XFLAGS if security_flags.inc was included.

Fix on i386: ld: discarded output section: `.got.plt'

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-15 07:36:21 -07:00
Khem Raj
76bc58e932 klibc: Fix build with security flags
Drop -Os which is also causing the relro
Fixes
| x86_64-bec-linux-musl-ld.bfd: discarded output section: `.got.plt'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2018-09-11 22:48:21 -07:00
Khem Raj
77922f115a klcc-cross: Recognise clang options
Let klcc understand '-no-integrated-as' which is a clang option used by
meta-clang for compiler defaults

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
2018-09-09 22:50:06 -07:00
Andrea Adami
641dff9768 klibc_2.0.4: add kexec_file_load() and getrandom() syscalls
Needed by kexec-tools afer 2.0.17

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-05 13:59:15 -07:00
Yi Zhao
1dcc5981c6 dracut: upgrade 047 -> 048
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-26 20:10:07 -07:00
Yi Zhao
d9bb8adedd dracut: upgrade 046 -> 047
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-06-27 22:17:32 -07:00
Andrea Adami
792cd222c4 ubi-utils-klibc_2.0.2: upgrade to git rev 64f61a9
-Incorporate 3 small after-relase fixes
 -Fix typos in patch comments (Upstream-Status)
 -Remove patch enumeration from Subject line

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-30 09:58:02 -07:00
Andrea Adami
9f38fa5ae1 ubi-utils-klibc: update from v. 1.5.2 to 2.0.2
Update to new version and drop accepted patches.
Use autotools and packageconfig (for xattrs).

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-26 21:10:55 -07:00
Trevor Woerner
9b08b7af9e grubby: update to latest
This project doesn't seem to produce regular releases as they once did, the
last such release (8.40-1) was in 2015 (over 3 years ago at this point).
Therefore switch to building the latest git commit.

Also, refresh the patches as required (used devtool --force-patch-refresh).

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-05-17 08:20:48 -07:00