Changeset 672 for branches


Ignore:
Timestamp:
Sep 10, 2015, 8:05:44 AM (4 years ago)
Author:
ehem
Message:

Cover another error condition that people may run into. Some later
kernels require a later version of kernel-package to build.

Add the feature of adding ${EXTRAEXTRAVERSION} from the environment to
the kernel version. Should anyone want to add onto the version string,
this is the way to do it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/contrib/debian/linux-image/build.sh

    r656 r672  
    2222esac
    2323
     24# check for presence of device settings
    2425if ! [ -f "${basedir}/configs/${device}.vars" ]
    2526then
     
    2829fi
    2930
     31# check for kernel-package being installed
    3032if ! which make-kpkg > /dev/null
    3133then
     
    3335        exit 1
    3436fi
     37# retrieve kernel-package version
     38kpkg_rev=`make-kpkg --help | grep -e^Version\:`
     39kpkg_rev=${kpkg_rev#Version\:\ }
    3540
    3641. "${basedir}/configs/${device}.vars"
    3742
     43# check compatibility between kernel-package and kernel
     44case "${linuxver}" in
     45[12].*|3.[0-9])
     46        min_kpkg="12.036+nmu3"
     47;;
     48# I'm unsure where the version breakdown is, but 3.2 can use v12, 3.16 needs v13
     493.[0-9][0-9]*|[4-9].*|*.*|*)
     50        min_kpkg="13.014+nmu1"
     51;;
     52esac
     53if dpkg --compare-versions "${kpkg_rev}" lt "${min_kpkg}"
     54then
     55        echo $0\: installed version of kernel-package \("${kpkg_rev}"\) is too old, need at least version "${min_kpkg}" to build
     56        exit 1
     57fi
     58
    3859kernsrc="/usr/src/linux-source-${linuxver}.tar.bz2"
    3960
    4061archfull=`dpkg-architecture "-a${arch}" -qDEB_HOST_MULTIARCH`
    4162
     63#CC=${archfull}-cc
    4264CC=${archfull}-gcc
    4365export CC
     
    152174
    153175# the key command
    154 echo MODULE_LOC=\""${linuxdir}/modules"\" make-kpkg --config config --arch \""${arch}"\" --initrd --append_to_version \""${revextra}-${device}"\" --revision \""${revision}"\" --cross-compile \""${archfull}-"\" kernel_image modules_image kernel_headers
    155 if ! yes "" 2>/dev/null | MODULE_LOC="${linuxdir}/modules" make-kpkg --config config --arch "${arch}" --initrd --append_to_version "${revextra}-${device}" --revision "${revision}" --cross-compile "${archfull}-" kernel_image modules_image kernel_headers
     176echo MODULE_LOC=\""${linuxdir}/modules"\" make-kpkg --config config --arch \""${arch}"\" --initrd --append_to_version \""${revextra}${EXTRAEXTRAVERSION}-${device}"\" --revision \""${revision}"\" --cross-compile \""${archfull}-"\" kernel_image modules_image kernel_headers
     177if ! yes "" 2>/dev/null | MODULE_LOC="${linuxdir}/modules" make-kpkg --config config --arch "${arch}" --initrd --append_to_version "${revextra}${EXTRAEXTRAVERSION}-${device}" --revision "${revision}" --cross-compile "${archfull}-" kernel_image modules_image kernel_headers
    156178then
    157179        echo ; echo Kernel build failed\!
     
    161183
    162184# move the packages to the bin directory
    163 packages="${DEBIAN_BUILD_DIR}/linux-image-${revision}-${device}_${revision}_${arch}.deb"\ "${DEBIAN_BUILD_DIR}/linux-headers-${revision}-${device}_${revision}_${arch}.deb"
     185packages="${DEBIAN_BUILD_DIR}/linux-image-${revision}${EXTRAEXTRAVERSION}-${device}_${revision}_${arch}.deb"\ "${DEBIAN_BUILD_DIR}/linux-headers-${revision}${EXTRAEXTRAVERSION}-${device}_${revision}_${arch}.deb"
    164186
    165187if [ -n "${modules}" ]
    166 then    packages="${packages} ""${DEBIAN_BUILD_DIR}/linux-module-"*"-${revision}-${device}_"*"+${revision}_${arch}.deb"
     188then    packages="${packages} ""${DEBIAN_BUILD_DIR}/linux-module-"*"-${revision}${EXTRAEXTRAVERSION}-${device}_"*"+${revision}_${arch}.deb"
    167189fi
    168190
Note: See TracChangeset for help on using the changeset viewer.