From 4b46c1f6e891b1ddd5968536440b888661fade3e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 31 Aug 2005 10:45:47 +0000 Subject: Initial population git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- openembedded/classes/srec.bbclass | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 openembedded/classes/srec.bbclass (limited to 'openembedded/classes/srec.bbclass') diff --git a/openembedded/classes/srec.bbclass b/openembedded/classes/srec.bbclass new file mode 100644 index 000000000..ae46a407f --- /dev/null +++ b/openembedded/classes/srec.bbclass @@ -0,0 +1,26 @@ +# +# Creates .srec files from images. +# +# Useful for loading with Yamon. + +# Define SREC_VMAADDR in your machine.conf. + +SREC_CMD = "${TARGET_PREFIX}objcopy -O srec -I binary --adjust-vma ${SREC_VMAADDR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type}.srec" + +# Do not build srec files for these types of images: +SREC_SKIP = "tar" + +do_srec () { + if [ ${SREC_VMAADDR} = "" ] ; then + oefatal Cannot do_srec without SREC_VMAADDR defined. + fi + for type in ${IMAGE_FSTYPES}; do + for skiptype in ${SREC_SKIP}; do + if [ $type = $skiptype ] ; then continue 2 ; fi + done + ${SREC_CMD} + done + return 0 +} + +addtask srec after do_rootfs before do_build -- cgit v1.2.3