Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

feat(endpoint): Improve endpoint build instructions #674

Merged
merged 1 commit into from
Jun 23, 2020

Conversation

splasky
Copy link
Contributor

@splasky splasky commented Jun 9, 2020

This commit adds the build instructions for generating endpoint test
or app with different target. For compatibility with legato framework,
we use the GNU Make build system to build endpoint. Use "make legato"
to generate endpoint app.

The macro TARGET intends to the target to generate. The default TARGET
is the platform on your development host. Set the TARGET like
TARGET=wp77xx to generate specific platform endpoint app.

The macro ENABLE_ENDPOINT_TEST is for generating the endpoint app in test mode.
Set ENABLE_ENDPOINT_TEST=true to enable generating test mode endpoint app.

The endpoint uses the sierra framework as based runtime system.
Developers need to set up the sierra development environment
to build endpoint as specific target. See docs/endpoint.md for
more information.

The default port has been modified to pass the test on buildkite.

Close #591

@splasky splasky requested a review from marktwtn June 9, 2020 08:26
@jserv jserv changed the title feat(endpoint): Provide endpoint build process feat(endpoint): Improve endpoint build instructions Jun 9, 2020
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
@splasky splasky force-pushed the 591 branch 2 times, most recently from cf4edef to 6a1fdee Compare June 10, 2020 02:50
Makefile Outdated Show resolved Hide resolved
@splasky splasky force-pushed the 591 branch 3 times, most recently from aca7793 to 8b506e9 Compare June 11, 2020 03:57
Makefile Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
endpoint/BUILD Outdated Show resolved Hide resolved
@splasky splasky force-pushed the 591 branch 3 times, most recently from 6d1473e to 6af9628 Compare June 15, 2020 01:39
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
@splasky splasky force-pushed the 591 branch 3 times, most recently from 4fd9965 to 3cdc03e Compare June 15, 2020 03:34
@splasky splasky marked this pull request as ready for review June 15, 2020 04:07
Makefile Outdated Show resolved Hide resolved
@splasky splasky force-pushed the 591 branch 2 times, most recently from 21e3833 to 4818252 Compare June 15, 2020 04:25
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
@splasky splasky force-pushed the 591 branch 2 times, most recently from c46d81b to c7b244e Compare June 22, 2020 03:16
docs/endpoint.md Outdated Show resolved Hide resolved
@splasky splasky force-pushed the 591 branch 3 times, most recently from 323ee43 to 081bc30 Compare June 22, 2020 11:05
Makefile Outdated
@@ -36,7 +52,15 @@ legato: cert
# which can not be downloaded when the 'fetch' option is used.
bazel --output_base=$(OUTPUT_BASE_DIR) build //endpoint:libendpoint.so
# Generate endpoint Legato app
(cd endpoint && leaf shell -c "mkapp -v -t wp77xx endpoint.adef")
ifeq ($(TARGET), development_host)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the consistent indention.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must be space, not tab.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By using define directives, you can customize commands which would be placed around here.
Check this: http://www.chiark.greenend.org.uk/doc/make-doc/make.html/Using-Variables.html

Copy link
Member

@jserv jserv Jun 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, F9 microkernel invokes platform-specific flash command in flexible ways: https://github.com/f9micro/f9-kernel/blob/master/mk/generic.mk#L79
File platform/*/build.mk defines platform-flash-command accordingly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always write down elegant and pretty code.

@jserv
Copy link
Member

jserv commented Jun 23, 2020

Check CI pipeline.

docs/endpoint.md Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Show resolved Hide resolved
docs/endpoint.md Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
docs/endpoint.md Outdated Show resolved Hide resolved
endpoint/platform/simulator/build.mk Outdated Show resolved Hide resolved
endpoint/platform/wp77xx/build.mk Outdated Show resolved Hide resolved
This commit adds the build instructions for generating endpoint test
or app with different target. For compatibility with legato framework,
we use the GNU Make build system to build endpoint. Use "make legato"
to generate endpoint app.

The macro TARGET intends to the target platform. The default TARGET
is the platform on your development host. Set the TARGET like
TARGET=wp77xx to generate specific platform endpoint app.

The macro ENABLE_ENDPOINT_TEST is for generating the endpoint
app in test mode. Set ENABLE_ENDPOINT_TEST=true to enable
generating test mode endpoint app.

The endpoint uses the sierra framework as based runtime system.
Developers need to set up the sierra development environment
to build endpoint as specific target. See docs/endpoint.md for
more information.

Close DLTcollab#591
@jserv jserv merged commit 3ac2bb3 into DLTcollab:develop Jun 23, 2020
@splasky splasky deleted the 591 branch June 24, 2020 02:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI/CD(endpoint): Set up Legato-friendly CI/CD environment
4 participants