Magellan Linux

Diff of /trunk/include/kernel.sminc

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

branches/magellan-next/include/kernel.sminc revision 9466 by niro, Thu Dec 1 16:48:58 2011 UTC trunk/include/kernel.sminc revision 33338 by niro, Wed Jul 12 20:16:24 2023 UTC
# Line 2  Line 2 
2  # $Id$  # $Id$
3    
4  # needed extra vars:  # needed extra vars:
5  #   ${KERNEL_TYPE}:   needed, 'sources', 'headers' or 'image'  #  ${KERNEL_TYPE}:       needed, 'sources', 'headers' or 'image'
6  #   ${BRANCH}:        needed, style branch of the kernel  #  ${BRANCH}:            needed, style branch of the kernel
7  #   ${KERNEL_CONFIG}: optional, needed if you want to override the default  #  ${KERNEL_CONFIG}:     optional, needed if you want to override the default
8  #                     searchpath ${SOURCEDIR}/${PNAME}/config-${PVER}-${BRANCH}-${PBUILD}  #                        searchpath ${SOURCEDIR}/${PNAME}/config-${PVER}-${BRANCH}-${PBUILD}
9  #  #
10  #   ${PSUBVER}:       optional, only needed for 2.6.x.x naming scheme  #  ${PSUBVER}:           optional, only needed for 2.6.x.x naming scheme
11  #   ${EXTRAVERSION}:  optinal, extra version for the kernel name  #  ${EXTRAVERSION}:      optinal, extra version for the kernel name
12  #                     default setting is ${PSUBVER}-${BRANCH}-${PBUILD}  #                        default setting is ${PSUBVER}-${BRANCH}-${PBUILD}
13  #   ${KERNEL_IMAGE_PATH}: override the default KERNEL_IMAGE_PATH (to build xen images for e.g.)  #  ${KERNEL_IMAGE_PATH}: override the default KERNEL_IMAGE_PATH (to build xen images for e.g.)
14  #   ${COMPRESS_MODULES}: compresses the kernel modules with given compressor (gzip|bzip2|xz)  #  ${COMPRESS_MODULES}:  compresses the kernel modules with given compressor (gzip|bzip2|xz)
15    #  ${LINUX_FIRMWARE}:    remove included firmware bits if requested
16    #                        set the version here like USE_LINUX_FIRMARE="20110605"
17    #                        version "internal" keeps the bits too
18    #
19    #  ${INCLUDE_KERNELVERSION_FILE}: creates a /boot/kernelversion file (deprecated)
20    #  ${USE_KERNEL_SYMLINKS}: creates symlinks to unversioned kernel image files
21    #   - kernel-x.x.x.x -> /boot/vmlinuz
22    #   - initrd-x.x.x.x -> /boot/initrd
23    #   - config-x.x.x.x -> /boot/config
24    #   - System.map-x.x.x.x -> /boot/System.map
25    
26  sminclude mtools  sminclude mtools
27    
# Line 23  else Line 33  else
33   KERNEL_ARCH_EXTENSION=""   KERNEL_ARCH_EXTENSION=""
34  fi  fi
35    
 # remove included firmware bits if requested  
 # set the version here like USE_LINUX_FIRMARE="20110605"  
 # version "internal" keeps the bits too  
 if [[ ! -z ${LINUX_FIRMWARE}  ]] && [[ ${LINUX_FIRMWARE} != internal ]]  
 then  
  DEPEND="${DEPEND}  
  >= sys-kernel/linux-firmware-${LINUX_FIRMWARE}"  
 fi  
   
36  if [[ ! -z ${COMPRESS_MODULES} ]]  if [[ ! -z ${COMPRESS_MODULES} ]]
37  then  then
38   case ${COMPRESS_MODULES} in   case ${COMPRESS_MODULES} in
# Line 59  then Line 60  then
60  fi  fi
61    
62  # some sane defaults  # some sane defaults
63  : ${PCATEGORIE="sys-kernel"}  : ${PCAT="sys-kernel"}
64  : ${HOMEPAGE="http://magellan-linux.de/"}  : ${HOMEPAGE="http://magellan-linux.de/"}
 : ${SRCFILE="linux-${PVER/${PSUBVER}/}.tar.bz2"}  
 : ${SRCDIR="${BUILDDIR}/linux-${PVER}-${BRANCH}-${PBUILD}"}  
