config: Add support for ish build target
The cros-ish eclass uses the ish build target to decide what to build.
There's already support for specifying the ish build target in
model.yaml, so add support to config.star as well.
BUG=b:234776154
TEST=./generate.sh, ./config.star for project/fake/fake
Cq-Depend: chromium:3954407
Change-Id: Ia74656029c7fa640df952e8a7a3ee00976656d05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/config/+/3954902
Commit-Queue: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Benjamin Shai <bshai@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
diff --git a/generated/descriptors.json b/generated/descriptors.json
index d7d6618..fa1ecc5 100644
--- a/generated/descriptors.json
+++ b/generated/descriptors.json
@@ -578,6 +578,13 @@
"name": "bmpblk",
"number": 8,
"type": "TYPE_STRING"
+ },
+ {
+ "jsonName": "ish",
+ "label": "LABEL_OPTIONAL",
+ "name": "ish",
+ "number": 9,
+ "type": "TYPE_STRING"
}
],
"name": "BuildTargets"
diff --git a/go/build/api/firmware_config.pb.go b/go/build/api/firmware_config.pb.go
index 6bd59d7..c4a7483 100644
--- a/go/build/api/firmware_config.pb.go
+++ b/go/build/api/firmware_config.pb.go
@@ -507,6 +507,8 @@
ZephyrEc string `protobuf:"bytes,7,opt,name=zephyr_ec,json=zephyrEc,proto3" json:"zephyr_ec,omitempty"`
// Build target for chromeos-bmpblk.
Bmpblk string `protobuf:"bytes,8,opt,name=bmpblk,proto3" json:"bmpblk,omitempty"`
+ // Build target for chromeos-ish.
+ Ish string `protobuf:"bytes,9,opt,name=ish,proto3" json:"ish,omitempty"`
}
func (x *Firmware_BuildTargets) Reset() {
@@ -597,6 +599,13 @@
return ""
}
+func (x *Firmware_BuildTargets) GetIsh() string {
+ if x != nil {
+ return x.Ish
+ }
+ return ""
+}
+
var File_chromiumos_build_api_firmware_config_proto protoreflect.FileDescriptor
var file_chromiumos_build_api_firmware_config_proto_rawDesc = []byte{
@@ -656,13 +665,13 @@
0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46,
0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0b,
0x70, 0x64, 0x52, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10,
- 0x05, 0x22, 0x8a, 0x03, 0x0a, 0x08, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x12, 0x50,
+ 0x05, 0x22, 0x9c, 0x03, 0x0a, 0x08, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x12, 0x50,
0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d,
0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x72,
0x6d, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65,
0x74, 0x73, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73,
- 0x1a, 0xab, 0x02, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
+ 0x1a, 0xbd, 0x02, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x12, 0x20, 0x0a,
0x0b, 0x64, 0x65, 0x70, 0x74, 0x68, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
@@ -680,18 +689,19 @@
0x69, 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x7a, 0x65, 0x70,
0x68, 0x79, 0x72, 0x5f, 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x7a, 0x65,
0x70, 0x68, 0x79, 0x72, 0x45, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6d, 0x70, 0x62, 0x6c, 0x6b,
- 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6d, 0x70, 0x62, 0x6c, 0x6b, 0x22, 0x67,
- 0x0a, 0x13, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63,
- 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x42, 0x75, 0x69,
- 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64,
- 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x6f, 0x2e, 0x63, 0x68,
- 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72, 0x6f, 0x6d,
- 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6f, 0x2f,
- 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6d, 0x70, 0x62, 0x6c, 0x6b, 0x12, 0x10,
+ 0x0a, 0x03, 0x69, 0x73, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x73, 0x68,
+ 0x22, 0x67, 0x0a, 0x13, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x42, 0x75, 0x69, 0x6c,
+ 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64,
+ 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
+ 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x75, 0x69, 0x6c,
+ 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x42,
+ 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x0c, 0x62, 0x75, 0x69,
+ 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x6f, 0x2e,
+ 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72,
+ 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67,
+ 0x6f, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
}
var (
diff --git a/payload_utils/join_config_payloads.py b/payload_utils/join_config_payloads.py
index 1bbc907..33a1741 100755
--- a/payload_utils/join_config_payloads.py
+++ b/payload_utils/join_config_payloads.py
@@ -291,6 +291,7 @@
build_config.build_targets.coreboot = build_props.get('coreboot', '')
build_config.build_targets.depthcharge = build_props.get('depthcharge', '')
build_config.build_targets.ec = build_props.get('ec', '')
+ build_config.build_targets.ish = build_props.get('ish', '')
build_config.build_targets.libpayload = build_props.get('libpayload', '')
build_config.build_targets.zephyr_ec = build_props.get('zephyr-ec', '')
diff --git a/proto/chromiumos/build/api/firmware_config.proto b/proto/chromiumos/build/api/firmware_config.proto
index 00361b0..5bedc82 100644
--- a/proto/chromiumos/build/api/firmware_config.proto
+++ b/proto/chromiumos/build/api/firmware_config.proto
@@ -118,6 +118,9 @@
// Build target for chromeos-bmpblk.
string bmpblk = 8;
+
+ // Build target for chromeos-ish.
+ string ish = 9;
}
BuildTargets build_targets = 1;
diff --git a/python/chromiumos/build/api/firmware_config_pb2.py b/python/chromiumos/build/api/firmware_config_pb2.py
index 08b8345..ac65c58 100644
--- a/python/chromiumos/build/api/firmware_config_pb2.py
+++ b/python/chromiumos/build/api/firmware_config_pb2.py
@@ -21,7 +21,7 @@
syntax='proto3',
serialized_options=b'Z.go.chromium.org/chromiumos/config/go/build/api',
create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n*chromiumos/build/api/firmware_config.proto\x12\x14\x63hromiumos.build.api\x1a\"chromiumos/build/api/portage.proto\x1a\x1d\x63hromiumos/storage_path.proto\"=\n\x0c\x46irmwareType\"-\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04MAIN\x10\x01\x12\x06\n\x02\x45\x43\x10\x02\x12\x06\n\x02PD\x10\x03\"6\n\x07Version\x12\r\n\x05major\x18\x01 \x01(\x05\x12\r\n\x05minor\x18\x02 \x01(\x05\x12\r\n\x05patch\x18\x03 \x01(\x05\"\xeb\x01\n\x0f\x46irmwarePayload\x12\x36\n\x13\x66irmware_image_path\x18\x05 \x01(\x0b\x32\x17.chromiumos.StoragePathH\x00\x12!\n\x13\x66irmware_image_name\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x35\n\x04type\x18\x03 \x01(\x0e\x32\'.chromiumos.build.api.FirmwareType.Type\x12.\n\x07version\x18\x04 \x01(\x0b\x32\x1d.chromiumos.build.api.VersionB\x10\n\x0e\x66irmware_imageJ\x04\x08\x01\x10\x02\"\x92\x02\n\x0e\x46irmwareConfig\x12>\n\x0fmain_ro_payload\x18\x01 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayload\x12>\n\x0fmain_rw_payload\x18\x02 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayload\x12<\n\rec_ro_payload\x18\x03 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayload\x12<\n\rpd_ro_payload\x18\x05 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayloadJ\x04\x08\x04\x10\x05\"\xa5\x02\n\x08\x46irmware\x12\x42\n\rbuild_targets\x18\x01 \x01(\x0b\x32+.chromiumos.build.api.Firmware.BuildTargets\x1a\xd4\x01\n\x0c\x42uildTargets\x12\x10\n\x08\x63oreboot\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65pthcharge\x18\x02 \x01(\t\x12\n\n\x02\x65\x63\x18\x03 \x01(\t\x12\x11\n\tec_extras\x18\x04 \x03(\t\x12\x12\n\nlibpayload\x18\x05 \x01(\t\x12G\n\x14portage_build_target\x18\x06 \x01(\x0b\x32).chromiumos.build.api.Portage.BuildTarget\x12\x11\n\tzephyr_ec\x18\x07 \x01(\t\x12\x0e\n\x06\x62mpblk\x18\x08 \x01(\t\"Y\n\x13\x46irmwareBuildConfig\x12\x42\n\rbuild_targets\x18\x01 \x01(\x0b\x32+.chromiumos.build.api.Firmware.BuildTargetsB0Z.go.chromium.org/chromiumos/config/go/build/apib\x06proto3'
+ serialized_pb=b'\n*chromiumos/build/api/firmware_config.proto\x12\x14\x63hromiumos.build.api\x1a\"chromiumos/build/api/portage.proto\x1a\x1d\x63hromiumos/storage_path.proto\"=\n\x0c\x46irmwareType\"-\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04MAIN\x10\x01\x12\x06\n\x02\x45\x43\x10\x02\x12\x06\n\x02PD\x10\x03\"6\n\x07Version\x12\r\n\x05major\x18\x01 \x01(\x05\x12\r\n\x05minor\x18\x02 \x01(\x05\x12\r\n\x05patch\x18\x03 \x01(\x05\"\xeb\x01\n\x0f\x46irmwarePayload\x12\x36\n\x13\x66irmware_image_path\x18\x05 \x01(\x0b\x32\x17.chromiumos.StoragePathH\x00\x12!\n\x13\x66irmware_image_name\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x35\n\x04type\x18\x03 \x01(\x0e\x32\'.chromiumos.build.api.FirmwareType.Type\x12.\n\x07version\x18\x04 \x01(\x0b\x32\x1d.chromiumos.build.api.VersionB\x10\n\x0e\x66irmware_imageJ\x04\x08\x01\x10\x02\"\x92\x02\n\x0e\x46irmwareConfig\x12>\n\x0fmain_ro_payload\x18\x01 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayload\x12>\n\x0fmain_rw_payload\x18\x02 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayload\x12<\n\rec_ro_payload\x18\x03 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayload\x12<\n\rpd_ro_payload\x18\x05 \x01(\x0b\x32%.chromiumos.build.api.FirmwarePayloadJ\x04\x08\x04\x10\x05\"\xb2\x02\n\x08\x46irmware\x12\x42\n\rbuild_targets\x18\x01 \x01(\x0b\x32+.chromiumos.build.api.Firmware.BuildTargets\x1a\xe1\x01\n\x0c\x42uildTargets\x12\x10\n\x08\x63oreboot\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65pthcharge\x18\x02 \x01(\t\x12\n\n\x02\x65\x63\x18\x03 \x01(\t\x12\x11\n\tec_extras\x18\x04 \x03(\t\x12\x12\n\nlibpayload\x18\x05 \x01(\t\x12G\n\x14portage_build_target\x18\x06 \x01(\x0b\x32).chromiumos.build.api.Portage.BuildTarget\x12\x11\n\tzephyr_ec\x18\x07 \x01(\t\x12\x0e\n\x06\x62mpblk\x18\x08 \x01(\t\x12\x0b\n\x03ish\x18\t \x01(\t\"Y\n\x13\x46irmwareBuildConfig\x12\x42\n\rbuild_targets\x18\x01 \x01(\x0b\x32+.chromiumos.build.api.Firmware.BuildTargetsB0Z.go.chromium.org/chromiumos/config/go/build/apib\x06proto3'
,
dependencies=[chromiumos_dot_build_dot_api_dot_portage__pb2.DESCRIPTOR,chromiumos_dot_storage__path__pb2.DESCRIPTOR,])
@@ -310,6 +310,13 @@
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='ish', full_name='chromiumos.build.api.Firmware.BuildTargets.ish', index=8,
+ number=9, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
@@ -323,7 +330,7 @@
oneofs=[
],
serialized_start=851,
- serialized_end=1063,
+ serialized_end=1076,
)
_FIRMWARE = _descriptor.Descriptor(
@@ -354,7 +361,7 @@
oneofs=[
],
serialized_start=770,
- serialized_end=1063,
+ serialized_end=1076,
)
@@ -385,8 +392,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=1065,
- serialized_end=1154,
+ serialized_start=1078,
+ serialized_end=1167,
)
_FIRMWARETYPE_TYPE.containing_type = _FIRMWARETYPE
diff --git a/test/project/fake/fake/config.star b/test/project/fake/fake/config.star
index b6ef40b..5f1220e 100755
--- a/test/project/fake/fake/config.star
+++ b/test/project/fake/fake/config.star
@@ -568,7 +568,7 @@
ec_version = sc.create_fw_version(11111, 2),
pd_version = sc.create_fw_version(11111),
),
- firmware_build_config = sc.create_fw_build_config_by_names("fake", ec_name = "fake", ec_extras = ["fake_ec_extra1", "fake_ec_extra2"], zephyr_ec_name = "projects/fake/fake"),
+ firmware_build_config = sc.create_fw_build_config_by_names("fake", ec_name = "fake", ec_extras = ["fake_ec_extra1", "fake_ec_extra2"], zephyr_ec_name = "projects/fake/fake", ish_name = "fake"),
power = _SC_POWER,
wifi = _SC_WIFI_ATH10K,
ui = sc.create_ui(extra_web_apps_dir = "apps1"),
diff --git a/test/project/fake/fake/generated/config.jsonproto b/test/project/fake/fake/generated/config.jsonproto
index a2f1ece..4236c61 100644
--- a/test/project/fake/fake/generated/config.jsonproto
+++ b/test/project/fake/fake/generated/config.jsonproto
@@ -7247,6 +7247,7 @@
"fake_ec_extra1",
"fake_ec_extra2"
],
+ "ish": "fake",
"libpayload": "fake",
"zephyrEc": "projects/fake/fake"
}
diff --git a/test/project/fake/fake/sw_build_config/platform/chromeos-config/generated/project-config.json b/test/project/fake/fake/sw_build_config/platform/chromeos-config/generated/project-config.json
index ab77222..98c8b27 100644
--- a/test/project/fake/fake/sw_build_config/platform/chromeos-config/generated/project-config.json
+++ b/test/project/fake/fake/sw_build_config/platform/chromeos-config/generated/project-config.json
@@ -121,6 +121,7 @@
"fake_ec_extra1",
"fake_ec_extra2"
],
+ "ish": "fake",
"libpayload": "fake",
"zephyr-ec": "projects/fake/fake"
},
diff --git a/util/sw_config.star b/util/sw_config.star
index a4dd317..062c108 100644
--- a/util/sw_config.star
+++ b/util/sw_config.star
@@ -88,6 +88,7 @@
depthcharge = None,
ec = None,
ec_extras = None,
+ ish = None,
libpayload = None,
zephyr_ec = None):
"""Builds a Firmware.BuildTargets proto."""
@@ -97,6 +98,7 @@
depthcharge = depthcharge,
ec = ec,
ec_extras = ec_extras,
+ ish = ish,
libpayload = libpayload,
zephyr_ec = zephyr_ec,
)
@@ -110,6 +112,7 @@
bmpblk_name = None,
ec_name = None,
depthcharge_name = None,
+ ish_name = None,
libpayload_name = None,
ec_extras = None,
zephyr_ec_name = None):
@@ -127,6 +130,7 @@
ec = ec_name,
ec_extras = ec_extras,
depthcharge = depthcharge_name if depthcharge_name else coreboot_name,
+ ish = ish_name,
libpayload = libpayload_name if libpayload_name else coreboot_name,
zephyr_ec = zephyr_ec_name,
),