• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15config("e2fsprogs-defaults") {
16  cflags = [ "-Wno-pointer-sign" ]
17}
18
19ohos_shared_library("libext2_misc") {
20  configs = [ ":e2fsprogs-defaults" ]
21  sources = [ "create_inode.c" ]
22  include_dirs = [
23    ".",
24    "//third_party/e2fsprogs/lib",
25  ]
26  cflags = [ "-Wno-error=format-extra-args" ]
27
28  deps = [
29    "//third_party/e2fsprogs/lib/et:libext2_com_err",
30    "//third_party/e2fsprogs/lib/ext2fs:libext2fs",
31    "//third_party/e2fsprogs/lib/support:libext2_quota",
32  ]
33  install_enable = true
34  part_name = "e2fsprogs"
35  install_images = [
36    "system",
37    "updater",
38  ]
39}
40
41###################################################
42###Build mke2fs
43ohos_executable("mke2fs") {
44  configs = [ ":e2fsprogs-defaults" ]
45  sources = [
46    "default_profile.c",
47    "mk_hugefiles.c",
48    "mke2fs.c",
49    "util.c",
50  ]
51
52  include_dirs = [
53    ".",
54    "//third_party/e2fsprogs/e2fsck",
55    "//third_party/e2fsprogs/lib",
56    "//third_party/e2fsprogs/lib/ext2fs",
57  ]
58  cflags = [
59    "-Wno-error=format",
60    "-Wno-error=type-limits",
61    "-Wno-format-extra-args",
62  ]
63
64  deps = [
65    "//third_party/e2fsprogs/lib/blkid:libext2_blkid",
66    "//third_party/e2fsprogs/lib/e2p:libext2_e2p",
67    "//third_party/e2fsprogs/lib/et:libext2_com_err",
68    "//third_party/e2fsprogs/lib/ext2fs:libext2fs",
69    "//third_party/e2fsprogs/lib/support:libext2_quota",
70    "//third_party/e2fsprogs/lib/uuid:libext2_uuid",
71    "//third_party/e2fsprogs/misc:libext2_misc",
72  ]
73
74  install_enable = true
75  part_name = "e2fsprogs"
76  install_images = [
77    "system",
78    "updater",
79  ]
80}
81
82ohos_executable("blkid") {
83  configs = [ ":e2fsprogs-defaults" ]
84  sources = [ "blkid.c" ]
85
86  include_dirs = [
87    ".",
88    "//third_party/e2fsprogs/lib",
89    "//third_party/e2fsprogs/lib/blkid",
90  ]
91  cflags = [
92    "-Wno-error=format",
93    "-Wno-error=type-limits",
94    "-Wno-format-extra-args",
95  ]
96
97  deps = [
98    "//third_party/e2fsprogs/lib/blkid:libext2_blkid",
99    "//third_party/e2fsprogs/lib/e2p:libext2_e2p",
100    "//third_party/e2fsprogs/lib/et:libext2_com_err",
101    "//third_party/e2fsprogs/lib/ext2fs:libext2fs",
102  ]
103
104  install_enable = true
105  subsystem_name = "filemanagement"
106  part_name = "storage_service"
107  install_images = [
108    "system",
109    "updater",
110  ]
111}
112