Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-system-image
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
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reform
reform-system-image
Commits
40d78aac
Commit
40d78aac
authored
3 years ago
by
minute
Browse files
Options
Downloads
Patches
Plain Diff
reform-display-config: add eMMC support
parent
74daec27
No related branches found
Branches containing commit
No related tags found
1 merge request
!25
MNT Reform System Image v2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reform2-imx8mq/reform-tools_1.0-7/usr/sbin/reform-display-config
+19
-8
19 additions, 8 deletions
...-imx8mq/reform-tools_1.0-7/usr/sbin/reform-display-config
with
19 additions
and
8 deletions
reform2-imx8mq/reform-tools_1.0-7/usr/sbin/reform-display-config
+
19
−
8
View file @
40d78aac
...
...
@@ -9,8 +9,18 @@ fi
DTB
=
"x"
DTB_TARGET
=
"imx8mq-mnt-reform2.dtb"
CHOICE
=
"
$1
"
BOOTPART
=
"mmcblk1p1"
BOOTDISK
=
"SD card"
case
"
$1
"
in
if
[[
"--emmc"
==
"
$1
"
]]
then
CHOICE
=
"
$2
"
BOOTPART
=
"mmcblk0p1"
BOOTDISK
=
"eMMC"
fi
case
"
$CHOICE
"
in
dual
)
DTB
=
"imx8mq-mnt-reform2-dual-display.dtb"
;;
single
)
DTB
=
"imx8mq-mnt-reform2-single-display.dtb"
;;
esac
...
...
@@ -18,12 +28,13 @@ esac
if
[[
"
$DTB
"
==
"x"
]]
then
echo
"Usage: "
echo
" reform-display-config dual Select dual-display support (internal + HDMI)."
echo
" reform-display-config single Select only internal display (turns off HDMI)."
echo
" reform-display-config dual Select dual-display support (internal + HDMI)."
echo
" reform-display-config single Select only internal display (turns off HDMI)."
echo
" reform-display-config --emmc dual|single Record choice on eMMC."
exit
fi
MOUNTED_AT
=
$(
mount |
grep
mmcblk1p1
|
grep
"on /"
|
cut
-d
' '
-s
-f
3
)
MOUNTED_AT
=
$(
mount |
grep
$BOOTPART
|
grep
"on /"
|
cut
-d
' '
-s
-f
3
)
if
[[
"x
$MOUNTED_AT
"
!=
"x"
]]
then
if
[[
-e
"
${
MOUNTED_AT
}
/
${
DTB_TARGET
}
"
]]
&&
[[
-e
"
${
MOUNTED_AT
}
/
${
DTB
}
"
]]
...
...
@@ -34,17 +45,17 @@ then
exit
fi
echo
"Error: the
SD card
is already mounted at
$MOUNTED_AT
, but the DTB files (
$DTB_TARGET
and
$DTB
) are not there."
echo
"Error: the
$BOOTDISK
is already mounted at
$MOUNTED_AT
, but the DTB files (
$DTB_TARGET
and
$DTB
) are not there."
exit
fi
echo
"Assuming boot files are on
SD card
, but your system is not. Mounting /dev/
mmcblk1p1
on /boot."
echo
"Assuming boot files are on
$BOOTDISK
, but your system is not. Mounting /dev/
$BOOTPART
on /boot."
mount /dev/
mmcblk1p1
/boot
mount /dev/
$BOOTPART
/boot
if
[[
-e
"/boot/
$DTB_TARGET
"
]]
&&
[[
-e
"/boot/
$DTB
"
]]
then
echo
"Found source and target files in
/boot
."
echo
"Found source and target files in
the root directory of
$BOOTPART
."
cp
-v
"/boot/
$DTB
"
"/boot/
$DTB_TARGET
"
echo
"Restart MNT Reform (type: reboot) after saving your work to activate the changes."
umount /boot
...
...
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