Magellan Linux

Diff of /tags/grubby-8_15/new-kernel-pkg

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1749 by niro, Sat Feb 18 01:09:18 2012 UTC revision 1752 by niro, Sat Feb 18 01:22:03 2012 UTC
# Line 85  then Line 85  then
85   lilo=/sbin/zipl   lilo=/sbin/zipl
86   runLilo="yes"   runLilo="yes"
87   isx86=""   isx86=""
88  elif [[ ${ARCH} = armv7l ]]  elif [[ ${ARCH} = armv7l ]] || [[ ${ARCH} = armv7hl ]]
89  then  then
90     machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')
91   liloConfig=""   liloConfig=""
92   bootPrefix=/boot   bootPrefix=/boot
93   ubootDir=${UBOOT_DIR:-"/boot/uboot"}   ubootDir=${UBOOT_DIR:-"/boot/uboot"}
# Line 98  then Line 99  then
99   mounted=""   mounted=""
100   liloFlag=""   liloFlag=""
101   isx86=""   isx86=""
102     if [[ ${machine} == "OMAP3 Beagle Board" ]] || [[ ${machine} == "OMAP4 Panda board" ]]
103     then
104     ubootAddress=0x80008000
105     else
106     ubootAddress=0x00008000
107     fi
108  else  else
109   # this leaves i?86 and x86_64   # this leaves i?86 and x86_64
110   liloConfig=/etc/lilo.conf   liloConfig=/etc/lilo.conf
# Line 400  remove() Line 407  remove()
407   [ -f ${tmpKList} ] && rm -f ${tmpKList}   [ -f ${tmpKList} ] && rm -f ${tmpKList}
408   fi   fi
409   else   else
410   [[ -n ${verbose} ]] && echo "No previous kernel version. uBoot images not removed!"   [[ -n ${verbose} ]] && echo "No previous kernel version.  U-Boot images not removed!"
411   fi   fi
412   else   else
413   [[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not modifying ${ubootDir}"   [[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not modifying ${ubootDir}"
# Line 500  update() Line 507  update()
507   [[ -n ${verbose} ]] && echo "adding $version to ${ubootDir}..."   [[ -n ${verbose} ]] && echo "adding $version to ${ubootDir}..."
508    
509   [[ -n ${verbose} ]] && echo "creating uImage-${version}"   [[ -n ${verbose} ]] && echo "creating uImage-${version}"
510   mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 \   mkimage -A arm -O linux -T kernel -C none -a ${ubootAddress} \
511   -n ${version} -d ${bootPrefix}/${kernelName}-${version} ${ubootDir}/uImage-${version}   -e ${ubootAddress} -n ${version} \
512     -d ${bootPrefix}/${kernelName}-${version} ${ubootDir}/uImage-${version}
513    
514   [[ -n ${verbose} ]] && echo "creating uInitrd-${version}"   [[ -n ${verbose} ]] && echo "creating uInitrd-${version}"
515   mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 \   mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 \
# Line 805  fi Line 813  fi
813  [[ -n ${liloConfig} ]] && [ -f ${liloConfig} ] && cfgLilo=1  [[ -n ${liloConfig} ]] && [ -f ${liloConfig} ] && cfgLilo=1
814  [[ -n ${extlinuxConfig} ]] && [ -f ${extlinuxConfig} ] && cfgExtlinux=1  [[ -n ${extlinuxConfig} ]] && [ -f ${extlinuxConfig} ] && cfgExtlinux=1
815    
816  # if we have a uBoot directory, check if it is mounted.  # if we have a U-Boot directory, but no boot script, check if the directory
817  # if not, mount it. Then check if a boot script exists.  # is mounted.  If not, mount it, and then check if a boot script exists.
818  if [[ -n ${ubootDir} ]]  if [[ -n ${ubootDir} ]]
819  then  then
820   mountEntry=$(mount | grep ${ubootDir})   if [ -f ${ubootScript} ]
  if [[ -z ${mountEntry} ]]  
821   then   then
822   mount ${ubootDevice} ${ubootDir}   cfguBoot=1
823   mounted=1   else
824     mountEntry=$(mount | grep ${ubootDir})
825     if [[ -z ${mountEntry} ]]
826     then
827     mount ${ubootDevice} ${ubootDir}
828     mounted=1
829     fi
830     [ -f ${ubootScript} ] && cfguBoot=1
831   fi   fi
  [ -f ${ubootScript} ] && cfguBoot=1  
832  fi  fi
833    
834  # if we have a lilo config on an x86 box, see if the default boot loader  # if we have a lilo config on an x86 box, see if the default boot loader
# Line 836  then Line 849  then
849   update   update
850  fi  fi
851    
852    # if we mounted the U-Boot directory, unmount it.
853    [[ -n ${mounted} ]] && umount ${ubootDir}
854    
855  exit 0  exit 0

Legend:
Removed from v.1749  
changed lines
  Added in v.1752