Magellan Linux

Diff of /trunk/include/kernel.sminc

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

revision 11369 by niro, Sun Mar 4 14:16:15 2012 UTC revision 18718 by niro, Wed Aug 14 10:49:25 2013 UTC
# Line 90  case ${KERNEL_TYPE} in Line 90  case ${KERNEL_TYPE} in
90   DEPEND="${DEPEND}   DEPEND="${DEPEND}
91   >= sys-kernel/linux-firmware-${LINUX_FIRMWARE}"   >= sys-kernel/linux-firmware-${LINUX_FIRMWARE}"
92   fi   fi
93     SDEPEND="${SDEPEND}
94     >= sys-dev/bc-1.06"
95   : ${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."}
96   ;;   ;;
97    
# Line 113  KPBUILD="${PBUILD}" Line 115  KPBUILD="${PBUILD}"
115  KBRANCH="${BRANCH}"  KBRANCH="${BRANCH}"
116  SPECIAL_VARS="${SPECIAL_VARS} KPVER KPBUILD KBRANCH"  SPECIAL_VARS="${SPECIAL_VARS} KPVER KPBUILD KBRANCH"
117    
118    # dummy function to apply kernel patches
119    kernel_apply_patches()
120    {
121     return 0
122    }
123    
124  kernel_src_prepare()  kernel_src_prepare()
125  {  {
126   munpack ${SRCFILE} || die   munpack ${SRCFILE} || die
# Line 123  kernel_src_prepare() Line 131  kernel_src_prepare()
131   chmod -R a+r-w+X,u+w ${SRCDIR} || die   chmod -R a+r-w+X,u+w ${SRCDIR} || die
132    
133   cd ${SRCDIR}   cd ${SRCDIR}
134     kernel_apply_patches || die
135    
136   # fixes INSTALL_PATH to /boot and EXTRAVERSION   # fixes INSTALL_PATH to /boot and EXTRAVERSION
137   sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \   sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \
# Line 133  kernel_src_prepare() Line 142  kernel_src_prepare()
142   if [[ ${PVER%%.*} -gt 2 ]]   if [[ ${PVER%%.*} -gt 2 ]]
143   then   then
144   local sublevel="$(echo ${PVER} | cut -d. -f3)"   local sublevel="$(echo ${PVER} | cut -d. -f3)"
145   sed -i "s:^\(SUBLEVEL =\).*:\1 ${sublevel}:" Makefile || die   sed -i "s:^\(SUBLEVEL =\).*:\1 ${sublevel}:" Makefile || die
146   fi   fi
147  }  }
148    
# Line 192  kernel_image_src_install() Line 201  kernel_image_src_install()
201   minstalldir /boot || die   minstalldir /boot || die
202    
203   # install modules   # install modules
204   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
205    
206   # install kernelimage   # install kernelimage
207   if [[ -z ${KERNEL_IMAGE_PATH} ]]   if [[ -z ${KERNEL_IMAGE_PATH} ]]
# Line 236  KRNINITRD= Line 245  KRNINITRD=
245   || die   || die
246    
247   # fix build symlink   # fix build symlink
248   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 ]
249   then   then
250   echo "fixing build symlink"   echo "fixing build symlink"
251   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
252   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \
253   /lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build \   /usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/build \
254   || die   || die
255   fi   fi
256    
257   # and fixing source symlink   # and fixing source symlink
258   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 ]
259   then   then
260   echo "fixing source symlink"   echo "fixing source symlink"
261   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
262   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \   mlink /usr/src/linux-${PVER}-${BRANCH}-${PBUILD} \
263   /lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source \   /usr/lib/modules/${PVER}-${BRANCH}-${PBUILD}${KERNEL_ARCH_EXTENSION}/source \
264   || die   || die
265   fi   fi
266    
267   # remove firmware bits if $LINUX_FIRMWARE was set   # remove firmware bits if $LINUX_FIRMWARE was set
268   if [[ ! -z ${LINUX_FIRMWARE} ]] && [[ ${LINUX_FIRMWARE} != internal ]]   if [[ ! -z ${LINUX_FIRMWARE} ]] && [[ ${LINUX_FIRMWARE} != internal ]]
269   then   then
270   if [[ -d ${BINDIR}/lib/firmware ]]   if [[ -d ${BINDIR}/usr/lib/firmware ]]
271   then   then
272   rm -rv ${BINDIR}/lib/firmware   rm -rv ${BINDIR}/usr/lib/firmware
273   fi   fi
274   fi   fi
275    
# Line 399  kernel_image_postremove() Line 408  kernel_image_postremove()
408   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
409   then   then
410   # remove old image entry from grub   # remove old image entry from grub
411   new-kernel-pkg -v --rminitrd --remove ${KPVER}-${KBRANCH}-${KPBUILD}   new-kernel-pkg -v --rminitrd --rmmoddep --remove ${KPVER}-${KBRANCH}-${KPBUILD}
412   fi   fi
413  }  }
414    

Legend:
Removed from v.11369  
changed lines
  Added in v.18718