• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright (c) 2021 bestechnic (Shanghai) Technologies CO., LIMITED.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# generate fs
16let block_size=$1
17let fs_image_size=$2
18let page_size=fs_image_size/block_size
19let fs_image_size=page_size*block_size
20fs_src_path=$3
21fs_dst_path=$4
22fs_name=$5
23mklittlefs_path="$6/tools"
24
25fs_path="${fs_dst_path}/release_bin"
26
27${mklittlefs_path}/mklittlefs -c ${fs_src_path} -d 5 -b ${block_size} -p ${page_size} -s ${fs_image_size} ${fs_path}/${fs_name}.bin