Magellan Linux

Diff of /trunk/include/kernel.sminc

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

revision 18720 by niro, Wed Aug 14 11:08:46 2013 UTC revision 33243 by niro, Mon Oct 21 10:09:36 2019 UTC
# Line 63  fi Line 63  fi
63  : ${PCAT="sys-kernel"}  : ${PCAT="sys-kernel"}
64  : ${HOMEPAGE="http://magellan-linux.de/"}  : ${HOMEPAGE="http://magellan-linux.de/"}
65  : ${TARBALLPVER="${PVER}"}  : ${TARBALLPVER="${PVER}"}
66  : ${SRCFILE="linux-${TARBALLPVER}.tar.bz2"}  : ${SRCFILE="linux-${TARBALLPVER}.tar.xz"}
67  : ${SRCDIR="${BUILDDIR}/linux-${PVER}-${BRANCH}-${PBUILD}"}  : ${SRCDIR="${BUILDDIR}/linux-${PVER}-${BRANCH}-${PBUILD}"}
68    
69  if [[ -z ${SRC_URI[*]} ]]  if [[ -z ${SRC_URI[*]} ]]
# Line 84  then Line 84  then
84   esac   esac
85  fi  fi
86    
87    case ${PNAME} in
88     *-lts) _upparam="longterm" ;;
89     *) _upparam="stable" ;;
90    esac
91    
92    UP2DATE="updatecmd http://www.kernel.org/ | grep -A1 -i '${_upparam}:' | sed 's/.*:\ \([0-9]\.[0-9].*\)\ [0-9].*/\1/;q'"
93    
94  case ${KERNEL_TYPE} in  case ${KERNEL_TYPE} in
95   image)   image)
96   : ${PROVIDE="virtual/kernel"}   : ${PROVIDE="virtual/kernel"}
97   : ${DEPEND=">= virtual/module-tools   : ${DEPEND=">= virtual/module-tools
98   >= sys-fs/udev-115   >= sys-fs/udev-115
99     >= sys-apps/grubby-8.29-r1
100   >= virtual/initramfs-tools   >= virtual/initramfs-tools
101   >= virtual/initscripts"}   >= virtual/initscripts"}
102   if [[ ! -z ${LINUX_FIRMWARE}  ]] && [[ ${LINUX_FIRMWARE} != internal ]]   if [[ ! -z ${LINUX_FIRMWARE}  ]] && [[ ${LINUX_FIRMWARE} != internal ]]
# Line 97  case ${KERNEL_TYPE} in Line 105  case ${KERNEL_TYPE} in
105   >= sys-kernel/linux-firmware-${LINUX_FIRMWARE}"   >= sys-kernel/linux-firmware-${LINUX_FIRMWARE}"
106   fi   fi
107   SDEPEND="${SDEPEND}   SDEPEND="${SDEPEND}
108   >= sys-dev/bc-1.06"   >= sys-dev/bc-1.06
109     >= sys-dev/bison-3
110     >= sys-dev/flex-2.6"
111   : ${DESCRIPTION="Kernel image of the '${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}' kernel branch."}   : ${DESCRIPTION="Kernel image of the '${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}' kernel branch."}
112   ;;   ;;
113    
# Line 139  kernel_src_prepare() Line 149  kernel_src_prepare()
149   cd ${SRCDIR}   cd ${SRCDIR}
150   kernel_apply_patches || die   kernel_apply_patches || die
151    
152     # fix permissions after the patchwork
153     # gnu patch doesn't support git-style file mode
154     if [ -e tools/objtool/sync-check.sh ]
155     then
156     chmod +x tools/objtool/sync-check.sh || die
157     fi
158    
159   # fixes INSTALL_PATH to /boot and EXTRAVERSION   # fixes INSTALL_PATH to /boot and EXTRAVERSION
160   sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \   sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \
161   -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile || die   -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile || die
# Line 195  kernel_src_compile() Line 212  kernel_src_compile()
212    
213   # at least alsa-drivers needs this one ...   # at least alsa-drivers needs this one ...
214   touch include/linux/autoconf.h || die   touch include/linux/autoconf.h || die
215    
216     # compat symlink for 3.7.x new version.h location until everything is fixed
217   ;;   ;;
218   esac   esac
219  }  }
# Line 409  kernel_image_preremove() Line 428  kernel_image_preremove()
428   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
429   then   then
430   mount /boot &> /dev/null   mount /boot &> /dev/null
  fi  
 }  
431    
 kernel_image_postremove()  
 {  
  if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]  
  then  
432   # remove old image entry from grub   # remove old image entry from grub
433   new-kernel-pkg -v --rminitrd --rmmoddep --remove ${KPVER}-${KBRANCH}-${KPBUILD}   new-kernel-pkg -v --rminitrd --rmmoddep --remove ${KPVER}-${KBRANCH}-${KPBUILD}
434   fi   fi
# Line 437  kernel_image_postinstall() Line 450  kernel_image_postinstall()
450   # do not run this if ${MROOT} is set !   # do not run this if ${MROOT} is set !
451   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
452   then   then
453   new-kernel-pkg -v --mkinitrd --make-default --install ${KPVER}-${KBRANCH}-${KPBUILD}   new-kernel-pkg -v --mkinitrd --dracut --make-default --install ${KPVER}-${KBRANCH}-${KPBUILD}
454   fi   fi
455    
456   if [[ ${USE_KERNEL_SYMLINKS} = true ]]   if [[ ${USE_KERNEL_SYMLINKS} = true ]]
# Line 495  export_inherits kernel src_prepare src_c Line 508  export_inherits kernel src_prepare src_c
508  # export pre/postinstall functions depending on KERNEL_TYPE  # export pre/postinstall functions depending on KERNEL_TYPE
509  case ${KERNEL_TYPE} in  case ${KERNEL_TYPE} in
510   image)   image)
511   export_inherits kernel_image preinstall preremove postinstall postremove   export_inherits kernel_image preinstall preremove postinstall
512   SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kernel_image_preinstall kernel_image_preremove kernel_image_postinstall kernel_image_postremove"   SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kernel_image_preinstall kernel_image_preremove kernel_image_postinstall"
513   ;;   ;;
514   sources)   sources)
515   export_inherits kernel_sources postinstall   export_inherits kernel_sources postinstall

Legend:
Removed from v.18720  
changed lines
  Added in v.33243