Merge "ramdisk_module and dtb_prebuild properties are optional" am: fe306aba98
am: f6d53e9586
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1934956 Change-Id: I404b479fe4ffb6a440b596b15a900e851121b748
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")
|
|
||||||
return output
|
|
||||||
}
|
|
||||||
dtb := android.PathForModuleSrc(ctx, dtbName)
|
dtb := android.PathForModuleSrc(ctx, dtbName)
|
||||||
cmd.FlagWithInput("--dtb ", dtb)
|
cmd.FlagWithInput("--dtb ", dtb)
|
||||||
|
}
|
||||||
|
|
||||||
cmdline := strings.Join(b.properties.Cmdline, " ")
|
cmdline := strings.Join(b.properties.Cmdline, " ")
|
||||||
if cmdline != "" {
|
if cmdline != "" {
|
||||||
@@ -178,10 +176,7 @@ 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")
|
|
||||||
return output
|
|
||||||
}
|
|
||||||
ramdisk := ctx.GetDirectDepWithTag(ramdiskName, bootimgRamdiskDep)
|
ramdisk := ctx.GetDirectDepWithTag(ramdiskName, bootimgRamdiskDep)
|
||||||
if filesystem, ok := ramdisk.(*filesystem); ok {
|
if filesystem, ok := ramdisk.(*filesystem); ok {
|
||||||
flag := "--ramdisk "
|
flag := "--ramdisk "
|
||||||
@@ -193,6 +188,7 @@ func (b *bootimg) buildBootImage(ctx android.ModuleContext, vendor bool) android
|
|||||||
ctx.PropertyErrorf("ramdisk", "%q is not android_filesystem module", ramdisk.Name())
|
ctx.PropertyErrorf("ramdisk", "%q is not android_filesystem module", ramdisk.Name())
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bootconfig := proptools.String(b.properties.Bootconfig)
|
bootconfig := proptools.String(b.properties.Bootconfig)
|
||||||
if bootconfig != "" {
|
if bootconfig != "" {
|
||||||
|
Reference in New Issue
Block a user