diff options
Diffstat (limited to 'examples/recipes')
-rw-r--r-- | examples/recipes/bar.yml | 9 | ||||
-rw-r--r-- | examples/recipes/binutils.yml | 67 | ||||
-rw-r--r-- | examples/recipes/busybox.yml | 64 | ||||
-rw-r--r-- | examples/recipes/e2fsprogs.yml | 54 | ||||
-rw-r--r-- | examples/recipes/foo.yml | 14 | ||||
-rw-r--r-- | examples/recipes/gcc-libs.yml | 32 | ||||
-rw-r--r-- | examples/recipes/gcc.yml | 126 | ||||
-rw-r--r-- | examples/recipes/glibc.yml | 70 | ||||
-rw-r--r-- | examples/recipes/gmp.yml | 55 | ||||
-rw-r--r-- | examples/recipes/libgcc-initial.yml | 52 | ||||
-rw-r--r-- | examples/recipes/libgcc.yml | 33 | ||||
-rw-r--r-- | examples/recipes/linux-uapi-headers.yml | 22 | ||||
-rw-r--r-- | examples/recipes/linux.yml | 61 | ||||
-rw-r--r-- | examples/recipes/ls.yml | 12 | ||||
-rw-r--r-- | examples/recipes/make_ext4fs.yml | 44 | ||||
-rw-r--r-- | examples/recipes/mpc.yml | 59 | ||||
-rw-r--r-- | examples/recipes/mpfr.yml | 59 | ||||
-rw-r--r-- | examples/recipes/rootfs.yml | 56 | ||||
-rw-r--r-- | examples/recipes/toolchain.yml | 31 | ||||
-rw-r--r-- | examples/recipes/zlib.yml | 52 |
20 files changed, 972 insertions, 0 deletions
diff --git a/examples/recipes/bar.yml b/examples/recipes/bar.yml new file mode 100644 index 0000000..f25322e --- /dev/null +++ b/examples/recipes/bar.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 new file mode 100644 index 0000000..d524596 --- /dev/null +++ b/examples/recipes/binutils.yml @@ -0,0 +1,67 @@ +meta: + version: '2.37' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.xz' + sha256: '820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.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 {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/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 {{pn}}-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 {{pn}}-build + make DESTDIR={{destdir}} install diff --git a/examples/recipes/busybox.yml b/examples/recipes/busybox.yml new file mode 100644 index 0000000..aa37687 --- /dev/null +++ b/examples/recipes/busybox.yml @@ -0,0 +1,64 @@ +meta: + version: '1.34.0' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.bz2' + sha256: 'ec8d1615edb045b83b81966604759c4d4ac921434ab4011da604f629c06074ce' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.tar.bz2 + + + configure: + inherit: + task: 'unpack' + run: | + mkdir {{pn}}-build + cd {{pn}}-build + make \ + -f ../{{pn}}-{{pv}}/Makefile \ + KBUILD_SRC=../{{pn}}-{{pv}} \ + defconfig + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{pn}}-build + make \ + ARCH={{host.karch}} \ + CROSS_COMPILE={{cross_compile}} \ + EXTRA_CFLAGS='-DBB_EXTRA_VERSION=""' \ + {{pn}} busybox.links + sed -i \ + -e 's@^/usr@@' \ + -e 's@^/sbin@/bin@' \ + {{pn}}.links + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{pn}}-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 new file mode 100644 index 0000000..b8377f0 --- /dev/null +++ b/examples/recipes/e2fsprogs.yml @@ -0,0 +1,54 @@ +meta: + version: '1.46.4' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.xz' + sha256: 'b11042533c1b1dcf17512f0da48e05b0c573dada1dd8b762864d10f4dc399713' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.tar.xz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + mkdir {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/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 {{pn}}-build + make + find -name config.log -delete + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{pn}}-build + make DESTDIR={{destdir}} install + diff --git a/examples/recipes/foo.yml b/examples/recipes/foo.yml new file mode 100644 index 0000000..2982795 --- /dev/null +++ b/examples/recipes/foo.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 new file mode 100644 index 0000000..54c34df --- /dev/null +++ b/examples/recipes/gcc-libs.yml @@ -0,0 +1,32 @@ +meta: + name: 'gcc' + version: '11.2.0' +tasks: + compile: + args: + host: 'platform' + inherit: + recipe: 'libgcc' + task: 'compile' + args: + host: 'build' + target: 'host' + run: | + cd {{pn}}-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 {{pn}}-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 new file mode 100644 index 0000000..2911734 --- /dev/null +++ b/examples/recipes/gcc.yml @@ -0,0 +1,126 @@ +meta: + version: '11.2.0' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.xz' + sha256: 'd08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.tar.xz + + sed -i -e 's@^MULTILIB_OSDIRNAMES@# &@' {{pn}}-{{pv}}/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 {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/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 ../{{pn}}-{{pv}}/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 {{pn}}-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 {{pn}}-build + make DESTDIR={{destdir}} install-host + diff --git a/examples/recipes/glibc.yml b/examples/recipes/glibc.yml new file mode 100644 index 0000000..e9fa405 --- /dev/null +++ b/examples/recipes/glibc.yml @@ -0,0 +1,70 @@ +meta: + version: '2.34' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.xz' + sha256: '44d26a1fe20b8853a48f470ead01e4279e869ac149b195dda4e44a195d981ab2' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.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 {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/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-add-ons \ + --enable-obsolete-rpc \ + --enable-kernel=2.6.32 \ + --enable-bind-now \ + --disable-profile \ + --enable-stackguard-randomization \ + --enable-lock-elision \ + --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 {{pn}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'linux-uapi-headers' + task: 'install' + run: | + cd {{pn}}-build + make install_root={{destdir}} install diff --git a/examples/recipes/gmp.yml b/examples/recipes/gmp.yml new file mode 100644 index 0000000..9575edd --- /dev/null +++ b/examples/recipes/gmp.yml @@ -0,0 +1,55 @@ +meta: + version: '6.2.1' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.lz' + sha256: '2c7f4f0d370801b2849c48c9ef3f59553b5f1d3791d070cffb04599f9fc67b41' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.tar.lz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + mkdir {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/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 {{pn}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{pn}}-build + make DESTDIR={{destdir}} install + rm {{destdir}}{{host.prefix}}/lib/*.a + rm {{destdir}}{{host.prefix}}/lib/*.la + diff --git a/examples/recipes/libgcc-initial.yml b/examples/recipes/libgcc-initial.yml new file mode 100644 index 0000000..fc047e8 --- /dev/null +++ b/examples/recipes/libgcc-initial.yml @@ -0,0 +1,52 @@ +meta: + name: 'gcc' + version: '11.2.0' +tasks: + configure: + args: + host: 'platform' + target: 'platform' + inherit: + recipe: 'gcc' + task: 'compile' + depends: + - recipe: 'gcc' + task: 'header-stubs' + run: | + cd {{pn}}-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 {{pn}}-build + make all-target-libgcc + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: {} + run: | + cd {{pn}}-build + make DESTDIR={{destdir}} install-target-libgcc + + ln -s libgcc.a {{destdir}}{{host.prefix}}/lib/gcc/{{target.gnu_triplet}}/"$(cat ../{{pn}}-{{pv}}/gcc/BASE-VER)"/libgcc_eh.a diff --git a/examples/recipes/libgcc.yml b/examples/recipes/libgcc.yml new file mode 100644 index 0000000..9d5eb3f --- /dev/null +++ b/examples/recipes/libgcc.yml @@ -0,0 +1,33 @@ +meta: + name: 'gcc' + version: '11.2.0' +tasks: + compile: + args: + host: 'platform' + target: 'platform' + inherit: + recipe: 'gcc' + task: 'compile' + depends: + - recipe: 'glibc' + task: 'install' + args: + host: 'target' + run: | + cd {{pn}}-build + make all-target-libgcc + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: {} + run: | + cd {{pn}}-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 new file mode 100644 index 0000000..fdd9a8e --- /dev/null +++ b/examples/recipes/linux-uapi-headers.yml @@ -0,0 +1,22 @@ +meta: + name: 'linux' + version: '5.10.66' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.xz' + sha256: '5dfa06bbbbd164b9ea669ec637b1e6d05fb5fea8ef3aeb6729f2cbcd0dfcc8a7' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.tar.xz + + install: + args: + host: 'platform' + inherit: + task: 'unpack' + output: + default: {} + run: | + cd {{pn}}-{{pv}} + make INSTALL_HDR_PATH={{destdir}}{{host.prefix}} ARCH={{host.karch}} headers_install + diff --git a/examples/recipes/linux.yml b/examples/recipes/linux.yml new file mode 100644 index 0000000..a7f4394 --- /dev/null +++ b/examples/recipes/linux.yml @@ -0,0 +1,61 @@ +meta: + version: '5.10.66' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.xz' + sha256: '5dfa06bbbbd164b9ea669ec637b1e6d05fb5fea8ef3aeb6729f2cbcd0dfcc8a7' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.tar.xz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'gcc' + task: 'install' + run: | + mkdir {{pn}}-build + cd {{pn}}-build + make \ + -f ../{{pn}}-{{pv}}/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 {{pn}}-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 {{pn}}-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 new file mode 100644 index 0000000..633336d --- /dev/null +++ b/examples/recipes/ls.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 new file mode 100644 index 0000000..53fed98 --- /dev/null +++ b/examples/recipes/make_ext4fs.yml @@ -0,0 +1,44 @@ +meta: + version: '2020-01-05-5c201be7d72aff735da27e17c29852e0cefe3e52' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.gz' + sha256: 'bfe984cc757c676639090a5b34bdfc359cdef9b723de77efbce590872dce4132' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.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 {{pn}}-{{pv}} + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'zlib' + task: 'install' + run: | + cd {{pn}}-{{pv}} + 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 new file mode 100644 index 0000000..8a4aadf --- /dev/null +++ b/examples/recipes/mpc.yml @@ -0,0 +1,59 @@ +meta: + version: '1.2.1' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.gz' + sha256: '17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.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 {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/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 {{pn}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'mpfr' + task: 'install' + run: | + cd {{pn}}-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 new file mode 100644 index 0000000..61642ac --- /dev/null +++ b/examples/recipes/mpfr.yml @@ -0,0 +1,59 @@ +meta: + version: '4.1.0' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.xz' + sha256: '0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.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 {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/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 {{pn}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'gmp' + task: 'install' + run: | + cd {{pn}}-build + make DESTDIR={{destdir}} install + rm {{destdir}}{{host.prefix}}/lib/*.a + rm {{destdir}}{{host.prefix}}/lib/*.la + diff --git a/examples/recipes/rootfs.yml b/examples/recipes/rootfs.yml new file mode 100644 index 0000000..77b50ba --- /dev/null +++ b/examples/recipes/rootfs.yml @@ -0,0 +1,56 @@ +tasks: + install: + 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}}/sys \ + {{destdir}}/root \ + {{destdir}}/run \ + {{destdir}}/var \ + {{destdir}}/usr/bin \ + {{destdir}}/usr/lib + + 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}} + + + image-ext4: + args: + host: 'platform' + build_depends: + - recipe: 'e2fsprogs' + task: 'install' + - recipe: 'make_ext4fs' + task: 'install' + depends: + - task: 'install' + output: + default: {} + run: | + IMAGE={{destdir}}/{{pn}}.ext4 + UUID="$( + python3 \ + -c 'import sys; import uuid; print(uuid.UUID(hex=sys.argv[1][:32], version=4))' \ + "$INPUT_HASH" + )" + + mkdir {{destdir}} + {{build.prefix}}/bin/make_ext4fs -l 2G -T "$SOURCE_DATE_EPOCH" -L root "$IMAGE" {{sysroot}} + E2FSPROGS_FAKE_TIME="$SOURCE_DATE_EPOCH" {{build.prefix}}/sbin/tune2fs -U "$UUID" "$IMAGE" diff --git a/examples/recipes/toolchain.yml b/examples/recipes/toolchain.yml new file mode 100644 index 0000000..ab8e6de --- /dev/null +++ b/examples/recipes/toolchain.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 new file mode 100644 index 0000000..7146cde --- /dev/null +++ b/examples/recipes/zlib.yml @@ -0,0 +1,52 @@ +meta: + version: '1.2.11' +tasks: + unpack: + fetch: + - name: '{{pn}}-{{pv}}.tar.gz' + sha256: 'c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1' + run: | + tar xf {{dldir}}/{{pn}}-{{pv}}.tar.gz + + configure: + args: + host: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + depends: + - recipe: 'toolchain' + task: 'depends' + run: | + mkdir {{pn}}-build + cd {{pn}}-build + ../{{pn}}-{{pv}}/configure \ + --prefix={{host.prefix}} + find -name configure.log -delete + + compile: + args: + host: 'platform' + inherit: + task: 'configure' + run: | + cd {{pn}}-build + make + + install: + args: + host: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'toolchain' + task: 'depends' + run: | + cd {{pn}}-build + make DESTDIR={{destdir}} install + rm {{destdir}}{{host.prefix}}/lib/*.a + |