Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmaports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
postmarketOS
pmaports
Commits
18ef03a3
Commit
18ef03a3
authored
3 years ago
by
tim
Browse files
Options
Downloads
Patches
Plain Diff
u-boot-rock64: new package
parent
95623b60
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
temp/u-boot-rock64/APKBUILD
+41
-0
41 additions, 0 deletions
temp/u-boot-rock64/APKBUILD
temp/u-boot-rock64/update-u-boot
+109
-0
109 additions, 0 deletions
temp/u-boot-rock64/update-u-boot
with
150 additions
and
0 deletions
temp/u-boot-rock64/APKBUILD
0 → 100644
+
41
−
0
View file @
18ef03a3
# U-boot RC built for rk3399, can be upstreamed to alpine soon when 2020.04 is released
pkgname
=
u-boot-rock64
pkgver
=
2021.07
pkgrel
=
0
pkgdesc
=
"u-boot bootloader for the rk3328"
url
=
"https://gitlab.com/u-boot/u-boot"
arch
=
"aarch64"
license
=
"GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
ISC LGPL-2.0-only LGPL-2.1-only X11"
makedepends
=
"
$depends_dev
bc dtc python3-dev swig bison flex openssl-dev arm-trusted-firmware"
options
=
"!check"
source
=
"
ftp://ftp.denx.de/pub/u-boot/u-boot-
${
pkgver
//_/-
}
.tar.bz2
update-u-boot
"
builddir
=
"
$srcdir
"
/u-boot-
${
pkgver
//_/-
}
build
()
{
touch
include/config.h
LC_ALL
=
C
date
+
'#define U_BOOT_DATE "%b %d %C%y"'
>
include/timestamp_autogenerated.h
LC_ALL
=
C
date
+
'#define U_BOOT_TIME "%T"'
>>
include/timestamp_autogenerated.h
export
BL31
=
"/usr/share/arm-trusted-firmware/rk3328/bl31.elf"
export
BUILD_DIR
=
"
$builddir
"
/build
mkdir
-p
"
$BUILD_DIR
"
make
O
=
"
$BUILD_DIR
"
HOSTCC
=
gcc
ARCH
=
arm rock64-rk3328_defconfig
make
O
=
"
$BUILD_DIR
"
HOSTCC
=
gcc
ARCH
=
arm all
}
package
()
{
install
-D
-m644
build/u-boot-rockchip.bin
\
"
$pkgdir
"
/usr/share/u-boot/pine64-rock64/u-boot-rockchip.bin
install
-D
-m755
"
$srcdir
"
/update-u-boot
"
$pkgdir
"
/usr/sbin/update-u-boot
}
sha512sums
=
"
210b206a4626feb0985580d9448a97b499b09bf9b9313ca847a66624785e9e9b0fae8f2e329acd344f5f75cb722d2093dd0ee394311ddd1fde05e400ee71a24d u-boot-2021.07.tar.bz2
5ffa497122f3fd23b0b1c055229d650895fd03ca415ba6fb6df2ba848023d523fc14caaaf13d5409cc4b03e73cb92493eac1d8952738376c46395de827cad509 update-u-boot
"
This diff is collapsed.
Click to expand it.
temp/u-boot-rock64/update-u-boot
0 → 100644
+
109
−
0
View file @
18ef03a3
#!/bin/sh
verbose
=
board
=
device
=
dryrun
=
imagedir
=
get_defaults
()
{
if
[
-z
"
$board
"
-a
-e
/sys/firmware/devicetree/base/compatible
]
;
then
case
"
$(
cat
/sys/firmware/devicetree/base/compatible 2>/dev/null
)
"
in
pine64,rock64
*
)
board
=
rock64
;;
esac
fi
if
[
-z
"
$device
"
]
;
then
case
"
$board
"
in
rockpro64
)
device
=
/dev/mmcblk2
;;
esac
fi
if
[
-z
"
$imagedir
"
]
;
then
imagedir
=
"
$(
realpath
$(
dirname
$0
))
"
[
-f
"
$imagedir
/README.txt"
]
||
imagedir
=
"/usr/share/u-boot"
fi
}
die
()
{
echo
"ERROR:
$@
"
exit
1
}
usage
()
{
get_defaults
cat
<<
EOF
usage:
$0
[-n,--dry-run] [-i,--imagedir <imagedir>] [-b|--board <board-type>] [-d|--device <device>]
options:
-b,--board <board> Specify the board type: rock64
(current default:
${
board
:-
none
}
)
-d,--device <device> Specify the device where to install u-boot
(current default:
${
device
:-
none
}
)
-i,--imagedir <imagedir> Specify u-boot image directory
(current default:
${
imagedir
:-
none
}
)
-n,--dry-run Print commands but don't execute them
EOF
}
while
[
$#
-gt
0
]
;
do
opt
=
"
$1
"
shift
case
"
$opt
"
in
-b
|
--board
)
case
"
$1
"
in
rock64
)
board
=
"rock64"
;;
*
)
usage
;
exit
1
;;
esac
shift
;;
-d
|
--device
)
device
=
"
$1
"
shift
;;
-i
|
--imagedir
)
imagedir
=
"
$1
"
shift
;;
-n
|
--dry-run
)
dryrun
=
"echo"
;;
--
)
break
;;
-
*
)
usage
exit
1
;;
esac
done
get_defaults
if
[
-z
"
$board
"
-o
-z
"
$device
"
-o
-z
"
$imagedir
"
-o
!
-e
"
$imagedir
"
]
;
then
usage
exit
1
fi
if
[
-z
"
$dryrun
"
]
;
then
echo
"Updating
$board
u-boot in
$device
in 3 seconds..."
sleep
3
fi
(
set
-e
case
"
$board
"
in
rock64
)
[
-e
"
$imagedir
/pine64-rock64/"
]
||
die
"rock64 images not installed, apk add u-boot-rock64"
$dryrun
dd
if
=
$imagedir
/pine64-rock64/u-boot-rockchip.bin
of
=
$device
bs
=
1024
seek
=
32
status
=
none
;;
esac
$dryrun
sync
)
||
die
"U-Boot installation in
$device
failed"
[
-z
"
$dryrun
"
]
&&
echo
"Completed successfully."
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