Commit 67d5bdb7 authored by Jae Hoon Kim's avatar Jae Hoon Kim Committed by Commit Bot

arcvm: Don't pick ARCVM DLC paths

ARCVM remains in rootfs.

BUG=chromium:1058105
TEST=Build chrome

Change-Id: I0a4f37c393a1231120f191920135c4c0e84b00e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2085704Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746565}
parent da305e98
...@@ -22,7 +22,6 @@ namespace { ...@@ -22,7 +22,6 @@ namespace {
constexpr const char kArcVmConfigJsonPath[] = "/usr/share/arcvm/config.json"; constexpr const char kArcVmConfigJsonPath[] = "/usr/share/arcvm/config.json";
constexpr const char kBuiltinPath[] = "/opt/google/vms/android"; constexpr const char kBuiltinPath[] = "/opt/google/vms/android";
constexpr const char kDlcPath[] = "/run/imageloader/arcvm-dlc/package/root";
constexpr const char kFstab[] = "fstab"; constexpr const char kFstab[] = "fstab";
constexpr const char kKernel[] = "vmlinux"; constexpr const char kKernel[] = "vmlinux";
constexpr const char kRootFs[] = "system.raw.img"; constexpr const char kRootFs[] = "system.raw.img";
...@@ -39,10 +38,10 @@ FileSystemStatus::FileSystemStatus() ...@@ -39,10 +38,10 @@ FileSystemStatus::FileSystemStatus()
: is_android_debuggable_( : is_android_debuggable_(
IsAndroidDebuggable(base::FilePath(kArcVmConfigJsonPath))), IsAndroidDebuggable(base::FilePath(kArcVmConfigJsonPath))),
is_host_rootfs_writable_(IsHostRootfsWritable()), is_host_rootfs_writable_(IsHostRootfsWritable()),
system_image_path_(SelectDlcOrBuiltin(base::FilePath(kRootFs))), system_image_path_(base::FilePath(kBuiltinPath).Append(kRootFs)),
vendor_image_path_(SelectDlcOrBuiltin(base::FilePath(kVendorImage))), vendor_image_path_(base::FilePath(kBuiltinPath).Append(kVendorImage)),
guest_kernel_path_(SelectDlcOrBuiltin(base::FilePath(kKernel))), guest_kernel_path_(base::FilePath(kBuiltinPath).Append(kKernel)),
fstab_path_(SelectDlcOrBuiltin(base::FilePath(kFstab))), fstab_path_(base::FilePath(kBuiltinPath).Append(kFstab)),
is_system_image_ext_format_(IsSystemImageExtFormat(system_image_path_)) {} is_system_image_ext_format_(IsSystemImageExtFormat(system_image_path_)) {}
// static // static
...@@ -92,17 +91,6 @@ bool FileSystemStatus::IsHostRootfsWritable() { ...@@ -92,17 +91,6 @@ bool FileSystemStatus::IsHostRootfsWritable() {
return rw; return rw;
} }
// static
base::FilePath FileSystemStatus::SelectDlcOrBuiltin(
const base::FilePath& file) {
const base::FilePath dlc_path = base::FilePath(kDlcPath).Append(file);
if (base::PathExists(dlc_path)) {
VLOG(1) << "arcvm-dlc will be used for " << file.value();
return dlc_path;
}
return base::FilePath(kBuiltinPath).Append(file);
}
// static // static
bool FileSystemStatus::IsSystemImageExtFormat(const base::FilePath& path) { bool FileSystemStatus::IsSystemImageExtFormat(const base::FilePath& path) {
base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ); base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
......
...@@ -79,7 +79,6 @@ class FileSystemStatus { ...@@ -79,7 +79,6 @@ class FileSystemStatus {
static bool IsAndroidDebuggable(const base::FilePath& json_path); static bool IsAndroidDebuggable(const base::FilePath& json_path);
static bool IsHostRootfsWritable(); static bool IsHostRootfsWritable();
static base::FilePath SelectDlcOrBuiltin(const base::FilePath& file);
// https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout // https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout
// Super block starts from block 0, offset 0x400. // Super block starts from block 0, offset 0x400.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment