forked from mpe/ci-scripts
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
132 changed files
with
18,230 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ There are images for various toolchains, they are encoded in the distro name/ver | |
- `[email protected]`: Ubuntu 20.04, gcc 9.4.0, binutils 2.34 | ||
- `[email protected]`: Ubuntu 18.04, gcc 7.5.0, binutils 2.30 | ||
- `[email protected]`: Ubuntu 16.04, gcc 5.4.0, binutils 2.26.1 | ||
- `fedora@39`: Fedora 39, gcc 13.2.1, binutils 2.40-14, clang 17.0.6 | ||
- `fedora@38`: Fedora 38, gcc 12.2.1, binutils 2.39-3, clang 16.0.2 | ||
- `fedora@37`: Fedora 37, gcc 12.2.1, binutils 2.38-5, clang 15.0.7 | ||
- `fedora@36`: Fedora 36, gcc 12.1.1, binutils 2.37-7, clang 14.0.5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
all: help | ||
|
||
export FEDORA_LATEST := 38 | ||
export FEDORA_LATEST := 39 | ||
|
||
x86 = $(filter x86_64,$(shell uname -m)) | ||
isa_3 = $(filter arch_3_00,$(shell LD_SHOW_AUXV=1 /bin/true)) | ||
|
@@ -16,14 +16,14 @@ endif | |
|
||
UBUNTU_DISTROS += [email protected] [email protected] [email protected] ubuntu | ||
|
||
FEDORA_DISTROS := fedora@${FEDORA_LATEST} fedora@37 fedora@36 fedora@35 fedora@34 fedora@33 fedora@31 fedora | ||
FEDORA_DISTROS := fedora@${FEDORA_LATEST} fedora@38 fedora@37 fedora@36 fedora@35 fedora@34 fedora@33 fedora@31 fedora | ||
KORG_DISTROS := [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] | ||
ALL_DISTROS := ${UBUNTU_DISTROS} ${KORG_DISTROS} ${FEDORA_DISTROS} | ||
DOCS_DISTRO := docs@${UBUNTU_LATEST} | ||
X86_DISTROS := ubuntu@${UBUNTU_LATEST} ubuntu | ||
ALIAS_DISTROS := ubuntu ubuntu-allcross fedora | ||
ALLCROSS_DISTROS := ubuntu-allcross@${UBUNTU_LATEST} ubuntu-allcross | ||
ALL_ARCHES := alpha arm arm64 i686 m68k mips mips64 riscv s390 sh sparc x86_64 | ||
ALIAS_DISTROS := ubuntu allcross fedora | ||
ALLCROSS_DISTROS := allcross@sid allcross | ||
ALL_ARCHES := alpha arc arm arm64 i686 m68k mips mips64 parisc riscv s390 sh sparc x86_64 | ||
SUBARCHES := ppc64le ppc64 ppc | ||
|
||
VERSION: | ||
|
@@ -32,7 +32,7 @@ VERSION: | |
define MAIN_TEMPLATE = | ||
image@${1}@${2} rebuild-image@${1}@${2}: VERSION | ||
|
||
image@${1}@${2} rebuild-image@${1}@${2} pull-image@${1}@${2} push-image@${1}@${2}: | ||
image@${1}@${2} rebuild-image@${1}@${2} pull-image@${1}@${2} push-image@${1}@${2} pull-base-image@${1}@${2}: | ||
@./scripts/image.sh $$@ | ||
|
||
clean@${1}@${2}: | ||
|
@@ -43,6 +43,7 @@ IMAGES += image@${1}@${2} | |
PULL_IMAGES += pull-image@${1}@${2} | ||
REBUILD_IMAGES += rebuild-image@${1}@${2} | ||
PUSH_IMAGES += push-image@${1}@${2} | ||
PULL_BASE_IMAGES += pull-base-image@${1}@${2} | ||
endef | ||
|
||
define KERNEL_TEMPLATE = | ||
|
@@ -52,6 +53,9 @@ kernel@${1}@${2}: image@${1}@${2} | |
clean-kernel@${1}@${2}: | ||
@./scripts/clean.sh $$@ | ||
|
||
prune-kernel@${1}@${2}: | ||
@./scripts/prune.sh $$@ | ||
|
||
KERNEL += $(if $(filter-out ${ALIAS_DISTROS},${2}), kernel@${1}@${2}) | ||
endef | ||
|
||
|
@@ -62,6 +66,9 @@ ppctests@${1}@${2} selftests@${1}@${2}: image@${1}@${2} | |
clean-selftests@${1}@${2}: | ||
@./scripts/clean.sh $$@ | ||
|
||
prune-selftests@${1}@${2}: | ||
@./scripts/prune.sh $$@ | ||
|
||
PPCTESTS += $(if $(filter-out ${ALIAS_DISTROS},${2}), ppctests@${1}@${2}) | ||
SELFTESTS += $(if $(filter-out ${ALIAS_DISTROS},${2}), selftests@${1}@${2}) | ||
endef | ||
|
@@ -141,9 +148,10 @@ images: ${IMAGES} | |
pull-images: ${PULL_IMAGES} | ||
rebuild-images: ${REBUILD_IMAGES} | ||
push-images: ${PUSH_IMAGES} | ||
pull-base-images: ${PULL_BASE_IMAGES} | ||
docs: ${DOCS} | ||
|
||
ALL_TARGETS = ${KERNEL} ${PPCTESTS} ${SELFTESTS} ${IMAGES} ${PULL_IMAGES} ${DOCS} ${CLEAN} | ||
ALL_TARGETS = ${KERNEL} ${PPCTESTS} ${SELFTESTS} ${PERF} ${IMAGES} ${PULL_IMAGES} ${REBUILD_IMAGES} ${PUSH_IMAGES} ${PULL_BASE_IMAGES} ${DOCS} ${CLEAN} | ||
.PHONY: ${ALL_TARGETS} VERSION | ||
|
||
empty:= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
ARG from | ||
FROM ${from} | ||
ARG from | ||
|
||
RUN apt-get -q -y update && \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
apt-get -q -y install --no-install-recommends \ | ||
bc \ | ||
bison \ | ||
bsdmainutils \ | ||
bzip2 \ | ||
ca-certificates \ | ||
ccache \ | ||
cpio \ | ||
crossbuild-essential-powerpc \ | ||
gcc-multilib-powerpc-linux-gnu \ | ||
dwarves \ | ||
file \ | ||
flex \ | ||
gcc \ | ||
gcc-powerpc-linux-gnu g++-powerpc-linux-gnu \ | ||
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ | ||
gcc-alpha-linux-gnu g++-alpha-linux-gnu \ | ||
gcc-arc-linux-gnu g++-arc-linux-gnu \ | ||
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \ | ||
gcc-hppa-linux-gnu g++-hppa-linux-gnu \ | ||
gcc-i686-linux-gnu g++-i686-linux-gnu \ | ||
gcc-m68k-linux-gnu g++-m68k-linux-gnu \ | ||
gcc-mips64el-linux-gnuabi64 g++-mips64el-linux-gnuabi64 \ | ||
gcc-mipsel-linux-gnu g++-mipsel-linux-gnu \ | ||
gcc-riscv64-linux-gnu g++-riscv64-linux-gnu \ | ||
gcc-s390x-linux-gnu g++-s390x-linux-gnu \ | ||
gcc-sh4-linux-gnu g++-sh4-linux-gnu \ | ||
gcc-sparc64-linux-gnu g++-sparc64-linux-gnu \ | ||
gcc-x86-64-linux-gnu g++-x86-64-linux-gnu \ | ||
git \ | ||
kmod \ | ||
libc-dev \ | ||
libelf-dev \ | ||
libfuse-dev \ | ||
liblz4-tool \ | ||
libssl-dev \ | ||
lzop \ | ||
make \ | ||
openssl \ | ||
python3 \ | ||
python3-dev \ | ||
u-boot-tools \ | ||
rename \ | ||
rsync \ | ||
sparse \ | ||
xz-utils && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/packages.sh /var/cache/* /var/log/dpkg.log | ||
|
||
ARG uid | ||
ARG gid | ||
|
||
RUN groupadd --gid $gid linuxppc | ||
RUN useradd --uid $uid --gid $gid linuxppc | ||
USER linuxppc | ||
|
||
COPY scripts/container-build.sh /bin/container-build.sh | ||
COPY VERSION /VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
if [[ -z "$1" ]]; then | ||
echo "Usage: $0 <target>" >&2 | ||
exit 1 | ||
fi | ||
|
||
dir="$(dirname "$0")" | ||
script_base="$(realpath "$dir")" | ||
. "$script_base/lib.sh" | ||
|
||
IFS=@ read -r task subarch distro version <<< "$1" | ||
|
||
output_dir=$(get_output_dir "$script_base" "$subarch" "$distro" "$version" "$task" "$DEFCONFIG" "$TARGETS" "$CLANG") | ||
|
||
case "$task" in | ||
prune-kernel) | ||
if [[ ! -e "$output_dir/Makefile" ]]; then | ||
# Assume it's already been pruned | ||
exit 0 | ||
fi | ||
|
||
echo "Pruning non-outputs in $output_dir" | ||
|
||
set -euo pipefail | ||
cd "$output_dir" | ||
mkdir -p "artifacts" | ||
for path in .config vmlinux System.map arch/powerpc/boot/zImage include/config/kernel.release \ | ||
arch/powerpc/kernel/asm-offsets.s arch/powerpc/boot/uImage modules.tar.bz2 \ | ||
sparse.log log.txt | ||
do | ||
if [[ -e "$path" ]]; then | ||
mv "$path" artifacts/ | ||
fi | ||
done | ||
find . -not -path "./artifacts*" -delete | ||
mv artifacts/.config config | ||
mv artifacts/* . | ||
rmdir artifacts | ||
;; | ||
prune-selftests) | ||
if [[ ! -e "$output_dir/kselftest" ]]; then | ||
# Assume it's already been pruned | ||
exit 0 | ||
fi | ||
|
||
echo "Pruning non-outputs in $output_dir" | ||
|
||
set -euo pipefail | ||
cd "$output_dir" | ||
if [[ -d install ]]; then | ||
mv install selftests | ||
tar -czf selftests.tar.gz selftests | ||
fi | ||
find . -not -path "./selftests.tar.gz" -delete | ||
;; | ||
*) | ||
(set -x ; rm -rf "$output_dir") | ||
;; | ||
esac |
Oops, something went wrong.