diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2011-04-26 21:12:51 +0200 |
---|---|---|
committer | Andrea Adami <andrea.adami@gmail.com> | 2011-04-26 21:15:42 +0200 |
commit | 482fb6fb36c713b46c8fff87d1eee144b3e1ef6a (patch) | |
tree | 447d4414dd67ef7cc6cf3839bf632b395d266d31 /classes/obsolete | |
parent | 6346a2c6b97ece64c9065c0700025d934e84755e (diff) | |
download | openembedded-482fb6fb36c713b46c8fff87d1eee144b3e1ef6a.tar.gz |
nylon: move specific classes to /obsolete
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Diffstat (limited to 'classes/obsolete')
-rw-r--r-- | classes/obsolete/nylon-helpers.bbclass | 35 | ||||
-rw-r--r-- | classes/obsolete/nylon-image.bbclass | 25 | ||||
-rw-r--r-- | classes/obsolete/nylon-mirrors.bbclass | 6 |
3 files changed, 66 insertions, 0 deletions
diff --git a/classes/obsolete/nylon-helpers.bbclass b/classes/obsolete/nylon-helpers.bbclass new file mode 100644 index 0000000000..1755d91d23 --- /dev/null +++ b/classes/obsolete/nylon-helpers.bbclass @@ -0,0 +1,35 @@ +# ############################################################################ +# Helper functions for building packages from the trunk or branches. To use +# this .bbclass simply inherit from it in your conf/local.conf. +# +# - get_branch() helps to construct the package name when fetching by +# extracting the directory name above the "build" directory containing the +# oe environment and bitbake. That directory name is usually the branch in +# which the package is located in the svn with one exception: "unstable" +# is synonymous for "trunk". In the package you can then use the ${BRANCH} +# variable within the svn (or cvs) url for the package. +# +# - get_tomorrow() makes sure the latest version of a package is fetched. To +# use it, set the SRCDATE to ${TOMORROW}. +# ############################################################################ + +def get_branch(): + import commands, re + build = re.sub(r'/sources$', '', commands.getoutput('pwd')) + build = re.sub(r'/tmp/work.*$', '', build) + build = re.sub(r'/packages\.4g.*$', '', build) + if re.search(r'/trunk/[^/]+/?$', build): + return 'trunk' + if re.search(r'/unstable$', build): + return 'trunk' + if re.search(r'/testing$', build): + return 'testing' + return re.sub(r'^.*/([^/]+/[^/]+)/[^/]+/?$', r'\1', build) + +# end of get_branch + +def get_tomorrow(): + import time + return time.strftime('%Y%m%d', time.gmtime(time.time() + 3600*24)) + +# end of get_tomorrow diff --git a/classes/obsolete/nylon-image.bbclass b/classes/obsolete/nylon-image.bbclass new file mode 100644 index 0000000000..e973bf7cf5 --- /dev/null +++ b/classes/obsolete/nylon-image.bbclass @@ -0,0 +1,25 @@ +# we dont need the kernel in the image +ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/*Image*" + +# create a tar.gz (.imgz) file containing the filesystem and the kernel +nylon_create_imgz() { + rm -rf ${DEPLOY_DIR_IMAGE}/tmp + rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz + install -d ${DEPLOY_DIR_IMAGE}/tmp + + # copy the kernel (for mips on flash) into tmp + FLASH_BIN=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin + cp ${FLASH_BIN} ${DEPLOY_DIR_IMAGE}/tmp/zImage.flash + + # copy rootfs.jffs (or so) into tmp + cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${DEPLOY_DIR_IMAGE}/tmp/rootfs.jffs2 + + # make an imgz out of tmp + ( cd ${DEPLOY_DIR_IMAGE}/tmp; tar cvzf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz * ) + rm -r ${DEPLOY_DIR_IMAGE}/tmp +} + +IMAGE_POSTPROCESS_COMMAND += "kldsköa" +IMAGE_POSTPROCESS_COMMAND_mtx-1 += "nylon_create_imgz;" +IMAGE_POSTPROCESS_COMMAND_mtx-2 += "nylon_create_imgz;" +IMAGE_POSTPROCESS_COMMAND_mtx-3a += "nylon_create_initrd_uimage;" diff --git a/classes/obsolete/nylon-mirrors.bbclass b/classes/obsolete/nylon-mirrors.bbclass new file mode 100644 index 0000000000..11cc45ca0c --- /dev/null +++ b/classes/obsolete/nylon-mirrors.bbclass @@ -0,0 +1,6 @@ +MIRRORS_append () { +ftp://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/ +http://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/ +ftp://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/unstable/sources/ +http://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/unstable/sources/ +}
\ No newline at end of file |