Merge "ramdisk_module and dtb_prebuild properties are optional" am: fe306aba98
am: f6d53e9586
am: 201a831d3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1934956 Change-Id: I08a0f581e97a8b1c1b7a6c22c6efef9ee7dba161
This commit is contained in:
@@ -145,12 +145,10 @@ func (b *bootimg) buildBootImage(ctx android.ModuleContext, vendor bool) android
|
|||||||
}
|
}
|
||||||
|
|
||||||
dtbName := proptools.String(b.properties.Dtb_prebuilt)
|
dtbName := proptools.String(b.properties.Dtb_prebuilt)
|
||||||
if dtbName == "" {
|
if dtbName != "" {
|
||||||
ctx.PropertyErrorf("dtb_prebuilt", "must be set")
|
dtb := android.PathForModuleSrc(ctx, dtbName)
|
||||||
return output
|
cmd.FlagWithInput("--dtb ", dtb)
|
||||||
}
|
}
|
||||||
dtb := android.PathForModuleSrc(ctx, dtbName)
|
|
||||||
cmd.FlagWithInput("--dtb ", dtb)
|
|
||||||
|
|
||||||
cmdline := strings.Join(b.properties.Cmdline, " ")
|
cmdline := strings.Join(b.properties.Cmdline, " ")
|
||||||
if cmdline != "" {
|
if cmdline != "" {
|
||||||
@@ -178,20 +176,18 @@ func (b *bootimg) buildBootImage(ctx android.ModuleContext, vendor bool) android
|
|||||||
cmd.FlagWithArg("--header_version ", headerVersion)
|
cmd.FlagWithArg("--header_version ", headerVersion)
|
||||||
|
|
||||||
ramdiskName := proptools.String(b.properties.Ramdisk_module)
|
ramdiskName := proptools.String(b.properties.Ramdisk_module)
|
||||||
if ramdiskName == "" {
|
if ramdiskName != "" {
|
||||||
ctx.PropertyErrorf("ramdisk_module", "must be set")
|
ramdisk := ctx.GetDirectDepWithTag(ramdiskName, bootimgRamdiskDep)
|
||||||
return output
|
if filesystem, ok := ramdisk.(*filesystem); ok {
|
||||||
}
|
flag := "--ramdisk "
|
||||||
ramdisk := ctx.GetDirectDepWithTag(ramdiskName, bootimgRamdiskDep)
|
if vendor {
|
||||||
if filesystem, ok := ramdisk.(*filesystem); ok {
|
flag = "--vendor_ramdisk "
|
||||||
flag := "--ramdisk "
|
}
|
||||||
if vendor {
|
cmd.FlagWithInput(flag, filesystem.OutputPath())
|
||||||
flag = "--vendor_ramdisk "
|
} else {
|
||||||
|
ctx.PropertyErrorf("ramdisk", "%q is not android_filesystem module", ramdisk.Name())
|
||||||
|
return output
|
||||||
}
|
}
|
||||||
cmd.FlagWithInput(flag, filesystem.OutputPath())
|
|
||||||
} else {
|
|
||||||
ctx.PropertyErrorf("ramdisk", "%q is not android_filesystem module", ramdisk.Name())
|
|
||||||
return output
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bootconfig := proptools.String(b.properties.Bootconfig)
|
bootconfig := proptools.String(b.properties.Bootconfig)
|
||||||
|
Reference in New Issue
Block a user