Changeset 645 for branches


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

Add in some more error checking. It appears though that kernel-package
fails to return kernel build success status.

Newer versions of kernel-package now produce module packages in the same
directory as the kernel package, adjust this script to match.

File:
1 edited

Legend:

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

    r620 r645  
    141141# the key command
    142142echo 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 yes "" | 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
     143if ! 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
     144then
     145        echo ; echo Kernel build failed\!
     146        exit 1
     147fi
    144148
    145149# move the packages to the bin directory
    146 mv "${DEBIAN_BUILD_DIR}/linux-debwrt-image-${revision%%-*}-${device}_${revision}_${arch}.deb" "${linuxdir}/modules"/*/*.deb "${INSTALL_DIR_DEBIAN_PACKAGES}"
     150if ! 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
     151then
     152        echo ; echo Output files missing, did kernel build fail\?
     153        exit 1
     154fi
     155
     156echo ; echo Successfully built kernel.
    147157
    148158exit 0
Note: See TracChangeset for help on using the changeset viewer.