Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
U
uboot-imx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Librem5
uboot-imx
Commits
3c208d95
Commit
3c208d95
authored
Jul 07, 2020
by
Guido Gunther
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add helper to update uboot
parent
8db94b49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
debian/bin/u-boot-install-librem5
debian/bin/u-boot-install-librem5
+39
-0
No files found.
debian/bin/u-boot-install-librem5
0 → 100755
View file @
3c208d95
#!/bin/sh
set
-e
dtmodel
=
"/sys/firmware/devicetree/base/model"
if
[
-z
"
$TARGET
"
]
&&
[
-f
"
${
dtmodel
}
"
]
;
then
case
$(
cat
"
${
dtmodel
}
"
)
in
"Purism Librem 5 devkit"
)
TARGET
=
"/usr/lib/u-boot/librem5_devkit"
;;
"Purism Librem 5"
)
TARGET
=
"/usr/lib/u-boot/librem5"
;;
*
)
echo
>
&2
"ERROR: Unknown system:
${
dtmodel
}
"
echo
>
&2
"Specify target: TARGET=/usr/lib/u-boot/UBOOT"
exit
1
;;
esac
fi
UBOOT_IMAGE
=
${
UBOOT_IMAGE
:-
"u-boot.imx"
}
DEV
=
"
$1
"
if
[
-z
"
$DEV
"
]
||
!
shift
||
[
-n
"
$*
"
]
;
then
echo
>
&2
"Usage:
$0
/dev/your-sd-or-mmc-or-image"
exit
1
fi
if
[
!
-w
"
$DEV
"
]
&&
[
-z
"
$FORCE
"
]
;
then
echo
>
&2
"
$0
: device/image (
$DEV
) must be writable"
exit
1
fi
echo
"Writing u-boot image"
dd
if
=
/dev/zero
of
=
"
$DEV
"
bs
=
1024
count
=
1055
seek
=
2
dd
if
=
"
${
TARGET
}
/
${
UBOOT_IMAGE
}
"
conv
=
notrunc
of
=
"
$DEV
"
bs
=
1024
seek
=
33
sync
"
$DEV
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment