Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
targets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feed
targets
Commits
788ca8e4
Commit
788ca8e4
authored
1 year ago
by
Mikhail Kshevetskiy
Browse files
Options
Downloads
Patches
Plain Diff
airoha: pass bootloader device to iopsys_do_upgrade in eMMC case
parent
cf58c44a
No related branches found
No related tags found
1 merge request
!1239
airoha: eMMC support fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
airoha/base-files/lib/upgrade/platform.sh
+22
-1
22 additions, 1 deletion
airoha/base-files/lib/upgrade/platform.sh
with
22 additions
and
1 deletion
airoha/base-files/lib/upgrade/platform.sh
+
22
−
1
View file @
788ca8e4
...
...
@@ -9,7 +9,28 @@ platform_do_upgrade() {
return
1
fi
iopsys_do_upgrade
"
$1
"
||
return
local
boot_dev
=
""
case
"
$(
get_root_device_type
)
"
in
emmc
)
# search for device-mapper devices with specified name
local dir
local
name
=
'u-boot'
for
dir
in
/sys/block/dm-
*
;
do
grep
-qFx
"
${
name
}
"
"
${
dir
}
/dm/name"
2>/dev/null
||
continue
;
boot_dev
=
$(
grep
'^DEVNAME='
"
${
dir
}
/uevent"
|
sed
's|^DEVNAME=|/dev/|'
)
break
done
if
[
-z
"
${
boot_dev
}
"
]
;
then
log sysupgrade
"ERROR: unable to determine boot device."
return
1
fi
;;
*
)
;;
esac
iopsys_do_upgrade
"
$1
"
"
${
boot_dev
}
"
||
return
}
# Tell the bootloader to boot from flash "bank" $1 next time.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment