Changeset 655 for branches


Ignore:
Timestamp:
Feb 2, 2015, 6:38:02 AM (5 years ago)
Author:
ehem
Message:

Allow for kernel builds that have absolutely no external modules. Get
full kernel version into resultant module name. This seems easier for
handling updates.

File:
1 edited

Legend:

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

    r647 r655  
    8181fi
    8282
     83# retrieve the full package/kernel version
    8384revision=`dpkg -s linux-source-${linuxver} | grep -e^Version\:`
    8485revision=${revision#Version\:\ }
     86# retrieve the extra version
     87revextra="${revision#${linuxver}.}"
     88while [ "${revextra}" != "${revextra#[0-9]}" ]
     89do revextra="${revextra#[0-9]}"
     90done
    8591
    8692rm -f "${DEBIAN_BUILD_DIR}/linux-"*"-${linuxver}"*"-${device}_"*"${linuxver}"*"_${arch}.deb"
     
    144150cp "${basedir}/configs/${device}.linux-${linuxver}.config" "${linuxdir}/.config"
    145151
     152
    146153# the key command
    147 echo MODULE_LOC=\""${linuxdir}/modules"\" make-kpkg --config config --arch \""${arch}"\" --initrd --append_to_version \""-${device}"\" --revision \""${revision}"\" --cross-compile \""${archfull}-"\" kernel_image modules_image
    148 if ! yes "" 2>/dev/null | MODULE_LOC="${linuxdir}/modules" make-kpkg --config config --arch "${arch}" --initrd --append_to_version "-${device}" --revision "${revision}" --cross-compile "${archfull}-" kernel_image modules_image
     154echo 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
     155if ! 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
    149156then
    150157        echo ; echo Kernel build failed\!
     
    152159fi
    153160
     161
    154162# move the packages to the bin directory
    155 if ! mv "${DEBIAN_BUILD_DIR}/linux-image-${revision%%-*}-${device}_${revision}_${arch}.deb" "${DEBIAN_BUILD_DIR}/linux-module-"*"-${revision%%-*}-${device}_"*"+${revision}_${arch}.deb" "${INSTALL_DIR_DEBIAN_PACKAGES}" > /dev/null 2>&1
     163packages="${DEBIAN_BUILD_DIR}/linux-image-${revision}-${device}_${revision}_${arch}.deb"
     164
     165if [ -n "${modules}" ]
     166then    packages="${packages} ""${DEBIAN_BUILD_DIR}/linux-module-"*"-${revision}-${device}_"*"+${revision}_${arch}.deb"
     167fi
     168
     169if ! mv -t "${INSTALL_DIR_DEBIAN_PACKAGES}" ${packages} > /dev/null 2>&1
    156170then
    157171        echo ; echo Output files missing, did kernel build fail\?
Note: See TracChangeset for help on using the changeset viewer.