65  : ${TARBALLPVER="${PVER}"}  : ${TARBALLPVER="${PVER}"}
66    : ${SRCFILE="linux-${TARBALLPVER}.tar.xz"}
67    : ${SRCDIR="${BUILDDIR}/linux-${PVER}-${BRANCH}-${PBUILD}"}
68    
69  case ${KERNEL_TYPE} in  if [[ -z ${SRC_URI[*]} ]]
70   image|sources)  then
71   if [[ -z ${SRC_URI[*]} ]]   SRC_URI=(
72   then   http://www.kernel.org/pub/linux/kernel/v$(echo ${PVER} | cut -d. -f1).x/${SRCFILE}
73   SRC_URI=(   http://ftp.uni-erlangen.de/pub/Linux/MIRROR.kernel/v$(echo ${PVER} | cut -d. -f1).x/${SRCFILE}
74   http://www.kernel.org/pub/linux/kernel/v$(echo ${PVER} | cut -d. -f1).x/${SRCFILE}   mirror://kernel-${BRANCH}/${SRCFILE}
75   http://ftp.uni-erlangen.de/pub/Linux/MIRROR.kernel/v$(echo ${PVER} | cut -d. -f1).x/${SRCFILE}   )
76   mirror://kernel-${BRANCH}/${SRCFILE}   case ${KERNEL_TYPE} in
77   mirror://kernel-${BRANCH}/config-${PVER}-${BRANCH}-${PBUILD}-i686   image|sources)
78   mirror://kernel-${BRANCH}/config-${PVER}-${BRANCH}-${PBUILD}-x86_64   SRC_URI=(
79   )   ${SRC_URI[*]}
80   fi   mirror://kernel-${BRANCH}/config-${PVER}-${BRANCH}-${PBUILD}-i686
81   ;;   mirror://kernel-${BRANCH}/config-${PVER}-${BRANCH}-${PBUILD}-x86_64
82     )
83     ;;
84     esac
85    fi
86    
87   headers)  case ${PNAME} in
88   if [[ -z ${SRC_URI[*]} ]]   *-lts) _upparam="longterm" ;;
89   then   *) _upparam="stable" ;;
  SRC_URI=(  
  http://www.kernel.org/pub/linux/kernel/v$(echo ${PVER} | cut -d. -f1-2)/${SRCFILE}  
  http://ftp.uni-erlangen.de/pub/Linux/MIRROR.kernel/v$(echo ${PVER} | cut -d. -f1-2)/${SRCFILE}  
  mirror://kernel-${BRANCH}/${SRCFILE}  
  )  
  fi  
  ;;  
