1d6aed566Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 2d6aed566Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3d6aed566Sopenharmony_ci# you may not use this file except in compliance with the License. 4d6aed566Sopenharmony_ci# You may obtain a copy of the License at 5d6aed566Sopenharmony_ci# 6d6aed566Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7d6aed566Sopenharmony_ci# 8d6aed566Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9d6aed566Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10d6aed566Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11d6aed566Sopenharmony_ci# See the License for the specific language governing permissions and 12d6aed566Sopenharmony_ci# limitations under the License. 13d6aed566Sopenharmony_ci 14d6aed566Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 15d6aed566Sopenharmony_ci 16d6aed566Sopenharmony_cimodule_name = get_path_info(rebase_path("."), "name") 17d6aed566Sopenharmony_cibuild_ext_component(module_name) { 18d6aed566Sopenharmony_ci exec_path = rebase_path(".") 19d6aed566Sopenharmony_ci 20d6aed566Sopenharmony_ci fs_src_path = product_path + "/fs_data/data" 21d6aed566Sopenharmony_ci 22d6aed566Sopenharmony_ci # lfs img size 32M 23d6aed566Sopenharmony_ci fs_image_size = 33554432 24d6aed566Sopenharmony_ci 25d6aed566Sopenharmony_ci # lfs img size 128*1024*2 26d6aed566Sopenharmony_ci block_size = 262144 27d6aed566Sopenharmony_ci 28d6aed566Sopenharmony_ci # lfs img blocks = fs_size/block_size 29d6aed566Sopenharmony_ci blocks = 128 30d6aed566Sopenharmony_ci 31d6aed566Sopenharmony_ci command = "./mklittlefs -c ${fs_src_path} -d 5 -b ${block_size} -p ${blocks} -s ${fs_image_size} ${product_path}/fs-storage.img" 32d6aed566Sopenharmony_ci} 33