Loading etc/prebuilt_etc.go +10 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ func RegisterPrebuiltEtcBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("prebuilt_usr_keychars", PrebuiltUserKeyCharsFactory) ctx.RegisterModuleType("prebuilt_usr_idc", PrebuiltUserIdcFactory) ctx.RegisterModuleType("prebuilt_font", PrebuiltFontFactory) ctx.RegisterModuleType("prebuilt_overlay", PrebuiltOverlayFactory) ctx.RegisterModuleType("prebuilt_firmware", PrebuiltFirmwareFactory) ctx.RegisterModuleType("prebuilt_dsp", PrebuiltDSPFactory) ctx.RegisterModuleType("prebuilt_rfsa", PrebuiltRFSAFactory) Loading Loading @@ -650,6 +651,15 @@ func PrebuiltFontFactory() android.Module { return module } // prebuilt_overlay is for a prebuilt artifact in <partition>/overlay directory. func PrebuiltOverlayFactory() android.Module { module := &PrebuiltEtc{} InitPrebuiltEtcModule(module, "overlay") // This module is device-only android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst) return module } // prebuilt_firmware installs a firmware file to <partition>/etc/firmware directory for system // image. // If soc_specific property is set to true, the firmware file is installed to the Loading etc/prebuilt_etc_test.go +13 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,19 @@ func TestPrebuiltFontInstallDirPath(t *testing.T) { android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltOverlayInstallDirPath(t *testing.T) { result := prepareForPrebuiltEtcTest.RunTestWithBp(t, ` prebuilt_overlay { name: "foo.conf", src: "foo.conf", } `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) expected := "out/soong/target/product/test_device/system/overlay" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltFirmwareDirPath(t *testing.T) { targetPath := "out/soong/target/product/test_device" tests := []struct { Loading Loading
etc/prebuilt_etc.go +10 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ func RegisterPrebuiltEtcBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("prebuilt_usr_keychars", PrebuiltUserKeyCharsFactory) ctx.RegisterModuleType("prebuilt_usr_idc", PrebuiltUserIdcFactory) ctx.RegisterModuleType("prebuilt_font", PrebuiltFontFactory) ctx.RegisterModuleType("prebuilt_overlay", PrebuiltOverlayFactory) ctx.RegisterModuleType("prebuilt_firmware", PrebuiltFirmwareFactory) ctx.RegisterModuleType("prebuilt_dsp", PrebuiltDSPFactory) ctx.RegisterModuleType("prebuilt_rfsa", PrebuiltRFSAFactory) Loading Loading @@ -650,6 +651,15 @@ func PrebuiltFontFactory() android.Module { return module } // prebuilt_overlay is for a prebuilt artifact in <partition>/overlay directory. func PrebuiltOverlayFactory() android.Module { module := &PrebuiltEtc{} InitPrebuiltEtcModule(module, "overlay") // This module is device-only android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst) return module } // prebuilt_firmware installs a firmware file to <partition>/etc/firmware directory for system // image. // If soc_specific property is set to true, the firmware file is installed to the Loading
etc/prebuilt_etc_test.go +13 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,19 @@ func TestPrebuiltFontInstallDirPath(t *testing.T) { android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltOverlayInstallDirPath(t *testing.T) { result := prepareForPrebuiltEtcTest.RunTestWithBp(t, ` prebuilt_overlay { name: "foo.conf", src: "foo.conf", } `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) expected := "out/soong/target/product/test_device/system/overlay" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltFirmwareDirPath(t *testing.T) { targetPath := "out/soong/target/product/test_device" tests := []struct { Loading