Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
f892bcdf
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f892bcdf
编写于
6月 06, 2020
作者:
A
AmadeusGhost
提交者:
GitHub
6月 06, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
treewide: adjust sysupgrade script (#4720)
This commit fix sysupgrade failed for bcm27xx.
上级
6ac928f1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
6 deletion
+16
-6
target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh
target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh
+8
-3
target/linux/bcm27xx/base-files/lib/upgrade/platform.sh
target/linux/bcm27xx/base-files/lib/upgrade/platform.sh
+8
-3
未找到文件。
target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh
浏览文件 @
f892bcdf
...
...
@@ -7,7 +7,7 @@ mbl_do_platform_check() {
[
"$#"
-gt
1
]
&&
return
1
export_bootdevice
&&
export_partdevice diskdev
0
||
{
export_bootdevice
&&
export_partdevice diskdev
-2
||
{
echo
"Unable to determine upgrade device"
return
1
}
...
...
@@ -36,7 +36,7 @@ mbl_do_platform_check() {
mbl_do_upgrade
()
{
local
diskdev partdev diff
export_bootdevice
&&
export_partdevice diskdev
0
||
{
export_bootdevice
&&
export_partdevice diskdev
-2
||
{
echo
"Unable to determine upgrade device"
return
1
}
...
...
@@ -70,6 +70,10 @@ mbl_do_upgrade() {
#iterate over each partition from the image and write it to the boot disk
while
read
part start size
;
do
# root is /dev/sd[a|b]2 and not /dev/sd[a|b] this causes some problem
# one of which is this offset, I'm not sure what's the best fix, so
# here's a WA.
let
part
=
$((
part
-
2
))
if
export_partdevice partdev
$part
;
then
echo
"Writing image to /dev/
$partdev
..."
get_image
"
$@
"
|
dd
of
=
"/dev/
$partdev
"
ibs
=
"512"
obs
=
1M
skip
=
"
$start
"
count
=
"
$size
"
conv
=
fsync
...
...
@@ -86,7 +90,8 @@ mbl_do_upgrade() {
mbl_copy_config
()
{
local
partdev
if
export_partdevice partdev 1
;
then
# Same as above /dev/sd[a|b]2 is root, so /boot is -1
if
export_partdevice partdev
-1
;
then
mount
-t
ext4
-o
rw,noatime
"/dev/
$partdev
"
/mnt
cp
-af
"
$CONF_TAR
"
/mnt/
umount /mnt
...
...
target/linux/bcm27xx/base-files/lib/upgrade/platform.sh
浏览文件 @
f892bcdf
...
...
@@ -9,7 +9,7 @@ platform_check_image() {
[
"$#"
-gt
1
]
&&
return
1
export_bootdevice
&&
export_partdevice diskdev
0
||
{
export_bootdevice
&&
export_partdevice diskdev
-2
||
{
echo
"Unable to determine upgrade device"
return
1
}
...
...
@@ -38,7 +38,7 @@ platform_check_image() {
platform_do_upgrade
()
{
local
diskdev partdev diff
export_bootdevice
&&
export_partdevice diskdev
0
||
{
export_bootdevice
&&
export_partdevice diskdev
-2
||
{
echo
"Unable to determine upgrade device"
return
1
}
...
...
@@ -72,6 +72,10 @@ platform_do_upgrade() {
#iterate over each partition from the image and write it to the boot disk
while
read
part start size
;
do
# root is /dev/sd[a|b]2 and not /dev/sd[a|b] this causes some problem
# one of which is this offset, I'm not sure what's the best fix, so
# here's a WA.
let
part
=
$((
part
-
2
))
if
export_partdevice partdev
$part
;
then
echo
"Writing image to /dev/
$partdev
..."
get_image
"
$@
"
|
dd
of
=
"/dev/
$partdev
"
ibs
=
"512"
obs
=
1M
skip
=
"
$start
"
count
=
"
$size
"
conv
=
fsync
...
...
@@ -88,7 +92,8 @@ platform_do_upgrade() {
platform_copy_config
()
{
local
partdev
if
export_partdevice partdev 1
;
then
# Same as above /dev/sd[a|b]2 is root, so /boot is -1
if
export_partdevice partdev
-1
;
then
mkdir
-p
/boot
[
-f
/boot/kernel.img
]
||
mount
-t
vfat
-o
rw,noatime
"/dev/
$partdev
"
/boot
cp
-af
"
$CONF_TAR
"
/boot/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录