diff options
author | Richard Purdie <richard@openedhand.com> | 2005-08-31 10:45:47 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2005-08-31 10:45:47 +0000 |
commit | 4b46c1f6e891b1ddd5968536440b888661fade3e (patch) | |
tree | e0ba2c1f56f61b868bf746da5c4feabb25b800b2 /openembedded/classes/srec.bbclass | |
download | poky-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.gz |
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes/srec.bbclass')
-rw-r--r-- | openembedded/classes/srec.bbclass | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/openembedded/classes/srec.bbclass b/openembedded/classes/srec.bbclass new file mode 100644 index 0000000000..ae46a407fe --- /dev/null +++ b/openembedded/classes/srec.bbclass | |||
@@ -0,0 +1,26 @@ | |||
1 | # | ||
2 | # Creates .srec files from images. | ||
3 | # | ||
4 | # Useful for loading with Yamon. | ||
5 | |||
6 | # Define SREC_VMAADDR in your machine.conf. | ||
7 | |||
8 | 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" | ||
9 | |||
10 | # Do not build srec files for these types of images: | ||
11 | SREC_SKIP = "tar" | ||
12 | |||
13 | do_srec () { | ||
14 | if [ ${SREC_VMAADDR} = "" ] ; then | ||
15 | oefatal Cannot do_srec without SREC_VMAADDR defined. | ||
16 | fi | ||
17 | for type in ${IMAGE_FSTYPES}; do | ||
18 | for skiptype in ${SREC_SKIP}; do | ||
19 | if [ $type = $skiptype ] ; then continue 2 ; fi | ||
20 | done | ||
21 | ${SREC_CMD} | ||
22 | done | ||
23 | return 0 | ||
24 | } | ||
25 | |||
26 | addtask srec after do_rootfs before do_build | ||