Magellan Linux

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

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

revision 1847 by niro, Mon Jul 2 13:04:02 2012 UTC revision 2059 by niro, Wed Feb 20 14:28:56 2013 UTC
# Line 112  then Line 112  then
112   lilo=/sbin/zipl   lilo=/sbin/zipl
113   runLilo="yes"   runLilo="yes"
114   isx86=""   isx86=""
115  elif [[ ${ARCH} = armv7l ]] || [[ ${ARCH} = armv7hl ]] || [[ ${ARCH} = armv5tel ]]  elif [[ ${ARCH} =~ armv[5|7].*l ]]
116  then  then
117   liloConfig=""   liloConfig=""
118   bootPrefix=/boot   bootPrefix=/boot
# Line 122  then Line 122  then
122   ubootDevice=/dev/${UBOOT_DEVICE:-"mmcblk0p1"}   ubootDevice=/dev/${UBOOT_DEVICE:-"mmcblk0p1"}
123   ubootDefaultImage=${UBOOT_UIMAGE:-"uImage"}   ubootDefaultImage=${UBOOT_UIMAGE:-"uImage"}
124   ubootDefaultInitrd=${UBOOT_UINITRD:-"uInitrd"}   ubootDefaultInitrd=${UBOOT_UINITRD:-"uInitrd"}
125     ubootAddress=${UBOOT_IMGADDR:-"0x00008000"}
126   mounted=""   mounted=""
127   liloFlag=""   liloFlag=""
128   isx86=""   isx86=""
  if [[ -z ${UBOOT_IMGADDR} ]]  
  then  
  machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')  
  if [ "${machine}" == "OMAP3 Beagle Board" ] || [ "${machine}" == "OMAP4 Panda board" ]  
  then  
  ubootAddress=0x80008000  
  else  
  ubootAddress=0x00008000  
  fi  
  else  
  ubootAddress="${UBOOT_IMGADDR}"  
  fi  
129  else  else
130   # this leaves i?86 and x86_64   # this leaves i?86 and x86_64
131   liloConfig=/etc/lilo.conf   liloConfig=/etc/lilo.conf
# Line 289  install() Line 278  install()
278   else   else
279   title="Magellan Linux [ ${version} ]"   title="Magellan Linux [ ${version} ]"
280   fi   fi
281   ${grubby} --grub2 -c ${grub2EfiConfig} \   ${grubby} --grub2 -c ${grub2EfiConfig} --efi \
282   --add-kernel=${bootPrefix}/${kernelName}-${version} \   --add-kernel=${bootPrefix}/${kernelName}-${version} \
283   ${INITRD} --copy-default ${makedefault} --title "${title}" \   ${INITRD} --copy-default ${makedefault} --title "${title}" \
284   ${mbkernel:+--add-multiboot="${mbkernel}"} \   ${mbkernel:+--add-multiboot="${mbkernel}"} \
# Line 378  remove() Line 367  remove()
367   if [[ -n ${cfgGrub2Efi} ]]   if [[ -n ${cfgGrub2Efi} ]]
368   then   then
369   [[ -n ${verbose} ]] && echo "removing ${version} from ${grub2EfiConfig}"   [[ -n ${verbose} ]] && echo "removing ${version} from ${grub2EfiConfig}"
370   ${grubby} --grub2 -c ${grub2EfiConfig} \   ${grubby} --grub2 -c ${grub2EfiConfig} --efi \
371   --remove-kernel=${bootPrefix}/${kernelName}-${version}   --remove-kernel=${bootPrefix}/${kernelName}-${version}
372   else   else
373   [[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby grub 2 with UEFI"   [[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby grub 2 with UEFI"
# Line 514  update() Line 503  update()
503   if [[ -n ${cfgGrub2Efi} ]]   if [[ -n ${cfgGrub2Efi} ]]
504   then   then
505   [[ -n ${verbose} ]] && echo "updating ${version} from ${grub2EfiConfig}"   [[ -n ${verbose} ]] && echo "updating ${version} from ${grub2EfiConfig}"
506   ${grubby} --grub2 -c ${grub2EfiConfig} \   ${grubby} --grub2 -c ${grub2EfiConfig} --efi \
507   --update-kernel=${bootPrefix}/${kernelName}-${version} \   --update-kernel=${bootPrefix}/${kernelName}-${version} \
508   ${INITRD} \   ${INITRD} \
509   ${kernargs:+--args="${kernargs}"} \   ${kernargs:+--args="${kernargs}"} \
# Line 807  fi Line 796  fi
796  # add dracut i18n, keyboard and plymouth kernel args if requested  # add dracut i18n, keyboard and plymouth kernel args if requested
797  if [[ -n ${dracut} ]] || [[ -n ${adddracutargs} ]]  if [[ -n ${dracut} ]] || [[ -n ${adddracutargs} ]]
798  then  then
799   [ -r /etc/conf.d/keymap ] && . /etc/conf.d/keymap   if [ -r /etc/vconsole.conf ]
  [ -r /etc/conf.d/consolefont ] && . /etc/conf.d/consolefont  
   
  if [[ -n ${KEYMAP} ]]  
800   then   then
801   kernargs="${kernargs} KEYTABLE=${KEYMAP}"   . /etc/vconsole.conf
802    
803     for i in SYSFONT SYSFONTACM UNIMAP KEYTABLE
804     do
805     val=$(eval echo \$$i)
806     [[ -n ${val} ]] && kernargs="${kernargs} ${i}=${val}"
807     done
808     else
809     if [ -r /etc/conf.d/consolefont ]
810     then
811     . /etc/conf.d/consolefont
812    
813     if [[ -n ${CONSOLEFONT} ]]
814     then
815     kernargs="${kernargs} SYSFONT=${CONSOLEFONT}"
816     fi
817     fi
818    
819     if  [ -r /etc/conf.d/keymap ]
820     then
821     . /etc/conf.d/keymap
822    
823     if [[ -n ${KEYMAP} ]]
824     then
825     kernargs="${kernargs} KEYTABLE=${KEYMAP}"
826     fi
827     fi
828   fi   fi
829    
830   if [[ -n ${CONSOLEFONT} ]]   if [ -r /etc/locale.conf ]
831   then   then
832   kernargs="${kernargs} SYSFONT=${CONSOLEFONT}"   . /etc/locale.conf
833    
834     if [[ -n ${LANG} ]]
835     then
836     kernargs="${kernargs} LANG=${LANG}"
837     fi
838   fi   fi
839  fi  fi
840    
# Line 875  then Line 892  then
892   fi   fi
893  fi  fi
894    
895    # if we're using U-Boot, check if the default load address should change
896    if [[ -n ${cfguBoot} ]] && [[ -z ${UBOOT_IMGADDR} ]]
897    then
898     [[ ${version}  =~ .([^.]*)$ ]]
899     platform=${BASH_REMATCH[1]}
900     # A few platforms use an alternate kernel load address
901     if [[ ${platform} = omap ]]
902     then
903     ubootAddress=0x80008000
904     elif [[ ${platform} = imx ]]
905     then
906     ubootAddress=0x90008000
907     fi
908    fi
909    
910  # 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
911  # is lilo to determine if it should be run  # is lilo to determine if it should be run
912  if [[ -n ${cfgLilo} ]] && [[ -n ${isx86} ]]  if [[ -n ${cfgLilo} ]] && [[ -n ${isx86} ]]

Legend:
Removed from v.1847  
changed lines
  Added in v.2059