Always use generated boot.img for `fastboot boot` command (#370)

This commit is contained in:
drebrez 2017-08-15 01:03:27 +02:00 committed by Oliver Smith
parent 401c29af76
commit a1370bafe1
2 changed files with 3 additions and 19 deletions

View File

@ -236,9 +236,8 @@ Flasher abstraction. Allowed variables:
$BOOT: Path to the /boot partition
$FLAVOR: Kernel flavor
$IMAGE: Path to the system partition image
$KERNEL_CMDLINE: Kernel commandline
Fastboot specific: $OFFSET_BASE, $OFFSET_KERNEL, $OFFSET_RAMDISK, $OFFSET_TAGS, $PAGE_SIZE
Fastboot specific: $KERNEL_CMDLINE
Heimdall specific: $PARTITION_KERNEL, $PARTITION_INITFS
"""
flashers = {
@ -249,14 +248,8 @@ flashers = {
"list_devices": [["fastboot", "devices", "-l"]],
"flash_system": [["fastboot", "flash", "system", "$IMAGE"]],
"flash_kernel": [["fastboot", "flash", "boot", "$BOOT/boot.img-$FLAVOR"]],
"boot": [["fastboot",
"--base", "$OFFSET_BASE",
"--kernel-offset", "$OFFSET_KERNEL",
"--ramdisk-offset", "$OFFSET_RAMDISK",
"--tags-offset", "$OFFSET_TAGS",
"--page-size", "$PAGE_SIZE",
"-c", "$KERNEL_CMDLINE",
"boot", "$BOOT/vmlinuz-$FLAVOR", "$BOOT/initramfs-$FLAVOR"]],
"boot": [["fastboot", "-c", "$KERNEL_CMDLINE", "boot", "$BOOT/boot.img-$FLAVOR"]],
},
},
# Some Samsung devices need the initramfs to be baked into the kernel (e.g.

View File

@ -33,9 +33,6 @@ def run(args, action, flavor=None):
_cmdline = args.deviceinfo["kernel_cmdline"]
if "cmdline" in args and args.cmdline:
_cmdline = args.cmdline
_base = args.deviceinfo["flash_offset_base"]
if _base == "":
_base = "0x10000000"
# Variable setup
vars = {
@ -43,12 +40,6 @@ def run(args, action, flavor=None):
"$FLAVOR": flavor if flavor is not None else "",
"$IMAGE": "/home/user/rootfs/" + args.device + ".img",
"$KERNEL_CMDLINE": _cmdline,
"$OFFSET_BASE": _base,
"$OFFSET_KERNEL": args.deviceinfo["flash_offset_kernel"],
"$OFFSET_RAMDISK": args.deviceinfo["flash_offset_ramdisk"],
"$OFFSET_SECOND": args.deviceinfo["flash_offset_second"],
"$OFFSET_TAGS": args.deviceinfo["flash_offset_tags"],
"$PAGE_SIZE": args.deviceinfo["flash_pagesize"],
"$PARTITION_INITFS": args.deviceinfo["flash_heimdall_partition_initfs"],
"$PARTITION_KERNEL": args.deviceinfo["flash_heimdall_partition_kernel"],
}