Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
18d64639
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
18d64639
编写于
10月 23, 2020
作者:
O
openharmony_ci
提交者:
Gitee
10月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
!24 jffs2镜像打包工具改为用户自行安装
Merge pull request !24 from JING/master
上级
37eba379
899b034e
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
28 addition
and
12 deletion
+28
-12
Makefile
Makefile
+3
-3
tools/fsimage/mkfs.jffs2
tools/fsimage/mkfs.jffs2
+0
-0
tools/scripts/make_rootfs/rootfsimg.sh
tools/scripts/make_rootfs/rootfsimg.sh
+25
-9
未找到文件。
Makefile
浏览文件 @
18d64639
...
...
@@ -165,13 +165,13 @@ endif
$(ROOTFSDIR)
:
prepare $(APPS)
$(HIDE)$(MAKE)
clean
-C
apps
$(HIDE)
$(
shell
$(LITEOSTOPDIR)
/tools/scripts/make_rootfs/rootfsdir.sh
$(OUT)
/bin
$(OUT)
/musl
$(ROOTFS_DIR)
)
$(HIDE)$(
LITEOSTOPDIR)
/tools/scripts/make_rootfs/rootfsdir.sh
$(OUT)
/bin
$(OUT)
/musl
$(ROOTFS_DIR
)
ifneq
($(VERSION),)
$(HIDE)
$(
shell
$(LITEOSTOPDIR)
/tools/scripts/make_rootfs/releaseinfo.sh
"
$(VERSION)
"
$(ROOTFS_DIR)
)
$(HIDE)$(
LITEOSTOPDIR)
/tools/scripts/make_rootfs/releaseinfo.sh
"
$(VERSION)
"
$(ROOTFS_DIR
)
endif
$(ROOTFS)
:
$(ROOTFSDIR)
$(HIDE)
$(
shell
$(LITEOSTOPDIR)
/tools/scripts/make_rootfs/rootfsimg.sh
$(ROOTFS_DIR)
$(FSTYPE)
)
$(HIDE)$(
LITEOSTOPDIR)
/tools/scripts/make_rootfs/rootfsimg.sh
$(ROOTFS_DIR)
$(FSTYPE
)
$(HIDE)
cd
$(ROOTFS_DIR)
/..
&&
zip
-r
$(ROOTFS_ZIP)
$(ROOTFS)
ifneq
($(OUT), $(LITEOS_TARGET_DIR))
$(HIDE)
mv
$(ROOTFS_DIR)
$(LITEOS_TARGET_DIR)
rootfs
...
...
tools/fsimage/mkfs.jffs2
已删除
100755 → 0
浏览文件 @
37eba379
文件已删除
tools/scripts/make_rootfs/rootfsimg.sh
浏览文件 @
18d64639
...
...
@@ -34,26 +34,42 @@ system=$(uname -s)
ROOTFS_DIR
=
$1
FSTYPE
=
$2
ROOTFS_IMG
=
${
ROOTFS_DIR
}
".img"
JFFS2_TOOL
=
$(
dirname
$(
readlink
-f
"
$0
"
))
/../../fsimage/mkfs.jffs2
WIN_JFFS2_TOOL
=
$(
dirname
$(
readlink
-f
"
$0
"
))
/../../fsimage/win-x86/mkfs.jffs2.exe
JFFS2_TOOL
=
mkfs.jffs2
WIN_JFFS2_TOOL
=
mkfs.jffs2.exe
VFAT_TOOL
=
mkfs.vfat
MCOPY_TOOL
=
mcopy
if
[
"
${
ROOTFS_DIR
}
"
=
"*rootfs"
]
;
then
chmod
-R
755
${
ROOTFS_DIR
}
tool_check
()
{
local
ret
=
'0'
command
-v
"
$1
"
>
/dev/null 2>&1
||
{
local
ret
=
'1'
;
}
if
[
"
$ret
"
-ne
0
]
;
then
echo
"
$1
tool is not exit, please install it"
>
&2
fi
return
0
}
chmod
-R
755
${
ROOTFS_DIR
}
if
[
-f
"
${
ROOTFS_DIR
}
/bin/init"
]
;
then
chmod
700
${
ROOTFS_DIR
}
/bin/init 2> /dev/null
fi
if
[
-f
"
${
ROOTFS_DIR
}
/bin/shell"
]
;
then
chmod
700
${
ROOTFS_DIR
}
/bin/shell 2> /dev/null
fi
if
[
"
${
FSTYPE
}
"
=
"jffs2"
]
;
then
if
[
"
${
system
}
"
!=
"Linux"
]
;
then
tool_check
${
WIN_JFFS2_TOOL
}
${
WIN_JFFS2_TOOL
}
-q
-o
${
ROOTFS_IMG
}
-d
${
ROOTFS_DIR
}
--pagesize
=
4096
else
chmod
+x
${
JFFS2_TOOL
}
tool_check
${
JFFS2_TOOL
}
${
JFFS2_TOOL
}
-q
-o
${
ROOTFS_IMG
}
-d
${
ROOTFS_DIR
}
--pagesize
=
4096
fi
elif
[
"
${
FSTYPE
}
"
=
"vfat"
]
;
then
if
[
"
${
system
}
"
!=
"Linux"
]
;
then
echo
"Unsupported fs type!"
echo
"Unsupported fs type!"
>
&2
else
tool_check
${
VFAT_TOOL
}
tool_check
${
MCOPY_TOOL
}
BLK_SIZE
=
512
CLT_SIZE
=
2048
FAT_TAB_NUM
=
2
...
...
@@ -73,9 +89,9 @@ elif [ "${FSTYPE}" = "vfat" ]; then
IMG_CNT
=
$((
(
${
IMG_SIZE
}
+
${
BLK_SIZE
}
-
1
)
/
${
BLK_SIZE
}
))
echo
mtools_skip_check
=
1
>>
~/.mtoolsrc
dd
if
=
/dev/zero
of
=
${
ROOTFS_IMG
}
count
=
${
IMG_CNT
}
bs
=
${
BLK_SIZE
}
mkfs.vfat
${
ROOTFS_IMG
}
-s
${
CLT_CNT
}
-f
${
FAT_TAB_NUM
}
-S
${
BLK_SIZE
}
>
/dev/null
mcopy
-i
${
ROOTFS_IMG
}
${
ROOTFS_DIR
}
/
*
-/ ::/
${
VFAT_TOOL
}
${
ROOTFS_IMG
}
-s
${
CLT_CNT
}
-f
${
FAT_TAB_NUM
}
-S
${
BLK_SIZE
}
>
/dev/null
${
MCOPY_TOOL
}
-i
${
ROOTFS_IMG
}
${
ROOTFS_DIR
}
/
*
-/ ::/
fi
else
echo
"Unsupported fs type!"
echo
"Unsupported fs type!"
>
&2
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录