Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
From 9db789b4498d4130450e988757914c03e42b40f5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 19 Jun 2023 18:33:36 -0700
|
||||
Subject: [PATCH] executor: Include missing linux/falloc.h
|
||||
|
||||
Its needed for FALLOC_FL_ZERO_RANGE which needs this header, it works
|
||||
with glibc because fcntl.h includes this header indirectly, however the
|
||||
failure comes to fore with musl C library where this header is not
|
||||
included indirectly by other system headers, therefore include it as
|
||||
required.
|
||||
|
||||
Fixes
|
||||
In file included from executor/common.h:505:
|
||||
executor/common_linux.h:5604:16: error: use of undeclared identifier 'FALLOC_FL_ZERO_RANGE'
|
||||
fallocate(fd, FALLOC_FL_ZERO_RANGE, 0, SWAP_FILE_SIZE);
|
||||
^
|
||||
Upstream-Status: Submitted [https://github.com/google/syzkaller/pull/3974]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
executor/common_linux.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/executor/common_linux.h b/executor/common_linux.h
|
||||
index d5152e058..9ae3fb159 100644
|
||||
--- a/executor/common_linux.h
|
||||
+++ b/executor/common_linux.h
|
||||
@@ -5585,6 +5585,7 @@ static long syz_pkey_set(volatile long pkey, volatile long val)
|
||||
#include <sys/stat.h>
|
||||
#include <sys/swap.h>
|
||||
#include <sys/types.h>
|
||||
+#include <linux/falloc.h>
|
||||
|
||||
#define SWAP_FILE "./swap-file"
|
||||
#define SWAP_FILE_SIZE (128 * 1000 * 1000) // 128 MB.
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From aca1030d29f627314d13884ebc7b2c313d718df7 Mon Sep 17 00:00:00 2001
|
||||
From: Ovidiu Panait <ovidiu.panait@windriver.com>
|
||||
Date: Wed, 13 Apr 2022 17:17:54 +0300
|
||||
Subject: [PATCH] sys/targets/targets.go: allow users to override hardcoded
|
||||
cross-compilers
|
||||
|
||||
Currently, cross compiler names are hardcoded for each os/arch combo. However,
|
||||
toolchain tuples differ, especially when using vendor provided toolchains.
|
||||
Allow users to specify the cross compiler for an os/arch combo using
|
||||
SYZ_CC_<os>_<arch> environment variables.
|
||||
|
||||
Also, remove hardcoded "-march=armv6" flag to fix compilation on arm.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
|
||||
---
|
||||
sys/targets/targets.go | 19 +++++++++++--------
|
||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/sys/targets/targets.go
|
||||
+++ b/sys/targets/targets.go
|
||||
@@ -262,7 +262,6 @@ var List = map[string]map[string]*Target
|
||||
PtrSize: 4,
|
||||
PageSize: 4 << 10,
|
||||
LittleEndian: true,
|
||||
- CFlags: []string{"-D__LINUX_ARM_ARCH__=6", "-march=armv6"},
|
||||
Triple: "arm-linux-gnueabi",
|
||||
KernelArch: "arm",
|
||||
KernelHeaderArch: "arm",
|
||||
@@ -700,12 +699,16 @@ func initTarget(target *Target, OS, arch
|
||||
for i := range target.CFlags {
|
||||
target.replaceSourceDir(&target.CFlags[i], sourceDir)
|
||||
}
|
||||
- if OS == Linux && arch == runtime.GOARCH {
|
||||
- // Don't use cross-compiler for native compilation, there are cases when this does not work:
|
||||
- // https://github.com/google/syzkaller/pull/619
|
||||
- // https://github.com/google/syzkaller/issues/387
|
||||
- // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56
|
||||
- target.Triple = ""
|
||||
+ if OS == Linux {
|
||||
+ if cc := os.Getenv("SYZ_CC_" + OS + "_" + arch); cc != "" {
|
||||
+ target.CCompiler = cc
|
||||
+ } else if arch == runtime.GOARCH {
|
||||
+ // Don't use cross-compiler for native compilation, there are cases when this does not work:
|
||||
+ // https://github.com/google/syzkaller/pull/619
|
||||
+ // https://github.com/google/syzkaller/issues/387
|
||||
+ // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56
|
||||
+ target.Triple = ""
|
||||
+ }
|
||||
}
|
||||
if target.CCompiler == "" {
|
||||
target.setCompiler(useClang)
|
||||
@@ -839,7 +842,7 @@ func (target *Target) lazyInit() {
|
||||
// On CI we want to fail loudly if cross-compilation breaks.
|
||||
// Also fail if SOURCEDIR_GOOS is set b/c in that case user probably assumes it will work.
|
||||
if (target.OS != runtime.GOOS || !runningOnCI) && getSourceDir(target) == "" {
|
||||
- if _, err := exec.LookPath(target.CCompiler); err != nil {
|
||||
+ if _, err := exec.LookPath(strings.Fields(target.CCompiler)[0]); err != nil {
|
||||
target.BrokenCompiler = fmt.Sprintf("%v is missing (%v)", target.CCompiler, err)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
DESCRIPTION = "syzkaller is an unsupervised coverage-guided kernel fuzzer"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=5335066555b14d832335aa4660d6c376"
|
||||
|
||||
inherit go-mod
|
||||
|
||||
GO_IMPORT = "github.com/google/syzkaller"
|
||||
|
||||
SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IMPORT};branch=master \
|
||||
file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \
|
||||
file://0001-executor-Include-missing-linux-falloc.h.patch;patchdir=src/${GO_IMPORT} \
|
||||
"
|
||||
SRCREV = "25905f5d0a2a7883bd33491997556193582c6059"
|
||||
|
||||
export GOPROXY = "https://proxy.golang.org,direct"
|
||||
# Workaround for network access issue during compile step.
|
||||
# This needs to be fixed in the recipes buildsystem so that
|
||||
# it can be accomplished during do_fetch task.
|
||||
do_compile[network] = "1"
|
||||
|
||||
COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux"
|
||||
|
||||
B = "${S}/src/${GO_IMPORT}/bin"
|
||||
|
||||
GO_EXTRA_LDFLAGS += ' -X ${GO_IMPORT}/prog.GitRevision=${SRCREV}'
|
||||
|
||||
export GOHOSTFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
|
||||
export GOTARGETFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
|
||||
export TARGETOS = '${GOOS}'
|
||||
export TARGETARCH = '${GOARCH}'
|
||||
export TARGETVMARCH = '${GOARCH}'
|
||||
|
||||
CGO_ENABLED = "1"
|
||||
|
||||
LDFLAGS:append:class-target = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "llvm android", " -lc++", " -lstdc++", d)}"
|
||||
|
||||
DEPENDS:class-native += "qemu-system-native"
|
||||
|
||||
do_compile:class-native() {
|
||||
export HOSTOS="${GOHOSTOS}"
|
||||
export HOSTARCH="${GOHOSTARCH}"
|
||||
|
||||
oe_runmake HOSTGO="${GO}" host
|
||||
}
|
||||
|
||||
do_compile:class-target() {
|
||||
export HOSTOS="${GOOS}"
|
||||
export HOSTARCH="${GOARCH}"
|
||||
export SYZ_CC_${TARGETOS}_${TARGETARCH}="${CC}"
|
||||
|
||||
# Unset GOOS and GOARCH so that the correct syz-sysgen binary can be
|
||||
# generated. Fixes:
|
||||
# go install: cannot install cross-compiled binaries when GOBIN is set
|
||||
unset GOOS
|
||||
unset GOARCH
|
||||
|
||||
oe_runmake GO="${GO}" CFLAGS="${CXXFLAGS} ${LDFLAGS}" REV=${SRCREV} target
|
||||
}
|
||||
|
||||
do_install:class-native() {
|
||||
SYZ_BINS_NATIVE="syz-manager syz-runtest syz-repro syz-mutate syz-prog2c \
|
||||
syz-db syz-upgrade"
|
||||
|
||||
install -d ${D}${bindir}
|
||||
|
||||
for i in ${SYZ_BINS_NATIVE}; do
|
||||
install -m 0755 ${B}/${i} ${D}${bindir}
|
||||
done
|
||||
}
|
||||
|
||||
do_install:class-target() {
|
||||
SYZ_TARGET_DIR="${TARGETOS}_${TARGETARCH}"
|
||||
SYZ_BINS_TARGET="syz-fuzzer syz-execprog syz-stress syz-executor"
|
||||
|
||||
install -d ${D}${bindir}/${SYZ_TARGET_DIR}
|
||||
|
||||
for i in ${SYZ_BINS_TARGET}; do
|
||||
install -m 0755 ${B}/${SYZ_TARGET_DIR}/${i} ${D}${bindir}/${SYZ_TARGET_DIR}
|
||||
done
|
||||
}
|
||||
|
||||
BBCLASSEXTEND += "native"
|
||||
Reference in New Issue
Block a user