02-squashfs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Build script for squashfs4.3+.
  2. #
  3. # Copyright (c) 2018-2020, 2023 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2022 DustDFG, <dfgdust@gmail.com>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. version=20230406_cbaa34a
  18. cd -- "$TMPDIR"
  19. rm -rf squashfs-tools-${version} \
  20. "${rootdir}/squashfs-tools_lzip"
  21. unpack "${worktree}/sources/squashfs-tools-${version}.tar.lz"
  22. # Build instructions
  23. cd squashfs-tools-${version}
  24. # Note:
  25. # The build environment for cross-compilation is not imported,
  26. # the squashfs-tools installation must work from the host system,
  27. # this will produce the compressed squash-image
  28. # Apply a patch to include LZIP support
  29. patch -p1 < "${worktree}/patches/squashfs-tools/squashfs-tools-20221209_c901403_lzip-0.diff"
  30. cd squashfs-tools
  31. ##
  32. # We turn OFF the LZIP support for now until further research in
  33. # order to have a correct behavior while booting the live CD.
  34. ##
  35. make -j${jobs} CC=cc LDFLAGS="" \
  36. GZIP_SUPPORT=1 \
  37. LZIP_SUPPORT=0 \
  38. XZ_SUPPORT=0 \
  39. LZO_SUPPORT=0 \
  40. LZ4_SUPPORT=0 \
  41. ZSTD_SUPPORT=0 \
  42. COMP_DEFAULT=gzip \
  43. XATTR_SUPPORT=1 \
  44. install INSTALL_DIR="${rootdir}/squashfs-tools_lzip"
  45. cleanup()
  46. {
  47. cd -- "$TMPDIR" && rm -rf squashfs-tools-${version}
  48. }