Skip to content

Commit 793e0ef

Browse files
mike-scottMaxPayne86
authored andcommitted
images: clean-up up the split between the default factory-image and arduino-includes
Signed-off-by: Michael Scott <mike@foundries.io>
1 parent 9861e42 commit 793e0ef

File tree

4 files changed

+123
-130
lines changed

4 files changed

+123
-130
lines changed

recipes-samples/images/lmp-devel-arduino-image.bb

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ require recipes-samples/images/lmp-feature-wifi.inc
1111
require recipes-samples/images/lmp-feature-sbin-path-helper.inc
1212
require recipes-samples/images/lmp-feature-sysctl-hang-crash-helper.inc
1313

14-
EXTRA_IMAGE_FEATURES = "package-management tools-debug"
14+
# Add any partner layer requirements
15+
include recipes-samples/images/lmp-partner-image.inc
1516

16-
SRC_URI += "\
17-
file://sudoers-arduino-lmp-base \
18-
"
17+
EXTRA_IMAGE_FEATURES = "package-management tools-debug"
1918

20-
IMAGE_FEATURES += "ssh-server-dropbear"
19+
SUDOERS_FILE = "sudoers-arduino-lmp-base"
2120

2221
CORE_IMAGE_BASE_INSTALL_GPLV3 = "\
2322
packagegroup-core-full-cmdline-utils \
@@ -33,30 +32,10 @@ CORE_IMAGE_BASE_INSTALL += " \
3332
${@bb.utils.contains('LMP_DISABLE_GPLV3', '1', '', '${CORE_IMAGE_BASE_INSTALL_GPLV3}', d)} \
3433
"
3534

36-
# Arduino additions
37-
38-
LMP_EXTRA = " \
39-
lmp-device-tree \
40-
lmp-auto-hostname \
41-
u-boot-fio-env \
42-
tmate \
43-
libgpiod-tools \
44-
dtc \
45-
stress-ng \
46-
"
35+
# Arduino development changes
4736

48-
ADB = " \
49-
android-tools \
50-
android-tools-adbd \
51-
"
52-
53-
ARDUINO = " \
54-
arduino-ootb \
55-
automount-boot \
56-
m4-proxy \
57-
udev-rules-portenta \
58-
libusbgx-config \
59-
"
37+
# early start not needed for lmp-base image
38+
LMP_EXTRA:remove = "compose-apps-early-start"
6039

6140
VIDEOTOOLS = " \
6241
gstreamer1.0 \
@@ -74,22 +53,10 @@ OPENCV = " \
7453
"
7554

