@@ -703,13 +703,13 fi | |||||
703 | # Execute custom scripts inside the chroot |
|
703 | # Execute custom scripts inside the chroot | |
704 | if [ -n "$CHROOT_SCRIPTS" ] && [ -d "$CHROOT_SCRIPTS" ] ; then |
|
704 | if [ -n "$CHROOT_SCRIPTS" ] && [ -d "$CHROOT_SCRIPTS" ] ; then | |
705 | cp -r "${CHROOT_SCRIPTS}" "${R}/chroot_scripts" |
|
705 | cp -r "${CHROOT_SCRIPTS}" "${R}/chroot_scripts" | |
706 |
chroot_exec /bin/bash -x << |
|
706 | chroot_exec /bin/bash -x << EOF | |
707 |
|
|
707 | for SCRIPT in /chroot_scripts/* ; do | |
708 |
|
|
708 | if [ -f $SCRIPT -a -x $SCRIPT ] ; then | |
709 |
|
|
709 | $SCRIPT | |
710 |
|
|
710 | fi | |
711 |
|
|
711 | done | |
712 |
|
|
712 | EOF | |
713 | rm -rf "${R}/chroot_scripts" |
|
713 | rm -rf "${R}/chroot_scripts" | |
714 | fi |
|
714 | fi | |
715 |
|
715 | |||
@@ -824,14 +824,14 if [ "$ENABLE_SPLITFS" = true ] ; then | |||||
824 | dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count=0 seek="${ROOT_SECTORS}" |
|
824 | dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count=0 seek="${ROOT_SECTORS}" | |
825 |
|
825 | |||
826 | # Write firmware/boot partition tables |
|
826 | # Write firmware/boot partition tables | |
827 | sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null <<EOM |
|
827 | sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null << EOM | |
828 |
|
|
828 | ${TABLE_SECTORS},${FRMW_SECTORS},c,* | |
829 |
|
|
829 | EOM | |
830 |
|
830 | |||
831 | # Write root partition table |
|
831 | # Write root partition table | |
832 | sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null <<EOM |
|
832 | sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null << EOM | |
833 |
|
|
833 | ${TABLE_SECTORS},${ROOT_SECTORS},83 | |
834 |
|
|
834 | EOM | |
835 |
|
835 | |||
836 | # Setup temporary loop devices |
|
836 | # Setup temporary loop devices | |
837 | FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME"-frmw.img)" |
|
837 | FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME"-frmw.img)" | |
@@ -841,10 +841,10 else # ENABLE_SPLITFS=false | |||||
841 | dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count=0 seek="${IMAGE_SECTORS}" |
|
841 | dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count=0 seek="${IMAGE_SECTORS}" | |
842 |
|
842 | |||
843 | # Write partition table |
|
843 | # Write partition table | |
844 | sfdisk -q -L -uS -f "$IMAGE_NAME.img" 2> /dev/null <<EOM |
|
844 | sfdisk -q -L -uS -f "$IMAGE_NAME.img" 2> /dev/null << EOM | |
845 |
|
|
845 | ${TABLE_SECTORS},${FRMW_SECTORS},c,* | |
846 |
|
|
846 | ${ROOT_OFFSET},${ROOT_SECTORS},83 | |
847 |
|
|
847 | EOM | |
848 |
|
848 | |||
849 | # Setup temporary loop devices |
|
849 | # Setup temporary loop devices | |
850 | FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME".img)" |
|
850 | FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME".img)" |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant