From 1896ea04204b8086a4f25e257dc5605e5505d768 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 4 Apr 2024 01:13:09 +0200 Subject: driver: recipe: move each recipe into a separate directory --- crates/driver/src/recipe.rs | 14 ++- examples/recipes/bar.yml | 9 -- examples/recipes/bar/build.yml | 9 ++ examples/recipes/binutils.yml | 67 -------------- examples/recipes/binutils/build.yml | 67 ++++++++++++++ examples/recipes/busybox.yml | 64 ------------- examples/recipes/busybox/build.yml | 64 +++++++++++++ examples/recipes/e2fsprogs.yml | 54 ----------- examples/recipes/e2fsprogs/build.yml | 54 +++++++++++ examples/recipes/foo.yml | 14 --- examples/recipes/foo/build.yml | 14 +++ examples/recipes/gcc-libs.yml | 32 ------- examples/recipes/gcc-libs/build.yml | 32 +++++++ examples/recipes/gcc.yml | 126 -------------------------- examples/recipes/gcc/build.yml | 126 ++++++++++++++++++++++++++ examples/recipes/glibc.yml | 68 -------------- examples/recipes/glibc/build.yml | 68 ++++++++++++++ examples/recipes/gmp.yml | 55 ----------- examples/recipes/gmp/build.yml | 55 +++++++++++ examples/recipes/image.yml | 57 ------------ examples/recipes/image/build.yml | 57 ++++++++++++ examples/recipes/libgcc-initial.yml | 52 ----------- examples/recipes/libgcc-initial/build.yml | 52 +++++++++++ examples/recipes/libgcc.yml | 32 ------- examples/recipes/libgcc/build.yml | 32 +++++++ examples/recipes/linux-uapi-headers.yml | 22 ----- examples/recipes/linux-uapi-headers/build.yml | 22 +++++ examples/recipes/linux.yml | 61 ------------- examples/recipes/linux/build.yml | 61 +++++++++++++ examples/recipes/ls.yml | 12 --- examples/recipes/ls/build.yml | 12 +++ examples/recipes/make_ext4fs.yml | 44 --------- examples/recipes/make_ext4fs/build.yml | 44 +++++++++ examples/recipes/mpc.yml | 59 ------------ examples/recipes/mpc/build.yml | 59 ++++++++++++ examples/recipes/mpfr.yml | 59 ------------ examples/recipes/mpfr/build.yml | 59 ++++++++++++ examples/recipes/toolchain.yml | 31 ------- examples/recipes/toolchain/build.yml | 31 +++++++ examples/recipes/zlib.yml | 52 ----------- examples/recipes/zlib/build.yml | 52 +++++++++++ 41 files changed, 979 insertions(+), 975 deletions(-) delete mode 100644 examples/recipes/bar.yml create mode 100644 examples/recipes/bar/build.yml delete mode 100644 examples/recipes/binutils.yml create mode 100644 examples/recipes/binutils/build.yml delete mode 100644 examples/recipes/busybox.yml create mode 100644 examples/recipes/busybox/build.yml delete mode 100644 examples/recipes/e2fsprogs.yml create mode 100644 examples/recipes/e2fsprogs/build.yml delete mode 100644 examples/recipes/foo.yml create mode 100644 examples/recipes/foo/build.yml delete mode 100644 examples/recipes/gcc-libs.yml create mode 100644 examples/recipes/gcc-libs/build.yml delete mode 100644 examples/recipes/gcc.yml create mode 100644 examples/recipes/gcc/build.yml delete mode 100644 examples/recipes/glibc.yml create mode 100644 examples/recipes/glibc/build.yml delete mode 100644 examples/recipes/gmp.yml create mode 100644 examples/recipes/gmp/build.yml delete mode 100644 examples/recipes/image.yml create mode 100644 examples/recipes/image/build.yml delete mode 100644 examples/recipes/libgcc-initial.yml create mode 100644 examples/recipes/libgcc-initial/build.yml delete mode 100644 examples/recipes/libgcc.yml create mode 100644 examples/recipes/libgcc/build.yml delete mode 100644 examples/recipes/linux-uapi-headers.yml create mode 100644 examples/recipes/linux-uapi-headers/build.yml delete mode 100644 examples/recipes/linux.yml create mode 100644 examples/recipes/linux/build.yml delete mode 100644 examples/recipes/ls.yml create mode 100644 examples/recipes/ls/build.yml delete mode 100644 examples/recipes/make_ext4fs.yml create mode 100644 examples/recipes/make_ext4fs/build.yml delete mode 100644 examples/recipes/mpc.yml create mode 100644 examples/recipes/mpc/build.yml delete mode 100644 examples/recipes/mpfr.yml create mode 100644 examples/recipes/mpfr/build.yml delete mode 100644 examples/recipes/toolchain.yml create mode 100644 examples/recipes/toolchain/build.yml delete mode 100644 examples/recipes/zlib.yml create mode 100644 examples/recipes/zlib/build.yml diff --git a/crates/driver/src/recipe.rs b/crates/driver/src/recipe.rs index ec1c116..3a033f1 100644 --- a/crates/driver/src/recipe.rs +++ b/crates/driver/src/recipe.rs @@ -1,4 +1,4 @@ -use std::{collections::HashMap, fs::File, path::Path, result}; +use std::{collections::HashMap, ffi::OsStr, fs::File, path::Path, result}; use scoped_tls_hkt::scoped_thread_local; use serde::{Deserialize, Deserializer}; @@ -47,8 +47,8 @@ fn read_recipe(path: &Path) -> Result { Ok(recipe) } -fn is_yml(path: &Path) -> bool { - path.extension() == Some("yml".as_ref()) +fn is_recipe(path: &Path) -> bool { + path.file_name().unwrap_or_default() == "build.yml" } pub fn read_recipes>(path: P) -> Result>> { @@ -60,11 +60,15 @@ pub fn read_recipes>(path: P) -> Result {{destdir}}/bar - diff --git a/examples/recipes/bar/build.yml b/examples/recipes/bar/build.yml new file mode 100644 index 0000000..f25322e --- /dev/null +++ b/examples/recipes/bar/build.yml @@ -0,0 +1,9 @@ +tasks: + build: + output: + default: {} + run: | + findmnt -o +PROPAGATION + mkdir -p {{destdir}} + echo bar > {{destdir}}/bar + diff --git a/examples/recipes/binutils.yml b/examples/recipes/binutils.yml deleted file mode 100644 index fb69750..0000000 --- a/examples/recipes/binutils.yml +++ /dev/null @@ -1,67 +0,0 @@ -meta: - version: '2.41' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: 'ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - configure: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --build={{build.gnu_triplet}} \ - --host={{host.gnu_triplet}} \ - --target={{target.gnu_triplet}} \ - --prefix={{host.prefix}} \ - --with-sysroot={{host_to_target.sysroot}} \ - --enable-libssp \ - --enable-deterministic-archives \ - --enable-plugins \ - --disable-bootstrap \ - --disable-multilib \ - --disable-werror \ - --disable-nls \ - --disable-sim \ - --disable-gdb - find -name config.log -delete - - compile: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make - find -name config.log -delete - - install: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install diff --git a/examples/recipes/binutils/build.yml b/examples/recipes/binutils/build.yml new file mode 100644 index 0000000..fb69750 --- /dev/null +++ b/examples/recipes/binutils/build.yml @@ -0,0 +1,67 @@ +meta: + version: '2.41' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: 'ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + configure: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --target={{target.gnu_triplet}} \ + --prefix={{host.prefix}} \ + --with-sysroot={{host_to_target.sysroot}} \ + --enable-libssp \ + --enable-deterministic-archives \ + --enable-plugins \ + --disable-bootstrap \ + --disable-multilib \ + --disable-werror \ + --disable-nls \ + --disable-sim \ + --disable-gdb + find -name config.log -delete + + compile: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make + find -name config.log -delete + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install diff --git a/examples/recipes/busybox.yml b/examples/recipes/busybox.yml deleted file mode 100644 index 273ceb5..0000000 --- a/examples/recipes/busybox.yml +++ /dev/null @@ -1,64 +0,0 @@ -meta: - version: '1.36.1' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.bz2' - sha256: 'b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.bz2 - - - configure: - inherit: - task: 'unpack' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - make \ - -f ../{{basename}}-{{version}}/Makefile \ - KBUILD_SRC=../{{basename}}-{{version}} \ - defconfig - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - run: | - cd {{basename}}-build - make \ - ARCH={{host.karch}} \ - CROSS_COMPILE={{cross_compile}} \ - EXTRA_CFLAGS='-DBB_EXTRA_VERSION=""' \ - {{basename}} busybox.links - sed -i \ - -e 's@^/usr@@' \ - -e 's@^/sbin@/bin@' \ - {{basename}}.links - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - run: | - cd {{basename}}-build - make \ - ARCH={{host.karch}} \ - CROSS_COMPILE={{cross_compile}} \ - EXTRA_CFLAGS='-DBB_EXTRA_VERSION=""' \ - CONFIG_PREFIX={{destdir}}{{host.prefix}} \ - install - rm {{destdir}}{{host.prefix}}/bin/strings diff --git a/examples/recipes/busybox/build.yml b/examples/recipes/busybox/build.yml new file mode 100644 index 0000000..273ceb5 --- /dev/null +++ b/examples/recipes/busybox/build.yml @@ -0,0 +1,64 @@ +meta: + version: '1.36.1' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.bz2' + sha256: 'b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.bz2 + + + configure: + inherit: + task: 'unpack' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + make \ + -f ../{{basename}}-{{version}}/Makefile \ + KBUILD_SRC=../{{basename}}-{{version}} \ + defconfig + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{basename}}-build + make \ + ARCH={{host.karch}} \ + CROSS_COMPILE={{cross_compile}} \ + EXTRA_CFLAGS='-DBB_EXTRA_VERSION=""' \ + {{basename}} busybox.links + sed -i \ + -e 's@^/usr@@' \ + -e 's@^/sbin@/bin@' \ + {{basename}}.links + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{basename}}-build + make \ + ARCH={{host.karch}} \ + CROSS_COMPILE={{cross_compile}} \ + EXTRA_CFLAGS='-DBB_EXTRA_VERSION=""' \ + CONFIG_PREFIX={{destdir}}{{host.prefix}} \ + install + rm {{destdir}}{{host.prefix}}/bin/strings diff --git a/examples/recipes/e2fsprogs.yml b/examples/recipes/e2fsprogs.yml deleted file mode 100644 index 5c916dc..0000000 --- a/examples/recipes/e2fsprogs.yml +++ /dev/null @@ -1,54 +0,0 @@ -meta: - version: '1.47.0' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: '144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - configure: - args: - host: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --build={{build.gnu_triplet}} \ - --host={{host.gnu_triplet}} \ - --prefix={{host.prefix}} - find -name config.log -delete - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make - find -name config.log -delete - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install - diff --git a/examples/recipes/e2fsprogs/build.yml b/examples/recipes/e2fsprogs/build.yml new file mode 100644 index 0000000..5c916dc --- /dev/null +++ b/examples/recipes/e2fsprogs/build.yml @@ -0,0 +1,54 @@ +meta: + version: '1.47.0' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: '144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --prefix={{host.prefix}} + find -name config.log -delete + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make + find -name config.log -delete + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install + diff --git a/examples/recipes/foo.yml b/examples/recipes/foo.yml deleted file mode 100644 index 2982795..0000000 --- a/examples/recipes/foo.yml +++ /dev/null @@ -1,14 +0,0 @@ -tasks: - build: - output: - default: {} - run: | - ls -lha - ls -lha /proc/self/fd - mkdir -p {{destdir}}/foo - cd {{destdir}} - echo foobar > foo/bar - touch foo/bla - touch foo/x - touch foo/z - touch foo/y diff --git a/examples/recipes/foo/build.yml b/examples/recipes/foo/build.yml new file mode 100644 index 0000000..2982795 --- /dev/null +++ b/examples/recipes/foo/build.yml @@ -0,0 +1,14 @@ +tasks: + build: + output: + default: {} + run: | + ls -lha + ls -lha /proc/self/fd + mkdir -p {{destdir}}/foo + cd {{destdir}} + echo foobar > foo/bar + touch foo/bla + touch foo/x + touch foo/z + touch foo/y diff --git a/examples/recipes/gcc-libs.yml b/examples/recipes/gcc-libs.yml deleted file mode 100644 index 2f566b8..0000000 --- a/examples/recipes/gcc-libs.yml +++ /dev/null @@ -1,32 +0,0 @@ -meta: - name: 'gcc' - version: '13.2.0' -tasks: - compile: - args: - host: 'platform' - inherit: - recipe: 'libgcc' - task: 'compile' - args: - host: 'build' - target: 'host' - run: | - cd {{basename}}-build - make all-target-libatomic all-target-libgomp all-target-libquadmath all-target-libstdc++-v3 - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - path: 'sysroot' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}}/install install-target-libgcc install-target-libatomic install-target-libgomp install-target-libquadmath install-target-libstdc++-v3 - rm -r {{destdir}}/install{{build.prefix}}/lib/gcc - mv -T {{destdir}}/install/{{build_to_host.sysroot}} {{destdir}}/sysroot - cp -al {{destdir}}/install{{build.prefix}}/* {{destdir}}/sysroot{{host.prefix}} - rm {{destdir}}/sysroot{{host.prefix}}/lib/*.la diff --git a/examples/recipes/gcc-libs/build.yml b/examples/recipes/gcc-libs/build.yml new file mode 100644 index 0000000..2f566b8 --- /dev/null +++ b/examples/recipes/gcc-libs/build.yml @@ -0,0 +1,32 @@ +meta: + name: 'gcc' + version: '13.2.0' +tasks: + compile: + args: + host: 'platform' + inherit: + recipe: 'libgcc' + task: 'compile' + args: + host: 'build' + target: 'host' + run: | + cd {{basename}}-build + make all-target-libatomic all-target-libgomp all-target-libquadmath all-target-libstdc++-v3 + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + path: 'sysroot' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}}/install install-target-libgcc install-target-libatomic install-target-libgomp install-target-libquadmath install-target-libstdc++-v3 + rm -r {{destdir}}/install{{build.prefix}}/lib/gcc + mv -T {{destdir}}/install/{{build_to_host.sysroot}} {{destdir}}/sysroot + cp -al {{destdir}}/install{{build.prefix}}/* {{destdir}}/sysroot{{host.prefix}} + rm {{destdir}}/sysroot{{host.prefix}}/lib/*.la diff --git a/examples/recipes/gcc.yml b/examples/recipes/gcc.yml deleted file mode 100644 index 4931052..0000000 --- a/examples/recipes/gcc.yml +++ /dev/null @@ -1,126 +0,0 @@ -meta: - version: '13.2.0' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: 'e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - sed -i -e 's@^MULTILIB_OSDIRNAMES@# &@' {{basename}}-{{version}}/gcc/config/*/t-* - - header-stubs: - args: - host: 'platform' - target: 'platform' - output: - default: {} - run: | - if {{not host_to_target.is_same}}; then - mkdir -p {{destdir}}{{target.prefix}}/include - touch {{destdir}}{{target.prefix}}/include/limits.h - fi - - configure: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - - recipe: 'binutils' - task: 'install' - args: - target: 'target' - depends: - - recipe: 'toolchain' - task: 'depends' - - recipe: 'mpc' - task: 'install' - - recipe: 'zlib' - task: 'install' - - task: 'header-stubs' - noinherit: true - run: | - export CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++" - - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --build={{build.gnu_triplet}} \ - --host={{host.gnu_triplet}} \ - --target={{target.gnu_triplet}} \ - --prefix={{host.prefix}} \ - --libdir={{host.prefix}}/lib \ - --libexecdir={{host.prefix}}/lib \ - --with-sysroot={{host_to_target.sysroot}} \ - --with-build-sysroot={{sysroot}} \ - --with-native-system-header-dir={{target.prefix}}/include \ - --with-toolexeclibdir={{host_to_target.sysroot}}{{target.prefix}}/lib \ - --with-gxx-include-dir={{host_to_target.sysroot}}{{target.prefix}}/include/c++/"$(cat ../{{basename}}-{{version}}/gcc/BASE-VER)" \ - --with-gnu-ld \ - --enable-shared \ - --enable-languages=c,c++ \ - --enable-threads=posix \ - --disable-multilib \ - --enable-c99 \ - --enable-long-long \ - --enable-symvers=gnu \ - --enable-libstdcxx-pch \ - --without-local-prefix \ - --disable-install-libiberty \ - --disable-libssp \ - --enable-libitm \ - --enable-lto \ - --disable-bootstrap \ - --with-system-zlib \ - --with-linker-hash-style=gnu \ - --enable-linker-build-id \ - --with-ppl=no \ - --with-cloog=no \ - --enable-checking=release \ - --enable-cheaders=c_global \ - --without-isl \ - --with-system-zlib \ - --enable-standard-branch-protection \ - --with-glibc-version=2.28 \ - --enable-initfini-array \ - --enable-__cxa_atexit - find -name config.log -delete - - compile: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'configure' - depends: - - task: 'header-stubs' - noinherit: true - run: | - cd {{basename}}-build - make all-host - find -name config.log -delete - - install: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'binutils' - task: 'install' - - recipe: 'mpc' - task: 'install' - - recipe: 'zlib' - task: 'install' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install-host - diff --git a/examples/recipes/gcc/build.yml b/examples/recipes/gcc/build.yml new file mode 100644 index 0000000..4931052 --- /dev/null +++ b/examples/recipes/gcc/build.yml @@ -0,0 +1,126 @@ +meta: + version: '13.2.0' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: 'e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + sed -i -e 's@^MULTILIB_OSDIRNAMES@# &@' {{basename}}-{{version}}/gcc/config/*/t-* + + header-stubs: + args: + host: 'platform' + target: 'platform' + output: + default: {} + run: | + if {{not host_to_target.is_same}}; then + mkdir -p {{destdir}}{{target.prefix}}/include + touch {{destdir}}{{target.prefix}}/include/limits.h + fi + + configure: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + - recipe: 'binutils' + task: 'install' + args: + target: 'target' + depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'mpc' + task: 'install' + - recipe: 'zlib' + task: 'install' + - task: 'header-stubs' + noinherit: true + run: | + export CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++" + + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --target={{target.gnu_triplet}} \ + --prefix={{host.prefix}} \ + --libdir={{host.prefix}}/lib \ + --libexecdir={{host.prefix}}/lib \ + --with-sysroot={{host_to_target.sysroot}} \ + --with-build-sysroot={{sysroot}} \ + --with-native-system-header-dir={{target.prefix}}/include \ + --with-toolexeclibdir={{host_to_target.sysroot}}{{target.prefix}}/lib \ + --with-gxx-include-dir={{host_to_target.sysroot}}{{target.prefix}}/include/c++/"$(cat ../{{basename}}-{{version}}/gcc/BASE-VER)" \ + --with-gnu-ld \ + --enable-shared \ + --enable-languages=c,c++ \ + --enable-threads=posix \ + --disable-multilib \ + --enable-c99 \ + --enable-long-long \ + --enable-symvers=gnu \ + --enable-libstdcxx-pch \ + --without-local-prefix \ + --disable-install-libiberty \ + --disable-libssp \ + --enable-libitm \ + --enable-lto \ + --disable-bootstrap \ + --with-system-zlib \ + --with-linker-hash-style=gnu \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ + --with-system-zlib \ + --enable-standard-branch-protection \ + --with-glibc-version=2.28 \ + --enable-initfini-array \ + --enable-__cxa_atexit + find -name config.log -delete + + compile: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'configure' + depends: + - task: 'header-stubs' + noinherit: true + run: | + cd {{basename}}-build + make all-host + find -name config.log -delete + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'binutils' + task: 'install' + - recipe: 'mpc' + task: 'install' + - recipe: 'zlib' + task: 'install' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install-host + diff --git a/examples/recipes/glibc.yml b/examples/recipes/glibc.yml deleted file mode 100644 index 20e2363..0000000 --- a/examples/recipes/glibc.yml +++ /dev/null @@ -1,68 +0,0 @@ -meta: - version: '2.38-25-gf6445dc94da1' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: '92594ade540761f70d57de4f3a150128e7b7f7ed653a59d1acc23468ab70fae9' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - configure: - args: - host: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'gcc' - task: 'install' - - recipe: 'libgcc-initial' - task: 'install' - depends: - - recipe: 'linux-uapi-headers' - task: 'install' - run: | - export BUILD_CC="$CC_FOR_BUILD" - - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --build={{build.gnu_triplet}} \ - --host={{host.gnu_triplet}} \ - --prefix={{host.prefix}} \ - --includedir={{host.prefix}}/include \ - --libdir={{host.prefix}}/lib \ - --libexecdir={{host.prefix}}/lib \ - --enable-bind-now \ - --enable-fortify-source \ - --enable-kernel=4.4 \ - --disable-nscd \ - --disable-profile \ - --disable-werror - - echo slibdir={{host.prefix}}/lib >> configparms - echo sbindir={{host.prefix}}/bin >> configparms - echo rootsbindir={{host.prefix}}/bin >> configparms - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'linux-uapi-headers' - task: 'install' - run: | - cd {{basename}}-build - make install_root={{destdir}} install diff --git a/examples/recipes/glibc/build.yml b/examples/recipes/glibc/build.yml new file mode 100644 index 0000000..20e2363 --- /dev/null +++ b/examples/recipes/glibc/build.yml @@ -0,0 +1,68 @@ +meta: + version: '2.38-25-gf6445dc94da1' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: '92594ade540761f70d57de4f3a150128e7b7f7ed653a59d1acc23468ab70fae9' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'gcc' + task: 'install' + - recipe: 'libgcc-initial' + task: 'install' + depends: + - recipe: 'linux-uapi-headers' + task: 'install' + run: | + export BUILD_CC="$CC_FOR_BUILD" + + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --prefix={{host.prefix}} \ + --includedir={{host.prefix}}/include \ + --libdir={{host.prefix}}/lib \ + --libexecdir={{host.prefix}}/lib \ + --enable-bind-now \ + --enable-fortify-source \ + --enable-kernel=4.4 \ + --disable-nscd \ + --disable-profile \ + --disable-werror + + echo slibdir={{host.prefix}}/lib >> configparms + echo sbindir={{host.prefix}}/bin >> configparms + echo rootsbindir={{host.prefix}}/bin >> configparms + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'linux-uapi-headers' + task: 'install' + run: | + cd {{basename}}-build + make install_root={{destdir}} install diff --git a/examples/recipes/gmp.yml b/examples/recipes/gmp.yml deleted file mode 100644 index f2585c2..0000000 --- a/examples/recipes/gmp.yml +++ /dev/null @@ -1,55 +0,0 @@ -meta: - version: '6.3.0' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: 'a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - configure: - args: - host: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --build={{build.gnu_triplet}} \ - --host={{host.gnu_triplet}} \ - --prefix={{host.prefix}} - find -name config.log -delete - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install - rm {{destdir}}{{host.prefix}}/lib/*.a - rm {{destdir}}{{host.prefix}}/lib/*.la - diff --git a/examples/recipes/gmp/build.yml b/examples/recipes/gmp/build.yml new file mode 100644 index 0000000..f2585c2 --- /dev/null +++ b/examples/recipes/gmp/build.yml @@ -0,0 +1,55 @@ +meta: + version: '6.3.0' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: 'a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --prefix={{host.prefix}} + find -name config.log -delete + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install + rm {{destdir}}{{host.prefix}}/lib/*.a + rm {{destdir}}{{host.prefix}}/lib/*.la + diff --git a/examples/recipes/image.yml b/examples/recipes/image.yml deleted file mode 100644 index 3f6d8f3..0000000 --- a/examples/recipes/image.yml +++ /dev/null @@ -1,57 +0,0 @@ -tasks: - rootfs: - args: - host: 'platform' - depends: - - recipe: 'busybox' - task: 'install' - - recipe: 'toolchain' - task: 'build_depends' - args: - target: 'host' - output: - default: {} - run: | - mkdir -p \ - {{destdir}}/dev \ - {{destdir}}/proc \ - {{destdir}}/root \ - {{destdir}}/run \ - {{destdir}}/sys \ - {{destdir}}/tmp \ - {{destdir}}/usr/bin \ - {{destdir}}/usr/lib \ - {{destdir}}/var - - ln -s bin {{destdir}}/usr/sbin - ln -s usr/bin {{destdir}}/bin - ln -s usr/bin {{destdir}}/sbin - ln -s usr/lib {{destdir}}/lib - ln -s ../run {{destdir}}/var/run - - rsync -aHAXK {{sysroot}}/ {{destdir}} - - - ext4: - args: - host: 'platform' - build_depends: - - recipe: 'e2fsprogs' - task: 'install' - - recipe: 'make_ext4fs' - task: 'install' - depends: - - task: 'rootfs' - output: - default: {} - run: | - IMAGE={{destdir}}/{{basename}}.ext4 - UUID="$( - python3 \ - -c 'import sys; import uuid; print(uuid.UUID(hex=sys.argv[1][:32], version=4))' \ - "$INPUT_HASH" - )" - - mkdir {{destdir}} - make_ext4fs -l 2G -T "$SOURCE_DATE_EPOCH" -L root "$IMAGE" {{sysroot}} - E2FSPROGS_FAKE_TIME="$SOURCE_DATE_EPOCH" tune2fs -U "$UUID" "$IMAGE" diff --git a/examples/recipes/image/build.yml b/examples/recipes/image/build.yml new file mode 100644 index 0000000..3f6d8f3 --- /dev/null +++ b/examples/recipes/image/build.yml @@ -0,0 +1,57 @@ +tasks: + rootfs: + args: + host: 'platform' + depends: + - recipe: 'busybox' + task: 'install' + - recipe: 'toolchain' + task: 'build_depends' + args: + target: 'host' + output: + default: {} + run: | + mkdir -p \ + {{destdir}}/dev \ + {{destdir}}/proc \ + {{destdir}}/root \ + {{destdir}}/run \ + {{destdir}}/sys \ + {{destdir}}/tmp \ + {{destdir}}/usr/bin \ + {{destdir}}/usr/lib \ + {{destdir}}/var + + ln -s bin {{destdir}}/usr/sbin + ln -s usr/bin {{destdir}}/bin + ln -s usr/bin {{destdir}}/sbin + ln -s usr/lib {{destdir}}/lib + ln -s ../run {{destdir}}/var/run + + rsync -aHAXK {{sysroot}}/ {{destdir}} + + + ext4: + args: + host: 'platform' + build_depends: + - recipe: 'e2fsprogs' + task: 'install' + - recipe: 'make_ext4fs' + task: 'install' + depends: + - task: 'rootfs' + output: + default: {} + run: | + IMAGE={{destdir}}/{{basename}}.ext4 + UUID="$( + python3 \ + -c 'import sys; import uuid; print(uuid.UUID(hex=sys.argv[1][:32], version=4))' \ + "$INPUT_HASH" + )" + + mkdir {{destdir}} + make_ext4fs -l 2G -T "$SOURCE_DATE_EPOCH" -L root "$IMAGE" {{sysroot}} + E2FSPROGS_FAKE_TIME="$SOURCE_DATE_EPOCH" tune2fs -U "$UUID" "$IMAGE" diff --git a/examples/recipes/libgcc-initial.yml b/examples/recipes/libgcc-initial.yml deleted file mode 100644 index 81cacfd..0000000 --- a/examples/recipes/libgcc-initial.yml +++ /dev/null @@ -1,52 +0,0 @@ -meta: - name: 'gcc' - version: '13.2.0' -tasks: - configure: - args: - host: 'platform' - target: 'platform' - inherit: - recipe: 'gcc' - task: 'compile' - depends: - - recipe: 'gcc' - task: 'header-stubs' - run: | - cd {{basename}}-build - make configure-target-libgcc - - # A hack borrowed from OpenEmbedded: - # We can build an initial libgcc without having to rebuild the whole gcc - # afterwards by manipulating the Makefile - sed -i -r \ - -e 's@^(INHIBIT_LIBC_CFLAGS =).*@\1 -Dinhibit_libc@' \ - gcc/libgcc.mvars - sed -i -r \ - -e 's@^(thread_header =).*@\1 gthr-single.h@' \ - -e 's@^(enable_shared =).*@\1 no@' \ - {{target.gnu_triplet}}/libgcc/Makefile - - compile: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make all-target-libgcc - - install: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'compile' - output: - default: {} - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install-target-libgcc - - ln -s libgcc.a {{destdir}}{{host.prefix}}/lib/gcc/{{target.gnu_triplet}}/"$(cat ../{{basename}}-{{version}}/gcc/BASE-VER)"/libgcc_eh.a diff --git a/examples/recipes/libgcc-initial/build.yml b/examples/recipes/libgcc-initial/build.yml new file mode 100644 index 0000000..81cacfd --- /dev/null +++ b/examples/recipes/libgcc-initial/build.yml @@ -0,0 +1,52 @@ +meta: + name: 'gcc' + version: '13.2.0' +tasks: + configure: + args: + host: 'platform' + target: 'platform' + inherit: + recipe: 'gcc' + task: 'compile' + depends: + - recipe: 'gcc' + task: 'header-stubs' + run: | + cd {{basename}}-build + make configure-target-libgcc + + # A hack borrowed from OpenEmbedded: + # We can build an initial libgcc without having to rebuild the whole gcc + # afterwards by manipulating the Makefile + sed -i -r \ + -e 's@^(INHIBIT_LIBC_CFLAGS =).*@\1 -Dinhibit_libc@' \ + gcc/libgcc.mvars + sed -i -r \ + -e 's@^(thread_header =).*@\1 gthr-single.h@' \ + -e 's@^(enable_shared =).*@\1 no@' \ + {{target.gnu_triplet}}/libgcc/Makefile + + compile: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make all-target-libgcc + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: {} + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install-target-libgcc + + ln -s libgcc.a {{destdir}}{{host.prefix}}/lib/gcc/{{target.gnu_triplet}}/"$(cat ../{{basename}}-{{version}}/gcc/BASE-VER)"/libgcc_eh.a diff --git a/examples/recipes/libgcc.yml b/examples/recipes/libgcc.yml deleted file mode 100644 index d7433fe..0000000 --- a/examples/recipes/libgcc.yml +++ /dev/null @@ -1,32 +0,0 @@ -meta: - name: 'gcc' -tasks: - compile: - args: - host: 'platform' - target: 'platform' - inherit: - recipe: 'gcc' - task: 'compile' - depends: - - recipe: 'glibc' - task: 'install' - args: - host: 'target' - run: | - cd {{basename}}-build - make all-target-libgcc - - install: - args: - host: 'platform' - target: 'platform' - inherit: - task: 'compile' - output: - default: {} - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install-target-libgcc - rm {{destdir}}{{host_to_target.sysroot}}{{target.prefix}}/lib/libgcc_s.so* - rmdir -p --ignore-fail-on-non-empty {{destdir}}{{host_to_target.sysroot}}{{target.prefix}}/lib diff --git a/examples/recipes/libgcc/build.yml b/examples/recipes/libgcc/build.yml new file mode 100644 index 0000000..d7433fe --- /dev/null +++ b/examples/recipes/libgcc/build.yml @@ -0,0 +1,32 @@ +meta: + name: 'gcc' +tasks: + compile: + args: + host: 'platform' + target: 'platform' + inherit: + recipe: 'gcc' + task: 'compile' + depends: + - recipe: 'glibc' + task: 'install' + args: + host: 'target' + run: | + cd {{basename}}-build + make all-target-libgcc + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: {} + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install-target-libgcc + rm {{destdir}}{{host_to_target.sysroot}}{{target.prefix}}/lib/libgcc_s.so* + rmdir -p --ignore-fail-on-non-empty {{destdir}}{{host_to_target.sysroot}}{{target.prefix}}/lib diff --git a/examples/recipes/linux-uapi-headers.yml b/examples/recipes/linux-uapi-headers.yml deleted file mode 100644 index 3fadccd..0000000 --- a/examples/recipes/linux-uapi-headers.yml +++ /dev/null @@ -1,22 +0,0 @@ -meta: - name: 'linux' - version: '6.5.5' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: '8cf10379f7df8ea731e09bff3d0827414e4b643dd41dc99d0af339669646ef95' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - install: - args: - host: 'platform' - inherit: - task: 'unpack' - output: - default: {} - run: | - cd {{basename}}-{{version}} - make INSTALL_HDR_PATH={{destdir}}{{host.prefix}} ARCH={{host.karch}} headers_install - diff --git a/examples/recipes/linux-uapi-headers/build.yml b/examples/recipes/linux-uapi-headers/build.yml new file mode 100644 index 0000000..3fadccd --- /dev/null +++ b/examples/recipes/linux-uapi-headers/build.yml @@ -0,0 +1,22 @@ +meta: + name: 'linux' + version: '6.5.5' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: '8cf10379f7df8ea731e09bff3d0827414e4b643dd41dc99d0af339669646ef95' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + install: + args: + host: 'platform' + inherit: + task: 'unpack' + output: + default: {} + run: | + cd {{basename}}-{{version}} + make INSTALL_HDR_PATH={{destdir}}{{host.prefix}} ARCH={{host.karch}} headers_install + diff --git a/examples/recipes/linux.yml b/examples/recipes/linux.yml deleted file mode 100644 index 53a0bd7..0000000 --- a/examples/recipes/linux.yml +++ /dev/null @@ -1,61 +0,0 @@ -meta: - version: '6.5.5' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: '8cf10379f7df8ea731e09bff3d0827414e4b643dd41dc99d0af339669646ef95' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - configure: - args: - host: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'gcc' - task: 'install' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - make \ - -f ../{{basename}}-{{version}}/Makefile \ - ARCH={{host.karch}} \ - CROSS_COMPILE={{cross_compile}} \ - defconfig - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - run: | - export KBUILD_BUILD_TIMESTAMP="@${SOURCE_DATE_EPOCH}" - - cd {{basename}}-build - make \ - ARCH={{host.karch}} \ - CROSS_COMPILE={{cross_compile}} \ - all - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - boot: - path: 'boot' - modules: - path: 'modules' - run: | - cd {{basename}}-build - mkdir -p {{destdir}}/boot - make \ - ARCH={{host.karch}} \ - CROSS_COMPILE={{cross_compile}} \ - INSTALL_PATH={{destdir}}/boot \ - INSTALL_MOD_PATH={{destdir}}/modules{{host.prefix}} \ - DEPMOD=true \ - install modules_install diff --git a/examples/recipes/linux/build.yml b/examples/recipes/linux/build.yml new file mode 100644 index 0000000..53a0bd7 --- /dev/null +++ b/examples/recipes/linux/build.yml @@ -0,0 +1,61 @@ +meta: + version: '6.5.5' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: '8cf10379f7df8ea731e09bff3d0827414e4b643dd41dc99d0af339669646ef95' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'gcc' + task: 'install' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + make \ + -f ../{{basename}}-{{version}}/Makefile \ + ARCH={{host.karch}} \ + CROSS_COMPILE={{cross_compile}} \ + defconfig + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + export KBUILD_BUILD_TIMESTAMP="@${SOURCE_DATE_EPOCH}" + + cd {{basename}}-build + make \ + ARCH={{host.karch}} \ + CROSS_COMPILE={{cross_compile}} \ + all + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + boot: + path: 'boot' + modules: + path: 'modules' + run: | + cd {{basename}}-build + mkdir -p {{destdir}}/boot + make \ + ARCH={{host.karch}} \ + CROSS_COMPILE={{cross_compile}} \ + INSTALL_PATH={{destdir}}/boot \ + INSTALL_MOD_PATH={{destdir}}/modules{{host.prefix}} \ + DEPMOD=true \ + install modules_install diff --git a/examples/recipes/ls.yml b/examples/recipes/ls.yml deleted file mode 100644 index 633336d..0000000 --- a/examples/recipes/ls.yml +++ /dev/null @@ -1,12 +0,0 @@ -tasks: - build: - depends: - - recipe: 'foo' - task: 'build' - - recipe: 'bar' - task: 'build' - output: - default: {} - run: | - ls -lh / - ls -lhR {{sysroot}} diff --git a/examples/recipes/ls/build.yml b/examples/recipes/ls/build.yml new file mode 100644 index 0000000..633336d --- /dev/null +++ b/examples/recipes/ls/build.yml @@ -0,0 +1,12 @@ +tasks: + build: + depends: + - recipe: 'foo' + task: 'build' + - recipe: 'bar' + task: 'build' + output: + default: {} + run: | + ls -lh / + ls -lhR {{sysroot}} diff --git a/examples/recipes/make_ext4fs.yml b/examples/recipes/make_ext4fs.yml deleted file mode 100644 index f77fde4..0000000 --- a/examples/recipes/make_ext4fs.yml +++ /dev/null @@ -1,44 +0,0 @@ -meta: - version: '2020-01-05-5c201be7d72aff735da27e17c29852e0cefe3e52' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.gz' - sha256: 'bfe984cc757c676639090a5b34bdfc359cdef9b723de77efbce590872dce4132' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.gz - - compile: - args: - host: 'platform' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - - recipe: 'zlib' - task: 'install' - inherit: - task: 'unpack' - run: | - cd {{basename}}-{{version}} - make - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - - recipe: 'zlib' - task: 'install' - run: | - cd {{basename}}-{{version}} - install -d {{destdir}}{{host.prefix}}/bin - install -m755 make_ext4fs {{destdir}}{{host.prefix}}/bin/ - diff --git a/examples/recipes/make_ext4fs/build.yml b/examples/recipes/make_ext4fs/build.yml new file mode 100644 index 0000000..f77fde4 --- /dev/null +++ b/examples/recipes/make_ext4fs/build.yml @@ -0,0 +1,44 @@ +meta: + version: '2020-01-05-5c201be7d72aff735da27e17c29852e0cefe3e52' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.gz' + sha256: 'bfe984cc757c676639090a5b34bdfc359cdef9b723de77efbce590872dce4132' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.gz + + compile: + args: + host: 'platform' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'zlib' + task: 'install' + inherit: + task: 'unpack' + run: | + cd {{basename}}-{{version}} + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'zlib' + task: 'install' + run: | + cd {{basename}}-{{version}} + install -d {{destdir}}{{host.prefix}}/bin + install -m755 make_ext4fs {{destdir}}{{host.prefix}}/bin/ + diff --git a/examples/recipes/mpc.yml b/examples/recipes/mpc.yml deleted file mode 100644 index 0d17661..0000000 --- a/examples/recipes/mpc.yml +++ /dev/null @@ -1,59 +0,0 @@ -meta: - version: '1.3.1' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.gz' - sha256: 'ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.gz - - configure: - args: - host: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - - recipe: 'mpfr' - task: 'install' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --build={{build.gnu_triplet}} \ - --host={{host.gnu_triplet}} \ - --prefix={{host.prefix}} - find -name config.log -delete - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - - recipe: 'mpfr' - task: 'install' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install - rm {{destdir}}{{host.prefix}}/lib/*.a - rm {{destdir}}{{host.prefix}}/lib/*.la - diff --git a/examples/recipes/mpc/build.yml b/examples/recipes/mpc/build.yml new file mode 100644 index 0000000..0d17661 --- /dev/null +++ b/examples/recipes/mpc/build.yml @@ -0,0 +1,59 @@ +meta: + version: '1.3.1' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.gz' + sha256: 'ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.gz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'mpfr' + task: 'install' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --prefix={{host.prefix}} + find -name config.log -delete + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'mpfr' + task: 'install' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install + rm {{destdir}}{{host.prefix}}/lib/*.a + rm {{destdir}}{{host.prefix}}/lib/*.la + diff --git a/examples/recipes/mpfr.yml b/examples/recipes/mpfr.yml deleted file mode 100644 index 2c87912..0000000 --- a/examples/recipes/mpfr.yml +++ /dev/null @@ -1,59 +0,0 @@ -meta: - version: '4.2.1' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.xz' - sha256: '277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz - - configure: - args: - host: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - - recipe: 'gmp' - task: 'install' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --build={{build.gnu_triplet}} \ - --host={{host.gnu_triplet}} \ - --prefix={{host.prefix}} - find -name config.log -delete - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - - recipe: 'gmp' - task: 'install' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install - rm {{destdir}}{{host.prefix}}/lib/*.a - rm {{destdir}}{{host.prefix}}/lib/*.la - diff --git a/examples/recipes/mpfr/build.yml b/examples/recipes/mpfr/build.yml new file mode 100644 index 0000000..2c87912 --- /dev/null +++ b/examples/recipes/mpfr/build.yml @@ -0,0 +1,59 @@ +meta: + version: '4.2.1' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: '277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'gmp' + task: 'install' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --prefix={{host.prefix}} + find -name config.log -delete + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'gmp' + task: 'install' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install + rm {{destdir}}{{host.prefix}}/lib/*.a + rm {{destdir}}{{host.prefix}}/lib/*.la + diff --git a/examples/recipes/toolchain.yml b/examples/recipes/toolchain.yml deleted file mode 100644 index ab8e6de..0000000 --- a/examples/recipes/toolchain.yml +++ /dev/null @@ -1,31 +0,0 @@ -tasks: - build_depends: - args: - host: 'platform' - target: 'platform' - output: - default: - runtime_depends: - - recipe: 'gcc' - task: 'install' - - recipe: 'libgcc' - task: 'install' - - depends: - args: - host: 'platform' - output: - default: - runtime_depends: - - recipe: 'glibc' - task: 'install' - - recipe: 'gcc-libs' - task: 'install' - - build: - args: - host: 'platform' - build_depends: - - task: 'build_depends' - depends: - - task: 'depends' diff --git a/examples/recipes/toolchain/build.yml b/examples/recipes/toolchain/build.yml new file mode 100644 index 0000000..ab8e6de --- /dev/null +++ b/examples/recipes/toolchain/build.yml @@ -0,0 +1,31 @@ +tasks: + build_depends: + args: + host: 'platform' + target: 'platform' + output: + default: + runtime_depends: + - recipe: 'gcc' + task: 'install' + - recipe: 'libgcc' + task: 'install' + + depends: + args: + host: 'platform' + output: + default: + runtime_depends: + - recipe: 'glibc' + task: 'install' + - recipe: 'gcc-libs' + task: 'install' + + build: + args: + host: 'platform' + build_depends: + - task: 'build_depends' + depends: + - task: 'depends' diff --git a/examples/recipes/zlib.yml b/examples/recipes/zlib.yml deleted file mode 100644 index 65c0d19..0000000 --- a/examples/recipes/zlib.yml +++ /dev/null @@ -1,52 +0,0 @@ -meta: - version: '1.3' -tasks: - unpack: - fetch: - - name: '{{basename}}-{{version}}.tar.gz' - sha256: 'ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e' - run: | - tar xf {{dldir}}/{{basename}}-{{version}}.tar.gz - - configure: - args: - host: 'platform' - inherit: - task: 'unpack' - build_depends: - - recipe: 'toolchain' - task: 'build_depends' - depends: - - recipe: 'toolchain' - task: 'depends' - run: | - mkdir {{basename}}-build - cd {{basename}}-build - ../{{basename}}-{{version}}/configure \ - --prefix={{host.prefix}} - find -name configure.log -delete - - compile: - args: - host: 'platform' - inherit: - task: 'configure' - run: | - cd {{basename}}-build - make - - install: - args: - host: 'platform' - inherit: - task: 'compile' - output: - default: - runtime_depends: - - recipe: 'toolchain' - task: 'depends' - run: | - cd {{basename}}-build - make DESTDIR={{destdir}} install - rm {{destdir}}{{host.prefix}}/lib/*.a - diff --git a/examples/recipes/zlib/build.yml b/examples/recipes/zlib/build.yml new file mode 100644 index 0000000..65c0d19 --- /dev/null +++ b/examples/recipes/zlib/build.yml @@ -0,0 +1,52 @@ +meta: + version: '1.3' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.gz' + sha256: 'ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.gz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --prefix={{host.prefix}} + find -name configure.log -delete + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + cd {{basename}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install + rm {{destdir}}{{host.prefix}}/lib/*.a + -- cgit v1.2.3