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 20 namespace cuttlefish { 21 22 bool SplitRamdiskModules(const std::string& ramdisk_path, 23 const std::string& ramdisk_stage_dir, 24 const std::string& vendor_dlkm_build_dir, 25 const std::string& system_dlkm_build_dir); 26 27 bool WriteFsConfig(const char* output_path, const std::string& fs_root, 28 const std::string& mount_point); 29 30 bool GenerateFileContexts(const char* output_path, 31 const std::string& mount_point); 32 33 bool RepackSuperWithPartition(const std::string& superimg_path, 34 const std::string& image_path, 35 const std::string& partition_name); 36 37 bool BuildVbmetaImage(const std::string& vendor_dlkm_img, 38 const std::string& vbmeta_path); 39 bool 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. 45 bool MoveIfChanged(const std::string& src, const std::string& dst); 46 47 } // namespace cuttlefish 48