Changeset 646 for branches


Ignore:
Timestamp:
Jan 6, 2015, 1:45:18 AM (5 years ago)
Author:
ehem
Message:

More cleanup and updates of this kernel build script. Use
dpkg-architecture for retrieving the arch-os-api triplet. ARM has rather
low consistency amoung its triplets, so this should have benefits in the
future.

Fix the intermediate build cleanup step, which now has to be capable of
dealing with module packages. This was also out of date, since the use
of kernel-package's --stem option was removed so we no longer have
"debwrt" in the package name.

I'm still rather unsure of ${DEBIAN_BUILD_PKG_DIR}. This is particularly
questionable since these aren't actually targetting the build host.

File:
1 edited

Legend:

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

    r645 r646  
    3838kernsrc="/usr/src/linux-source-${linuxver}.tar.bz2"
    3939
    40 if ! which ${arch}-linux-gnu-gcc > /dev/null
     40archfull=`dpkg-architecture "-a${arch}" -qDEB_HOST_MULTIARCH`
     41
     42if ! which ${archfull}-gcc > /dev/null
    4143then
    42         echo $0\: GCC for architecture \"${arch}\" not found, please install package c-compiler-${arch}-linx-gnu
     44        echo $0\: GCC for architecture \"${arch}\" not found, please install package c-compiler\:${arch} or c-compiler-${archfull}
    4345        fail=64
    4446fi
     
    7981revision=${revision#Version\:\ }
    8082
    81 rm -rf "${DEBIAN_BUILD_DIR}/linux-debwrt-image-${linuxver}*-${device}_${linuxver}*${device}*_${arch}.deb"
     83rm -f "${DEBIAN_BUILD_DIR}/linux-"*"-${linuxver}"*"-${device}_"*"${linuxver}"*"_${arch}.deb"
    8284
    8385linuxdir="${DEBIAN_BUILD_DIR}/linux-source-${linuxver}"
     
    140142
    141143# the key command
    142 echo MODULE_LOC=\""${linuxdir}/modules"\" make-kpkg --config config --arch \""${arch}"\" --initrd --append_to_version \""-${device}"\" --revision \""${revision}"\" --cross-compile \""${arch}-linux-gnu-"\" kernel_image modules_image
    143 if ! yes "" 2>/dev/null | MODULE_LOC="${linuxdir}/modules" make-kpkg --config config --arch "${arch}" --initrd --append_to_version "-${device}" --revision "${revision}" --cross-compile "${arch}-linux-gnu-" kernel_image modules_image
     144echo MODULE_LOC=\""${linuxdir}/modules"\" make-kpkg --config config --arch \""${arch}"\" --initrd --append_to_version \""-${device}"\" --revision \""${revision}"\" --cross-compile \""${archfull}-"\" kernel_image modules_image
     145if ! 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
    144146then
    145147        echo ; echo Kernel build failed\!
     
    148150
    149151# move the packages to the bin directory
    150 if ! mv "${DEBIAN_BUILD_DIR}/linux-image-${revision%%-*}-${device}_${revision}_${arch}.deb" "${DEBIAN_BUILD_PKG_DIR}/linux-module-"*"-${revision%%-*}-${device}_"*"+${revision}_${arch}.deb" "${INSTALL_DIR_DEBIAN_PACKAGES}" > /dev/null 2>&1
     152if ! 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
    151153then
    152154        echo ; echo Output files missing, did kernel build fail\?
Note: See TracChangeset for help on using the changeset viewer.