From: Richard W.M. Jones Date: Wed, 10 Aug 2016 17:04:56 +0000 (+0100) Subject: Add diffutils (diff), findutils (find), sed and patch to the stage3 chroot. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=5a3e56562529ea34cb3961f363ff7d2a5c79a93d;p=fedora-riscv.git Add diffutils (diff), findutils (find), sed and patch to the stage3 chroot. --- diff --git a/.gitignore b/.gitignore index b05ec7e..a8fab17 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,9 @@ stamp-* /beecrypt-4.2.1/ /bzip2-1.0.6/ /coreutils-8.25/ +/diffutils-3.4/ /file-5.28/ +/findutils-4.6.0/ /gmp-6.1.1/ /grep-2.25/ /gzip-1.8/ @@ -32,11 +34,13 @@ stamp-* /mpfr-3.1.4/ /nano-2.6.2/ /ncurses-6.0-20160730/ +/patch-2.7.5/ /popt-1.16/ /riscv-binutils-gdb-riscv-binutils-2.26/ /riscv-gcc-riscv-gcc-6.1.0/ /riscv-strace-f320e1897832fd07a62e18ed288e75d8e79f4c5b/ /rpm-9571218/ +/sed-4.2/ /tar-1.29/ /util-linux-2.28/ /zlib-1.2.8/ diff --git a/Makefile b/Makefile index 9c07b0c..b137fd1 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,10 @@ STRACE_COMMIT = f320e1897832fd07a62e18ed288e75d8e79f4c5b STRACE_SHORT_COMMIT = f320e189 BZIP2_VERSION = 1.0.6 MAKE_VERSION = 4.1 +DIFFUTILS_VERSION = 3.4 +FINDUTILS_VERSION = 4.6.0 +SED_VERSION = 4.2 +PATCH_VERSION = 2.7.5 all: stage1 stage2 stage3 stage4 @@ -289,6 +293,10 @@ stage3: stage3-kernel/linux-$(KERNEL_VERSION)/vmlinux \ stage3-chroot/usr/bin/strace \ stage3-chroot/usr/bin/bzip2 \ stage3-chroot/usr/bin/make \ + stage3-chroot/usr/bin/diff \ + stage3-chroot/usr/bin/find \ + stage3-chroot/usr/bin/sed \ + stage3-chroot/usr/bin/patch \ stage3-chroot/usr/bin/rpm \ stage3-chroot/init \ stage3-disk.img @@ -756,6 +764,74 @@ make-$(MAKE_VERSION).tar.gz: wget -O $@-t https://ftp.gnu.org/gnu/make/make-$(MAKE_VERSION).tar.gz mv $@-t $@ +# Cross-compile GNU diffutils. +stage3-chroot/usr/bin/diff: diffutils-$(DIFFUTILS_VERSION).tar.xz + rm -rf diffutils-$(DIFFUTILS_VERSION) + tar -Jxf $^ + cd diffutils-$(DIFFUTILS_VERSION) && \ + PATH=$(ROOT)/fixed-gcc:$$PATH \ + ./configure \ + --host=riscv64-unknown-linux-gnu \ + --prefix=/usr --libdir=/usr/lib64 + cd diffutils-$(DIFFUTILS_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make + cd diffutils-$(DIFFUTILS_VERSION) && make install DESTDIR=$(ROOT)/stage3-chroot + +diffutils-$(DIFFUTILS_VERSION).tar.xz: + rm -f $@ $@-t + wget -O $@-t https://ftp.gnu.org/gnu/diffutils/diffutils-$(DIFFUTILS_VERSION).tar.xz + mv $@-t $@ + +# Cross-compile GNU findutils. +stage3-chroot/usr/bin/find: findutils-$(FINDUTILS_VERSION).tar.gz + rm -rf findutils-$(FINDUTILS_VERSION) + tar -zxf $^ + cd findutils-$(FINDUTILS_VERSION) && \ + PATH=$(ROOT)/fixed-gcc:$$PATH \ + ./configure \ + --host=riscv64-unknown-linux-gnu \ + --prefix=/usr --libdir=/usr/lib64 + cd findutils-$(FINDUTILS_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make + cd findutils-$(FINDUTILS_VERSION) && make install DESTDIR=$(ROOT)/stage3-chroot + +findutils-$(FINDUTILS_VERSION).tar.gz: + rm -f $@ $@-t + wget -O $@-t https://ftp.gnu.org/gnu/findutils/findutils-$(FINDUTILS_VERSION).tar.gz + mv $@-t $@ + +# Cross-compile GNU sed. +stage3-chroot/usr/bin/sed: sed-$(SED_VERSION).tar.gz + rm -rf sed-$(SED_VERSION) + tar -zxf $^ + cd sed-$(SED_VERSION) && \ + PATH=$(ROOT)/fixed-gcc:$$PATH \ + ./configure \ + --host=riscv64-unknown-linux-gnu \ + --prefix=/usr --libdir=/usr/lib64 + cd sed-$(SED_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make + cd sed-$(SED_VERSION) && make install DESTDIR=$(ROOT)/stage3-chroot + +sed-$(SED_VERSION).tar.gz: + rm -f $@ $@-t + wget -O $@-t https://ftp.gnu.org/gnu/sed/sed-$(SED_VERSION).tar.gz + mv $@-t $@ + +# Cross-compile patch. +stage3-chroot/usr/bin/patch: patch-$(PATCH_VERSION).tar.gz + rm -rf patch-$(PATCH_VERSION) + tar -zxf $^ + cd patch-$(PATCH_VERSION) && \ + PATH=$(ROOT)/fixed-gcc:$$PATH \ + ./configure \ + --host=riscv64-unknown-linux-gnu \ + --prefix=/usr --libdir=/usr/lib64 + cd patch-$(PATCH_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make + cd patch-$(PATCH_VERSION) && make install DESTDIR=$(ROOT)/stage3-chroot + +patch-$(PATCH_VERSION).tar.gz: + rm -f $@ $@-t + wget -O $@-t https://ftp.gnu.org/gnu/patch/patch-$(PATCH_VERSION).tar.gz + mv $@-t $@ + # Cross-compile RPM / rpmbuild. # We build this from a git commit, with a few hacks to the configure # script.