summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 042f4b180c2890a05ab0c6a2ab22909424e906af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# **README.md for the 'meta-agl' layer**

**See README-AGL.md for general information about Automotive Grade Linux.**

## meta-agl, the core layer for Automotive Grade Linux Distribution

AGL is creating an automotive specific Linux distribution that unifies
the software that has been written in a number of places already,
such as GENIVI and Tizen IVI.

The layer 'meta-agl' provides a minimal set of software
to boot system of AGL Distribution. 'meta-agl' is the minimal
core which is used build AGL profiles on top of it.

Especially there is no reference UI included which is part of 'meta-agl-demo'.

Additional components like the security framework are part of 'meta-agl-extra'.

The AGL community appreciates feedback, ideas, suggestion, bugs and
documentation just as much as code. Please join the irc conversation
at the #automotive channel on irc.freenode.net and our mailing list.

For infomation for subscribing to the mailing list
    [automotive-discussions](http://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions)
For information about AGL Distribution, see the
    [AGL Distribution](https://wiki.automotivelinux.org/agl-distro)
For information abount Getting started with AGL
    [here](https://wiki.automotivelinux.org/start/getting-started)
For information about contributing to the AGL Distro
    [here](https://wiki.automotivelinux.org/agl-distro/contributing)

## Quick start guide

See README-AGL.md

## 'meta-agl' Layer Dependencies

* poky
  > URI: git://git.yoctoproject.org/poky
  > branch         : jethro
  > tested revision: 40376446904ae3529be41737fed9a0b650ed167d

* meta-openembedded
  > URI: git://git.openembedded.org/meta-openembedded
  > layer          : meta-openembedded
  > branch         : jethro
  > tested revision: 8ab04afbffb4bc5184cfe0655049de6f44269990

Specifically out of meta-openembedded these sub-layers are used:

* meta-openembedded/meta-oe
* meta-openembedded/meta-multimedia
* meta-openembedded/meta-networking
* meta-openembedded/meta-python

## Layers

There are 5 layers in top-level `meta-agl`.

* `meta-agl/meta-ivi-common`\
  `meta-ivi-common` is a layer which contains common packages to AGL
  Distribution and other platforms for In-Vehicle Infotainment system.
* `meta-agl/meta-agl`\
  `meta-agl` is a layer which contains AGL common and middleware packages.
* `meta-agl/meta-agl-bsp`\
  `meta-agl-bsp` is a layer which contains required packages to boot AGL
  distribution on an emulated machine(QEMU).
* `meta-agl/meta-netboot`\
  `meta-netboot` contains the netboot initrd support recipes. This is needed
  in case of booting over the network as NFS does not support the securitylabels.

## Packagegroups

AGL package group design:

* packagegroup-agl-image-minimal

        packagegroup-agl-core-automotive.bb
        packagegroup-agl-core-connectivity.bb
        packagegroup-agl-core-graphics.bb
        packagegroup-agl-core-kernel.bb
        packagegroup-agl-core-multimedia.bb
        packagegroup-agl-core-navi-lbs.bb
        packagegroup-agl-core-os-commonlibs.bb
        packagegroup-agl-core-security.bb
        packagegroup-agl-core-speech-services.bb

These are for making image ``agl-image-minimal`` which is small image just
capable of allowing a device to boot.

Subsystem should maintain packagegroup-agl-core-[subsystem].bb which should
hold sufficient packages to build ``agl-image-minimal``.

* packagegroup-agl-image-ivi

        packagegroup-agl-ivi-automotive.bb
        packagegroup-agl-ivi-connectivity.bb
        packagegroup-agl-ivi-graphics.bb
        packagegroup-agl-ivi-kernel.bb
        packagegroup-agl-ivi-multimedia.bb
        packagegroup-agl-ivi-navi-lbs.bb
        packagegroup-agl-ivi-os-commonlibs.bb
        packagegroup-agl-ivi-security.bb
        packagegroup-agl-ivi-speech-services.bb

These are for making image ``agl-image-ivi`` which is baseline for the profiles
of AGL distro. 'Baseline' means Service Layer and Operating System Layer defined
in AGL Spec v1.0.

* packagegroup-agl-test.bb

Additional tools used in QA tests (for agl-image*-qa).

* packagegroup-ivi-common*

        packagegroup-ivi-common-core-automotive.bb
        packagegroup-ivi-common-core.bb
        packagegroup-ivi-common-core-connectivity.bb
        packagegroup-ivi-common-core-graphics.bb
        packagegroup-ivi-common-core-kernel.bb
        packagegroup-ivi-common-core-multimedia.bb
        packagegroup-ivi-common-core-navi-lbs.bb
        packagegroup-ivi-common-core-os-commonlibs.bb
        packagegroup-ivi-common-core-security.bb
        packagegroup-ivi-common-core-speech-services.bb
        packagegroup-ivi-common-test.bb

These are for picking up some packages from upstreams like GENIVI/Tizen/Others.
The layer of ``meta-ivi-common`` has no image to build, all packagegroups are
aggregated to ``packagegroup-ivi-common-core' and it is included by images,
``agl-image-ivi.bb`` and ``agl-demo-platform.bb``.

## Supported Machines

See [docs.automotivelinux.org](http://docs.automotivelinux.org)
span class="nv">mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) ROOT_SRCDIR := $(patsubst %/,%,$(dir $(mkfile_path))) ROOT_GOPRJ := $(abspath $(ROOT_SRCDIR)/../../../../../..) LOCAL_BINDIR := $(ROOT_SRCDIR)/bin LOCAL_TOOLSDIR := $(ROOT_SRCDIR)/tools/${HOST_GOOS} PACKAGE_DIR := $(ROOT_SRCDIR)/package export GOPATH := $(shell go env GOPATH):$(ROOT_GOPRJ) export PATH := $(PATH):$(LOCAL_TOOLSDIR) # Check Go version GOVERSION := $(shell go version |grep -o '[0-9\.]*'|head -n 1) GOVERMAJ := $(shell echo $(GOVERSION) |cut -f1 -d.) GOVERMIN := $(shell echo $(GOVERSION) |cut -f2 -d.) CHECKGOVER := $(shell [ $(GOVERMAJ) -gt 1 -o \( $(GOVERMAJ) -eq 1 -a $(GOVERMIN) -ge 8 \) ] && echo true) CHECKERRMSG := "ERROR: Go version 1.8.1 or higher is requested (current detected version: $(GOVERSION))." VERBOSE_1 := -v VERBOSE_2 := -v -x # Release or Debug mode ifeq ($(filter 1,$(RELEASE) $(REL)),) GO_LDFLAGS= # disable compiler optimizations and inlining GO_GCFLAGS=-N -l BUILD_MODE="Debug mode" WEBAPP_BUILD_RULE=build else # optimized code without debug info GO_LDFLAGS=-s -w GO_GCFLAGS= BUILD_MODE="Release mode" WEBAPP_BUILD_RULE=build:prod endif ifeq ($(SUB_VERSION), ) PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(VERSION).zip else # only use dot as separator to allow rpm packaging (see version .spec file) PK_VER := $(subst _,.,$(subst -,,$(VERSION))) PK_SBVER := $(subst _,.,$(subst -,,$(SUB_VERSION))) PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(PK_VER).$(PK_SBVER).zip endif all: tools/syncthing build .PHONY: build build: checkgover vendor xds webapp xds: scripts tools/syncthing/copytobin @echo "### Build XDS server (version $(VERSION), subversion $(SUB_VERSION)) - $(BUILD_MODE)"; @cd $(ROOT_SRCDIR); $(BUILD_ENV_FLAGS) go build $(VERBOSE_$(V)) -i -o $(LOCAL_BINDIR)/$(TARGET)$(EXT) -ldflags "$(GO_LDFLAGS) -X main.AppVersion=$(VERSION) -X main.AppSubVersion=$(SUB_VERSION)" -gcflags "$(GO_GCFLAGS)" . test: tools/glide go test --race $(shell $(LOCAL_TOOLSDIR)/glide novendor) vet: tools/glide go vet $(shell $(LOCAL_TOOLSDIR)/glide novendor) fmt: tools/glide go fmt $(shell $(LOCAL_TOOLSDIR)/glide novendor) run: build/xds tools/syncthing/copytobin $(LOCAL_BINDIR)/$(TARGET)$(EXT) --log info $(XDS_SERVER_RUN_ARGS) debug: build/xds tools/syncthing/copytobin $(LOCAL_BINDIR)/$(TARGET)$(EXT) --log debug $(XDS_SERVER_DEBUG_ARGS) .PHONY: clean clean: rm -rf $(LOCAL_BINDIR)/* $(ROOT_SRCDIR)/debug $(ROOT_GOPRJ)/pkg/*/$(REPOPATH) $(PACKAGE_DIR) .PHONY: distclean distclean: clean (cd $(ROOT_SRCDIR) && rm -rf $(LOCAL_BINDIR) ./tools ./glide.lock ./vendor ./*.zip ./webapp/dist ./webapp/node_modules) webapp: webapp/install mkdir -p $(ROOT_SRCDIR)/webapp/dist $(ROOT_SRCDIR)/webapp/dist/fonts (cd $(ROOT_SRCDIR)/webapp && cp -a ./assets ./src/index.html ./node_modules/font-awesome/css/font-awesome.min.css ./dist/) (cd $(ROOT_SRCDIR)/webapp && cp -a ./node_modules/font-awesome/fonts/* ./dist/fonts/) webapp/install: (cd webapp && npm install) @[ -d ${DESTDIR}/usr ] && { echo "Removing unwanted ${DESTDIR}/usr directory"; rm -rf ${DESTDIR}/usr; } .PHONY: scripts scripts: @mkdir -p $(LOCAL_BINDIR) && cp -rf scripts/xds-utils scripts/sdks $(LOCAL_BINDIR) .PHONY: conffile conffile: cat $(ROOT_SRCDIR)/conf.d/etc/xds/server/server-config.json \ | sed -e s,"www","$(DESTDIR_WWW)",g \ > $(DESTDIR)/server-config.json.in .PHONY: install install: @test -e $(LOCAL_BINDIR)/xds-server$(EXT) -a -d webapp/dist || { echo "Please execute first: make all"; exit 1; } @test -d $(LOCAL_BINDIR)/xds-utils || { echo "Please execute first: make all"; exit 1; } @test -e $(LOCAL_BINDIR)/syncthing$(EXT) -a -e $(LOCAL_BINDIR)/syncthing-inotify$(EXT) || { echo "Please execute first: make all"; exit 1; } mkdir -p $(DESTDIR) \ && cp -a $(LOCAL_BINDIR)/* $(DESTDIR) mkdir -p $(DESTDIR_WWW) \ && cp -a webapp/dist/* $(DESTDIR_WWW) .PHONY: _package _package: clean make -f $(ROOT_SRCDIR)/Makefile all install DESTDIR=$(PACKAGE_DIR)/xds-server make -f $(ROOT_SRCDIR)/Makefile conffile DESTDIR=$(PACKAGE_DIR)/xds-server DESTDIR_WWW=www cp -r $(ROOT_SRCDIR)/conf.d $(PACKAGE_DIR)/xds-server rm -f $(ROOT_SRCDIR)/$(PACKAGE_ZIPFILE) (cd $(PACKAGE_DIR) && zip -r $(ROOT_SRCDIR)/$(PACKAGE_ZIPFILE) ./xds-server) # On support Linux for now .PHONY: package package: @echo "# Build linux amd64..." GOOS=linux GOARCH=amd64 RELEASE=1 make -f $(ROOT_SRCDIR)/Makefile _package make -f $(ROOT_SRCDIR)/Makefile clean .PHONY: package-all package-all: package vendor: tools/glide glide.yaml $(LOCAL_TOOLSDIR)/glide install --strip-vendor vendor/debug: vendor (cd vendor/gerrit.automotivelinux.org/gerrit/src/xds && \ rm -rf xds-common.git && ln -s ../../../../../../xds-common xds-common.git ) .PHONY: tools/glide tools/glide: @test -f $(LOCAL_TOOLSDIR)/glide || { \ echo "Downloading glide"; \ mkdir -p $(LOCAL_TOOLSDIR); \ curl --silent --connect-timeout 60 --retry 3 -L https://glide.sh/get | GOBIN=$(LOCAL_TOOLSDIR) sh; \ } .PHONY: tools/syncthing tools/syncthing: @test -e $(LOCAL_TOOLSDIR)/syncthing$(EXT) -a -e $(LOCAL_TOOLSDIR)/syncthing-inotify$(EXT) || { \ mkdir -p $(LOCAL_TOOLSDIR); \ DESTDIR=$(LOCAL_TOOLSDIR) \ SYNCTHING_VERSION=$(SYNCTHING_VERSION) \ SYNCTHING_INOTIFY_VERSION=$(SYNCTHING_INOTIFY_VERSION) \ ./scripts/xds-utils/get-syncthing.sh; } .PHONY: tools/syncthing/copytobin: @test -e $(LOCAL_TOOLSDIR)/syncthing$(EXT) -a -e $(LOCAL_TOOLSDIR)/syncthing-inotify$(EXT) || { echo "Please execute first: make tools/syncthing\n"; exit 1; } @mkdir -p $(LOCAL_BINDIR) @cp -f $(LOCAL_TOOLSDIR)/syncthing$(EXT) $(LOCAL_TOOLSDIR)/syncthing-inotify$(EXT) $(LOCAL_BINDIR) .PHONY: checkgover: @test "$(CHECKGOVER)" = "true" || { echo $(CHECKERRMSG); exit 1; } .PHONY: help help: @echo "Main supported rules:" @echo " all (default)" @echo " build" @echo " package" @echo " install" @echo " clean" @echo " distclean" @echo "" @echo "Influential make variables:" @echo " V - Build verbosity {0,1,2}." @echo " BUILD_ENV_FLAGS - Environment added to 'go build'."