=== modified file 'linaro_image_tools/media_create/boards.py'
@@ -534,21 +534,27 @@
boot_script = (
("%(fatload_command)s %(load_interface)s %(mmc_option)s "
"%(kernel_addr)s %(uimage_path)suImage; ")) % replacements
- if i_img_data is not None:
+ boot_script_bootm = (("bootm %(kernel_addr)s")) % replacements
+ if i_img_data is not None and d_img_data is not None:
+ boot_script += (
+ ("%(fatload_command)s %(load_interface)s %(mmc_option)s "
+ "%(initrd_addr)s %(uimage_path)suInitrd; "
+ "%(fatload_command)s %(load_interface)s %(mmc_option)s "
+ "%(dtb_addr)s board.dtb; ")) % replacements
+ boot_script_bootm += (
+ (" %(initrd_addr)s %(dtb_addr)s")) % replacements
+ elif i_img_data is None and d_img_data is not None:
+ boot_script += (
+ ("%(fatload_command)s %(load_interface)s %(mmc_option)s "
+ "%(dtb_addr)s board.dtb; ")) % replacements
+ boot_script_bootm += ((" - %(dtb_addr)s")) % replacements
+ elif i_img_data is not None and d_img_data is None:
boot_script += (
("%(fatload_command)s %(load_interface)s %(mmc_option)s "
"%(initrd_addr)s %(uimage_path)suInitrd; ")) % replacements
- if d_img_data is not None:
- assert self.dtb_addr is not None, (
- "Need a dtb_addr when passing d_img_data")
- boot_script += (
- ("%(fatload_command)s %(load_interface)s %(mmc_option)s "
- "%(dtb_addr)s board.dtb; ")) % replacements
- boot_script += (("bootm %(kernel_addr)s")) % replacements
- if i_img_data is not None:
- boot_script += ((" %(initrd_addr)s")) % replacements
- if self.dtb_addr is not None:
- boot_script += ((" %(dtb_addr)s")) % replacements
+ boot_script_bootm += ((" %(initrd_addr)s")) % replacements
+
+ boot_script += boot_script_bootm
return boot_script
def add_boot_args(self, extra_args):
=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
@@ -2261,11 +2261,13 @@
board_conf = get_board_config('highbank')
boot_commands = board_conf._get_boot_env(
is_live=False, is_lowmem=False, consoles=[],
- rootfs_id="UUID=deadbeef", i_img_data="initrd", d_img_data=None)
+ rootfs_id="UUID=deadbeef", i_img_data="initrd",
+ d_img_data="board.dtb")
expected = {
'bootargs': 'root=UUID=deadbeef rootwait ro',
'bootcmd': 'ext2load scsi 0:1 0x00800000 uImage; '
'ext2load scsi 0:1 0x01000000 uInitrd; '
+ 'ext2load scsi 0:1 0x00001000 board.dtb; '
'bootm 0x00800000 0x01000000 0x00001000',
'fdt_high': '0xffffffff',
'initrd_high': '0xffffffff'}