From 42df0f592a8dd18db6bbb55f574983b945523bd5 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 8 Jun 2019 18:04:39 +0200 Subject: [PATCH] Replace pkg2sqfs with the squashfs-ng tools Signed-off-by: David Oberhollenzer --- mk.sh | 2 +- pkg/release-alix/build | 7 ++++++- pkg/release-qemu/build | 7 ++++++- pkg/release-rpi3/build | 7 ++++++- pkg/tc-squashfs/build | 28 ++++++++++++++++++++++++++++ pkg/toolchain/build | 1 + 6 files changed, 48 insertions(+), 4 deletions(-) create mode 100755 pkg/tc-squashfs/build diff --git a/mk.sh b/mk.sh index 4f9bec2..ec769d6 100755 --- a/mk.sh +++ b/mk.sh @@ -65,7 +65,7 @@ CMAKETCFILE="$TCDIR/toolchain.cmake" ############################### build packages ############################### echo "--- boot strap phase ---" -for pkg in tc-pkgtool; do +for pkg in tc-pkgtool tc-squashfs; do include_pkg "$pkg" build_package done diff --git a/pkg/release-alix/build b/pkg/release-alix/build index af0f9bc..8bfdc56 100755 --- a/pkg/release-alix/build +++ b/pkg/release-alix/build @@ -3,7 +3,12 @@ SUBPKG="release" build() { pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" -R "$REPODIR" linux - pkg2sqfs -c xz "$REPODIR/rootfs.pkg" "$OS_RELEASE/rootfs.img" + + pkg dump -l pkg -r "$TCDIR/$TARGET" "$REPODIR/rootfs.pkg" \ + > "$PKGBUILDDIR/files.txt" + + gensquashfs -F "$PKGBUILDDIR/files.txt" "$OS_RELEASE/rootfs.img" + rm "$PKGBUILDDIR/files.txt" # copy helper scripts local linux_image="$OS_RELEASE/vmlinuz" diff --git a/pkg/release-qemu/build b/pkg/release-qemu/build index da0b8cf..38568ef 100755 --- a/pkg/release-qemu/build +++ b/pkg/release-qemu/build @@ -3,7 +3,12 @@ SUBPKG="release" build() { pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" -R "$REPODIR" linux - pkg2sqfs -c xz "$REPODIR/rootfs.pkg" "$OS_RELEASE/rootfs.img" + + pkg dump -l pkg -r "$TCDIR/$TARGET" "$REPODIR/rootfs.pkg" \ + > "$PKGBUILDDIR/files.txt" + + gensquashfs -F "$PKGBUILDDIR/files.txt" "$OS_RELEASE/rootfs.img" + rm "$PKGBUILDDIR/files.txt" # copy helper scripts local linux_image="vmlinuz" diff --git a/pkg/release-rpi3/build b/pkg/release-rpi3/build index d4cb367..ad66c91 100755 --- a/pkg/release-rpi3/build +++ b/pkg/release-rpi3/build @@ -4,7 +4,12 @@ SUBPKG="release" build() { pkg install -om -r "$PKGBUILDDIR/boot" -R "$REPODIR" \ boot-rpi boot-rpi-dtbo boot-rpi-dtb linux - pkg2sqfs -c xz "$REPODIR/rootfs.pkg" "boot/rootfs.img" + + pkg dump -l pkg -r "$TCDIR/$TARGET" "$REPODIR/rootfs.pkg" \ + > "$PKGBUILDDIR/files.txt" + + gensquashfs -F "$PKGBUILDDIR/files.txt" "boot/rootfs.img" + rm "$PKGBUILDDIR/files.txt" # copy files from this package cp "$SCRIPTDIR/pkg/$PKGNAME/install.sh" "$PKGBUILDDIR" diff --git a/pkg/tc-squashfs/build b/pkg/tc-squashfs/build new file mode 100755 index 0000000..b812f2b --- /dev/null +++ b/pkg/tc-squashfs/build @@ -0,0 +1,28 @@ +VERSION="0.1" +SRCDIR="squashfs-tools-ng-${VERSION}" +TARBALL="${SRCDIR}.tar.xz" +URL="https://infraroot.at/pub/squashfs" +SHA256SUM="d09b4632a7e2690810e5312a28906da9b8804b1901f20066aaeb5053020c8e40" +DEPENDS="" + +prepare() { + return +} + +build() { + $1/configure --prefix="$TCDIR" --disable-static \ + --build="$HOSTTUPLE" --host="$HOSTTUPLE" + + make -j $NUMJOBS +} + +deploy() { + make install + + touch "$PKGDEPLOYDIR/$PKGNAME.files" + touch "$PKGDEPLOYDIR/$PKGNAME.desc" +} + +check_update() { + return +} diff --git a/pkg/toolchain/build b/pkg/toolchain/build index 17050ef..50749a9 100755 --- a/pkg/toolchain/build +++ b/pkg/toolchain/build @@ -1,4 +1,5 @@ DEPENDS="tc-binutils crt-dev libstdc++-dev tc-file tc-pkgtool basefiles" +DEPENDS="$DEPENDS tc-squashfs" build() { return