Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
build
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
RAffT
build
Commits
b81fe049
Commit
b81fe049
authored
6 years ago
by
Igor Opaniuk
Committed by
Jérôme Forissier
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
poplar: use buildroot for creating initial rootfs
Signed-off-by:
Igor Opaniuk
<
igor.opaniuk@linaro.org
>
parent
53119b77
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
poplar.mk
+17
-85
17 additions, 85 deletions
poplar.mk
with
17 additions
and
85 deletions
poplar.mk
+
17
−
85
View file @
b81fe049
...
@@ -23,14 +23,12 @@ ARM_TF_BUILD ?= release
...
@@ -23,14 +23,12 @@ ARM_TF_BUILD ?= release
endif
endif
OUT_PATH
?=
$(
ROOT
)
/out
OUT_PATH
?=
$(
ROOT
)
/out
ROOTFS_BIN
?=
$(
ROOT
)
/out-br/images/rootfs.tar
ARM_TF_PATH
?=
$(
ROOT
)
/arm-trusted-firmware
ARM_TF_PATH
?=
$(
ROOT
)
/arm-trusted-firmware
LLOADER_PATH
?=
$(
ROOT
)
/l-loader
LLOADER_PATH
?=
$(
ROOT
)
/l-loader
UBOOT_PATH
?=
$(
ROOT
)
/u-boot
UBOOT_PATH
?=
$(
ROOT
)
/u-boot
OPTEE_PATH
?=
$(
ROOT
)
/optee_os
OPTEE_CLIENT_PATH
?=
$(
ROOT
)
/optee_client
OPTEE_CLIENT_EXPORT
?=
$(
OPTEE_CLIENT_PATH
)
/out/export
OPTEE_CLIENT_EXPORT
?=
$(
OPTEE_CLIENT_PATH
)
/out/export
OPTEE_
TEST_
PATH
?=
$(
ROOT
)
/optee_
test
OPTEE_PATH
?=
$(
ROOT
)
/optee_
os
LINUX_PATH
?=
$(
ROOT
)
/linux
LINUX_PATH
?=
$(
ROOT
)
/linux
TOOLS_PATH
?=
$(
ROOT
)
/poplar-tools
TOOLS_PATH
?=
$(
ROOT
)
/poplar-tools
...
@@ -45,22 +43,15 @@ OPTEE_BIN ?= $(OPTEE_PATH)/out/arm/core/tee-header_v2.bin
...
@@ -45,22 +43,15 @@ OPTEE_BIN ?= $(OPTEE_PATH)/out/arm/core/tee-header_v2.bin
OPTEE_BIN_EXTRA1
?=
$(
OPTEE_PATH
)
/out/arm/core/tee-pager_v2.bin
OPTEE_BIN_EXTRA1
?=
$(
OPTEE_PATH
)
/out/arm/core/tee-pager_v2.bin
OPTEE_BIN_EXTRA2
?=
$(
OPTEE_PATH
)
/out/arm/core/tee-pageable_v2.bin
OPTEE_BIN_EXTRA2
?=
$(
OPTEE_PATH
)
/out/arm/core/tee-pageable_v2.bin
ROOTFS_BIN
?=
linaro-stretch-developer-
*
.tar.gz
ROOTFS_URL
?=
https://releases.linaro.org/debian/images/developer-arm64/latest/
$(
ROOTFS_BIN
)
PKG_OPTEE_VERSION
?=
$(
shell
cd
$(
OPTEE_OS_PATH
)
&&
git describe
)
-0
PKG_PATH
?=
$(
OUT_PATH
)
/debpkg/optee_
$(
PKG_OPTEE_VERSION
)
PKG_USR_BIN
?=
$(
PKG_PATH
)
/usr/bin
PKG_CONTROL
?=
$(
PKG_PATH
)
/DEBIAN/control
################################################################################
################################################################################
# Targets
# Targets
################################################################################
################################################################################
.PHONY
:
all
.PHONY
:
all
all
:
u-boot arm-tf l-loader linux
rootfs
prepare-images
deb-package
| toolchains
all
:
u-boot arm-tf
buildroot
l-loader linux prepare-images | toolchains
.PHONY
:
clean
.PHONY
:
clean
clean
:
u-boot-clean arm-tf-clean l-loader-clean linux-clean optee-os-clean
clean
:
u-boot-clean arm-tf-clean l-loader-clean linux-clean optee-os-clean
\
buildroot-clean
################################################################################
################################################################################
# Toolchain
# Toolchain
...
@@ -91,24 +82,6 @@ u-boot: u-boot-config
...
@@ -91,24 +82,6 @@ u-boot: u-boot-config
u-boot-clean
:
u-boot-clean
:
cd
$(
UBOOT_PATH
)
&&
git clean
-xdf
cd
$(
UBOOT_PATH
)
&&
git clean
-xdf
################################################################################
# OP-TEE client
################################################################################
.PHONY
:
optee-client
optee-client
:
optee-client-common
.PHONY
:
optee-client-clean
optee-client-clean
:
optee-client-common-clean
################################################################################
# OP-TEE xtest
################################################################################
.PHONY
:
xtest
xtest
:
xtest-common
.PHONY
:
xtest-clean
xtest-clean
:
xtest-clean-common
################################################################################
################################################################################
# ARM Trusted Firmware
# ARM Trusted Firmware
################################################################################
################################################################################
...
@@ -153,17 +126,6 @@ l-loader: arm-tf
...
@@ -153,17 +126,6 @@ l-loader: arm-tf
l-loader-clean
:
l-loader-clean
:
cd
$(
LLOADER_PATH
)
&&
git clean
-xdf
cd
$(
LLOADER_PATH
)
&&
git clean
-xdf
################################################################################
# rootfs
################################################################################
.PHONY
:
rootfs
rootfs
:
@
wget
-nc
-P
$(
OUT_PATH
)
$(
ROOTFS_URL
)
.PHONY
:
rootfs-clean
rootfs-clean
:
rm
-f
$(
ROOTFS_BIN
)
################################################################################
################################################################################
# Linux
# Linux
################################################################################
################################################################################
...
@@ -193,45 +155,23 @@ LINUX_CLEANER_COMMON_FLAGS += ARCH=arm64
...
@@ -193,45 +155,23 @@ LINUX_CLEANER_COMMON_FLAGS += ARCH=arm64
linux-cleaner
:
linux-cleaner-common
linux-cleaner
:
linux-cleaner-common
################################################################################
# Build package
################################################################################
.PHONY
:
deb-package
deb-package
:
xtest optee-client
mkdir
-p
$(
PKG_PATH
)
/usr/lib/aarch64-linux-gnu
mkdir
-p
$(
PKG_USR_BIN
)
mkdir
-p
$(
PKG_PATH
)
/lib/optee_armtz
mkdir
-p
$(
PKG_PATH
)
/DEBIAN
cp
-f
$(
OPTEE_CLIENT_EXPORT
)
/bin/tee-supplicant
$(
PKG_USR_BIN
)
cp
-f
$(
OPTEE_TEST_PATH
)
/out/xtest/xtest
$(
PKG_USR_BIN
)
cp
-f
$(
OPTEE_CLIENT_EXPORT
)
/lib/libtee
*
$(
PKG_PATH
)
/usr/lib/aarch64-linux-gnu
find
$(
OPTEE_TEST_PATH
)
/out/ta
-name
"*.ta"
-exec
cp
{}
$(
PKG_PATH
)
/lib/optee_armtz
\;
echo
"Package: op-tee"
>
$(
PKG_CONTROL
)
echo
"Version:
$(
PKG_OPTEE_VERSION
)
"
>>
$(
PKG_CONTROL
)
echo
"Section: base"
>>
$(
PKG_CONTROL
)
echo
"Priority: optional"
>>
$(
PKG_CONTROL
)
echo
"Architecture: arm64"
>>
$(
PKG_CONTROL
)
echo
"Depends:"
>>
$(
PKG_CONTROL
)
echo
"Maintainer: OP-TEE <op-tee@linaro.org>"
>>
$(
PKG_CONTROL
)
echo
"Description: OP-TEE client binaries, test program and Trusted Applications"
>>
$(
PKG_CONTROL
)
echo
" Package contains tee-supplicant, libtee.so, xtest and a set of"
>>
$(
PKG_CONTROL
)
echo
" Trusted Applications."
>>
$(
PKG_CONTROL
)
echo
" NOTE! This package should only be used for testing and development."
>>
$(
PKG_CONTROL
)
echo
""
dpkg-deb
--build
$(
PKG_PATH
)
################################################################################
# Prepare images
################################################################################
.PHONY
:
prepare-images
.PHONY
:
prepare-images
prepare-images
:
linux l-loader root
fs
prepare-images
:
linux l-loader
build
root
@
cp
$(
TOOLS_PATH
)
/poplar_recovery_builder.sh
$(
OUT_PATH
)
@
cp
$(
TOOLS_PATH
)
/poplar_recovery_builder.sh
$(
OUT_PATH
)
@
cp
$(
LLOADER_BIN
)
$(
OUT_PATH
)
@
cp
$(
LLOADER_BIN
)
$(
OUT_PATH
)
@
cp
$(
LINUX_PATH
)
/arch/arm64/boot/Image
$(
OUT_PATH
)
@
cp
$(
LINUX_PATH
)
/arch/arm64/boot/Image
$(
OUT_PATH
)
@
cp
$(
LINUX_DTB
)
$(
OUT_PATH
)
@
cp
$(
LINUX_DTB
)
$(
OUT_PATH
)
@
cd
$(
OUT_PATH
)
&&
\
@
cd
$(
OUT_PATH
)
&&
PATH
=
$(
UBOOT_PATH
)
/tools:
$$
PATH
\
PATH
=
$(
UBOOT_PATH
)
/tools:
$$
PATH
\
bash ./poplar_recovery_builder.sh all
"
$(
ROOTFS_BIN
)
"
bash ./poplar_recovery_builder.sh all
"
$(
ROOTFS_BIN
)
"
################################################################################
# Buildroot/RootFS
################################################################################
.PHONY
:
update_rootfs
update_rootfs
:
arm-tf u-boot
.PHONY
:
buildroot
buildroot
:
update_rootfs
################################################################################
################################################################################
# Flash images
# Flash images
...
@@ -281,11 +221,3 @@ flash-help:
...
@@ -281,11 +221,3 @@ flash-help:
@
echo
""
@
echo
""
@
echo
" => reset"
@
echo
" => reset"
@
echo
""
@
echo
""
@
echo
"9. Upload deb package using SCP (run on your host PC):"
@
echo
""
@
echo
"
$$
scp optee_
${
PKG_OPTEE_VERSION
}
.deb linaro@192.168.0.2:/tmp"
@
echo
""
@
echo
"10. Install package (run on Poplar board in bash shell):"
@
echo
""
@
echo
"
$$
cd /tmp && dpkg --force-all -i optee*.deb"
@
echo
""
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