Android-cuttlefish cvd tool
vendor_dlkm_utils.h
Go to the documentation of this file.
1//
2// Copyright (C) 2023 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <string>
19
21
22namespace cuttlefish {
23
24bool SplitRamdiskModules(const std::string& ramdisk_path,
25 const std::string& ramdisk_stage_dir,
26 const std::string& vendor_dlkm_build_dir,
27 const std::string& system_dlkm_build_dir);
28
29Result<bool> WriteFsConfig(const char* output_path, const std::string& fs_root,
30 const std::string& mount_point);
31
32Result<void> RepackSuperWithPartition(const std::string& superimg_path,
33 const std::string& image_path,
34 const std::string& partition_name);
35
36Result<void> BuildVbmetaImage(const std::string& vendor_dlkm_img,
37 const std::string& vbmeta_path);
38
39Result<void> BuildDlkmImage(const std::string& src_dir, const bool is_erofs,
40 const std::string& partition_name,
41 const std::string& output_image);
42
43// Move file `src` to `dst` if the contents of these files differ.
44// Return true if and only if the move happened.
45bool MoveIfChanged(const std::string& src, const std::string& dst);
46
47} // namespace cuttlefish
Definition: expected.h:86
Definition: alloc_utils.cpp:23
Result< void > BuildDlkmImage(const std::string &src_dir, const bool is_erofs, const std::string &partition_name, const std::string &output_image)
Definition: vendor_dlkm_utils.cc:340
Result< void > BuildVbmetaImage(const std::string &image_path, const std::string &vbmeta_path)
Definition: vendor_dlkm_utils.cc:410
bool SplitRamdiskModules(const std::string &ramdisk_path, const std::string &ramdisk_stage_dir, const std::string &vendor_dlkm_build_dir, const std::string &system_dlkm_build_dir)
Definition: vendor_dlkm_utils.cc:426
bool MoveIfChanged(const std::string &src, const std::string &dst)
Definition: vendor_dlkm_utils.cc:560
Result< void > RepackSuperWithPartition(const std::string &superimg_path, const std::string &image_path, const std::string &partition_name)
Definition: vendor_dlkm_utils.cc:394
Result< bool > WriteFsConfig(const char *output_path, const std::string &fs_root, const std::string &mount_point)