Skip to content

Commit c110d94

Browse files
committed
build: Build all YIO components from GitHub source
All YIO components are now built from their GitHub repository sources, and no longer downloaded as binary releases. Not only is this more "Buildroot style", but also allows to adapt to new Qt versions more quickly or use other build environments.
1 parent bdb24b4 commit c110d94

File tree

51 files changed

+316
-483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+316
-483
lines changed

README.md

+35-93
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,32 @@ See dedicated [docker-build project](https://github.com/YIO-Remote/docker-build)
3737

3838
### Linux
3939

40-
The build process has been tested on Ubuntu 18.04.3, 19.04 and 19.10. Other Linux distributions should work as well.
40+
The build process has been tested on Ubuntu 18.04.3, and 20.04. Other Linux distributions should work as well.
4141

4242
#### Prepare Build Environment
4343

4444
The minimal [Ubuntu 18.04.3 LTS Server](http://cdimage.ubuntu.com/releases/18.04.3/release/) version is well suited for a headless build VM. Use a desktop version if the VM should also be used for Qt development with Qt Creator.
4545

4646
Install required tools:
4747

48-
1. Prepare Ubuntu to build the Buildroot toolchain:
48+
1. Prepare Ubuntu to build the Buildroot toolchain and compile the YIO Qt projects:
4949

5050
sudo apt-get install \
5151
build-essential \
52+
bzip2 \
5253
g++ \
54+
gdb-multiarch \
5355
gettext \
54-
patch \
5556
git \
57+
libavahi-client-dev \
58+
libgl1-mesa-dev \
5659
libncurses5-dev \
5760
libtool \
5861
npm \
62+
patch \
5963
python \
64+
rsync \
65+
tar \
6066
texinfo \
6167
unzip \
6268
screen \
@@ -66,12 +72,6 @@ Install required tools:
6672

6773
2. Optional: install Qt with the [Qt online installer](https://www.qt.io/download-open-source).
6874

69-
3. Optional: dependencies for Qt development and building Linux target in Qt Creator:
70-
71-
sudo apt-get install \
72-
libavahi-client-dev \
73-
libgl1-mesa-dev
74-
7575
## Build SD Card Image
7676

7777
Checkout project:
@@ -123,32 +123,32 @@ Individual YIO components can be selected or deselected within menuconfig:
123123
Navigate to: External options -> Yio remote
124124

125125
```
126-
→ External options → YIO remote ──────────────────────────────────────
127-
┌────────────────────────── YIO remote ───────────────────────────┐
128-
│ Arrow keys navigate the menu. <Enter> selects submenus --->
129-
(or empty submenus ----). Highlighted letters are hotkeys.
130-
Pressing <Y> selects a feature, while <N> excludes a feature.
131-
Press <Esc><Esc> to exit, <?> for Help, </> for Search.
132-
│ ┌─────────────────────────────────────────────────────────────┐ │
133-
│ │ --- YIO remote │ │
134-
│ │ Source (Binary GitHub releases) ---> │ │
135-
│ │ [ ] Debug build │ │
136-
│ │ [ ] Custom versions (DANGEROUS!) │ │
137-
│ │ [*] Remote application │ │
138-
│ │ [*] Web configurator │ │
139-
│ │ [*] Integration plugins │ │
140-
│ │ [*] Dock integration │ │
141-
│ │ [*] Home Assistant integration │ │
142-
│ │ [*] Homey integration │ │
143-
│ │ [*] Spotify integration │ │
144-
│ │ [*] OpenWeather integration │ │
145-
│ │ [ ] openHAB integration (UNDER DEVELOPMENT) │ │
146-
│ │ [ ] Roon integration (UNDER DEVELOPMENT) │ │
147-
│ │ │ │
148-
│ └─────────────────────────────────────────────────────────────┘ │
149-
├─────────────────────────────────────────────────────────────────
150-
│ <Select> < Exit > < Help > < Save > < Load >
151-
└─────────────────────────────────────────────────────────────────
126+
→ External options → YIO remote ──────────────────────────────────────────────
127+
┌────────────────────────────── YIO remote ───────────────────────────────┐
128+
│ Arrow keys navigate the menu. <Enter> selects submenus ---> (or empty │
129+
│ submenus ----). Highlighted letters are hotkeys. Pressing <Y> │
130+
│ selects a feature, while <N> excludes a feature. Press <Esc><Esc> to │
131+
│ exit, <?> for Help, </> for Search. Legend: [*] feature is selected │
132+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
133+
│ │ --- YIO remote │ │
134+
│ │ [ ] Debug build │ │
135+
│ │ [ ] Custom versions (DANGEROUS!) │ │
136+
│ │ [*] Remote application │ │
137+
│ │ [*] Integration library │ │
138+
│ │ [*] Web configurator │ │
139+
│ │ [*] Integration plugins │ │
140+
│ │ [*] Dock integration │ │
141+
│ │ [*] Home Assistant integration │ │
142+
│ │ [*] Homey integration │ │
143+
│ │ [*] Spotify integration │ │
144+
│ │ [*] Bang & Olufsen integration │ │
145+
│ │ [ ] openHAB integration (UNDER DEVELOPMENT) │ │
146+
│ │ [ ] Roon integration (UNDER DEVELOPMENT) │ │
147+
│ │ [ ] OpenWeather integration (EXPERIMENTAL!) │ │
148+
│ └─────────────────────────────────────────────────────────────────────┘ │
149+
├─────────────────────────────────────────────────────────────────────────┤
150+
<Select> < Exit > < Help > < Save > < Load >
151+
└─────────────────────────────────────────────────────────────────────────┘
152152
```
153153

154154
#### Output Directories
@@ -203,61 +203,3 @@ Cause: journald build bug when using many cores/threads (> 16)
203203
Solution: reduce make parallelism
204204

205205
make BR2_JLEVEL=12
206-
207-
## Technology Research
208-
209-
The following technologies were / are investigated for finding an easy and automated solution to build the RPi image.
210-
211-
### Build and Use external Toolchain with Buildroot
212-
213-
A separate toolchain would speed up the build process. This can easily be achieved with [Buildroot Submodule](https://github.com/Openwide-Ingenierie/buildroot-submodule#using-buildroot-submodule-to-build-a-toolchain-separately).
214-
215-
A *make clean* will no longer erase the compiler toolchain and therefore speedup a new full build. Since Qt is required to build the YIO remote projects the complete Qt tools would have to be included as well to use the separate toolchain for the remote-software and -plugin projects. Therefore we are not using this feature to keep it simple and not to introduce another build dependency.
216-
217-
Using an external toolchain involves the following changes:
218-
219-
1. Dedicated Makefile for the toolchain: `Makefile.toolchain`
220-
221-
PROJECT_NAME := toolchain
222-
include common.mk
223-
224-
2. A toolchain subproject with the toolchain configuration: `toolchain/defconfig`
225-
226-
BR2_arm=y
227-
BR2_arm1176jzf_s=y
228-
BR2_DL_DIR="$(HOME)/buildroot/dl"
229-
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL_BUILDROOT_SUBMODULE_PATH)/local.mk"
230-
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_BUILDROOT_SUBMODULE_PATH)/patch"
231-
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
232-
BR2_KERNEL_HEADERS_CUSTOM_TARBALL=y
233-
BR2_KERNEL_HEADERS_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/raspberrypi-kernel_1.20190401-1.tar.gz"
234-
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
235-
BR2_TOOLCHAIN_BUILDROOT_CXX=y
236-
BR2_INIT_NONE=y
237-
# BR2_PACKAGE_BUSYBOX is not set
238-
# BR2_TARGET_ROOTFS_TAR is not set
239-
240-
3. Referencing the external toolchain in the main project: `rpi0/defconfig`
241-
242-
BR2_TOOLCHAIN_EXTERNAL=y
243-
BR2_TOOLCHAIN_EXTERNAL_PATH="$(BR2_EXTERNAL_BUILDROOT_SUBMODULE_PATH)/toolchain/output/host/usr"
244-
BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
245-
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
246-
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
247-
BR2_TOOLCHAIN_EXTERNAL_CXX=y
248-
249-
### Vagrant
250-
251-
Vagrant would be perfect for building the RPi image. Everything could be automated and one would only have to type `vagrant up`.
252-
253-
Found issues so far:
254-
255-
- Almost all official Linux boxes have a 'small' 10 GB disk:
256-
- Not enough to build the image.
257-
- No standard way of extending the disk, or limited to one virtualization provider (vagrant-disksize plugin).
258-
- Synced folders don't work because of hard links
259-
- Serious issues with VirtualBox 6 in combination with newer Ubuntu images
260-
- Bootup takes 5+ minutes instead of seconds
261-
- Issue is something with the UART console
262-
263-
Vagrant might be investigated again in the future. For now the Docker Image provides an easy way to build on Linux, macOS and Windows.

Technology_research.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Technology Research
2+
3+
The following technologies were / are investigated for finding an easy and automated solution to build the RPi image.
4+
5+
## Build and Use external Toolchain with Buildroot
6+
7+
A separate toolchain would speed up the build process. This can easily be achieved with [Buildroot Submodule](https://github.com/Openwide-Ingenierie/buildroot-submodule#using-buildroot-submodule-to-build-a-toolchain-separately).
8+
9+
A *make clean* will no longer erase the compiler toolchain and therefore speedup a new full build. Since Qt is required to build the YIO remote projects the complete Qt tools would have to be included as well to use the separate toolchain for the remote-software and -plugin projects. Therefore we are not using this feature to keep it simple and not to introduce another build dependency.
10+
11+
Using an external toolchain involves the following changes:
12+
13+
1. Dedicated Makefile for the toolchain: `Makefile.toolchain`
14+
15+
PROJECT_NAME := toolchain
16+
include common.mk
17+
18+
2. A toolchain subproject with the toolchain configuration: `toolchain/defconfig`
19+
20+
BR2_arm=y
21+
BR2_arm1176jzf_s=y
22+
BR2_DL_DIR="$(HOME)/buildroot/dl"
23+
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL_BUILDROOT_SUBMODULE_PATH)/local.mk"
24+
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_BUILDROOT_SUBMODULE_PATH)/patch"
25+
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
26+
BR2_KERNEL_HEADERS_CUSTOM_TARBALL=y
27+
BR2_KERNEL_HEADERS_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/raspberrypi-kernel_1.20190401-1.tar.gz"
28+
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
29+
BR2_TOOLCHAIN_BUILDROOT_CXX=y
30+
BR2_INIT_NONE=y
31+
# BR2_PACKAGE_BUSYBOX is not set
32+
# BR2_TARGET_ROOTFS_TAR is not set
33+
34+
3. Referencing the external toolchain in the main project: `rpi0/defconfig`
35+
36+
BR2_TOOLCHAIN_EXTERNAL=y
37+
BR2_TOOLCHAIN_EXTERNAL_PATH="$(BR2_EXTERNAL_BUILDROOT_SUBMODULE_PATH)/toolchain/output/host/usr"
38+
BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
39+
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
40+
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
41+
BR2_TOOLCHAIN_EXTERNAL_CXX=y
42+
43+
## Vagrant
44+
45+
Vagrant would be perfect for building the RPi image. Everything could be automated and one would only have to type `vagrant up`.
46+
47+
Found issues so far:
48+
49+
- Almost all official Linux boxes have a 'small' 10 GB disk:
50+
- Not enough to build the image.
51+
- No standard way of extending the disk, or limited to one virtualization provider (vagrant-disksize plugin).
52+
- Synced folders don't work because of hard links
53+
- Serious issues with VirtualBox 6 in combination with newer Ubuntu images
54+
- Bootup takes 5+ minutes instead of seconds
55+
- Issue is something with the UART console
56+
57+
Vagrant might be investigated again in the future. For now the Docker Image provides an easy way to build on Linux, macOS and Windows.

yio-remote/Config.in

+5-52
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ if BR2_PACKAGE_YIO_REMOTE
2828

2929
# Default versions of all YIO components which work together in this remote-os release.
3030
# All YIO components have their own release channel and version numbers don't relate or indicate a compatible version!
31-
# Custom versions can be enabled with: BR2_PACKAGE_YIO_REMOTE_CUSTOM_VERSION
3231
config BR2_PACKAGE_YIO_REMOTE_SOFTWARE_VERSION_DEF
3332
string
3433
default "v0.6.0"
34+
config BR2_PACKAGE_YIO_INTEGRATIONS_LIBRARY_VERSION_DEF
35+
string
36+
default "v0.5.1"
3537
config BR2_PACKAGE_YIO_WEB_CONFIGURATOR_VERSION_DEF
3638
string
3739
default "v0.2.1"
@@ -60,56 +62,6 @@ config BR2_PACKAGE_YIO_INTEGRATION_ROON_VERSION_DEF
6062
string
6163
default "v0.4.1"
6264

63-
choice
64-
prompt "Source"
65-
help
66-
Select from where the YIO remote components will be installed.
67-
This only applies to Qt based components, i.e. the web-configurator
68-
will always be packaged from the GitHub sources.
69-
70-
config BR2_PACKAGE_YIO_REMOTE_BIN_RELEASE
71-
bool "Binary GitHub releases"
72-
help
73-
Use binary releases for Qt based components from GitHub repositories.
74-
Attention: the binary releases are only compatible on the Raspberry Pi!
75-
76-
config BR2_PACKAGE_YIO_REMOTE_CUSTOM_BIN_DIR
77-
bool "Binary folder"
78-
help
79-
This option allows to specify a local folder containing pre-compiled
80-
Qt binaries for the target platform. The folder must contain debug and
81-
release subdirectories.
82-
Attention: Buildroot will cache the synchronized folder after the first
83-
build. To update the binaries all involved packages must be reconfigured
84-
by executing:
85-
make yio-${PACKAGE_NAME}-reconfigure
86-
or the build directories of all yio packages must be deleted:
87-
rm -Rf rpi0/output/build/yio-*
88-
before building a new image!
89-
90-
# TODO Build from source not yet implemented
91-
# config BR2_PACKAGE_YIO_REMOTE_GITHUB
92-
# bool "Build from source"
93-
# help
94-
# Use GitHub source repositories to build YIO components.
95-
96-
endchoice
97-
98-
config BR2_PACKAGE_YIO_REMOTE_CUSTOM_BIN_DIR_LOCATION
99-
string "URL of custom app binary folder"
100-
default "~/projects/yio/binaries/linux-gcc-arm"
101-
depends on BR2_PACKAGE_YIO_REMOTE_CUSTOM_BIN_DIR
102-
help
103-
Local folder containing pre-compiled binaries for the target platform.
104-
The folder must contain debug and release subdirectories.
105-
Attention: Buildroot will cache the synchronized folder after the first
106-
build. To update the binaries all involved packages must be reconfigured
107-
by executing:
108-
make yio-${PACKAGE_NAME}-reconfigure
109-
or the build directories of all yio packages must be deleted:
110-
rm -Rf rpi0/output/build/yio-*
111-
before building a new image!
112-
11365
config BR2_PACKAGE_YIO_REMOTE_DEBUG
11466
bool "Debug build"
11567
help
@@ -132,6 +84,7 @@ config BR2_PACKAGE_YIO_REMOTE_CUSTOM_VERSION
13284
remote application and the integration plugins!
13385

13486
source "../yio-remote/yio-remote-software/Config.in"
87+
source "../yio-remote/yio-integrations-library/Config.in"
13588
source "../yio-remote/yio-web-configurator/Config.in"
13689

13790
config BR2_PACKAGE_YIO_REMOTE_INTEGRATIONS
@@ -149,4 +102,4 @@ source "../yio-remote/yio-integration-openhab/Config.in"
149102
source "../yio-remote/yio-integration-roon/Config.in"
150103
source "../yio-remote/yio-integration-openweather/Config.in"
151104

152-
endif
105+
endif # BR2_PACKAGE_YIO_REMOTE

yio-remote/yio-integration-bangolufsen/Config.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ if BR2_PACKAGE_YIO_REMOTE_INTEGRATIONS
33
config BR2_PACKAGE_YIO_INTEGRATION_BANGOLUFSEN
44
bool "Bang & Olufsen integration"
55
default y
6-
# only binary GitHub support for now
7-
depends on BR2_PACKAGE_YIO_REMOTE_BIN_RELEASE
86
help
97
Includes the YIO Bang & Olufsen integration plugin.
108
https://github.com/YIO-Remote/integration.bangolufsen
@@ -16,9 +14,11 @@ config BR2_PACKAGE_YIO_INTEGRATION_BANGOLUFSEN_CUSTOM_VERSION
1614
default BR2_PACKAGE_YIO_INTEGRATION_BANGOLUFSEN_VERSION_DEF
1715
depends on BR2_PACKAGE_YIO_REMOTE_CUSTOM_VERSION
1816
help
19-
Custom version. Set version number with 'v' prefix,
20-
e.g. v0.3.0 or v0.4.0
17+
Custom version. Either a GitHub tag or commit hash.
18+
Set version number with 'v' prefix, e.g. v0.3.0 or v0.4.0
2119
See https://github.com/YIO-Remote/integration.bangolufsen/releases
20+
Attention: Git branch names are not supported!
21+
See Buildroot manual for details.
2222

2323
config BR2_PACKAGE_YIO_INTEGRATION_BANGOLUFSEN_VERSION
2424
string

yio-remote/yio-integration-bangolufsen/v0.1.0/yio-integration-bangolufsen.hash

-2
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
sha256 0daa27bd7d8045595af8047f8e7c62fabde74ebdf63f03d0fd321d953741fbb4 YIO-integration.bangolufsen-v0.2.2-RPi0-debug.tar
2-
sha256 31dc90e23788a79a273b868e8c441f045887c5cc52f60e3f92528d6baded5c66 YIO-integration.bangolufsen-v0.2.2-RPi0-release.tar
31
sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 LICENSE
2+
none xxx yio-integration-bangolufsen-v0.2.2.tar.gz

0 commit comments

Comments
 (0)