From: Patrick McCarty Date: Thu, 1 Aug 2013 19:43:06 +0000 (-0700) Subject: Split extlinux installation into a new function X-Git-Tag: accepted/tizen/20130925.224718~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae29a4b2f577412ae5866eacf79a80c2991626ef;p=platform%2Fupstream%2Fsystem-installer.git Split extlinux installation into a new function The extlinux install should only be done for MBR, so split this logic out into a new function. Also, use $INSTALLERFW_KERNEL_OPTS in the extlinux.conf instead of the hardcoded options. Change-Id: I2669ebcd9d3327ca18a1d6d102b6ee07d274eeaa --- diff --git a/scripts/system-installer b/scripts/system-installer index f881f8d..ad3525a 100644 --- a/scripts/system-installer +++ b/scripts/system-installer @@ -208,20 +208,7 @@ function mount_device { mount ${TARGET_DEV}${partnum} ${TGTMNT}/${mountpoint} } -function install_os { - rsync -WaAHXSh --exclude='/dev/' --exclude='/lost+found/' --exclude='/media/*' --exclude='/sys/' --exclude='/proc/' --exclude="/tmp/" --exclude="/run/" $SRCOSMNT/ $TGTMNT - - mkdir ${TGTMNT}/dev/ - chmod 0755 ${TGTMNT}/dev - - rm ${TGTMNT}/etc/fstab - - if [[ $FILESYSTEM = "btrfs" ]]; then - ROOTFLAGS="rootflags=subvol=tizen" - else - ROOTFLAGS="" - fi - +function install_extlinux { mkdir -p ${TGTMNT}/boot/extlinux cat > ${TGTMNT}/boot/extlinux/extlinux.conf << EOF default vesamenu.c32 @@ -244,7 +231,7 @@ menu clear label tizen menu label Boot Tizen kernel ../vmlinuz - append root=${ROOTFS} rw vga=current splash=silent quiet ${ROOTFLAGS} + append root=${ROOTFS} ${INSTALLERFW_KERNEL_OPTS} ${ROOTFLAGS} menu default EOF @@ -252,6 +239,25 @@ EOF cat /usr/share/syslinux/mbr.bin > ${TARGET_DEV} /sbin/extlinux -i ${TGTMNT}/boot/extlinux +} + +function install_os { + rsync -WaAHXSh --exclude='/dev/' --exclude='/lost+found/' --exclude='/media/*' --exclude='/sys/' --exclude='/proc/' --exclude="/tmp/" --exclude="/run/" $SRCOSMNT/ $TGTMNT + + mkdir ${TGTMNT}/dev/ + chmod 0755 ${TGTMNT}/dev + + rm ${TGTMNT}/etc/fstab + + if [[ $FILESYSTEM = "btrfs" ]]; then + ROOTFLAGS="rootflags=subvol=tizen" + else + ROOTFLAGS="" + fi + + if [ "$INSTALLERFW_PTABLE_FORMAT" = "msdos" ]; then + install_extlinux + fi if [[ $FILESYSTEM = "btrfs" ]]; then sed -i 's|SUBVOLUME="/"|SUBVOLUME="'${TGTMNT}'"|' /etc/snapper/configs/root