blob: 48156cd2d2a4819e03f6866cac0208fea850174f [file] [log] [blame]
Fathi Boudracd8f58d2012-06-15 17:43:39 +03001#!/usr/bin/python
2
Andy Doan15aa23b2012-02-02 16:40:58 -06003# Copyright (C) 2012 Linaro
4#
5# Author: Andy Doan <andy.doan@linaro.org>
6#
7# This file is part of Linaro Daily Prebuilt Images.
8#
9# Linaro Daily Prebuilt Images is free software; you can redistribute it and/or
10# modify it under the terms of the GNU General Public License
11# as published by the Free Software Foundation; either version 2
12# of the License, or (at your option) any later version.
13#
14# Linaro Daily Prebuilt Images is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with Linaro Image Tools; if not, write to the Free Software
21# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22# USA.
23
Andy Doanfccf4842012-03-08 10:42:19 -060024from linaro_fetch_image import fetch_image
Andy Doan15aa23b2012-02-02 16:40:58 -060025from linaro_image_tools import cmd_runner
26
Andy Doan8ff38f02012-02-20 16:32:37 -060027import crawler
28
Andy Doan15aa23b2012-02-02 16:40:58 -060029import argparse
Andy Doan15aa23b2012-02-02 16:40:58 -060030import datetime
Ricardo Salveti de Araujob39eb802012-06-23 00:55:31 -030031import time
Andy Doan3634c472012-04-17 12:50:58 -050032import hashlib
Andy Doanc6500af2012-03-15 14:44:39 -050033import os
Andy Doan15aa23b2012-02-02 16:40:58 -060034import re
Andy Doane449bce2012-03-21 15:22:31 -050035import urlparse
Andy Doan35ee9dc2012-05-11 01:10:12 -050036import string
Andy Doan15aa23b2012-02-02 16:40:58 -060037
Andy Doanea2e1ea2012-04-23 11:56:29 -050038class HwPack:
39 def __init__(self, lmcname, eula=False, pre_inst_script=None):
40 self.lmcname = lmcname
41 if eula:
42 self.eula = 'EULA.txt'
43 else:
Andy Doan4aabf022012-04-26 14:30:29 -050044 self.eula = 'OPEN-EULA.txt'
Andy Doanea2e1ea2012-04-23 11:56:29 -050045 self.pre_inst_script = pre_inst_script
46
47 def do_eula(self, imgfile):
48 fname = '%s/%s' % (os.path.dirname(imgfile), self.eula)
49 with file(fname, 'a'):
50 pass #just need the file to exist
51
Andy Doan15aa23b2012-02-02 16:40:58 -060052# a mapping of hwpack name to l-m-c name
53HWPACKS = {
Andy Doanea2e1ea2012-04-23 11:56:29 -050054 'beagleboard': HwPack('beagle'),
Fathi Boudra02454c92012-12-01 06:58:42 +020055 'efikamx': HwPack('efikamx'),
56 'igep': HwPack('igep'),
57 'leb-origen': HwPack('origen'),
Andy Doanea2e1ea2012-04-23 11:56:29 -050058 'lt-mx5': HwPack('mx53loco'),
59 'lt-mx6': HwPack('mx6qsabrelite'),
Andy Doan490f6202012-04-25 10:56:08 -050060 'lt-origen': HwPack('origen'),
Fathi Boudra02454c92012-12-01 06:58:42 +020061 'lt-panda': HwPack('panda'),
62 'lt-panda-x11-base': HwPack('panda'),
Fathi Boudra1337ec62012-12-02 21:11:56 +020063 'lt-snowball': HwPack('snowball_sd', True, 'ste-preinstall.sh'),
64 'lt-snowball-x11-base': HwPack('snowball_sd', True, 'ste-preinstall.sh'),
Ricardo Salveti de Araujoa798c502012-06-27 19:05:10 -030065 'lt-vexpress': HwPack('vexpress'),
Fathi Boudra02454c92012-12-01 06:58:42 +020066 'origen': HwPack('origen'),
67 'overo': HwPack('overo'),
68 'panda': HwPack('panda'),
Fathi Boudra1337ec62012-12-02 21:11:56 +020069 'snowball': HwPack('snowball_sd', True),
Fathi Boudra02454c92012-12-01 06:58:42 +020070 'ti-panda-x11-base': HwPack('panda'),
Andy Doanedffb5d2012-04-25 11:22:19 -050071 'vexpress': HwPack('vexpress'),
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -030072 'vexpress64': HwPack('vexpress'),
Andy Doan15aa23b2012-02-02 16:40:58 -060073}
74# a mapping of binary image to its image_file size
75BINARIES = {
Andy Doan4202d882012-03-29 21:36:09 -050076 'alip': '2G',
Fathi Boudra02454c92012-12-01 06:58:42 +020077 'developer': '1G',
78 'lamp-armv8': '1G',
Andy Doan4202d882012-03-29 21:36:09 -050079 'linarotv-xbmc': '3G',
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -030080 'minimal-armv8': '512M',
Fathi Boudra02454c92012-12-01 06:58:42 +020081 'nano': '1G',
82 'nano-lava': '1G',
Ricardo Salveti de Araujod0fe5c42012-10-17 03:29:58 -030083 'sdk-armv8': '2G',
Fathi Boudra02454c92012-12-01 06:58:42 +020084 'server': '1G',
85 'ubuntu-desktop': '3G',
Andy Doan15aa23b2012-02-02 16:40:58 -060086}
87
Fathi Boudra75e299a2012-08-26 19:04:03 +030088SNAPSHOTS_URL = "http://snapshots.linaro.org"
89
Andy Doan15aa23b2012-02-02 16:40:58 -060090def today():
91 d = datetime.date.today()
92 return "%d%02d%02d" % (d.year, d.month, d.day)
93
Ricardo Salveti de Araujob39eb802012-06-23 00:55:31 -030094def download(dm, url):
95 print "INFO: Fetching", url
96 before = time.time()
97 dfile = dm.download(url, None, verbose=False)
98 delta_min, delta_secs = divmod(int(time.time() - before), 60)
99 print "INFO: Downloaded file '%s' in %d min(s) and %d sec(s)" % (
100 dfile, delta_min, delta_secs)
101 return dfile
102
Andy Doan15aa23b2012-02-02 16:40:58 -0600103def compress_image(imgfile):
Ricardo Salveti de Araujoba7dacf2012-06-23 01:08:24 -0300104 print "INFO: compressing %s" % imgfile
Ricardo Salveti de Araujod6788502012-06-23 01:19:18 -0300105 before = time.time()
Ricardo Salveti de Araujo7edc48b2012-06-23 03:55:04 -0300106 args = ('gzip', imgfile)
Andy Doan15aa23b2012-02-02 16:40:58 -0600107 cmd_runner.run(args).wait()
Ricardo Salveti de Araujod6788502012-06-23 01:19:18 -0300108 delta_min, delta_secs = divmod(int(time.time() - before), 60)
109 print "INFO: file compressed in %d min(s) and %d sec(s)" % (
110 delta_min, delta_secs)
Ricardo Salveti de Araujo7edc48b2012-06-23 03:55:04 -0300111 return '%s.gz' % imgfile
Andy Doan23ce4e12012-03-21 12:46:21 -0500112
Ricardo Salveti de Araujod3743e92012-08-15 01:50:10 -0300113def zsync_image(platform, imgfile):
Ricardo Salveti de Araujoba7dacf2012-06-23 01:08:24 -0300114 print "INFO: making zsync file for %s" % imgfile
Ricardo Salveti de Araujod6788502012-06-23 01:19:18 -0300115 before = time.time()
Fathi Boudra75e299a2012-08-26 19:04:03 +0300116 basepath = "%s/%s/pre-built" % (SNAPSHOTS_URL, platform)
Paul Larson2a8e67b2012-08-06 09:47:14 -0500117 imgpath=os.sep.join(imgfile.split(os.sep)[-3:])
118 zurl=basepath + os.sep + imgpath
119 args = ('zsyncmake', '-b 2048', '-u', zurl, '-o', '%s.zsync' % imgfile,
120 imgfile)
Andy Doan23ce4e12012-03-21 12:46:21 -0500121 cmd_runner.run(args).wait()
Ricardo Salveti de Araujod6788502012-06-23 01:19:18 -0300122 delta_min, delta_secs = divmod(int(time.time() - before), 60)
123 print "INFO: zsync generated in %d min(s) and %d sec(s)" % (
124 delta_min, delta_secs)
Andy Doan15aa23b2012-02-02 16:40:58 -0600125
Andy Doan3634c472012-04-17 12:50:58 -0500126def md5sum(fname):
127 md5 = hashlib.md5()
128 with open(fname, 'rb') as f:
129 while True:
130 data = f.read(4096)
131 if not data: break
132 md5.update(data)
133 return md5.hexdigest()
134
Fathi Boudraef3cd832012-12-09 10:01:25 +0200135def create_image_info(infofile, gzfile, binary_file, hwpack_url, \
136 rootfs_url, platform):
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300137 ''' prints out the md5sum and hwpack/rootfs info for the given image
Andy Doan3634c472012-04-17 12:50:58 -0500138 '''
Ricardo Salveti de Araujo7edc48b2012-06-23 03:55:04 -0300139 print "INFO: building image info for: %s" % gzfile
140 md5 = md5sum(gzfile)
Andy Doan3634c472012-04-17 12:50:58 -0500141
142 binary_file = os.path.basename(binary_file)
Andy Doan35ee9dc2012-05-11 01:10:12 -0500143 tfile = '%s/image_info_template.html' % os.path.dirname(__file__)
Andy Doan3634c472012-04-17 12:50:58 -0500144
Andy Doan35ee9dc2012-05-11 01:10:12 -0500145 tmpl = None
146 with open(tfile) as f:
147 buff = f.read()
148 tmpl = string.Template(buff)
149
150 title = 'Pre-Built Image Info'
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300151
152 # build hwpack manifest and rootfs packages links
Fathi Boudraef3cd832012-12-09 10:01:25 +0200153 hwpack_name = os.path.basename(hwpack_url)
154 hwpack_manifest_url = ("%s" % hwpack_url).replace(".tar.gz", ".manifest.txt")
155 hwpack_manifest = os.path.basename(hwpack_manifest_url)
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300156
Fathi Boudraef3cd832012-12-09 10:01:25 +0200157 rootfs_name = os.path.basename(rootfs_url)
158 rootfs_packages_url = ("%s" % rootfs_url).replace(".tar.gz", ".packages")
159 rootfs_packages = os.path.basename(rootfs_packages_url)
160
161 if platform == "openembedded":
162 rootfs_packages_url = "n/a"
163 rootfs_packages = "n/a"
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300164
Ricardo Salveti de Araujo894040a2012-05-29 14:07:55 -0300165 # try to get information from Jenkins, if available
166 jenkins_buildn = os.environ.get('BUILD_NUMBER') or 'Not Found'
167 jenkins_build_url = os.environ.get('BUILD_URL') or 'http://ci.linaro.org'
168
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300169 buff = tmpl.substitute(
Ricardo Salveti de Araujo7edc48b2012-06-23 03:55:04 -0300170 title=title, md5=md5, image_name=os.path.basename(gzfile),
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300171 hwpack_name=hwpack_name, hwpack_url=hwpack_url,
172 rootfs_name=rootfs_name, rootfs_url=rootfs_url,
173 hwpack_manifest_name=hwpack_manifest,
174 hwpack_manifest_url=hwpack_manifest_url,
175 rootfs_packages_name=rootfs_packages,
Ricardo Salveti de Araujo894040a2012-05-29 14:07:55 -0300176 rootfs_packages_url=rootfs_packages_url,
177 jenkins_buildn=jenkins_buildn,
178 jenkins_build_url=jenkins_build_url)
Andy Doan3c0c3892012-04-25 11:09:53 -0500179 with open(infofile, 'w') as f:
Andy Doan35ee9dc2012-05-11 01:10:12 -0500180 f.write(buff)
Andy Doan3634c472012-04-17 12:50:58 -0500181
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -0300182def build_image(lmc, imgfile, hwpack, hwpack_file, binary,
183 binary_file, fastmodel=False):
Ricardo Salveti de Araujoba7dacf2012-06-23 01:08:24 -0300184 print "INFO: building image: %s" % imgfile
Andy Doanea2e1ea2012-04-23 11:56:29 -0500185 hwpi = HWPACKS[hwpack]
Andy Doan15aa23b2012-02-02 16:40:58 -0600186 size = BINARIES[binary]
187
Andy Doanc6500af2012-03-15 14:44:39 -0500188 args = [lmc,
Fathi Boudra885753b2012-12-05 20:58:32 +0200189 '--image-size', size,
Andy Doan15aa23b2012-02-02 16:40:58 -0600190 '--hwpack-force-yes',
191 '--hwpack', hwpack_file,
192 '--binary', binary_file,
Andy Doanc6500af2012-03-15 14:44:39 -0500193 ]
194
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -0300195 if fastmodel:
196 args += ['--dev', 'fastmodel',
197 '--output-directory', os.path.dirname(imgfile),
Fathi Boudra885753b2012-12-05 20:58:32 +0200198 '--image-file', os.path.basename(imgfile)]
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -0300199 else:
200 args += ['--dev', hwpi.lmcname,
Fathi Boudra885753b2012-12-05 20:58:32 +0200201 '--image-file', imgfile]
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -0300202
Andy Doanea2e1ea2012-04-23 11:56:29 -0500203 if hwpi.pre_inst_script is not None:
Andy Doanc6500af2012-03-15 14:44:39 -0500204 sdir = os.path.abspath(os.path.dirname(__file__))
Andy Doanea2e1ea2012-04-23 11:56:29 -0500205 script = "%s/%s" % (sdir, hwpi.pre_inst_script)
Andy Doanc6500af2012-03-15 14:44:39 -0500206 print "using presintall script: %s" % script
207 args.append('--preinstall-script')
208 args.append(script)
209
Ricardo Salveti de Araujoba7dacf2012-06-23 01:08:24 -0300210 print "INFO: running l-m-c:", " ".join([str(arg) for arg in args])
211
Andy Doanea2e1ea2012-04-23 11:56:29 -0500212 hwpi.do_eula(imgfile)
Ricardo Salveti de Araujod6788502012-06-23 01:19:18 -0300213
214 # some useful information so we know how much time it took per lmc run
215 before = time.time()
Andy Doan15aa23b2012-02-02 16:40:58 -0600216 cmd_runner.run(args, as_root=True).wait()
Ricardo Salveti de Araujod6788502012-06-23 01:19:18 -0300217 delta_min, delta_secs = divmod(int(time.time() - before), 60)
218 print "INFO: linaro-media-create took %d min(s) and %d sec(s) to run" % (
219 delta_min, delta_secs)
Andy Doan15aa23b2012-02-02 16:40:58 -0600220
Andy Doan184cd3b2012-03-29 22:20:02 -0500221class SnapshotCrawler:
Ricardo Salveti de Araujo0352cb92012-06-22 21:48:34 -0300222 def __init__(self, platform, hwpacks, binaries):
Andy Doan184cd3b2012-03-29 22:20:02 -0500223 self.platform = platform
224 self.hwpacks = hwpacks
225 self.binaries = binaries
Andy Doane449bce2012-03-21 15:22:31 -0500226
Andy Doan184cd3b2012-03-29 22:20:02 -0500227 def get_binaries(self):
228 '''return a hash table of binary->url'''
229 binaryf = {}
230 for binary in self.binaries:
Fathi Boudra75e299a2012-08-26 19:04:03 +0300231 url = "%s/%s/images/%s" % (SNAPSHOTS_URL, self.platform, binary)
Andy Doan184cd3b2012-03-29 22:20:02 -0500232 (date, url) = crawler.latest_rfs(url)
Andy Doan4202d882012-03-29 21:36:09 -0500233 binaryf[binary] = url
Andy Doan4202d882012-03-29 21:36:09 -0500234
Andy Doan184cd3b2012-03-29 22:20:02 -0500235 return binaryf
Andy Doana3977372012-03-29 12:22:44 -0500236
Ricardo Salveti de Araujo0352cb92012-06-22 21:48:34 -0300237 def get_hwpacks(self):
238 '''return a hash table of hwpack->urls (date, url)'''
239 hwpackf = {}
240 for hwpack in self.hwpacks:
Fathi Boudra75e299a2012-08-26 19:04:03 +0300241 url = "%s/%s/hwpacks/%s" % (SNAPSHOTS_URL, self.platform, hwpack)
Ricardo Salveti de Araujo0352cb92012-06-22 21:48:34 -0300242 hwpackf[hwpack] = crawler.latest_hwpacks(url)
243
244 return hwpackf
Andy Doan4202d882012-03-29 21:36:09 -0500245
Andy Doan184cd3b2012-03-29 22:20:02 -0500246 def get_image_name(self, odir, hwpack, hwpack_url, binary):
247
Fathi Boudra684e5e42012-11-30 04:19:33 +0100248 #convert a url like:
249 # http://snapshots.linaro.org/SERIE/hwpacks/HWPACK_NAME/HWPACK_BUILD_NUMBER/HWPACK_FILE_NAME
Andy Doan184cd3b2012-03-29 22:20:02 -0500250 # to:
Fathi Boudra684e5e42012-11-30 04:19:33 +0100251 # SERIE/pre-built/HWPACK_NAME/HWPACK_BUILD_NUMBER/HWPACK_FILE_NAME.img
Andy Doan184cd3b2012-03-29 22:20:02 -0500252 path = urlparse.urlparse(hwpack_url).path
Andy Doan66e2d5c2012-04-18 23:01:59 -0500253 parts = path.split('/')
254 name = parts[-1] #use for the file name below
255 path = '/'.join(parts[-3:-1])
Andy Doan184cd3b2012-03-29 22:20:02 -0500256
257 path = '%s/%s' % (odir, path)
258 if not os.path.exists(path):
259 os.makedirs(path)
Andy Doan66e2d5c2012-04-18 23:01:59 -0500260
261 date = re.search(r'_(\d+-\d+)_', name).group(1)
Ricardo Salveti de Araujo99d52482012-06-22 16:05:09 -0300262 return "%s/%s-%s_%s_%s.img" % (path, hwpack, self.platform, binary, date)
Andy Doan184cd3b2012-03-29 22:20:02 -0500263
Andy Doan15aa23b2012-02-02 16:40:58 -0600264def main():
Andy Doan15aa23b2012-02-02 16:40:58 -0600265 hwpacks = HWPACKS.keys()
266 binaries = BINARIES.keys()
267
268 p = argparse.ArgumentParser(description=
Andy Doana3977372012-03-29 12:22:44 -0500269 'Builds a matrix of builds from the latest build on '
270 'snapshots.linaro.org or release images on releases.linaro.org')
Andy Doan15aa23b2012-02-02 16:40:58 -0600271
Andy Doan15aa23b2012-02-02 16:40:58 -0600272 p.add_argument('-w', dest='hwpacks', action='append',
273 help='The hwpacks to generate for, default=%s' %
Fathi Boudraabe11302012-12-01 19:04:53 +0200274 ', '.join(hwpacks))
Andy Doan15aa23b2012-02-02 16:40:58 -0600275 p.add_argument('-b', dest='binaries', action='append',
276 help='The binaries to generate for, default=%s' %
Fathi Boudraabe11302012-12-01 19:04:53 +0200277 ', '.join(binaries))
Fathi Boudra684e5e42012-11-30 04:19:33 +0100278 p.add_argument('-p', dest='platform', default='quantal',
279 help='The platform, default=quantal')
Fathi Boudraf9b39042012-12-01 19:09:11 +0200280 p.add_argument('-o', dest='out_dir', default='./out',
281 help='The out directory for downloaded and built files, default=./out')
282 p.add_argument('-d', dest='date', default="",
283 help='The date (YYYYMMDD) as reference for hwpack')
Andy Doan4202d882012-03-29 21:36:09 -0500284 p.add_argument('-r', dest='release', action='store_true', default=False,
285 help='If this is for release images. NOTE: the "date" arg'
286 'will then become the cycle ie -d 12.03')
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -0300287 p.add_argument('-f', dest='fastmodel', action='store_true',
288 help='Build for the fastmodel target (for vexpress hwpack)')
289
Andy Doan15aa23b2012-02-02 16:40:58 -0600290
291 args = p.parse_args()
Andy Doana3977372012-03-29 12:22:44 -0500292
Andy Doan15aa23b2012-02-02 16:40:58 -0600293 if args.hwpacks:
294 hwpacks = args.hwpacks
295 if args.binaries:
296 binaries = args.binaries
297
Andy Doan1c6ef8b2012-04-23 12:28:50 -0500298 crawler.cookie_setup()
299
Andy Doan15aa23b2012-02-02 16:40:58 -0600300 dm = fetch_image.DownloadManager(args.out_dir)
Andy Doan15aa23b2012-02-02 16:40:58 -0600301
Andy Doan4202d882012-03-29 21:36:09 -0500302 if args.release:
Andy Doan184cd3b2012-03-29 22:20:02 -0500303 site = ReleaseCrawler(args.date, args.platform, hwpacks, binaries)
Andy Doan4202d882012-03-29 21:36:09 -0500304 else:
Ricardo Salveti de Araujo0352cb92012-06-22 21:48:34 -0300305 site = SnapshotCrawler(args.platform, hwpacks, binaries)
Andy Doan184cd3b2012-03-29 22:20:02 -0500306
Ricardo Salveti de Araujo0352cb92012-06-22 21:48:34 -0300307 hwpackf = site.get_hwpacks()
Andy Doan184cd3b2012-03-29 22:20:02 -0500308 binaryf = site.get_binaries()
Andy Doan15aa23b2012-02-02 16:40:58 -0600309
Andy Doanb00dbc02012-03-15 16:23:06 -0500310 lmc = '%s/linaro-image-tools/linaro-media-create' % args.out_dir
Andy Doan184cd3b2012-03-29 22:20:02 -0500311 odir = '%s/pre-built' % args.out_dir
Andy Doanb00dbc02012-03-15 16:23:06 -0500312
Andy Doan15aa23b2012-02-02 16:40:58 -0600313 for hwpack in hwpacks:
Ricardo Salveti de Araujo0352cb92012-06-22 21:48:34 -0300314 url = None
315 # check if the user wanted a hwpack from a specific date
316 if args.date:
317 try:
318 dates = [elem[0] for elem in hwpackf[hwpack]]
319 index = dates.index(args.date)
320 url = hwpackf[hwpack][index][1]
321 except:
322 print "ERROR: Could not find hwpack '%s' with date '%s'" \
323 ", skipping pre-built image for it" % (hwpack, args.date)
324 else:
325 # just grab the latest hwpack
326 try:
327 url = hwpackf[hwpack][0][1]
328 except:
329 print "ERROR: Could not find a valid hwpack url for '%s'" \
330 ", skipping pre-built image for it" % (hwpack)
Andy Doanb00dbc02012-03-15 16:23:06 -0500331
Andy Doan2cfe5e62012-02-09 17:41:45 -0800332 if url is not None and url is not False:
Ricardo Salveti de Araujob39eb802012-06-23 00:55:31 -0300333 hwpf = download(dm, url)
Andy Doan15aa23b2012-02-02 16:40:58 -0600334 for binary in binaries:
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300335 # create the image and metadata
Ricardo Salveti de Araujo99d52482012-06-22 16:05:09 -0300336 imgfile = site.get_image_name(odir, hwpack, url, binary)
Ricardo Salveti de Araujob93a7ec2012-05-29 14:07:53 -0300337 infofile = '%s.html' % os.path.splitext(imgfile)[0]
Ricardo Salveti de Araujob39eb802012-06-23 00:55:31 -0300338 rfsf = download(dm, binaryf[binary])
Ricardo Salveti de Araujo688f24f2012-10-17 02:40:36 -0300339 build_image(lmc, imgfile, hwpack, hwpf, binary, rfsf,
340 args.fastmodel)
Ricardo Salveti de Araujo7edc48b2012-06-23 03:55:04 -0300341 gzfile = compress_image(imgfile)
Ricardo Salveti de Araujod3743e92012-08-15 01:50:10 -0300342 zsync_image(args.platform, gzfile)
Fathi Boudraef3cd832012-12-09 10:01:25 +0200343 create_image_info(infofile, gzfile, imgfile, url, \
344 binaryf[binary], args.platform)
Andy Doan15aa23b2012-02-02 16:40:58 -0600345
346if __name__ == '__main__':
347 main()