Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
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-boundary-uboot
Commits
6879ad68
Commit
6879ad68
authored
6 years ago
by
Gary Bisson
Committed by
Troy Kisky
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
boundary: bootscripts: upgrade: add i.MX8MQ support
Signed-off-by:
Gary Bisson
<
gary.bisson@boundarydevices.com
>
parent
388a233f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
board/boundary/bootscripts/upgrade.txt
+47
-1
47 additions, 1 deletion
board/boundary/bootscripts/upgrade.txt
with
47 additions
and
1 deletion
board/boundary/bootscripts/upgrade.txt
+
47
−
1
View file @
6879ad68
...
...
@@ -7,6 +7,7 @@ offset=0x400
erase_size=0xC0000
qspi_offset=0x0
a_base=0x12000000
block_size=0x200
if itest.s x51 == "x${imx_cpu}"; then
a_base=0x92000000
...
...
@@ -14,6 +15,9 @@ elif itest.s x53 == "x${imx_cpu}"; then
a_base=0x72000000
elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
a_base=0x82000000
elif itest.s x8MQ == "x${imx_cpu}"; then
a_base=0x42000000
offset=0x8400
fi
qspi_match=1
...
...
@@ -25,6 +29,47 @@ setexpr a_script ${a_base}
setenv stdout serial,vga
if itest.s "x${sfname}" == "x" ; then
# U-Boot resides in (e)MMC
if itest.s "x${env_dev}" == "x" || itest.s "x${env_part}" == "x"; then
echo "Please set env_dev/part to the appropriate values"
exit
fi
# Load bootloader binary for this board
if ${fs}load ${devtype} ${devnum}:${distro_bootpart} ${a_uImage1} u-boot.$uboot_defconfig ; then
else
echo "File u-boot.$uboot_defconfig not found on SD card" ;
exit
fi
# Compute block count for filesize and offset
setexpr cntfile ${filesize} / ${block_size}
setexpr cntoffset ${offset} / ${block_size}
# Select media partition (if different from main partition)
mmc dev ${env_dev} ${env_part}
# Read and compare current U-Boot
mmc read ${a_uImage2} ${cntoffset} ${cntfile}
if cmp.b ${a_uImage1} ${a_uImage2} ${filesize} ; then
echo "------- U-Boot versions match" ;
exit ;
fi
echo "Need U-Boot upgrade" ;
echo "Program in 5 seconds" ;
for n in 5 4 3 2 1 ; do
echo $n ;
sleep 1 ;
done
mmc write ${a_uImage1} ${cntoffset} ${cntfile}
# Switch back to main eMMC partition (to avoid confusion)
mmc dev ${env_dev}
else
# U-Boot resides in NOR flash
if sf probe || sf probe || sf probe 1 27000000 || sf probe 1 27000000 ; then
echo "probed SPI ROM" ;
else
...
...
@@ -152,7 +197,8 @@ if itest.s "x" != "x${next}" ; then
echo "${next} not found on ${devtype} ${devnum}:${distro_bootpart}"
fi
fi
fi
while echo "---- U-Boot upgraded.
reset
" ; do
while echo "---- U-Boot upgraded.
Please reset the board
" ; do
sleep 120
done
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