redpine: build from objects tarball by default

Also use git revision (SHA1) as part of the tarball name.

https://jira.digi.com/browse/DEL-134

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2013-03-06 20:11:50 +01:00
parent 4f0067f8d4
commit 383dda0a06
2 changed files with 27 additions and 7 deletions

View File

@ -60,8 +60,10 @@ tarball:
install -m 0644 $${i} $(TAR_DIR)/$$(dirname $${i})/; \ install -m 0644 $${i} $(TAR_DIR)/$$(dirname $${i})/; \
done done
cp -r RS.GENR.LNX.SD_GPL/include $(TAR_DIR)/RS.GENR.LNX.SD_GPL/ cp -r RS.GENR.LNX.SD_GPL/include $(TAR_DIR)/RS.GENR.LNX.SD_GPL/
rm -f redpine-$(DEL_PLATFORM).tar.gz && tar cz --transform 's,\(^[^/]\+/\),\1$(DEL_PLATFORM)/,' \ REV="$$(git rev-parse --short --verify HEAD)"; \
--numeric-owner --owner 0 --group 0 -f redpine-$(DEL_PLATFORM).tar.gz -C $(TAR_DIR) . rm -f redpine-$(DEL_PLATFORM)-$${REV}.tar.gz && \
tar cz --transform 's,\(^[^/]\+/\),\1$(DEL_PLATFORM)/,' \
--numeric-owner --owner 0 --group 0 -f redpine-$(DEL_PLATFORM)-$${REV}.tar.gz -C $(TAR_DIR) .
-rm -rf $(TAR_DIR) -rm -rf $(TAR_DIR)
endif #ifneq ($(KERNELRELEASE),) endif #ifneq ($(KERNELRELEASE),)

View File

@ -6,11 +6,24 @@ inherit module
PR = "r0" PR = "r0"
REDPINE_BUILD_SRC ?= "1" # Uncomment to build the driver from sources (internal use only)
# REDPINE_BUILD_SRC ?= "1"
SRCREV = "${AUTOREV}" SRCREV = "e43f35983fbcc4d2c537cfb5c0133c7d3cf4fc61"
SRC_URI_git = "${DIGI_LOG_GIT}linux-modules/redpine.git;protocol=git;branch=refs/heads/master"
SRC_URI_obj = "file://redpine-${MACHINE}.tar.gz" # Checksums for 'redpine-${MACHINE}-${SRCREV_SHORT}.tar.gz' tarballs
TARBALL_MD5_ccimx51js = "8ffb32adef6374b535941e31217876ab"
TARBALL_SHA256_ccimx51js = "ba507b694f4dbc98c8ac5dd7b4fd47de6c8f122cd6c4fd3a5cba24ace2c8c7a0"
TARBALL_MD5_ccimx53js = "c65caf5097892b77024116b76e0c7e16"
TARBALL_SHA256_ccimx53js = "618889737ce0a06aa9bcd8e9c3e1588a2ba4eea8be9d5952d97948dfe2d39c6c"
SRC_URI_git = " \
${DIGI_LOG_GIT}linux-modules/redpine.git;protocol=git \
"
SRCREV_SHORT = "${@'${SRCREV}'[:7]}"
SRC_URI_obj = " \
${DIGI_MIRROR}/redpine-${MACHINE}-${SRCREV_SHORT}.tar.gz;md5sum=${TARBALL_MD5};sha256sum=${TARBALL_SHA256} \
"
SRC_URI = "${@base_conditional('REDPINE_BUILD_SRC', '1' , '${SRC_URI_git}', '${SRC_URI_obj}', d)}" SRC_URI = "${@base_conditional('REDPINE_BUILD_SRC', '1' , '${SRC_URI_git}', '${SRC_URI_obj}', d)}"
SRC_URI += " \ SRC_URI += " \
@ -40,7 +53,12 @@ do_deploy() {
if [ "${REDPINE_BUILD_SRC}" = "1" ]; then if [ "${REDPINE_BUILD_SRC}" = "1" ]; then
oe_runmake tarball oe_runmake tarball
install -d ${DEPLOY_DIR_IMAGE} install -d ${DEPLOY_DIR_IMAGE}
cp ${S}/redpine-${MACHINE}.tar.gz ${DEPLOY_DIR_IMAGE}/ if [ -f "${S}/redpine-${MACHINE}-${SRCREV_SHORT}.tar.gz" ]; then
cp ${S}/redpine-${MACHINE}-${SRCREV_SHORT}.tar.gz ${DEPLOY_DIR_IMAGE}/
else
bberror "Objects tarball not found: ${S}/redpine-${MACHINE}-${SRCREV_SHORT}.tar.gz"
exit 1
fi
fi fi
} }