diff --git a/fsck/BUILD.gn b/fsck/BUILD.gn index 7498bb3..b82c09e 100644 --- a/fsck/BUILD.gn +++ b/fsck/BUILD.gn @@ -1,66 +1,67 @@ # Copyright (c) 2021 Huawei Device Co., Ltd. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import("//build/ohos.gni") -config("e2fsprogs-defaults") { - cflags = [ - "-Wno-pointer-sign", - "-Wno-unused-variable", - "-Wno-string-plus-int", - "-Wno-error=format", - "-Wno-unused-function", - "-Wno-unused-parameter", - "-Wno-incompatible-pointer-types", +config("f2fs-defaults") { + cflags = [ + "-Wno-pointer-sign", + "-Wno-unused-variable", + "-Wno-string-plus-int", + "-Wno-error=format", + "-Wno-unused-function", + "-Wno-unused-parameter", + "-Wno-incompatible-pointer-types", ] } ################################################### ##Build fsck ohos_executable("fsck.f2fs") { - configs = [ ":e2fsprogs-defaults" ] + configs = [ ":f2fs-defaults" ] sources = [ - "fsck.c", - "main.c", - "defrag.c", - "dict.c", - "dir.c", - "dump.c", - "mkquota.c", - "mount.c", - "node.c", - "quotaio.c", - "quotaio_tree.c", - "quotaio_v2.c", - "resize.c", - "segment.c", - "sload.c", - "xattr.c", + "defrag.c", + "dict.c", + "dir.c", + "dump.c", + "fsck.c", + "main.c", + "mkquota.c", + "mount.c", + "node.c", + "quotaio.c", + "quotaio_tree.c", + "quotaio_v2.c", + "resize.c", + "segment.c", + "sload.c", + "xattr.c", ] include_dirs = [ ".", - "//third_party/e2fsprogs/f2fs-tools-1.14.0", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/include", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/lib", + "//third_party/f2fs-tools", + "//third_party/f2fs-tools/include", + "//third_party/f2fs-tools/lib", "//third_party/e2fsprogs/contrib/android", ] deps = [ - "//third_party/e2fsprogs/f2fs-tools-1.14.0/lib:libf2fs", "//third_party/e2fsprogs/contrib/android:libdacconfig", + "//third_party/f2fs-tools/lib:libf2fs", ] - defines = [ - "HAVE_CONFIG_H", + defines = [ "HAVE_CONFIG_H" ] + + symlink_target_name = [ + "resize.f2fs", + "sload.f2fs", ] install_enable = true - subsystem_name = "storage_manager" + subsystem_name = "filemanagement" part_name = "storage_standard" - install_images = [ - "system", - ] + install_images = [ "system" ] } diff --git a/lib/BUILD.gn b/lib/BUILD.gn index 5659dfa..5871b27 100644 --- a/lib/BUILD.gn +++ b/lib/BUILD.gn @@ -1,11 +1,11 @@ # Copyright (c) 2021 Huawei Device Co., Ltd. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import("//build/ohos.gni") -config("e2fsprogs-defaults") { +config("f2fs-defaults") { cflags = [ "-Wall", "-Werror", @@ -16,33 +16,31 @@ config("e2fsprogs-defaults") { ] } config("libf2fs-headers") { - include_dirs = [ - ".", - "//third_party/e2fsprogs/f2fs-tools-1.14.0", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/include", - ] + include_dirs = [ + ".", + "//third_party/f2fs-tools", + "//third_party/f2fs-tools/include", + ] } ohos_shared_library("libf2fs") { sources = [ + "libf2fs.c", "libf2fs_io.c", "libf2fs_zoned.c", - "libf2fs.c", "nls_utf8.c", ] - + include_dirs = [ "." ] configs = [ - ":e2fsprogs-defaults", + ":f2fs-defaults", ":libf2fs-headers", ] defines = [ "HAVE_CONFIG_H" ] install_enable = true - subsystem_name = "storage_manager" + subsystem_name = "filemanagement" part_name = "storage_standard" - install_images = [ - "system", - ] + install_images = [ "system" ] } diff --git a/mkfs/BUILD.gn b/mkfs/BUILD.gn index b570477..3f54e56 100644 --- a/mkfs/BUILD.gn +++ b/mkfs/BUILD.gn @@ -1,50 +1,46 @@ # Copyright (c) 2021 Huawei Device Co., Ltd. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import("//build/ohos.gni") -config("e2fsprogs-defaults") { - cflags = [ - "-Wno-pointer-sign", - "-Wno-unused-variable", - "-Wno-string-plus-int", - "-Wno-error=format", +config("f2fs-defaults") { + cflags = [ + "-Wno-pointer-sign", + "-Wno-unused-variable", + "-Wno-string-plus-int", + "-Wno-error=format", ] } ################################################### ##Build mkfs.f2fs ohos_executable("mkfs.f2fs") { - configs = [ ":e2fsprogs-defaults" ] + configs = [ ":f2fs-defaults" ] sources = [ - "f2fs_format_main.c", - "f2fs_format_utils.c", - "f2fs_format.c", + "f2fs_format.c", + "f2fs_format_main.c", + "f2fs_format_utils.c", ] include_dirs = [ ".", "//third_party/e2fsprogs/lib/uuid", - "//third_party/e2fsprogs/f2fs-tools-1.14.0", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/include", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/lib", + "//third_party/f2fs-tools", + "//third_party/f2fs-tools/include", + "//third_party/f2fs-tools/lib", ] deps = [ "//third_party/e2fsprogs/lib/uuid:libext2_uuid", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/lib:libf2fs", - ] - - defines = [ - "HAVE_CONFIG_H", + "//third_party/f2fs-tools/lib:libf2fs", ] + defines = [ "HAVE_CONFIG_H" ] + install_enable = true - subsystem_name = "storage_manager" + subsystem_name = "filemanagement" part_name = "storage_standard" - install_images = [ - "system", - ] + install_images = [ "system" ] } diff --git a/tools/BUILD.gn b/tools/BUILD.gn index 2d54e01..6a898ca 100644 --- a/tools/BUILD.gn +++ b/tools/BUILD.gn @@ -1,87 +1,74 @@ # Copyright (c) 2021 Huawei Device Co., Ltd. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import("//build/ohos.gni") -config("e2fsprogs-defaults") { - cflags = [ - "-std=gnu89", - "-Wno-implicit-function-declaration", - "-Wno-pointer-sign", - ] +config("f2fs-defaults") { + cflags = [ + "-std=gnu89", + "-Wno-implicit-function-declaration", + "-Wno-pointer-sign", + ] } ################################################### ##Build f2fscrypt ohos_executable("f2fscrypt") { - configs = [ ":e2fsprogs-defaults" ] - sources = [ - "f2fscrypt.c", - "sha512.c", + configs = [ ":f2fs-defaults" ] + sources = [ + "f2fscrypt.c", + "sha512.c", ] include_dirs = [ ".", - "//third_party/e2fsprogs/f2fs-tools-1.14.0", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/include", + "//third_party/f2fs-tools", + "//third_party/f2fs-tools/include", "//third_party/e2fsprogs/lib/uuid", ] cflags = [ "-Wno-error=format-extra-args" ] - deps = [ - "//third_party/e2fsprogs/lib/uuid:libext2_uuid", - ] + deps = [ "//third_party/e2fsprogs/lib/uuid:libext2_uuid" ] install_enable = true - subsystem_name = "storage_manager" + subsystem_name = "filemanagement" part_name = "storage_standard" - install_images = [ - "system", - ] + install_images = [ "system" ] } ################################################### ##Build f2fstat ohos_executable("f2fstat") { - configs = [ ":e2fsprogs-defaults" ] - sources = [ - "f2fstat.c", - ] + configs = [ ":f2fs-defaults" ] + sources = [ "f2fstat.c" ] - include_dirs = [ - ".", - ] + include_dirs = [ "." ] cflags = [ "-Wno-error=format", "-Wno-error=type-limits", "-Wno-format-extra-args", ] - deps = [ - ] + deps = [] install_enable = true - subsystem_name = "storage_manager" + subsystem_name = "filemanagement" part_name = "storage_standard" - install_images = [ - "system", - ] + install_images = [ "system" ] } ################################################### ##Build fibmap.f2fs ohos_executable("fibmap.f2fs") { - configs = [ ":e2fsprogs-defaults" ] - sources = [ - "fibmap.c", - ] + configs = [ ":f2fs-defaults" ] + sources = [ "fibmap.c" ] include_dirs = [ ".", - "//third_party/e2fsprogs/f2fs-tools-1.14.0", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/include", - "//third_party/e2fsprogs/f2fs-tools-1.14.0/lib", + "//third_party/f2fs-tools", + "//third_party/f2fs-tools/include", + "//third_party/f2fs-tools/lib", ] cflags = [ @@ -90,18 +77,12 @@ ohos_executable("fibmap.f2fs") { "-Wno-format-extra-args", ] - deps = [ - "//third_party/e2fsprogs/f2fs-tools-1.14.0/lib:libf2fs", - ] + deps = [ "//third_party/f2fs-tools/lib:libf2fs" ] - defines = [ - "HAVE_CONFIG_H", - ] + defines = [ "HAVE_CONFIG_H" ] install_enable = true - subsystem_name = "storage_manager" + subsystem_name = "filemanagement" part_name = "storage_standard" - install_images = [ - "system", - ] + install_images = [ "system" ] }