diff options
author | Mattias Backman <mattias.backman@linaro.org> | 2012-02-21 09:01:08 +0100 |
---|---|---|
committer | Mattias Backman <mattias.backman@linaro.org> | 2012-02-21 09:01:08 +0100 |
commit | 7cd4f3d17b607ce12fcc26650152378bd6e132ef (patch) | |
tree | 83f58befd81376cceb17e3c6b6bad4d657c66407 /linaro_image_tools/media_create/android_boards.py | |
parent | c80e7556eb1eff292a10a785f7da62fe5684c161 (diff) | |
parent | 7b11b988b74093cdb8ed4b1f6951230d67f4dd3c (diff) |
Add support for Snowball EMMC startupfiles for l-a-m-c
Diffstat (limited to 'linaro_image_tools/media_create/android_boards.py')
-rw-r--r-- | linaro_image_tools/media_create/android_boards.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/linaro_image_tools/media_create/android_boards.py b/linaro_image_tools/media_create/android_boards.py index 735d2d4..2d8d9c6 100644 --- a/linaro_image_tools/media_create/android_boards.py +++ b/linaro_image_tools/media_create/android_boards.py @@ -37,6 +37,7 @@ from linaro_image_tools.media_create.boards import VexpressA9Config from linaro_image_tools.media_create.boards import ( align_up, align_partition, + classproperty, make_boot_script, install_mx5_boot_loader, ) @@ -238,6 +239,36 @@ class AndroidSnowballEmmcConfig(AndroidBoardConfig, SnowballEmmcConfig): return '%s,%s,0xDA\n%s' % ( loader_start, loader_len, command) + @classmethod + def populate_raw_partition(cls, media, boot_dir): + # To avoid adding a Snowball specific command line option, we assume + # that the user already has unpacked the startfiles to ./startupfiles + config_files_dir = cls.snowball_config(boot_dir) + assert os.path.exists(config_files_dir), ( + "You need to unpack the Snowball startupfiles to the directory " + "'startupfiles' in your current working directory. See " + "igloocommunity.org for more information.") + # We copy the u-boot files from the unpacked boot.tar.bz2 + # and put it with the startfiles. + boot_files = ['u-boot.bin'] + for boot_file in boot_files: + cmd_runner.run(['cp', os.path.join(boot_dir, 'boot', boot_file), + config_files_dir], as_root=True).wait() + super(AndroidSnowballEmmcConfig, cls).populate_raw_partition( + media, boot_dir) + + @classmethod + def snowball_config(cls, chroot_dir): + # The user is expected to have unpacked the startupfiles to this subdir + # of their working dir. + return os.path.join('.', 'startupfiles') + + @classproperty + def delete_startupfiles(cls): + # The startupfiles will have been unpacked to the user's working dir + # and should not be deleted after they have been installed. + return False + class AndroidMx53LoCoConfig(AndroidBoardConfig, Mx53LoCoConfig): extra_boot_args_options = ( |