Standardized handling of the optional param CONFIG
This commit is contained in:
parent
b0976d2e85
commit
0271c0c10d
4 changed files with 27 additions and 25 deletions
|
@ -216,12 +216,14 @@ boot_Makefiles() { #
|
|||
*grub*) continue ;;
|
||||
*whatnext*) continue ;;
|
||||
*settingenvironment*) sed 's@PS1=@set +h\nPS1=@' -i $file ;;
|
||||
*kernel) # if there is no kernel config file do not build the kernel
|
||||
*kernel) # if there is no kernel config file do not build the kernel
|
||||
[[ -z $CONFIG ]] && continue
|
||||
sed "s|make mrproper|make mrproper\ncp $CONFIG .config|" -i $file
|
||||
# You cannot run menuconfig from within the makefile
|
||||
# Copy the config file to /sources with a standardized name
|
||||
cp -v $CONFIG $BUILDDIR/sources/kernel-config
|
||||
sed "s|make mrproper|make mrproper\ncp /sources/kernel-config .config|" -i $file
|
||||
# You cannot run menuconfig from within the makefile
|
||||
sed 's|menuconfig|oldconfig|' -i $file
|
||||
#If defined include the keymap in the kernel
|
||||
#If defined include the keymap in the kernel
|
||||
if [[ -n "$KEYMAP" ]]; then
|
||||
sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
|
||||
else
|
||||
|
@ -856,12 +858,14 @@ bootable_Makefiles() { #
|
|||
case $this_script in
|
||||
*grub*) continue ;;
|
||||
*kernel)
|
||||
# if there is no kernel config file do not build the kernel
|
||||
# if there is no kernel config file do not build the kernel
|
||||
[[ -z $CONFIG ]] && continue
|
||||
sed "s|make mrproper|make mrproper\ncp $CONFIG .config|" -i $file
|
||||
# You cannot run menuconfig from within the makefile
|
||||
# Copy the config file to /sources with a standardized name
|
||||
cp -v $CONFIG $BUILDDIR/sources/kernel-config
|
||||
sed "s|make mrproper|make mrproper\ncp /sources/kernel-config .config|" -i $file
|
||||
# You cannot run menuconfig from within the makefile
|
||||
sed 's|menuconfig|oldconfig|' -i $file
|
||||
# If defined include the keymap in the kernel
|
||||
# If defined include the keymap in the kernel
|
||||
if [[ -n "$KEYMAP" ]]; then
|
||||
sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
|
||||
else
|
||||
|
@ -937,13 +941,14 @@ bm_bootable_Makefiles() { #
|
|||
case $this_script in
|
||||
*grub*) continue ;;
|
||||
*kernel)
|
||||
# if there is no kernel config file do not build the kernel
|
||||
# if there is no kernel config file do not build the kernel
|
||||
[[ -z $CONFIG ]] && continue
|
||||
cfg_file="/sources/`basename $CONFIG`"
|
||||
sed "s|make mrproper|make mrproper\ncp $cfg_file .config|" -i $file
|
||||
# You cannot run menuconfig from within the makefile
|
||||
# Copy the named config file to /sources with a standardized name
|
||||
cp -v $CONFIG $BUILDDIR/sources/kernel-config
|
||||
sed "s|make mrproper|make mrproper\ncp ../kernel-config .config|" -i $file
|
||||
# You cannot run menuconfig from within the makefile
|
||||
sed 's|menuconfig|oldconfig|' -i $file
|
||||
# If defined include the keymap in the kernel
|
||||
# If defined include the keymap in the kernel
|
||||
if [[ -n "$KEYMAP" ]]; then
|
||||
sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i $file
|
||||
else
|
||||
|
|
|
@ -455,11 +455,6 @@ EOF
|
|||
) >> $MKFILE.tmp
|
||||
fi
|
||||
|
||||
if [[ `_IS_ $this_script kernel` ]] ; then
|
||||
# not much really, script does everything..
|
||||
echo -e "\t@cp -f $CONFIG \$(MOUNT_PT)/sources/kernel-config" >> $MKFILE.tmp
|
||||
fi
|
||||
|
||||
# Check if we have a real /etc/fstab file
|
||||
if [[ `_IS_ $this_script fstab` ]] && [[ -n "$FSTAB" ]] ; then
|
||||
wrt_copy_fstab "$this_script"
|
||||
|
|
|
@ -222,14 +222,15 @@ chapter789_Makefiles() {
|
|||
# The filesystems can't be unmounted via Makefile and the user
|
||||
# should enter the chroot environment to create the root
|
||||
# password, edit several files and setup Grub.
|
||||
if [[ `_IS_ ${this_script} grub` ]] || [[ `_IS_ ${this_script} reboot` ]] ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
#
|
||||
# If no .config file is supplied, the kernel build is skipped
|
||||
if [ -z $CONFIG ] && [[ `_IS_ ${this_script} kernel` ]] ; then
|
||||
continue
|
||||
fi
|
||||
#
|
||||
case ${this_script} in
|
||||
*grub) continue ;;
|
||||
*reboot) continue ;;
|
||||
*kernel) [[ -z ${CONFIG} ]] && continue
|
||||
cp ${CONFIG} $BUILDDIR/sources/kernel-config ;;
|
||||
esac
|
||||
|
||||
# First append each name of the script files to a list (this will become
|
||||
# the names of the targets in the Makefile
|
||||
|
|
|
@ -722,6 +722,7 @@ extract_commands() { #
|
|||
grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \
|
||||
-e 's@">@"@' \
|
||||
-e '/generic/d' >> packages
|
||||
echo " ...OK"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Reference in a new issue