slitaz-modular view mkiso.sh @ rev 64

Updated slitaz-modular script to make subfolders for differnet flavors packages lists. This way you can get a iso to load one of the more basic flavors.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Apr 12 20:20:45 2011 +0000 (2011-04-12)
parents 636e958e0560
children 51467048ef4f
line source
1 #!/bin/bash
3 . /etc/slitaz/slitaz.conf
4 . /etc/slitaz/tazwok.conf
6 QUIET="y"
7 FORCE="y"
8 export LABEL="slitaz_$(date +%Y%m)"
9 PUBLISHER="Slitaz"
10 APPLICATION="Slitaz"
11 CREATE_DEFAULT="n"
12 BASEDIR="$(pwd)"
13 PROFILE="$BASEDIR/$1"
14 ver=""
15 CDNAME="slitaz"
16 RMSTUFF=n
17 MVSTUFF=n
18 UNGZIP=n
19 EXT="xz"
20 COMPRESSION="xz -Xbcj x86"
21 MKOPTION="-b 256k"
22 BASE_MODULES=""
23 MODULES=""
24 UNION_MODULES=""
25 WORKING="$PROFILE/working"
26 INITRAMFS="$WORKING/initramfs"
27 UNION="$WORKING/union"
28 LOG="$WORKING/log"
29 ISODIR="$WORKING/iso"
30 IMGNAME="$PROFILE/$CDNAME-$1-$(date +%F).iso"
31 IMGMD5NAME="$IMGNAME.md5"
32 LASTBR="$INITRAMFS"
33 SGNFILE="$ISODIR/$CDNAME/livecd.sgn"
34 MODULES_DIR="$WORKING/modules"
35 HG_DIR="$WORKING/hg"
36 HG_URL="http://hg.slitaz.org"
37 HG_PATH="home/slitaz/repos"
38 COPY_HG="no"
39 UPDATE_HG="no"
40 BACKUP_SOURCES="no"
41 BACKUP_PACKAGES="no"
42 MIRROR_DIR="mirror"
43 PKGISO_DIR="$ISODIR/$MIRROR_DIR/packages"
44 SRCISO_DIR="$ISODIR/$MIRROR_DIR/src"
45 BACKUP_ALL="no"
46 KEY_FILES="init liblinuxlive linuxrc"
47 CLEAN_MODULES_DIR="no"
48 CLEAN_INITRAMFS="no"
49 PACKAGES_REPOSITORY="$LOCAL_REPOSITORY/packages"
50 INCOMING_REPOSITORY="$LOCAL_REPOSITORY/packages-incoming"
51 SOURCES_REPOSITORY="$LOCAL_REPOSITORY/src"
52 HG_LIST="flavors flavors-stable slitaz-base-files slitaz-boot-scripts slitaz-configs slitaz-dev-tools slitaz-doc slitaz-doc-wiki-data slitaz-forge slitaz-modular slitaz-pizza slitaz-tools tazlito tazpkg tazusb tazweb tazwok website wok wok-stable wok-tiny wok-undigest"
54 error () { echo -e "\033[1;31;40m!!! \033[1;37;40m$@\033[1;0m"; }
55 warn () { echo -e "\033[1;33;40m*** \033[1;37;40m$@\033[1;0m"; }
56 info () { echo -e "\033[1;32;40m>>> \033[1;37;40m$@\033[1;0m"; }
58 # do UID checking here so someone can at least get usage instructions
59 #if [ "$EUID" != "0" ]; then
60 # error "error: This script must be run as root."
61 # exit 1
62 #fi
63 if [ ! -d $PROFILE -o "$1" = "" ]; then
64 echo "$0 profile-name"
65 echo "ex $0 core"
66 exit 1
67 fi
69 ROOT_MOD="$(ls -1 ${PROFILE}/list | head -1)"
70 INST_ROOT="${MODULES_DIR}/$(basename ${ROOT_MOD} .list)"
72 if [ -f ${PROFILE}/config ]; then
73 source ${PROFILE}/config
74 fi
76 _overlay()
77 {
78 if [ -d ${MODULES_DIR}/overlay ]; then
79 rm -rf ${MODULES_DIR}/overlay
80 cp -rf ${PROFILE}/overlay ${MODULES_DIR}
81 cp -af ${BASEDIR}/initramfs/* ${MODULES_DIR}/overlay
82 else
83 cp -rf ${PROFILE}/overlay ${MODULES_DIR}
84 cp -af ${BASEDIR}/initramfs/* ${MODULES_DIR}/overlay
85 fi
87 if [ -f ${MODULES_DIR}/overlay/etc/local-mirror.conf ]; then
88 sed -i "s|^#PKGDIR|PKGDIR=/packages|g" ${MODULES_DIR}/overlay/etc/local-mirror.conf
89 sed -i "s|^#SRCDIR|SRCDIR=/src|g" ${MODULES_DIR}/overlay/etc/local-mirror.conf
90 fi
92 if [ "${QUIET}" = "y" ]; then
93 mksquashfs "${MODULES_DIR}/overlay" "${ISODIR}/${CDNAME}/modules/zzz.overlay.${EXT}" -comp ${COMPRESSION} -noappend ${MKOPTION} >/dev/null
94 else
95 mksquashfs "${MODULES_DIR}/overlay" "${ISODIR}/${CDNAME}/modules/zzz.overlay.${EXT}" -comp ${COMPRESSION} -noappend ${MKOPTION}
96 fi
97 }
99 lzma_switches()
100 {
101 echo "-d$(echo 24) -mt$(grep ^processor < /proc/cpuinfo | wc -l)"
102 }
104 # Pack rootfs
105 pack_rootfs()
106 {
107 ( cd $1 ; find . -print | cpio -o -H newc ) | \
108 if [ -x /usr/bin/lzma ]; then
109 info "Generating lzma'ed initramfs... "
110 lzma e -si -so $(lzma_switches $1) > $2
111 else
112 info "Generating gziped initramfs... "
113 gzip -9 > $2
114 fi
115 echo 1 > /tmp/rootfs
116 }
118 download()
119 {
120 for file in $@; do
121 wget -q $file && break
122 done
123 }
125 initramfs () {
127 if [ ! -e "$BASEDIR/initramfs/initramfs.list" ]; then
128 error "error: $BASEDIR/initramfs/initramfs.list doesn't exist, aborting."
129 exit 1
130 fi
132 if [ "$CLEAN_INITRAMFS" = "yes" ]; then
133 if [ -d ${INITRAMFS} ]; then
134 rm -Rf ${INITRAMFS}
135 fi
136 fi
138 if [ ! -d ${INITRAMFS} ]; then
139 mkdir -p $INITRAMFS
140 fi
142 info "Making bootable image"
143 cat "$BASEDIR/initramfs/initramfs.list" | grep -v "^#" | while read pkgname; do
144 if [ ! -f ${INITRAMFS}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then
145 tazpkg get-install $pkgname --root=$INITRAMFS | tee -a $LOG/initramfs.log
146 sleep 1
147 else
148 info "${pkgname} installed"
149 fi
150 done
152 if [ ! -d $ISODIR/boot ]; then
153 mkdir -p $ISODIR/boot
154 fi
156 #if [ ! -f $ISODIR/boot/bzImage ]; then
157 cp -a $INITRAMFS/boot/vmlinuz* $ISODIR/boot/bzImage
158 rm -f $INITRAMFS/boot/vmlinuz*
159 if [ -f $INITRAMFS/boot/gpxe ]; then
160 cp -a $INITRAMFS/boot/gpxe $ISODIR/boot/gpxe
161 rm -f $INITRAMFS/boot/gpxe
162 fi
163 #fi
164 if [ -d $BASEDIR/initramfs ]; then
165 for i in $KEY_FILES; do
166 if [ -f $BASEDIR/initramfs/$i ]; then
167 cp -af $BASEDIR/initramfs/$i $INITRAMFS
168 fi
169 done
170 fi
172 if [ -f $INITRAMFS/liblinuxlive ]; then
173 sed -i "s|^#MIRROR|MIRROR=$MIRROR_DIR|g" $INITRAMFS/liblinuxlive
174 fi
176 }
178 copy_hg() {
179 if [ ! -d ${HG_DIR}/${1}/${HG_PATH}/${1} ]; then
180 info "Cloning $1 repo ..."
181 hg clone $HG_URL/${1} ${HG_DIR}/${1}/${HG_PATH}/${1}
182 if [ $(grep -l "^HG_URL=$HG_URL" $PROFILE/config) ]; then
183 if [ ! $(grep -l "$HG_URL" ${HG_DIR}/${1}/${HG_PATH}/${1}/.hg/hgrc) ]; then
184 echo "mirror = $HG_URL/$1" >> ${HG_DIR}/${1}/${HG_PATH}/${1}/.hg/hgrc
185 fi
186 fi
187 elif [ -d ${HG_DIR}/${1}/${HG_PATH}/${1} -a ${UPDATE_HG} = "yes" ]; then
188 info "Updating $1 repo ..."
189 cd ${HG_DIR}/${1}/${HG_PATH}/${1}
190 hg pull $HG_URL/${1} -u
191 if [ $(grep -l "^HG_URL=$HG_URL" $PROFILE/config) ]; then
192 if [ ! $(grep -l "$HG_URL" ${HG_DIR}/${1}/${HG_PATH}/${1}/.hg/hgrc) ]; then
193 echo "mirror = $HG_URL/$1" >> ${HG_DIR}/${1}/${HG_PATH}/${1}/.hg/hgrc
194 fi
195 fi
196 cd $PROFILE
197 fi
198 }
200 squashfs_hg() {
201 if [ ! -d "$ISODIR/$CDNAME/modules/hg" ]; then
202 mkdir -p "$ISODIR/$CDNAME/modules/hg"
203 fi
204 if [ -d ${HG_DIR}/${1}/ ]; then
205 _mksquash ${HG_DIR}/${1} "$ISODIR/$CDNAME/modules/hg/" /${HG_PATH}/${1}
206 fi
207 }
209 slitaz_union () {
211 if [ -d ${MODULES_DIR}/${mod}/var/lib/tazpkg/installed ]; then
212 echo "${mod} module exist. Moving on."
213 elif [ ! -d ${MODULES_DIR}/${mod}/var/lib/tazpkg/installed ]; then
214 if [ -f "$PROFILE/list/${mod}.list" ]; then
215 cat "$PROFILE/list/${mod}.list" | grep -v "^#" | while read pkgname; do
216 if [ ! -f ${UNION}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then
217 tazpkg get-install $pkgname --root=${UNION} | tee -a ${LOG}/${mod}-current.log
218 sleep 1
219 else
220 info "${pkgname} installed"
221 fi
222 done
223 fi
225 if [ -f $PROFILE/list/${mod}.removelist ]; then
226 cat "$PROFILE/list/${mod}.removelist" | grep -v "^#" | while read pkgname; do
227 if [ -f ${UNION}/var/lib/tazpkg/installed/${pkgname}/files.list ]; then
228 echo "y" | tazpkg remove ${pkgname} --root=${UNION} | tee -a ${LOG}/${mod}-current.log
229 sleep 1
230 else
231 info "${pkgname} removed"
232 fi
233 done
234 fi
235 fi
236 }
238 union () {
239 if [ "$BASE_MODULES" != "" ]; then
240 UNION_MODULES="$BASE_MODULES $MODULES"
241 elif [ "$MODULES" != "" ]; then
242 UNION_MODULES="$MODULES"
243 else
244 error "Error: no modules assigned in config for profile."
245 exit 1
246 fi
248 mkdir -p $WORKING
249 mkdir -p $UNION
250 mkdir -p $LOG
251 mkdir -p $ISODIR/${CDNAME}/base
252 mkdir -p $ISODIR/${CDNAME}/modules
253 mkdir -p $ISODIR/${CDNAME}/optional
254 mkdir -p $ISODIR/${CDNAME}/rootcopy
255 mkdir -p $ISODIR/${CDNAME}/tmp
256 mkdir -p $LASTBR
258 touch $SGNFILE
260 modprobe aufs
261 if [ $? -ne 0 ]; then
262 error "Error loading Union filesystem module. (aufs)"
263 exit 1
264 fi
266 # $INITRAMFS is now $LASTBR
267 # This will be copyed to /mnt/memory/changes on boot
268 initramfs
270 mount -t aufs -o br:${LASTBR}=rw aufs ${UNION}
271 if [ $? -ne 0 ]; then
272 error "Error mounting $union."
273 exit 1
274 fi
276 info "====> Installing packages to '$UNION'"
277 for mod in $UNION_MODULES; do
279 if [ "$CLEAN_MODULES_DIR" = "yes" ]; then
280 if [ -d $MODULES_DIR/$mod ]; then
281 rm -Rf $MODULES_DIR/$mod
282 fi
283 fi
285 if [ ! -d $MODULES_DIR/$mod ]; then
286 mkdir -p $MODULES_DIR/$mod
287 fi
288 info "Adding $MODULES_DIR/$mod as top branch of union."
289 mount -t aufs -o remount,add:0:${MODULES_DIR}/${mod}=rw aufs $UNION
290 info "Adding $LASTBR as lower branch of union."
291 mount -t aufs -o remount,mod:${LASTBR}=rr+wh aufs $UNION
292 LASTBR="$MODULES_DIR/${mod}"
294 slitaz_union
295 done
297 if [ -d ${UNION}/${INSTALLED} ]; then
298 ls ${UNION}/${INSTALLED} | sort > $ISODIR/packages-installed.list
299 fi
301 info "Unmounting union"
302 umount -l "${UNION}"
304 info "Removing unionfs .wh. files."
305 find ${MODULES_DIR} -type f -name ".wh.*" -exec rm {} \;
306 find ${MODULES_DIR} -type d -name ".wh.*" -exec rm -rf {} \;
307 }
309 backup_pkg() {
310 if [ "${BACKUP_PACKAGES}" = "yes" ]; then
311 [ -d $PKGISO_DIR ] && rm -r $PKGISO_DIR
312 mkdir -p $PKGISO_DIR
313 WOK=${HG_DIR}/wok/home/slitaz/repos/wok
314 info "Making cooking list based installed packages in union"
315 # this is to filter out packages build by get-
316 # packages that don't exist in repo or wok
317 cat $ISODIR/packages-installed.list | while read pkg; do
318 if [ ! -f $WOK/$pkg/receipt ]; then
319 sed -i "s|$pkg||g" $ISODIR/packages-installed.list
320 fi
321 done
322 tazwok gen-cooklist $ISODIR/packages-installed.list > $ISODIR/cookorder.list
323 [ -f $INCOMING_REPOSITORY/wok-wanted.txt ] || tazwok gen-wok-db
325 CACHE_REPOSITORY="$CACHE_DIR/$(cat /etc/slitaz-release)/packages"
327 cat $ISODIR/cookorder.list | grep -v "^#" | while read pkg; do
328 rwanted=$(grep $'\t'$pkg$ $INCOMING_REPOSITORY/wok-wanted.txt | cut -f 1)
329 pkg_VERSION="$(grep -m1 -A1 ^$pkg$ $PACKAGES_REPOSITORY/packages.txt | \
330 tail -1 | sed 's/ *//')"
331 incoming_pkg_VERSION="$(grep -m1 -A1 ^$pkg$ $INCOMING_REPOSITORY/packages.txt | \
332 tail -1 | sed 's/ *//')"
333 for wanted in $rwanted; do
334 if [ -f $INCOMING_REPOSITORY/$wanted-$incoming_pkg_VERSION.tazpkg ]; then
335 ln -sf $INCOMING_REPOSITORY/$wanted-$incoming_pkg_VERSION.tazpkg $PKGISO_DIR/$wanted-$incoming_pkg_VERSION.tazpkg
336 elif [ -f $PACKAGES_REPOSITORY/$wanted-$pkg_VERSION.tazpkg ]; then
337 ln -sf $PACKAGES_REPOSITORY/$wanted-$pkg_VERSION.tazpkg $PKGISO_DIR/$wanted-$pkg_VERSION.tazpkg
338 elif [ -f $CACHE_REPOSITORY/$Wanted-$pkg_VERSION.tazpkg ]; then
339 ln -sf $CACHE_REPOSITORY/$wanted-$pkg_VERSION.tazpkg $PKGISO_DIR/$wanted-$pkg_VERSION.tazpkg
340 fi
341 done
343 for i in $(ls $WOK/$pkg/receipt); do
344 unset SOURCE TARBALL WANTED PACKAGE VERSION pkg_VERSION COOK_OPT
345 source $i
346 pkg_VERSION="$(grep -m1 -A1 ^$PACKAGE$ $PACKAGES_REPOSITORY/packages.txt | \
347 tail -1 | sed 's/ *//')"
348 incoming_pkg_VERSION="$(grep -m1 -A1 ^$pkg$ $INCOMING_REPOSITORY/packages.txt | \
349 tail -1 | sed 's/ *//')"
350 [ "$WGET_URL" ] || continue
351 if [ -f $INCOMING_REPOSITORY/$PACKAGE-$incoming_pkg_VERSION.tazpkg ]; then
352 ln -sf $INCOMING_REPOSITORY/$PACKAGE-$incoming_pkg_VERSION.tazpkg $PKGISO_DIR/$PACKAGE-$incoming_pkg_VERSION.tazpkg
353 elif [ -f $PACKAGES_REPOSITORY/$PACKAGE-$pkg_VERSION.tazpkg ]; then
354 ln -sf $PACKAGES_REPOSITORY/$PACKAGE-$pkg_VERSION.tazpkg $PKGISO_DIR/$PACKAGE-$pkg_VERSION.tazpkg
355 elif [ -f $CACHE_REPOSITORY/$PACKAGE-$pkg_VERSION.tazpkg ]; then
356 ln -sf $CACHE_REPOSITORY/$PACKAGE-$pkg_VERSION.tazpkg $PKGISO_DIR/$PACKAGE-$pkg_VERSION.tazpkg
357 fi
358 done
359 done
361 [ -d $PKGISO_DIR ] && tazwok gen-list $PKGISO_DIR
362 fi
364 }
366 backup_src() {
368 if [ "${BACKUP_PACKAGES}" = "yes" -a "${BACKUP_SOURCES}" = "yes" ]; then
369 [ -d $SOURCES_REPOSITORY ] || mkdir -p $SOURCES_REPOSITORY
370 [ -d $SRCISO_DIR ] && rm -r $SRCISO_DIR
371 mkdir -p $SRCISO_DIR
372 WOK=${HG_DIR}/wok/home/slitaz/repos/wok
373 cat $ISODIR/cookorder.list | grep -v "^#"| while read pkg; do
374 #rwanted=$(grep $'\t'$pkg$ $INCOMING_REPOSITORY/wok-wanted.txt | cut -f 1)
375 for i in $(ls $WOK/$pkg/receipt); do
376 unset SOURCE TARBALL WANTED PACKAGE VERSION COOK_OPT
377 source $i
378 { [ ! "$TARBALL" ] || [ ! "$WGET_URL" ] ; } && continue
379 if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \
380 [ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then
381 tazwok get-src $PACKAGE --nounpack
382 if [ -f "$SOURCES_REPOSITORY/$TARBALL" ]; then
383 ln -sf $SOURCES_REPOSITORY/$TARBALL $SRCISO_DIR/$TARBALL
384 elif [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then
385 ln -sf $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma $SRCISO_DIR/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma
386 fi
387 else
388 [ -f "$SOURCES_REPOSITORY/$TARBALL" ] && ln -sf $SOURCES_REPOSITORY/$TARBALL $SRCISO_DIR/$TARBALL
389 [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && ln -sf $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma $SRCISO_DIR/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma
390 fi
391 done
392 done
393 cd $SRCISO_DIR
394 info "Make md5sum file for sources"
395 find * -not -type d | grep -v md5sum | xargs md5sum > md5sum
396 cd $WORKING
397 fi
399 }
401 backup_all()
402 {
403 if [ "${BACKUP_ALL}" = "yes" ]; then
404 [ -d $SRCISO_DIR ] || ln -sf $SOURCES_REPOSITORY $SRCISO_DIR
405 [ -d $PKGISO_DIR ] || ln -sf $PACKAGES_REPOSITORY $PKGISO_DIR
406 fi
407 }
409 # _mksquash dirname
410 _mksquash () {
411 if [ ! -d "$1" ]; then
412 error "Error: '$1' is not a directory"
413 return 1
414 fi
416 if [ ! -d "$2" ]; then
417 error "Error: '$2' is not a directory"
418 return 1
419 fi
421 if [ ! -d "${1}${3}" ]; then
422 error "Error: '${1}${3}' is not a directory"
423 return 1
424 fi
426 time_dir="${3}"
427 sqimg="${2}/$(basename ${1}).${EXT}"
428 info "====> Generating SquashFS image for '${1}'"
429 if [ -e "${sqimg}" ]; then
430 dirhaschanged=$(find ${1}${time_dir} -newer ${sqimg})
431 if [ "${dirhaschanged}" != "" ]; then
432 info "SquashFS image '${sqimg}' is not up to date, rebuilding..."
433 rm "${sqimg}"
434 else
435 info "SquashFS image '${sqimg}' is up to date, skipping."
436 return
437 fi
438 fi
440 info "Creating SquashFS image. This may take some time..."
441 start=$(date +%s)
442 if [ "${QUIET}" = "y" ]; then
443 mksquashfs "${1}" "${sqimg}" -noappend ${MKOPTION} -comp ${COMPRESSION} >/dev/null
444 else
445 mksquashfs "${1}" "${sqimg}" -noappend ${MKOPTION} -comp ${COMPRESSION}
446 fi
447 minutes=$(echo $start $(date +%s) | awk '{ printf "%0.2f",($2-$1)/60 }')
448 info "Image creation done in $minutes minutes."
449 }
451 imgcommon () {
452 for MOD in ${BASE_MODULES}; do
453 if [ -d "${MODULES_DIR}/${MOD}" ]; then
454 _mksquash "${MODULES_DIR}/${MOD}" "$ISODIR/$CDNAME/base" /var/lib/tazpkg/installed
455 fi
456 done
458 if [ "${MODULES}" != "" ]; then
459 for MOD in ${MODULES}; do
460 if [ -d "${MODULES_DIR}/${MOD}" ]; then
461 _mksquash "${MODULES_DIR}/${MOD}" "$ISODIR/$CDNAME/modules" /var/lib/tazpkg/installed
462 fi
463 done
464 fi
466 if [ "$HG_LIST" != "" ]; then
467 if [ "$COPY_HG" = "yes" ]; then
468 for hg in $HG_LIST; do
469 copy_hg $hg
470 squashfs_hg $hg
471 done
472 fi
473 fi
475 if [ "${HG_LIST}" != "" ]; then
476 for hg in ${HG_LIST}; do
477 if [ -d "${MODULES_DIR}/${hg}" ]; then
478 squashfs_hg $hg
479 fi
480 done
481 fi
483 [ -d $SRCISO_DIR ] && rm -r $SRCISO_DIR
484 [ -d $PKGISO_DIR ] && rm -r $PKGISO_DIR
486 if [ -d ${HG_DIR}/wok ]; then
487 backup_pkg
488 backup_src
489 fi
491 backup_all
493 info "====> Making bootable image"
495 # Sanity checks
496 if [ ! -d "${ISODIR}" ]; then
497 error "Error: '${ISODIR}' doesn't exist. What did you do?!"
498 exit 1
499 fi
501 if [ ! -f "${SGNFILE}" ]; then
502 error "Error: the ${SGNFILE} file doesn't exist. This image won't do anything"
503 error " Protecting you from yourself and erroring out here..."
504 exit 1
505 fi
508 if [ -e "${IMGNAME}" ]; then
509 if [ "${FORCE}" = "y" ]; then
510 info "Removing existing bootable image..."
511 rm -rf "${IMGNAME}"
512 else
513 error "Error: Image '${IMGNAME}' already exists, aborting."
514 exit 1
515 fi
516 fi
518 }
520 make_iso () {
521 imgcommon
523 info "Creating rootfs.gz"
524 pack_rootfs $INITRAMFS $ISODIR/boot/rootfs.gz
526 if [ -d $PROFILE/rootcd ]; then
527 cp -af $PROFILE/rootcd/* $ISODIR/
528 fi
530 info "Copying isolinux files..."
531 if [ -d $INITRAMFS/boot/isolinux ]; then
532 cp -a $INITRAMFS/boot/isolinux $ISODIR/boot
533 fi
535 if [ -d ${PROFILE}/overlay ]; then
536 _overlay
537 fi
539 info "Creating ISO image..."
540 genisoimage -R -l -f -o $IMGNAME -b boot/isolinux/isolinux.bin \
541 -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
542 -uid 0 -gid 0 \
543 -udf -allow-limited-size -iso-level 3 \
544 -V "SliTaz" -input-charset utf-8 -boot-info-table $ISODIR
545 if [ -x /usr/bin/isohybrid ]; then
546 info "Creating hybrid ISO..."
547 isohybrid "${IMGNAME}"
548 fi
549 md5sum "$IMGNAME" > $IMGMD5NAME
550 sed -i "s|$PROFILE/||g" $IMGMD5NAME
551 }
553 if [ "$MODULES" != "" ]; then
554 union
555 else
556 error "MODULES was empty. exiting."
557 exit 1
558 fi
560 make_iso