Magellan Linux

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

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

revision 2971 by niro, Thu Jun 30 10:06:57 2016 UTC revision 2993 by niro, Thu Jun 30 10:35:55 2016 UTC
# Line 155  mbkernel="${HYPERVISOR}" Line 155  mbkernel="${HYPERVISOR}"
155  mbargs="${HYPERVISOR_ARGS}"  mbargs="${HYPERVISOR_ARGS}"
156  adddracutargs=""  adddracutargs=""
157  addplymouthinitrd=""  addplymouthinitrd=""
158  DEBUGARG="systemd.debug"  DEBUGARG="systemd.log_level=debug systemd.log_target=kmsg"
159    
160  usage()  usage()
161  {  {
# Line 165  usage() Line 165  usage()
165   echo "       [--banner=<banner>] [--multiboot=multiboot]" >&2   echo "       [--banner=<banner>] [--multiboot=multiboot]" >&2
166   echo "       [--mbargs=mbargs] [--make-default] [--add-dracut-args]" >&2   echo "       [--mbargs=mbargs] [--make-default] [--add-dracut-args]" >&2
167   echo "       [--add-plymouth-initrd]" >&2   echo "       [--add-plymouth-initrd]" >&2
168   echo "       [--host-only] [--devtree=<devicetree.dtb>]" >&2   echo "       [--host-only] [--devtree=<devicetree.dtb>] [--devtreedir=</devicetree/path/>]" >&2
169   echo "       <--install | --remove | --update> <kernel-version>" >&2   echo "       <--install | --remove | --update> <kernel-version>" >&2
170   echo "       (ex: $(basename $0) --mkinitrd --depmod --install 2.4.7-2)" >&2   echo "       (ex: $(basename $0) --mkinitrd --depmod --install 2.4.7-2)" >&2
171   exit 1   exit 1
# Line 177  rungrubby() Line 177  rungrubby()
177   then   then
178   [[ ${MAKEDEBUG} != yes ]] && return 0   [[ ${MAKEDEBUG} != yes ]] && return 0
179   [[ -n ${verbose} ]] && echo "- First, making a debug entry."   [[ -n ${verbose} ]] && echo "- First, making a debug entry."
180   declare -x debugtitle=" with debugging"   if [[ ${ARCH} = s390 ]] || [[ ${ARCH} = s390x ]]
181     then
182     declare -x debugtitle="_with_debugging"
183     else
184     declare -x debugtitle=" with debugging"
185     fi
186   declare -x debugargs="${DEBUGARG}"   declare -x debugargs="${DEBUGARG}"
187   shift   shift
188   else   else
# Line 236  install() Line 241  install()
241   fi   fi
242    
243   DEVTREE=""   DEVTREE=""
244   if [[ x${devtreefile} != x ]] && [ -f "${devtreefile}" ]   if [[ -n ${devtreefile} ]] && [ -f ${devtreefile} ]
245   then   then
246   [[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby"   [[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby"
247   DEVTREE="--devtree ${devtreefile}"   DEVTREE="--devtree ${devtreefile}"
248   fi   fi
249    
250     DEVTREEDIR=""
251     if [[ -n ${devtreedir} ]] && [ -d ${devtreedir} ]
252     then
253     [ -n ${verbose} ] && echo "found ${devtreedir} and using it with grubby"
254     DEVTREEDIR="--devtreedir ${devtreedir}"
255     fi
256    
257   # FIXME: is this a good heuristic to find out if we're on iSeries?   # FIXME: is this a good heuristic to find out if we're on iSeries?
258   if [ -d /proc/iSeries ]   if [ -d /proc/iSeries ]
259   then   then
# Line 352  install() Line 364  install()
364   [[ -n ${verbose} ]] && echo "adding ${version} to ${extlinuxConfig}"   [[ -n ${verbose} ]] && echo "adding ${version} to ${extlinuxConfig}"
365    
366   ARGS="--extlinux -c ${extlinuxConfig} --add-kernel=${kernelImage} \   ARGS="--extlinux -c ${extlinuxConfig} --add-kernel=${kernelImage} \
367   ${DEVTREE} ${INITRD} --copy-default --title \"${title}\${debugtitle}\" \   ${DEVTREEDIR} ${DEVTREE} \
368     ${INITRD} --copy-default --title \"${title}\${debugtitle}\" \
369   ${mbkernel:+--add-multiboot=\"${mbkernel}\"} \   ${mbkernel:+--add-multiboot=\"${mbkernel}\"} \
370   ${mbargs:+--mbargs=\"${mbargs}\"} \   ${mbargs:+--mbargs=\"${mbargs}\"} \
371   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \
# Line 506  update() Line 519  update()
519   fi   fi
520    
521   DEVTREE=""   DEVTREE=""
522   if [[ x${devtreefile} != x ]] && [ -f ${devtreefile} ]   if [[ -n ${devtreefile} ]] && [ -f ${devtreefile} ]
523   then   then
524   [[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby"   [[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby"
525   DEVTREE="--devtree ${devtreefile}"   DEVTREE="--devtree ${devtreefile}"
526   fi   fi
527    
528     DEVTREEDIR=""
529     if [[ -n ${devtreedir} ]] && [ -d ${devtreedir} ]
530     then
531     [[ -n ${verbose} ]] && echo "found ${devtreedir} and using it with grubby"
532     DEVTREEDIR="--devtreedir ${devtreedir}"
533     fi
534    
535   if [[ -n ${cfgGrub} ]]   if [[ -n ${cfgGrub} ]]
536   then   then
537   [[ -n ${verbose} ]] && echo "updating ${version} from ${grubConfig}"   [[ -n ${verbose} ]] && echo "updating ${version} from ${grubConfig}"
# Line 614  update() Line 634  update()
634   then   then
635   [[ -n ${verbose} ]] && echo "updating ${version} from ${extlinuxConfig}"   [[ -n ${verbose} ]] && echo "updating ${version} from ${extlinuxConfig}"
636   ARGS="--extlinux -c ${extlinuxConfig} --update-kernel=${kernelImage} \   ARGS="--extlinux -c ${extlinuxConfig} --update-kernel=${kernelImage} \
637   ${DEVTREE} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \   ${DEVTREE} ${DEVTREEDIR} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \
638   ${removeargs:+--remove-args=\"${removeargs}\"} \   ${removeargs:+--remove-args=\"${removeargs}\"} \
639   --title=\"${title}\${debugtitle}\""   --title=\"${title}\${debugtitle}\""
640   rungrubby --debug ${ARGS}   rungrubby --debug ${ARGS}
# Line 694  do Line 714  do
714   fi   fi
715   ;;   ;;
716    
717     --devtreedir*)
718     if [[ $1 == --devtreedir\=* ]]
719     then
720     devtreedir=${1#--devtreedir=}
721     else
722     devtreedir=$2
723     shift
724     fi
725     ;;
726    
727   --dracut)   --dracut)
728   dracut=--dracut   dracut=--dracut
729   ;;   ;;
# Line 879  fi Line 909  fi
909    
910  if [[ ${ARCH} =~ armv[5|7].*l ]]  if [[ ${ARCH} =~ armv[5|7].*l ]]
911  then  then
912   if [ -d ${bootPrefix}/dtb-${version}/ ]   if [[ -z ${SHIPSDTB} ]] || [[ ${SHIPSDTB} != yes ]]
913   then   then
914   devtreedir="${bootPrefix}/dtb-${version}/"   if [[ -n ${dtbfile} ]] && [ -f ${bootPrefix}/dtb-${version}/${dtbfile} ]
915   if [[ -n ${dtbfile} ]] && [ -f ${devtreedir}/${dtbfile} ]   then
916     devtreefile="${bootPrefix}/dtb-${version}/${dtbfile}"
917     [[ -n ${verbose} ]] && echo "devtreefile is ${devtreefile}"
918     elif [ -d ${bootPrefix}/dtb-${version}/ ]
919   then   then
920   devtreefile="${devtreedir}/${dtbfile}"   devtreedir="${bootPrefix}/dtb-${version}/"
921     [[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}"
922   fi   fi
923   fi   fi
924  fi  fi

Legend:
Removed from v.2971  
changed lines
  Added in v.2993