How Do You Upgrade to Android jb4.3_1.1.0 GA bootloader in an OTA

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How Do You Upgrade to Android jb4.3_1.1.0 GA bootloader in an OTA

857 Views
freewaymad
Contributor IV

Hi,

I have found in the JB4.3_1.1.0 GA documentation; specifically the FAQ:


How do I customize the update script to update uboot?

Because Android only upgrades the boot.img, system.img, and recovery partitions, the automatically generated update

package does not support upgrading bootloader. If you need to upgrade the bootloader, you need to modify the update

package and perform the signing work manually.

1. Unzip the update.zip, and then modify the updater_script by implementing the following operations.

To upgrade uboot to NOR flash, refer to this script:

ui_print("writting u-boot...");

write_raw_image("u-boot.bin", "/dev/mtd0");

show_progress(0.1, 5);

To upgrade uboot for eMMC storage, because u-boot may be stored in the "boot partition" of eMMC, you need to

perform some system file operations before dd, for example,

# Write u-boot to 1K position.

# u-boot binary should be a no padding uboot!

# For eMMC(iNand) device, needs to unlock boot partition.

ui_print("writting u-boot...");

package_extract_file("files/u-boot-no-padding.bin", "/tmp/u-boot-no-padding.bin");

sysfs_file_write("class/mmc_host/mmc0/mmc0:0001/boot_config", "1");

simple_dd("/tmp/u-boot-no-padding.bin", "/dev/block/mmcblk0", 1024);

sysfs_file_write("class/mmc_host/mmc0/mmc0:0001/boot_config", "8");

show_progress(0.1, 5);

2. Resign the update package by using the following command:

$ make_update_zip.sh ~/mydroid ~/update-dir

I have found this script at /device/asus/grouper/releasetools.py

# Copyright (C) 2012 The Android Open Source Project

#

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#

#      http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

"""Emit extra commands needed for Group during OTA installation

(installing the bootloader)."""

import common

def FullOTA_InstallEnd(info):

  try:

    bootloader_bin = info.input_zip.read("RADIO/bootloader.raw")

  except KeyError:

    print "no bootloader.raw in target_files; skipping install"

  else:

    WriteBootloader(info, bootloader_bin)

def IncrementalOTA_InstallEnd(info):

  try:

    target_bootloader_bin = info.target_zip.read("RADIO/bootloader.raw")

    try:

      source_bootloader_bin = info.source_zip.read("RADIO/bootloader.raw")

    except KeyError:

      source_bootloader_bin = None

    if source_bootloader_bin == target_bootloader_bin:

      print "bootloader unchanged; skipping"

    else:

      WriteBootloader(info, target_bootloader_bin)

  except KeyError:

    print "no bootloader.raw in target target_files; skipping install"

def WriteBootloader(info, bootloader_bin):

  common.ZipWriteStr(info.output_zip, "bootloader.raw", bootloader_bin)

  fstab = info.info_dict["fstab"]

  info.script.Print("Writing bootloader...")

  info.script.AppendExtra('''package_extract_file("bootloader.raw", "%s");''' %

                          (fstab["/staging"].device,))

It contains some instructions that add the bootloader image to OTA package.

As far as I understand this script is used by release tools due to TARGET_RELEASETOOLS_EXTENSIONS variable set in  /device/asus/grouper/BoardConfig.mk. I understand this is for a whole different device, but do I have to do something similar to this for the IMX6Q, or do I add the script from the IMX6 documentation to the updater-script? I am really not sure.

Please help,

Dave

Labels (3)
0 Kudos
0 Replies