=== modified file 'linaro-android-media-create'
@@ -142,6 +142,7 @@
board_config.populate_raw_partition(args.device, BOOT_DIR)
populate_partition(BOOT_DIR + "/boot", BOOT_DISK, boot_partition)
board_config.populate_boot_script(boot_partition, BOOT_DISK, args.consoles)
+ board_config.install_boot_loader(args.device, BOOT_DISK)
populate_partition(SYSTEM_DIR + "/system", SYSTEM_DISK, system_partition)
populate_partition(DATA_DIR + "/data", DATA_DISK, data_partition)
print "Done creating Linaro Android image on %s" % args.device
=== modified file 'linaro_image_tools/media_create/android_boards.py'
@@ -34,7 +34,8 @@
from linaro_image_tools.media_create.boards import (
align_up,
align_partition,
- make_boot_script
+ make_boot_script,
+ install_mx5_boot_loader,
)
from linaro_image_tools import cmd_runner
@@ -160,6 +161,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
class AndroidOmapConfig(AndroidBoardConfig):
pass
@@ -219,7 +223,22 @@
Mx53LoCoConfig.serial_tty)
android_specific_args = 'init=/init androidboot.console=%s' % (
Mx53LoCoConfig.serial_tty)
- mmc_part_offset = 0
+
+ @classmethod
+ def get_sfdisk_cmd(cls, should_align_boot_part=False):
+ loader_start, loader_end, loader_len = align_partition(
+ 1, cls.LOADER_MIN_SIZE_S, 1, PART_ALIGN_S)
+
+ command = super(AndroidMx53LoCoConfig, cls).get_sfdisk_cmd(
+ should_align_boot_part=True, start_addr=loader_end,
+ extra_part=True)
+
+ return '%s,%s,0xDA\n%s' % (
+ loader_start, loader_len, command)
+
+ @classmethod
+ def install_boot_loader(cls, boot_partition, boot_device_or_file):
+ install_mx5_boot_loader(os.path.join(boot_device_or_file, "u-boot.bin"), boot_partition, cls.LOADER_MIN_SIZE_S)
android_board_configs = {
'beagle': AndroidBeagleConfig,
=== modified file 'linaro_image_tools/media_create/partitions.py'
@@ -372,8 +372,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)
data_partition = _get_device_file_for_partition_number(
media.path, 5 + board_config.mmc_part_offset)
sdcard_partition = _get_device_file_for_partition_number(