90  esac  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=">= sys-apps/module-init-tools-3.2   : ${DEPEND=">= virtual/module-tools
98   >= sys-fs/udev-115   >= sys-fs/udev-115
99   >= sys-apps/mkinitrd-5.0.8   >= sys-apps/grubby-8.29-r1
100     >= virtual/initramfs-tools
101   >= virtual/initscripts"}   >= virtual/initscripts"}
102   : ${DESCRIPTION="Kernel image of the '${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}' kernel."}   if [[ ! -z ${LINUX_FIRMWARE}  ]] && [[ ${LINUX_FIRMWARE} != internal ]]
103     then
104     DEPEND="${DEPEND}
105     >= sys-kernel/linux-firmware-${LINUX_FIRMWARE}"
106     fi
107     SDEPEND="${SDEPEND}
108     >= 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."}
112   ;;   ;;
113    
114   sources)   sources)
115   : ${PROVIDE="virtual/kernel-sources"}   : ${PROVIDE="virtual/kernel-sources"}
116   : ${DESCRIPTION="Kernel sources of the '${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}' kernel."}   : ${DESCRIPTION="Kernel sources of the '${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}' kernel branch."}
117   ;;   ;;
118    
119   headers)   headers)
# Line 119  KERNEL_CONFIG="${SOURCEDIR}/${PNAME}/con Line 129  KERNEL_CONFIG="${SOURCEDIR}/${PNAME}/con
129  KPVER="${PVER}"  KPVER="${PVER}"
130  KPBUILD="${PBUILD}"  KPBUILD="${PBUILD}"
131  KBRANCH="${BRANCH}"  KBRANCH="${BRANCH}"
132  SPECIAL_VARS="${SPECIAL_VARS} KPVER KPBUILD KBRANCH"  SPECIAL_VARS="${SPECIAL_VARS} KPVER KPBUILD KBRANCH USE_KERNEL_SYMLINKS"
133    
134    # dummy function to apply kernel patches
135    kernel_apply_patches()
136    {
137     return 0
138    }
139    
140  kernel_src_prepare()  kernel_src_prepare()
141  {  {
142   munpack ${SRCFILE} || die   munpack ${SRCFILE} || die
143   mv ${BUILDDIR}/linux-${TARBALLPVER/${PSUBVER}/} ${SRCDIR} || die   mv ${BUILDDIR}/linux-${TARBALLPVER} ${SRCDIR} || die
144    
145   # fix permissions   # fix permissions
146   chown -R 0:0 ${SRCDIR} || die   chown -R 0:0 ${SRCDIR} || die
147   chmod -R a+r-w+X,u+w ${SRCDIR} || die   chmod -R a+r-w+X,u+w ${SRCDIR} || die
148    
149   cd ${SRCDIR}   cd ${SRCDIR}
150     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:' \
# Line 141  kernel_src_prepare() Line 165  kernel_src_prepare()
165   if [[ ${PVER%%.*} -gt 2 ]]   if [[ ${PVER%%.*} -gt 2 ]]
166   then   then
167   local sublevel="$(echo ${PVER} | cut -d. -f3)"   local sublevel="$(echo ${PVER} | cut -d. -f3)"
168   sed -i "s:^\(SUBLEVEL =\).*:\1 ${sublevel}:" Makefile || die   sed -i "s:^\(SUBLEVEL =\).*:\1 ${sublevel}:" Makefile || die
169   fi   fi
170  }  }
171    
# Line 163  kernel_src_compile() Line 187  kernel_src_compile()
187   mmake ARCH=${ARCH/i*86/x86} || die   mmake ARCH=${ARCH/i*86/x86} || die
188   ;;   ;;
189    
190   headers)  # headers)
191   make ARCH=${ARCH/i*86/x86} headers_check || die  # make ARCH=${ARCH/i*86/x86} headers_check || die
192   ;;  # ;;
193    
194   sources)   sources)
195   make clean || die   make clean || die
# Line 188  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 200  kernel_image_src_install() Line 226  kernel_image_src_install()
226   minstalldir /boot || die   minstalldir /boot || die
227    
228   # install modules   # install modules
229   make ARCH=${ARCH/i*86/x86} INSTALL_MOD_PATH=${BINDIR} modules_install || die   make ARCH=${ARCH/i*86/x86} INSTALL_MOD_PATH=${BINDIR}/usr modules_install || die
230    
231   # install kernelimage   # install kernelimage
232   if [[ -z ${KERNEL_IMAGE_PATH} ]]   if [[ -z ${KERNEL_IMAGE_PATH} ]]
# Line 230  kernel_image_src_install() Line 256  kernel_image_src_install()
256   /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \   /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \
257   || die   || die
258    
259   # install kernel description   if [[ ${INCLUDE_KERNELVERSION_FILE} = true ]]
260   echo "   then
261  KRNVER=${BRANCH}-${PVER}-${ARCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}   MCONFIG=/boot/kernelversion
262  KRNLIB=${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}   # install kernel description
263  KRNIMG=kernel-${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}   mclearconfig || die
264  KRNINITRD=   maddconfig "KRNVER=${BRANCH}-${PVER}-${ARCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}" || die
265  " > ${BINDIR}/boot/kernelversion || die   maddconfig "KRNLIB=${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}" || die
266     maddconfig "KRNIMG=kernel-${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}" || die
267     maddconfig "KRNINITRD=" || die
268     fi
269    
270   # install kernel-config from srcdir   # install kernel-config from srcdir
271   minstallfile .config \   minstallfile .config \
# Line 244  KRNINITRD= Line 273  KRNINITRD=
273   || die   || die
274    
275   # fix build symlink   # fix build symlink
276   if [ -L ${BINDIR}/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build ]   if [ -L ${BINDIR}/usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build ]
277   then   then
278   echo "fixing build symlink"   echo "fixing build symlink"
279   rm ${BINDIR}/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build || die   rm ${BINDIR}/usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build || die
280   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \
281   /lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build \   /usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build \
282   || die   || die
283   fi   fi
284    
285   # and fixing source symlink   # and fixing source symlink
286   if [ -L ${BINDIR}/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source ]   if [ -L ${BINDIR}/usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source ]
287   then   then
288   echo "fixing source symlink"   echo "fixing source symlink"
289   rm ${BINDIR}/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source || die   rm ${BINDIR}/usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source || die
290   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \
291   /lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source \   /usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source \
292   || die   || die
293   fi   fi
294    
295   # remove firmware bits if $LINUX_FIRMWARE was set   # remove firmware bits if $LINUX_FIRMWARE was set
296   if [[ ! -z ${LINUX_FIRMWARE} ]] && [[ ${LINUX_FIRMWARE} != internal ]]   if [[ ! -z ${LINUX_FIRMWARE} ]] && [[ ${LINUX_FIRMWARE} != internal ]]
297   then   then
298   if [[ -d ${BINDIR}/lib/firmware ]]   if [[ -d ${BINDIR}/usr/lib/firmware ]]
299   then   then
300   rm -rv ${BINDIR}/lib/firmware   rm -rv ${BINDIR}/usr/lib/firmware
301   fi   fi
302   fi   fi
303    
# Line 284  kernel_headers_src_install() Line 313  kernel_headers_src_install()
313  {  {
314   cd ${SRCDIR}   cd ${SRCDIR}
315   make ARCH=${ARCH/i*86/x86} INSTALL_HDR_PATH=${BINDIR}/usr headers_install || die   make ARCH=${ARCH/i*86/x86} INSTALL_HDR_PATH=${BINDIR}/usr headers_install || die
316    
317     # clean-up unnecessary files
318     find ${BINDIR} -name .install -or -name ..install.cmd | xargs --no-run-if-empty rm -f
319  }  }
320    
321  kernel_sources_src_install()  kernel_sources_src_install()
# Line 396  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 --remove ${KPVER}-${KBRANCH}-${KPBUILD}   new-kernel-pkg -v --rminitrd --rmmoddep --remove ${KPVER}-${KBRANCH}-${KPBUILD}
434   fi   fi
435  }  }
436    
# Line 424  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   # symlink actual kernel to /boot/vmlinuz etc...   if [[ ${USE_KERNEL_SYMLINKS} = true ]]
457   ln -snf kernel-${KPVER}-${KBRANCH}-${KPBUILD} ${MROOT}/boot/vmlinuz   then
458   ln -snf System.map-${KPVER}-${KBRANCH}-${KPBUILD} ${MROOT}/boot/System.map   # symlink actual kernel to /boot/vmlinuz etc...
459   ln -snf config-${KPVER}-${KBRANCH}-${KPBUILD} ${MROOT}/boot/config   ln -snf kernel-${KPVER}-${KBRANCH}-${KPBUILD} ${MROOT}/boot/vmlinuz
460   [[ -f ${MROOT}/boot/initrd-${KPVER}-${KBRANCH}-${KPBUILD}.img ]] &&   ln -snf System.map-${KPVER}-${KBRANCH}-${KPBUILD} ${MROOT}/boot/System.map
461   ln -snf initrd-${KPVER}-${KBRANCH}-${KPBUILD}.img ${MROOT}/boot/initrd   ln -snf config-${KPVER}-${KBRANCH}-${KPBUILD} ${MROOT}/boot/config
462     [[ -f ${MROOT}/boot/initrd-${KPVER}-${KBRANCH}-${KPBUILD}.img ]] &&
463     ln -snf initrd-${KPVER}-${KBRANCH}-${KPBUILD}.img ${MROOT}/boot/initrd
464     fi
465  }  }
466    
467  kernel_sources_postinstall()  kernel_sources_postinstall()
468  {  {
469   # check for linux-VERSION/include as the kernel-image installs   # check for linux-VERSION/include as the kernel-image installs
470   # the file Modules.symver in the linux-VERSION directory   # the file Modules.symver in the linux-VERSION directory
471   if [ ! -d ${MROOT}/usr/src/linux-${KPVER}-${KBRANCH}-${KPBUILD}/include ]   if mqueryfeature "kernelsrcunpack" &&
472     [ ! -d ${MROOT}/usr/src/linux-${KPVER}-${KBRANCH}-${KPBUILD}/include ]
473   then   then
474   echo "Unpacking linux-${KPVER}-${KBRANCH}-${KPBUILD} source tarball ... "   echo "Unpacking linux-${KPVER}-${KBRANCH}-${KPBUILD} source tarball ... "
475   tar xvjf ${MROOT}/usr/src/linux-${KPVER}-${KBRANCH}-${KPBUILD}.tar.bz2 -C ${MROOT}/usr/src   tar xvjf ${MROOT}/usr/src/linux-${KPVER}-${KBRANCH}-${KPBUILD}.tar.bz2 -C ${MROOT}/usr/src
476   fi   fi
477    
478   if [ ! -d ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} ] &&   if mqueryfeature "kernelsrcunpack" &&
479     [ ! -d ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} ] &&
480   [ -f ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD}.tar.bz2 ]   [ -f ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD}.tar.bz2 ]
481   then   then
482   echo "Unpacking kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} source tarball ... "   echo "Unpacking kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} source tarball ... "
483   tar xvjf ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD}.tar.bz2 -C ${MROOT}/usr/src   tar xvjf ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD}.tar.bz2 -C ${MROOT}/usr/src
484   fi   fi
485    
486   # if not exist create linux symlink   # create linux symlink
487   if [ ! -h ${MROOT}/usr/src/linux ]   if mqueryfeature "linuxsymlink"
488   then   then
489   echo "Creating linux -> linux-${KPVER}-${KBRANCH}-${KPBUILD} symlink ... "   echo "Creating linux -> linux-${KPVER}-${KBRANCH}-${KPBUILD} symlink ... "
490   [ ! -d ${MROOT}/usr/src ] && install ${MROOT}/usr/src   [ ! -d ${MROOT}/usr/src ] && install ${MROOT}/usr/src
# Line 461  kernel_sources_postinstall() Line 492  kernel_sources_postinstall()
492   ${MROOT}/usr/src/linux || die   ${MROOT}/usr/src/linux || die
493   fi   fi
494    
495   # if not exist create kernel-modules symlink   # create kernel-modules symlink
496   if [ ! -h ${MROOT}/usr/src/kernel-modules ] &&   if mqueryfeature "linuxsymlink" &&
497   [ -d ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} ]   [ -d ${MROOT}/usr/src/kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} ]
498   then   then
499   echo "Creating kernel-modules -> kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} symlink ... "   echo "Creating kernel-modules -> kernel-modules-${KPVER}-${KBRANCH}-${KPBUILD} symlink ... "
# Line 477  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.9466  
changed lines
  Added in v.33338