Skip to content

Commit b69c667

Browse files
committed
Revert "Fail if new BOARD_BOOTCONFIG keys are found."
This reverts commit 44e80f3.
1 parent 4544632 commit b69c667

2 files changed

Lines changed: 0 additions & 41 deletions

File tree

base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ cf_cc_library(
145145
srcs = ["bootconfig_args.cpp"],
146146
hdrs = ["bootconfig_args.h"],
147147
deps = [
148-
"//cuttlefish/common/libs/utils:contains",
149148
"//cuttlefish/common/libs/utils:json",
150149
"//cuttlefish/host/libs/config:config_constants",
151150
"//cuttlefish/host/libs/config:cuttlefish_config",

base/cvd/cuttlefish/host/commands/assemble_cvd/bootconfig_args.cpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "absl/log/log.h"
2727
#include "absl/strings/numbers.h"
2828

29-
#include "cuttlefish/common/libs/utils/contains.h"
3029
#include "cuttlefish/common/libs/utils/json.h"
3130
#include "cuttlefish/host/libs/config/config_constants.h"
3231
#include "cuttlefish/host/libs/config/cuttlefish_config.h"
@@ -41,23 +40,6 @@ using vm_manager::QemuManager;
4140

4241
namespace {
4342

44-
static constexpr std::string_view kLegacyBoardBootconfigKeysShared[] = {
45-
"androidboot.hardware",
46-
"androidboot.vendor.apex.com.google.emulated.camera.provider.hal",
47-
"kernel.vmw_vsock_virtio_transport_common.virtio_transport_max_vsock_pkt_buf_size",
48-
};
49-
50-
static constexpr std::string_view kLegacyBoardBootconfigKeysAuto[] = {
51-
"androidboot.cuttlefish_service_bluetooth_checker",
52-
"androidboot.hibernation_resume_device",
53-
};
54-
55-
static constexpr std::string_view kLegacyBoardBootconfigKeysMinidroid[] = {
56-
"androidboot.adb.enabled",
57-
"androidboot.init_rc",
58-
"androidboot.microdroid.debuggable",
59-
};
60-
6143
template <typename T>
6244
void AppendMapWithReplacement(T* destination, const T& source) {
6345
for (const auto& [k, v] : source) {
@@ -90,32 +72,10 @@ Result<std::unordered_map<std::string, std::string>> ConsoleBootconfig(
9072

9173
} // namespace
9274

93-
// Bootconfing args should be added to the launcher and no longer via the build system variable
94-
// `BOARD_BOOTCONFIG`. Allow legacy keys for backward compatibility.
95-
Result<void> ValidateBoardBootconfigKeys(
96-
const cuttlefish::DeviceType type,
97-
const std::map<std::string, std::string, std::less<void>> args) {
98-
std::vector<std::string> allowed_args(std::begin(kLegacyBoardBootconfigKeysShared), std::end(kLegacyBoardBootconfigKeysShared));
99-
if (type == cuttlefish::DeviceType::Auto) {
100-
allowed_args.insert(allowed_args.end(), std::begin(kLegacyBoardBootconfigKeysAuto), std::end(kLegacyBoardBootconfigKeysAuto));
101-
} else if (type == cuttlefish::DeviceType::Minidroid) {
102-
allowed_args.insert(allowed_args.end(), std::begin(kLegacyBoardBootconfigKeysMinidroid), std::end(kLegacyBoardBootconfigKeysMinidroid));
103-
}
104-
105-
for(auto iter = args.begin(); iter != args.end(); iter++) {
106-
CF_EXPECTF(Contains(allowed_args, iter->first),
107-
"Error: detected new `BOARD_BOOTCONFIG` key: \"{}\"!!! Please add new bootconfig args to the `cvd` launcher.", iter->first);
108-
}
109-
110-
return {};
111-
}
112-
11375
Result<std::unordered_map<std::string, std::string>> BootconfigArgsFromConfig(
11476
const CuttlefishConfig& config,
11577
const CuttlefishConfig::InstanceSpecific& instance,
11678
const std::map<std::string, std::string, std::less<void>> builtin_bootconfig_args) {
117-
CF_EXPECT(ValidateBoardBootconfigKeys(instance.device_type(), builtin_bootconfig_args));
118-
11979
std::unordered_map<std::string, std::string> bootconfig_args;
12080

12181
AppendMapWithReplacement(&bootconfig_args,

0 commit comments

Comments
 (0)