7655
CORE_IMAGE_BASE_INSTALL += " \
77-
libdrm \
78-
usb-modeswitch \
56+
automount-boot \
57+
dtc \
58+
stress-ng \
59+
u-boot-fio-env \
7960
u-boot-fw-utils \
80-
${LMP_EXTRA} \
81-
${ADB} \
82-
${ARDUINO} \
8361
${OPENCV} \
8462
"
85-
86-
# Packages to be installed in Portenta-X8 machine only
87-
IMAGE_INSTALL:append:portenta-x8 = " openocd"
88-
89-
fakeroot do_populate_rootfs_add_custom_sudoers () {
90-
# Allow sudo group users to use sudo
91-
bbwarn Changing sudoers for arduino ootb!
92-
install -m 0440 ${WORKDIR}/sudoers-arduino-lmp-base ${IMAGE_ROOTFS}${sysconfdir}/sudoers.d/51-arduino
93-
}
94-
95-
IMAGE_PREPROCESS_COMMAND += "do_populate_rootfs_add_custom_sudoers; "
Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,56 @@
1-
require recipes-samples/images/lmp-partner-image.inc
1+
SUMMARY = "Minimal factory image which includes OTA Lite, Docker, and OpenSSH support"
2+
3+
require recipes-samples/images/lmp-image-common.inc
4+
5+
# Factory tooling requires SOTA (OSTree + Aktualizr-lite)
6+
require ${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'recipes-samples/images/lmp-feature-factory.inc', '', d)}
7+
8+
# Enable wayland related recipes if required by DISTRO
9+
require ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'recipes-samples/images/lmp-feature-wayland.inc', '', d)}
10+
11+
# Enable IMA support if required by DISTRO
12+
require ${@bb.utils.contains('DISTRO_FEATURES', 'ima', 'recipes-samples/images/lmp-feature-ima.inc', '', d)}
13+
14+
# Enable OP-TEE related recipes if provided by the image
15+
require ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'recipes-samples/images/lmp-feature-optee.inc', '', d)}
16+
17+
# Enable SE05X related recipes if provided by machine
18+
require ${@bb.utils.contains('MACHINE_FEATURES', 'se05x', 'recipes-samples/images/lmp-feature-se05x.inc', '', d)}
19+
20+
# Enable TPM2 related recipes if provided by machine
21+
require ${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'recipes-samples/images/lmp-feature-tpm2.inc', '', d)}
22+
23+
# Enable EFI support if provided by machine
24+
require ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'recipes-samples/images/lmp-feature-efi.inc', '', d)}
25+
26+
# Enable Xenomai4 related recipes if provided by the image
27+
require ${@bb.utils.contains('MACHINE_FEATURES', 'xeno4', 'recipes-samples/images/lmp-feature-xeno4.inc', '', d)}
28+
29+
# Enable jailhouse related recipes if provided by the machine
30+
require ${@bb.utils.contains('MACHINE_FEATURES', 'jailhouse', 'recipes-samples/images/lmp-feature-jailhouse.inc', '', d)}
31+
32+
require recipes-samples/images/lmp-feature-softhsm.inc
33+
require recipes-samples/images/lmp-feature-wireguard.inc
34+
require recipes-samples/images/lmp-feature-docker.inc
35+
require recipes-samples/images/lmp-feature-wifi.inc
36+
require recipes-samples/images/lmp-feature-ota-utils.inc
37+
require recipes-samples/images/lmp-feature-sbin-path-helper.inc
38+
39+
# Add any partner layer requirements
40+
include recipes-samples/images/lmp-partner-image.inc
41+
42+
IMAGE_FEATURES += "ssh-server-openssh"
43+
44+
CORE_IMAGE_BASE_INSTALL_GPLV3 = "\
45+
packagegroup-core-full-cmdline-utils \
46+
packagegroup-core-full-cmdline-multiuser \
47+
"
48+
49+
CORE_IMAGE_BASE_INSTALL += " \
50+
kernel-modules \
51+
networkmanager-nmcli \
52+
git \
53+
vim \
54+
packagegroup-core-full-cmdline-extended \
55+
${@bb.utils.contains('LMP_DISABLE_GPLV3', '1', '', '${CORE_IMAGE_BASE_INSTALL_GPLV3}', d)} \
56+
"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Additions for the arduino partner image
2+
3+
FILESEXTRAPATHS:prepend := "${THISDIR}/configs:"
4+
5+
IMAGE_FEATURES:remove "ssh-server-openssh"
6+
IMAGE_FEATURES += "ssh-server-dropbear"
7+
8+
SUDOERS_FILE ?= "sudoers-arduino-lmp"
9+
SRC_URI += "\
10+
file://${SUDOERS_FILE} \
11+
"
12+
13+
LMP_EXTRA = " \
14+
lmp-device-tree \
15+
lmp-auto-hostname \
16+
compose-apps-early-start \
17+
tmate \
18+
libgpiod-tools \
19+
"
20+
21+
ADB = " \
22+
android-tools \
23+
android-tools-adbd \
24+
"
25+
26+
ARDUINO = " \
27+
arduino-ootb \
28+
m4-proxy \
29+
udev-rules-portenta \
30+
libusbgx-config \
31+
"
32+
33+
CORE_IMAGE_BASE_INSTALL += " \
34+
libdrm \
35+
usb-modeswitch \
36+
${LMP_EXTRA} \
37+
${ADB} \
38+
${ARDUINO} \
39+
"
40+
41+
# No default password is configured for the device
42+
EXTRA_USERS_PARAMS += "\
43+
usermod -p '' ${LMP_USER}; \
44+
"
45+
46+
# Packages to be installed in Portenta-X8 machine only
47+
IMAGE_INSTALL:append:portenta-x8 = " openocd"
48+
49+
fakeroot do_populate_rootfs_add_custom_sudoers () {
50+
# Allow sudo group users to use sudo
51+
bbwarn Changing sudoers for arduino ootb!
52+
install -m 0440 ${WORKDIR}/${SUDOERS_FILE} ${IMAGE_ROOTFS}${sysconfdir}/sudoers.d/51-arduino
53+
}
54+
55+
IMAGE_PREPROCESS_COMMAND += "do_populate_rootfs_add_custom_sudoers; "

recipes-samples/images/lmp-partner-image.inc

Lines changed: 0 additions & 85 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lmp-partner-image-arduino.inc

0 commit comments

Comments
 (0)