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 |
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 |
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 |
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 |
|
${DEVTREEDIR} ${DEVTREE} \ |
368 |
${INITRD} --copy-default --title \"${title}\${debugtitle}\" \ |
${INITRD} --copy-default --title \"${title}\${debugtitle}\" \ |
369 |
${mbkernel:+--add-multiboot=\"${mbkernel}\"} \ |
${mbkernel:+--add-multiboot=\"${mbkernel}\"} \ |
370 |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
518 |
fi |
fi |
519 |
fi |
fi |
520 |
|
|
521 |
|
DEVTREE="" |
522 |
|
if [[ -n ${devtreefile} ]] && [ -f ${devtreefile} ] |
523 |
|
then |
524 |
|
[[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby" |
525 |
|
DEVTREE="--devtree ${devtreefile}" |
526 |
|
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}" |
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 |
${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} |
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 |
;; |
;; |
907 |
fi |
fi |
908 |
[[ -n ${verbose} ]] && echo "initrdfile is ${initrdfile}" |
[[ -n ${verbose} ]] && echo "initrdfile is ${initrdfile}" |
909 |
|
|
910 |
|
if [[ ${ARCH} =~ armv[5|7].*l ]] |
911 |
|
then |
912 |
|
if [[ -z ${SHIPSDTB} ]] || [[ ${SHIPSDTB} != yes ]] |
913 |
|
then |
914 |
|
if [[ -n ${dtbfile} ]] && [ -f ${bootPrefix}/dtb-${version}/${dtbfile} ] |
915 |
|
then |
916 |
|
devtreefile="${bootPrefix}/dtb-${version}/${dtbfile}" |
917 |
|
[[ -n ${verbose} ]] && echo "devtreefile is ${devtreefile}" |
918 |
|
elif [ -d ${bootPrefix}/dtb-${version}/ ] |
919 |
|
then |
920 |
|
devtreedir="${bootPrefix}/dtb-${version}/" |
921 |
|
[[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}" |
922 |
|
fi |
923 |
|
fi |
924 |
|
fi |
925 |
|
[[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}" |
926 |
|
|
927 |
# add dracut i18n, keyboard and plymouth kernel args if requested |
# add dracut i18n, keyboard and plymouth kernel args if requested |
928 |
if [[ -n ${dracut} ]] || [[ -n ${adddracutargs} ]] |
if [[ -n ${dracut} ]] || [[ -n ${adddracutargs} ]] |
929 |
then |
then |