• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2019 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 #include <vector>
20 
21 namespace cuttlefish {
22 bool RepackBootImage(const std::string& new_kernel_path,
23                      const std::string& boot_image_path,
24                      const std::string& new_boot_image_path,
25                      const std::string& tmp_artifact_dir);
26 bool RepackVendorBootImage(const std::string& new_ramdisk_path,
27                            const std::string& vendor_boot_image_path,
28                            const std::string& new_vendor_boot_image_path,
29                            const std::string& unpack_dir,
30                            bool bootconfig_supported);
31 bool RepackVendorBootImageWithEmptyRamdisk(
32     const std::string& vendor_boot_image_path,
33     const std::string& new_vendor_boot_image_path,
34     const std::string& unpack_dir, bool bootconfig_supported);
35 bool UnpackBootImage(const std::string& boot_image_path,
36                      const std::string& unpack_dir);
37 bool UnpackVendorBootImageIfNotUnpacked(
38     const std::string& vendor_boot_image_path, const std::string& unpack_dir);
39 void RepackGem5BootImage(const std::string& initrd_path,
40                          const std::string& bootconfig_path,
41                          const std::string& unpack_dir);
42 }
43