stages: 2/04-iso: Do not include kernel build/source tree in the LiveCD
[dragora.git] / stages / 2 / 02-squashfs
blobb3b82a4087465baded10670af49c0836eebc35ee
1 # Build script for squashfs4.3+.
3 # Copyright (c) 2018-2020, 2023 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2022 DustDFG, <dfgdust@gmail.com>.
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
10 #    http://www.apache.org/licenses/LICENSE-2.0
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.
18 version=20230406_cbaa34a
20 cd -- "$TMPDIR"
21 rm -rf squashfs-tools-${version} \
22        "${rootdir}/squashfs-tools_lzip"
23 unpack "${worktree}/sources/squashfs-tools-${version}.tar.lz"
25 # Build instructions
26 cd squashfs-tools-${version}
28 # Note:
29 # The build environment for cross-compilation is not imported,
30 # the squashfs-tools installation must work from the host system,
31 # this will produce the compressed squash-image
33 # Apply a patch to include LZIP support
34 patch -p1 < "${worktree}/patches/squashfs-tools/squashfs-tools-20221209_c901403_lzip-0.diff"
36 cd squashfs-tools
39 # We turn OFF the LZIP support for now until further research in
40 # order to have a correct behavior while booting the live CD.
43 make -j${jobs} CC=cc LDFLAGS="" \
44  GZIP_SUPPORT=1 \
45  LZIP_SUPPORT=0 \
46  XZ_SUPPORT=0 \
47  LZO_SUPPORT=0 \
48  LZ4_SUPPORT=0 \
49  ZSTD_SUPPORT=0 \
50  COMP_DEFAULT=gzip \
51  XATTR_SUPPORT=1 \
52  install INSTALL_DIR="${rootdir}/squashfs-tools_lzip"
54 cleanup()
56     cd -- "$TMPDIR" && rm -rf squashfs-tools-${version}