aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2014-04-09 20:44:07 +0100
committerFathi Boudra <fathi.boudra@linaro.org>2014-06-14 12:23:13 +0300
commit29e2ec415da8abcf41e5577d1bef6935bca29f5a (patch)
tree610e4a5d8a4634a9b8634b832c92c997bc2d4747
parentee69e94c9ac9aa073fa419d39237210abb189b5f (diff)
Add a generic board config
Add a generic config for boards that drop a kernel and an initrd into the boot partition. Juno is such a board, where the other boot files, such as DTB and firmware are put into the boot partition by the hardware pack metadata. FastModel config now herits from the generic config. Change-Id: Ib60c57f738eaa0199bbefd49cf77e0cd4a9ddb97 Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r--linaro_image_tools/media_create/boards.py28
1 files changed, 24 insertions, 4 deletions
diff --git a/linaro_image_tools/media_create/boards.py b/linaro_image_tools/media_create/boards.py
index c5a7f36..111969d 100644
--- a/linaro_image_tools/media_create/boards.py
+++ b/linaro_image_tools/media_create/boards.py
@@ -1450,13 +1450,12 @@ class VexpressA9Config(VexpressConfig):
super(VexpressA9Config, self).__init__()
-class FastModelConfig(BoardConfig):
+class GenericConfig(BoardConfig):
def __init__(self):
- super(FastModelConfig, self).__init__()
- self.supports_writing_to_mmc = False
+ super(GenericConfig, self).__init__()
def _get_bootcmd(self, i_img_data, d_img_data):
- """Get the bootcmd for FastModel.
+ """Get the bootcmd.
We override this as we don't do uboot.
"""
@@ -1465,6 +1464,25 @@ class FastModelConfig(BoardConfig):
def _make_boot_files_v2(self, boot_env, chroot_dir, boot_dir,
boot_device_or_file, k_img_data, i_img_data,
d_img_data):
+ # Rename the kernel image
+ if k_img_data is not None:
+ k_img = os.path.join(boot_dir,
+ os.path.basename(k_img_data).split('-')[0])
+ cmd_runner.run(["cp", "-v", k_img_data, k_img],
+ as_root=True).wait()
+ if i_img_data is not None:
+ cmd_runner.run(["cp", "-v", i_img_data, boot_dir],
+ as_root=True).wait()
+
+
+class FastModelConfig(GenericConfig):
+ def __init__(self):
+ super(FastModelConfig, self).__init__()
+ self.supports_writing_to_mmc = False
+
+ def _make_boot_files_v2(self, boot_env, chroot_dir, boot_dir,
+ boot_device_or_file, k_img_data, i_img_data,
+ d_img_data):
output_dir = os.path.dirname(boot_device_or_file)
# There are 2 kinds of models now, VE and Foundation
@@ -1956,9 +1974,11 @@ board_configs = {
'efikamx': EfikamxConfig,
'efikasb': EfikasbConfig,
'fastmodel': FastModelConfig,
+ 'generic': GenericConfig,
'highbank': HighBankConfig,
'i386': I386Config,
'igep': IgepConfig,
+ 'juno': GenericConfig,
'mx51evk': Mx51evkConfig,
'mx53loco': Mx53LoCoConfig,
'mx6qsabrelite': BoardConfig,