Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
nanopi-r2s
提交
c4df26fc
N
nanopi-r2s
项目概览
OpenDocCN
/
nanopi-r2s
通知
47
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nanopi-r2s
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c4df26fc
编写于
4月 14, 2020
作者:
S
songchenwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
luci-app-r2sflasher support img.zip file
上级
929220ad
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
20 deletion
+34
-20
.github/workflows/friendlywrt_with_features.yml
.github/workflows/friendlywrt_with_features.yml
+0
-2
README.md
README.md
+4
-0
luci-app-r2sflasher/Makefile
luci-app-r2sflasher/Makefile
+1
-1
luci-app-r2sflasher/root/usr/bin/rom_flash
luci-app-r2sflasher/root/usr/bin/rom_flash
+29
-17
未找到文件。
.github/workflows/friendlywrt_with_features.yml
浏览文件 @
c4df26fc
...
...
@@ -69,8 +69,6 @@ jobs:
cd ..
rm -rf friendlywrt/package/libs
cp -r openwrt/package/libs friendlywrt/package/
# rm -rf friendlywrt/package/libs/elfutils
# cp -r lede/package/libs/elfutils friendlywrt/package/libs/
-
name
:
Install Openwrt octeontx patches
run
:
|
...
...
README.md
浏览文件 @
c4df26fc
...
...
@@ -2,6 +2,10 @@
编译了两种固件,分别是基于 Lean 的和基于官方固件的。
点击
[
这里
](
https://github.com/songchenwen/nanopi-r2s/releases
)
下载固件,推荐下载 FriendlyWRT 开头的版本。
NanoPi R2S 图形化刷机工具 luci-app-r2sflasher 的 ipk 安装包,也可以从
[
这里
](
https://github.com/songchenwen/nanopi-r2s/releases
)
下载到,选择4月14日及之后的版本把 zip 包解压之后即可得到 ipk。
| 荐 | 固件名字 | 状态 | 改动记录 | 简介 |
| :--- | :------ | :--- | :----- | :--- |
|
*
| FriendlyWRT |
[
![friendlywrt
](
https://github.com/songchenwen/nanopi-r2s/workflows/friendlywrt/badge.svg
)
](https://github.com/songchenwen/nanopi-r2s/actions?query=workflow%3Afriendlywrt) |
[
改动记录
](
FriendlyWRT/CHANGELOG.md
)
| 以 FriendlyWRT 为基础, 添加 Lean 的包 |
...
...
luci-app-r2sflasher/Makefile
浏览文件 @
c4df26fc
...
...
@@ -12,7 +12,7 @@ define Package/$(PKG_NAME)
SUBMENU
:=
3. Applications
TITLE
:=
LuCI Application to Flash NanoPi R2S ROM
PKGARCH
:=
all
DEPENDS
:=
+bash +unzip +pv +losetup +zstd
DEPENDS
:=
+bash +
gzip +tar +
unzip +pv +losetup +zstd
endef
define
Build/Prepare
...
...
luci-app-r2sflasher/root/usr/bin/rom_flash
浏览文件 @
c4df26fc
...
...
@@ -31,7 +31,6 @@ cd $workingdir
inputfile
=
$1
nobackup
=
$2
imgfile
=
rom.img
lomntpoint
=
/mnt/img
backupfile
=
/tmp/backup.tar.gz
...
...
@@ -59,18 +58,28 @@ fi
if
[
"
$inputfileext
"
==
"zip"
]
;
then
gzfile
=
$(
unzip
-Z
-1
"
$inputfile
"
|
grep
"sd.img.gz$"
)
imgfile
=
$(
unzip
-Z
-1
"
$inputfile
"
|
grep
".img$"
)
if
[
"
$gzfile
"
==
""
]
;
then
if
[
"
$gzfile
"
==
""
]
&&
[
"
$imgfile
"
==
""
]
;
then
echo
"没发现 sd.img.gz 结尾的固件包"
cd
/root
rm
-rf
$workingdir
exit
1
fi
unzip
"
$inputfile
"
"
$gzfile
"
if
!
[
"
$gzfile
"
==
""
]
;
then
unzip
"
$inputfile
"
"
$gzfile
"
imgfile
=
""
else
if
!
[
"
$imgfile
"
==
""
]
;
then
unzip
"
$inputfile
"
"
$imgfile
"
fi
fi
rm
$inputfile
if
[
-f
"
$gzfile
"
]
;
then
echo
"zip 固件已解压至
$
gzfile
"
if
[
-f
"
$gzfile
"
]
||
[
-f
"
$imgfile
"
]
;
then
echo
"zip 固件已解压至
$
{
gzfile
}${
imgfile
}
"
else
echo
"zip 固件解压失败"
cd
/root
...
...
@@ -79,7 +88,7 @@ if [ "$inputfileext" == "zip" ]; then
fi
fi
if
[
"
$gzfile
"
==
""
]
;
then
if
[
"
$gzfile
"
==
""
]
&&
[
"
$imgfile
"
==
""
]
;
then
echo
"不是有效的 ROM 文件"
cd
/root
rm
$inputfile
...
...
@@ -87,17 +96,20 @@ if [ "$gzfile" == "" ]; then
exit
1
fi
echo
"开始解压 gz 文件......"
pv
"
$gzfile
"
|
gunzip
-dc
>
"
$imgfile
"
if
[
-f
"
$imgfile
"
]
;
then
echo
"gz 固件已解压至
$imgfile
"
rm
$gzfile
else
echo
"gz 固件解压失败"
rm
$gzfile
cd
/root
rm
-rf
$workingdir
exit
1
if
!
[
"
$gzfile
"
==
""
]
;
then
echo
"开始解压 gz 文件......"
imgfile
=
"rom.img"
pv
"
$gzfile
"
|
gunzip
-dc
>
"
$imgfile
"
if
[
-f
"
$imgfile
"
]
;
then
echo
"gz 固件已解压至
$imgfile
"
rm
$gzfile
else
echo
"gz 固件解压失败"
rm
$gzfile
cd
/root
rm
-rf
$workingdir
exit
1
fi
fi
lodev
=
$(
losetup
-f
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录