>> @@ -77,10 +78,6 @@
>>
>> @classmethod
>> def populate_boot_script(cls, boot_partition, boot_disk, consoles):
>> - cmd_runner.run(['mkdir', '-p', boot_disk]).wait()
>> - cmd_runner.run(['mount', boot_partition, boot_disk],
>> - as_root=True).wait()
>> -
>> boot_env = cls._get_boot_env(consoles)
>> cmdline_filepath = os.path.join(boot_disk, "cmdline")
>> cmdline_file = open(cmdline_filepath, 'r')
>> @@ -94,10 +91,6 @@
>> make_boot_script(boot_env, boot_script_path)
>>
>> cmd_runner.run(['sync']).wait()
>> - try:
>> - cmd_runner.run(['umount', boot_disk], as_root=True).wait()
>> - except cmd_runner.SubcommandNonZeroReturnValue:
>> - pass
>
> This change is no longer necessary and will actually break l-a-m-c as of
> r388. You might want to use the new partition_mounted() context manager
> here although that can be done later.
Yes, it was necessary in Saturday's build because the other changes
broke l-a-m-c completely. Probably obsoleted by the rebase, will check
if it's still needed w/ current trunk
>> @classmethod
>> def get_sfdisk_cmd(cls, should_align_boot_part=False,
>> @@ -158,6 +151,9 @@
>> def populate_raw_partition(cls, media, boot_dir):
>> super(AndroidBoardConfig, cls).populate_raw_partition(boot_dir, media)
>>
>> + @classmethod
>> + def install_boot_loader(cls, boot_partition, boot_device_or_file):
>> + pass
>
> Do we need a new classmethod for this? ISTM that
> populate_raw_partition(), which is already called in l-a-m-c, should be
> the one used to populate a raw partition with the board-specific
> bootloader instead, no?
Probably populate_raw_partition can be adapted to do the right thing instead.
>> --- linaro_image_tools/media_create/partitions.py 2011-06-29 09:16:39 +0000
>> +++ linaro_image_tools/media_create/partitions.py 2011-07-25 00:21:08 +0000
>> @@ -337,8 +337,14 @@
>> media.path, 1 + board_config.mmc_part_offset)
>> system_partition = _get_device_file_for_partition_number(
>> media.path, 2 + board_config.mmc_part_offset)
>> - cache_partition = _get_device_file_for_partition_number(
>> - media.path, 3 + board_config.mmc_part_offset)
>> + if board_config.mmc_part_offset != 1:
>> + cache_partition = _get_device_file_for_partition_number(
>> + media.path, 3 + board_config.mmc_part_offset)
>> + else:
>> + # In the current setup, partition 4 is always the
>> + # extended partition container, so we need to skip 4
>> + cache_partition = _get_device_file_for_partition_number(
>> + media.path, 5)
>
> I'm slightly confused by this change as the mmc_part_offset of
> Mx53LoCoConfig is still 0, so it won't use the new code (in the else
> block). Maybe this is not related to the rest of the changes in this
> branch?
Actually it is related to the rest of the changes and is vital to avoid a crash.
The patch removes the mmc_part_offset=0 line, and mmc_part_offset is
set to 1 in Mx5Config (and in turn Mx53Config and Mx53LoCoConfig).
Hi, here's the answers to your questions:
>> @@ -77,10 +78,6 @@ boot_script( cls, boot_partition, boot_disk, consoles): run(['mkdir' , '-p', boot_disk]).wait() run(['mount' , boot_partition, boot_disk], True).wait( ) boot_env( consoles) join(boot_ disk, "cmdline") filepath, 'r') script( boot_env, boot_script_path) run(['sync' ]).wait( ) run(['umount' , boot_disk], as_root= True).wait( ) SubcommandNonZe roReturnValue:
>>
>> @classmethod
>> def populate_
>> - cmd_runner.
>> - cmd_runner.
>> - as_root=
>> -
>> boot_env = cls._get_
>> cmdline_filepath = os.path.
>> cmdline_file = open(cmdline_
>> @@ -94,10 +91,6 @@
>> make_boot_
>>
>> cmd_runner.
>> - try:
>> - cmd_runner.
>> - except cmd_runner.
>> - pass
>
> This change is no longer necessary and will actually break l-a-m-c as of
> r388. You might want to use the new partition_mounted() context manager
> here although that can be done later.
Yes, it was necessary in Saturday's build because the other changes
broke l-a-m-c completely. Probably obsoleted by the rebase, will check
if it's still needed w/ current trunk
>> @classmethod align_boot_ part=False, raw_partition( cls, media, boot_dir): ardConfig, cls).populate_ raw_partition( boot_dir, media) boot_loader( cls, boot_partition, boot_device_ or_file) : raw_partition( ), which is already called in l-a-m-c, should be
>> def get_sfdisk_cmd(cls, should_
>> @@ -158,6 +151,9 @@
>> def populate_
>> super(AndroidBo
>>
>> + @classmethod
>> + def install_
>> + pass
>
> Do we need a new classmethod for this? ISTM that
> populate_
> the one used to populate a raw partition with the board-specific
> bootloader instead, no?
Probably populate_ raw_partition can be adapted to do the right thing instead.
>> --- linaro_ image_tools/ media_create/ partitions. py 2011-06-29 09:16:39 +0000 image_tools/ media_create/ partitions. py 2011-07-25 00:21:08 +0000 mmc_part_ offset) file_for_ partition_ number( mmc_part_ offset) file_for_ partition_ number( mmc_part_ offset) mmc_part_ offset != 1: file_for_ partition_ number( mmc_part_ offset) file_for_ partition_ number(
>> +++ linaro_
>> @@ -337,8 +337,14 @@
>> media.path, 1 + board_config.
>> system_partition = _get_device_
>> media.path, 2 + board_config.
>> - cache_partition = _get_device_
>> - media.path, 3 + board_config.
>> + if board_config.
>> + cache_partition = _get_device_
>> + media.path, 3 + board_config.
>> + else:
>> + # In the current setup, partition 4 is always the
>> + # extended partition container, so we need to skip 4
>> + cache_partition = _get_device_
>> + media.path, 5)
>
> I'm slightly confused by this change as the mmc_part_offset of
> Mx53LoCoConfig is still 0, so it won't use the new code (in the else
> block). Maybe this is not related to the rest of the changes in this
> branch?
Actually it is related to the rest of the changes and is vital to avoid a crash.
The patch removes the mmc_part_offset=0 line, and mmc_part_offset is
set to 1 in Mx5Config (and in turn Mx53Config and Mx53LoCoConfig).