File tree Expand file tree Collapse file tree 4 files changed +23
-16
lines changed
projects/sound-open-firmware Expand file tree Collapse file tree 4 files changed +23
-16
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,20 @@ FROM gcr.io/oss-fuzz-base/base-builder
23
23
# Base packages
24
24
RUN apt-get -y update && apt-get -y install \
25
25
gettext git libc6-dev-i386 libglib2.0-dev libncurses5-dev \
26
- libtool ninja-build python3-pip
26
+ libtool ninja-build software-properties-common
27
+
28
+ # Installing Python3.10 and using it instead of the default Python taken from the base-builder image
29
+ # as Zephyr requires >=3.10 and base has 3.8
30
+ RUN add-apt-repository ppa:deadsnakes/ppa && \
31
+ apt-get update && \
32
+ apt-get install -y python3.10 python3.10-distutils python3.10-venv && \
33
+ ln --force -s /usr/bin/python3.10 /usr/bin/python3
34
+
35
+ # Ensure python that was just installed gets precedence over
36
+ # the one already installed in /usr/local/bin
37
+ ENV PATH="/usr/bin/:${PATH}"
38
+
39
+ RUN python3 -m ensurepip --upgrade
27
40
RUN python3 -m pip install --upgrade pip
28
41
RUN pip3 install west
29
42
@@ -68,6 +81,6 @@ RUN cd $SRC; touch empty.c; gcc -m32 -c empty.c; ar rs /usr/lib32/libstdc++.a em
68
81
# If a user is mounting their local source directory for debugging
69
82
# then we need to tell git to chill out and just take the repo. If we
70
83
# don't west fails with bogus error messages.
71
- RUN git config --global --add safe.directory /src /sof_workspace/zephyr
84
+ RUN git config --global --add safe.directory $SRC /sof_workspace/zephyr
72
85
73
86
COPY build.sh $SRC/
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ unset CXXFLAGS
32
32
33
33
cd $SRC /sof_workspace
34
34
35
- sof/scripts/fuzz.sh -b -- - DEXTRA_CONF_FILE=stub_build_all_ipc3.conf
35
+ sof/scripts/fuzz.sh -b -s $SANITIZER -a $ARCHITECTURE -- - DEXTRA_CONF_FILE=stub_build_all_ipc3.conf -DEXTRA_CFLAGS= " -fno-sanitize-recover=all "
36
36
cp build-fuzz/zephyr/zephyr.exe $OUT /sof-ipc3
37
37
38
- sof/scripts/fuzz.sh -b -- - DEXTRA_CONF_FILE=stub_build_all_ipc4.conf
38
+ sof/scripts/fuzz.sh -b -s $SANITIZER -a $ARCHITECTURE -- - DEXTRA_CONF_FILE=stub_build_all_ipc4.conf -DEXTRA_CFLAGS= " -fno-sanitize-recover=all "
39
39
cp build-fuzz/zephyr/zephyr.exe $OUT /sof-ipc4
Original file line number Diff line number Diff line change 15
15
#
16
16
# ###############################################################################
17
17
18
- # Zephyr doesn't provide a "latest" link, so clone the source tree
19
- # that produces the SDK (much smaller than the tarball itself, so
20
- # minimal overhead) and find the latest version tag as a proxy. Will
21
- # likely break if the script is run in the moments between tagging a
22
- # release and the tarball appearing on github, but the risk is low and
23
- # it will recover with a retry.
18
+ # use the github API to fetch the latest stable SDK with assets
24
19
25
- git clone --filter=tree:0 https://github.com/zephyrproject-rtos/sdk-ng
20
+ RELEASES=$( curl -L -H " Accept: application/vnd.github+json" -H " X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/zephyrproject-rtos/sdk-ng/releases)
21
+ SDK=$( jq ' [.[] | select(.prerelease == false) | {tag: .tag_name, assets: .assets[] | select(.name | contains("linux-x86_64_minimal.tar.xz"))}] | .[0]' <<< $RELEASES )
26
22
27
- VER=$( git -C sdk-ng tag -l ' v*' | sort -rV | head -1 | sed ' s/v//' )
28
- URL=" https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$VER /zephyr-sdk-${VER} _linux-x86_64_minimal.tar.xz"
29
-
30
- curl -L -o sdk.tar.xz " $URL "
23
+ curl -L -o sdk.tar.xz $( jq -r ' .assets.browser_download_url' <<< $SDK )
31
24
tar xf sdk.tar.xz
32
25
rm sdk.tar.xz
33
26
34
- zephyr-sdk-$VER /setup.sh -h
27
+ zephyr-sdk-$( jq -r " .tag " <<< $SDK | tr -d ' v ' ) /setup.sh -h
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ fuzzing_engines:
15
15
- libfuzzer
16
16
sanitizers :
17
17
- address
18
+ - undefined
18
19
architectures :
19
20
- i386
20
21
main_repo : " https://github.com/thesofproject/sof"
You can’t perform that action at this time.
0 commit comments