close enough, cleanup formatting

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/10/merge
Robert Nelson 13 years ago
parent 45bfa203d9
commit 7bb96ad290

@ -124,7 +124,7 @@ function is_valid_addon {
} }
function check_root { function check_root {
if [[ $UID -ne 0 ]]; then if [[ ${UID} -ne 0 ]] ; then
echo "$0 must be run as sudo user or root" echo "$0 must be run as sudo user or root"
exit exit
fi fi
@ -338,8 +338,8 @@ function actually_dl_netinstall {
function check_dl_netinstall { function check_dl_netinstall {
MD5SUM=$(md5sum "${DIR}/dl/${DISTARCH}/${NETINSTALL}" | awk '{print $1}') MD5SUM=$(md5sum "${DIR}/dl/${DISTARCH}/${NETINSTALL}" | awk '{print $1}')
if [ "=$TEST_MD5SUM=" != "=$MD5SUM=" ]; then if [ "x${TEST_MD5SUM}" != "x${MD5SUM}" ] ; then
echo "Note: NetInstall md5sum has changed: $MD5SUM" echo "Note: NetInstall md5sum has changed: ${MD5SUM}"
echo "-----------------------------" echo "-----------------------------"
rm -f "${DIR}/dl/${DISTARCH}/${NETINSTALL}" || true rm -f "${DIR}/dl/${DISTARCH}/${NETINSTALL}" || true
actually_dl_netinstall actually_dl_netinstall
@ -356,7 +356,6 @@ function dl_netinstall_image {
echo "-----------------------------" echo "-----------------------------"
unset UBOOTWRAPPER unset UBOOTWRAPPER
case "${DISTARCH}" in case "${DISTARCH}" in
maverick-armel) maverick-armel)
TEST_MD5SUM=$MAVERICK_MD5SUM TEST_MD5SUM=$MAVERICK_MD5SUM
@ -424,7 +423,6 @@ function dl_netinstall_image {
UBOOTWRAPPER=1 UBOOTWRAPPER=1
NETINSTALL="uInitrd" NETINSTALL="uInitrd"
;; ;;
esac esac
if [ -f "${DIR}/dl/${DISTARCH}/${NETINSTALL}" ] ; then if [ -f "${DIR}/dl/${DISTARCH}/${NETINSTALL}" ] ; then
@ -432,7 +430,6 @@ esac
else else
actually_dl_netinstall actually_dl_netinstall
fi fi
echo "md5sum of NetInstall: ${MD5SUM}" echo "md5sum of NetInstall: ${MD5SUM}"
} }
@ -444,6 +441,7 @@ function boot_uenv_txt_template {
cat > ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ cat > ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__
#These video values are now set by default in the bootloader #These video values are now set by default in the bootloader
#uncomment/change if you need something else #uncomment/change if you need something else
UENV_VRAM UENV_VRAM
UENV_FB UENV_FB
UENV_TIMING UENV_TIMING
@ -681,7 +679,11 @@ function tweak_boot_scripts {
sed -i -e 's:VIDEO_OMAPFB_MODE:'$VIDEO_OMAPFB_MODE':g' ${TEMPDIR}/bootscripts/${ALL} sed -i -e 's:VIDEO_OMAPFB_MODE:'$VIDEO_OMAPFB_MODE':g' ${TEMPDIR}/bootscripts/${ALL}
#UENV_TIMING -> dvimode=1280x720MR-16@60 #UENV_TIMING -> dvimode=1280x720MR-16@60
if [ "x${ADDON}" == "xpico" ] ; then
sed -i -e 's:UENV_TIMING:dvimode=VIDEO_TIMING:g' ${TEMPDIR}/bootscripts/${ALL}
else
sed -i -e 's:UENV_TIMING:#dvimode=VIDEO_TIMING:g' ${TEMPDIR}/bootscripts/${ALL} sed -i -e 's:UENV_TIMING:#dvimode=VIDEO_TIMING:g' ${TEMPDIR}/bootscripts/${ALL}
fi
sed -i -e 's:VIDEO_TIMING:'$VIDEO_TIMING':g' ${TEMPDIR}/bootscripts/${ALL} sed -i -e 's:VIDEO_TIMING:'$VIDEO_TIMING':g' ${TEMPDIR}/bootscripts/${ALL}
#optargs=VIDEO_CONSOLE -> optargs=console=tty0 #optargs=VIDEO_CONSOLE -> optargs=console=tty0
@ -1059,7 +1061,7 @@ function omap_fatfs_boot_part {
echo "-----------------------------" echo "-----------------------------"
parted --script ${MMC} set 1 boot on parted --script ${MMC} set 1 boot on
if [ "$FDISK_DEBUG" ];then if [ "${FDISK_DEBUG}" ] ; then
echo "Debug: Partition 1 layout:" echo "Debug: Partition 1 layout:"
echo "-----------------------------" echo "-----------------------------"
fdisk -l ${MMC} fdisk -l ${MMC}
@ -1612,35 +1614,34 @@ function check_uboot_type {
function check_distro { function check_distro {
unset IN_VALID_DISTRO unset IN_VALID_DISTRO
case "${DISTRO_TYPE}" in case "${DISTRO_TYPE}" in
natty)
DIST=natty
ARCH=armel
;;
maverick) maverick)
DIST=maverick DIST="maverick"
ARCH=armel ARCH="armel"
;;
natty)
DIST="natty"
ARCH="armel"
;; ;;
oneiric) oneiric)
DIST=oneiric DIST="oneiric"
ARCH=armel ARCH="armel"
;; ;;
precise-armel) precise-armel)
DIST=precise DIST="precise"
ARCH=armel ARCH="armel"
;; ;;
precise-armhf) precise-armhf)
DIST=precise DIST="precise"
ARCH=armhf ARCH="armhf"
;; ;;
quantal-armhf) quantal-armhf)
DIST="quantal" DIST="quantal"
ARCH="armhf" ARCH="armhf"
;; ;;
squeeze) squeeze)
DIST=squeeze DIST="squeeze"
ARCH=armel ARCH="armel"
;; ;;
wheezy-armel) wheezy-armel)
DIST="wheezy" DIST="wheezy"
@ -1674,7 +1675,6 @@ function check_distro {
exit exit
;; ;;
esac esac
DISTARCH="${DIST}-${ARCH}" DISTARCH="${DIST}-${ARCH}"
} }
@ -1768,8 +1768,7 @@ while [ ! -z "$1" ]; do
--mmc) --mmc)
checkparm $2 checkparm $2
MMC="$2" MMC="$2"
if [[ "${MMC}" =~ "mmcblk" ]] if [[ "${MMC}" =~ "mmcblk" ]] ; then
then
PARTITION_PREFIX="p" PARTITION_PREFIX="p"
fi fi
check_root check_root

Loading…
Cancel
Save