diff --git a/config/aarch64/ci.toml b/config/aarch64/ci.toml index bbe0b337..76fb84db 100644 --- a/config/aarch64/ci.toml +++ b/config/aarch64/ci.toml @@ -34,6 +34,7 @@ gettext = {} git = {} # gdbserver = {} # wrong libc type # gnu-binutils = {} # bfd doesn't recognize redox +gnu-make = {} hicolor-icon-theme = {} installer = {} installer-gui = {} diff --git a/config/i586/ci.toml b/config/i586/ci.toml index 1df1e25d..8c6105c9 100644 --- a/config/i586/ci.toml +++ b/config/i586/ci.toml @@ -32,6 +32,7 @@ freefont = {} freetype2 = {} gettext = {} git = {} +gnu-make = {} hicolor-icon-theme = {} installer = {} installer-gui = {} diff --git a/config/redoxer.toml b/config/redoxer.toml index 8c50e37d..ad112df7 100644 --- a/config/redoxer.toml +++ b/config/redoxer.toml @@ -9,10 +9,12 @@ ca-certificates = {} coreutils = {} extrautils = {} findutils = {} +gnu-make = {} ion = {} netdb = {} pkgutils = {} relibc = {} +sed = {} # Override to not background dhcpd [[files]] diff --git a/config/riscv64gc/ci.toml b/config/riscv64gc/ci.toml index 694fbafa..6da302cb 100644 --- a/config/riscv64gc/ci.toml +++ b/config/riscv64gc/ci.toml @@ -32,6 +32,7 @@ freefont = {} freetype2 = {} gettext = {} git = {} +gnu-make = {} hicolor-icon-theme = {} installer = {} #installer-gui = {} # redox_syscall 0.4 not working on riscv64gc? diff --git a/podman/redox-base-containerfile b/podman/redox-base-containerfile index 525d64e1..837dd30f 100644 --- a/podman/redox-base-containerfile +++ b/podman/redox-base-containerfile @@ -31,6 +31,7 @@ RUN apt-get update \ gtk-doc-tools \ gtk-update-icon-cache \ help2man \ + ipxe-qemu \ intltool \ itstool \ libaudiofile-dev \ @@ -63,6 +64,9 @@ RUN apt-get update \ pkg-config \ po4a \ protobuf-compiler \ + qemu-system-x86 \ + qemu-system-arm \ + qemu-efi-aarch64 \ python3 \ python3-dev \ python3-mako \ diff --git a/recipes/dev/gnu-make/recipe.toml b/recipes/dev/gnu-make/recipe.toml index 7199d805..91e95a5d 100644 --- a/recipes/dev/gnu-make/recipe.toml +++ b/recipes/dev/gnu-make/recipe.toml @@ -10,9 +10,4 @@ autotools_recursive_regenerate """ [build] -template = "custom" -script = """ -DYNAMIC_INIT -rsync -av --delete "$COOKBOOK_SOURCE/." ./ -cookbook_configure -""" +template = "configure" diff --git a/recipes/dev/redoxer/recipe.toml b/recipes/dev/redoxer/recipe.toml new file mode 100644 index 00000000..5f5c2048 --- /dev/null +++ b/recipes/dev/redoxer/recipe.toml @@ -0,0 +1,6 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/redoxer" +branch = "master" + +[build] +template = "cargo" diff --git a/recipes/tests/os-test-result/recipe.toml b/recipes/tests/os-test-result/recipe.toml new file mode 100644 index 00000000..f0fded6b --- /dev/null +++ b/recipes/tests/os-test-result/recipe.toml @@ -0,0 +1,101 @@ +[source] +same_as = "../os-test" + +[build] +template = "custom" +dev-dependencies = [ + "host:redoxer", +# allows rebuilding relibc without updating prefix + "relibc", + "gnu-grep", + "libarchive", +] +script = """ +if [ "$TARGET" = "$COOKBOOK_HOST_TARGET" ]; then +# TODO: libc conflict on toolchain +export LD_LIBRARY_PATH="/lib/${GNU_TARGET}:${LD_LIBRARY_PATH}" +fi + +rsync -a "${COOKBOOK_SOURCE}/" ./ +os=$(echo "${TARGET}" | cut -d - -f3) +case "$os" in + linux) OS=Linux;; + redox) OS=Redox;; +esac + +# allows linking to relibc instead of prefix/host libc +export CC="env LIBRARY_PATH=${COOKBOOK_SYSROOT}/lib ${GNU_TARGET}-gcc" +export CFLAGS="\ +-nostdinc \ +-nostdlib \ +-isystem ${COOKBOOK_SYSROOT}/include \ +-static \ +--sysroot ${COOKBOOK_SYSROOT} \ +${COOKBOOK_SYSROOT}/lib/crt0.o \ +${COOKBOOK_SYSROOT}/lib/crti.o \ +${COOKBOOK_SYSROOT}/lib/crtn.o \ +${COOKBOOK_SYSROOT}/lib/libc.a \ +" + +make OS=${OS} CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS= \ + LDFLAGS= EXTRA_LDFLAGS= \ + CC_FOR_BUILD="${CC_WRAPPER} cc" CFLAGS_FOR_BUILD= CPPFLAGS_FOR_BUILD= \ + LDFLAGS_FOR_BUILD= -j ${COOKBOOK_MAKE_JOBS} all + +skips=( + # Skip hanging tests on Linux/Redox with relibc + basic/stdio/putc_unlocked +) + +if [ "$OS" = "Redox" ]; then +skips+=( + # Skip hanging tests on Redox with relibc + # https://gitlab.redox-os.org/redox-os/redox/-/issues/1752 + basic/sys_socket/accept + basic/sys_socket/recv + basic/sys_socket/send + basic/sys_socket/shutdown + signal/ppoll-block-close + signal/ppoll-block-close-raise + signal/ppoll-block-raise + signal/ppoll-block-sleep-raise-write + signal/ppoll-block-sleep-raise + signal/ppoll-block-sleep-write-raise +) +fi + +for skip in "${skips[@]}" +do + mkdir -p out.known/${os}/"$(dirname "${skip}")" + echo "skipped" > out.known/${os}/"${skip}.out" +done + +cp -t out -R out.known/${os} + +postinstall () { +make OS=${OS} CC_FOR_BUILD="${CC_WRAPPER} cc" \ + CFLAGS_FOR_BUILD= CPPFLAGS_FOR_BUILD= \ + LDFLAGS_FOR_BUILD= html json jsonl + + mkdir -p ${COOKBOOK_STAGE}/share/os-test + cp -a out ${COOKBOOK_STAGE}/share/os-test/out + cp -a html ${COOKBOOK_STAGE}/share/os-test/html + cp -a os-test.json ${COOKBOOK_STAGE}/share/os-test/os-test.json + cp -a os-test.jsonl ${COOKBOOK_STAGE}/share/os-test/os-test.jsonl +} + +if [ "$TARGET" = "$COOKBOOK_HOST_TARGET" ]; then + make test + postinstall +else + # bash: gnu-make crashes randomly but can continue + # issues with multi-core and make jobs + # https://gitlab.redox-os.org/redox-os/relibc/-/issues/240 + # https://gitlab.redox-os.org/redox-os/redox/-/issues/1753 + export REDOXER_QEMU_ARGS="-smp 1" + # make: jobs doesn't work yet + echo redoxer exec --folder . --folder "${COOKBOOK_SYSROOT}/usr/:/usr" --artifact out:/root/out \ + bash -c "until make test; do echo retrying; done" + postinstall +fi +"""