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.
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?
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?
Hi Bernhard,
I have a few questions about your changes below.
On Mon, 2011-07-25 at 00:21 +0000, Bernhard Rosenkraenzer wrote: image-tools) /code.launchpad .net/~berolinux /linaro- image-tools/ android- iMX53/+ merge/69018
> Bernhard Rosenkraenzer has proposed merging lp:~berolinux/linaro-image-tools/android-iMX53 into lp:linaro-image-tools.
>
> Requested reviews:
> linaro-image-tools maintainers (linaro-
>
> For more details, see:
> https:/
>
> Better support for Android on iMX53 -- the boot loader needs its own place at 0x400, and should be installed there.
> === modified file 'linaro_ image_tools/ media_create/ android_ boards. py' image_tools/ media_create/ android_ boards. py 2011-07-18 18:25:30 +0000 image_tools/ media_create/ android_ boards. py 2011-07-25 00:21:08 +0000 image_tools. media_create. boards import ( mx5_boot_ loader, 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:
> --- linaro_
> +++ linaro_
> @@ -34,7 +34,8 @@
> from linaro_
> align_up,
> align_partition,
> - make_boot_script
> + make_boot_script,
> + install_
> )
>
> from linaro_image_tools import cmd_runner
> @@ -77,10 +78,6 @@
>
> @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.
> 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) :
> @classmethod
> 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 raw_partition( ), which is already called in l-a-m-c, should be
populate_
the one used to populate a raw partition with the board-specific
bootloader instead, no?
> ig(AndroidBoard Config) : serial_ tty) specific_ args = 'init=/init androidboot. console= %s' % ( serial_ tty) align_boot_ part=False) : MIN_SIZE_ S, 1, PART_ALIGN_S) 53LoCoConfig, cls).get_ sfdisk_ cmd( align_boot_ part=True, start_addr= loader_ end, boot_loader( cls, boot_partition, boot_device_ or_file) : mx5_boot_ loader( os.path. join(boot_ device_ or_file, "u-boot.bin"), boot_partition, cls.LOADER_ MIN_SIZE_ S) board_configs = { nfig, image_tools/ media_create/ partitions. py' 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(
> class AndroidOmapConf
> pass
> @@ -217,7 +213,22 @@
> Mx53LoCoConfig.
> android_
> Mx53LoCoConfig.
> - mmc_part_offset = 0
> +
> + @classmethod
> + def get_sfdisk_cmd(cls, should_
> + loader_start, loader_end, loader_len = align_partition(
> + 1, cls.LOADER_
> +
> + command = super(AndroidMx
> + should_
> + extra_part=True)
> +
> + return '%s,%s,0xDA\n%s' % (
> + loader_start, loader_len, command)
> +
> + @classmethod
> + def install_
> + install_
>
> android_
> 'beagle': AndroidBeagleCo
>
> === modified file 'linaro_
> --- linaro_
> +++ 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?
> data_partition = _get_device_ file_for_ partition_ number( mmc_part_ offset) file_for_ partition_ number(
> media.path, 5 + board_config.
> sdcard_partition = _get_device_
>
-- /launchpad. net/~salgado>
Guilherme Salgado <https:/