Skip to content
Snippets Groups Projects
Commit ce338741 authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

vending-machine-control-application: Configure default I2C bus for B68 and Raspberry Pi


Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 86594951
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ Description=Vending Machine Control Application ...@@ -7,6 +7,7 @@ Description=Vending Machine Control Application
[Service] [Service]
Type=notify Type=notify
Environment="VENDING_MACHINE_CONTROL_I2C_BUS=@VENDING_MACHINE_CONTROL_I2C_BUS@"
ExecStart=/usr/bin/vending-machine-control-application ExecStart=/usr/bin/vending-machine-control-application
Restart=always Restart=always
......
...@@ -23,8 +23,14 @@ REQUIRED_DISTRO_FEATURES = "systemd" ...@@ -23,8 +23,14 @@ REQUIRED_DISTRO_FEATURES = "systemd"
EXTRA_OEMAKE += "DESTDIR=${D}" EXTRA_OEMAKE += "DESTDIR=${D}"
VENDING_MACHINE_CONTROL_I2C_BUS ??= "0"
VENDING_MACHINE_CONTROL_I2C_BUS_rpi ?= "1"
VENDING_MACHINE_CONTROL_I2C_BUS_seco-intel-b68 ?= "2"
do_install() { do_install() {
oe_runmake install oe_runmake install
install -d "${D}${systemd_system_unitdir}/" install -d "${D}${systemd_system_unitdir}/"
install -m 0644 "${WORKDIR}/${BPN}.service" "${D}${systemd_system_unitdir}/" install -m 0644 "${WORKDIR}/${BPN}.service" "${D}${systemd_system_unitdir}/"
sed -i -e 's,@VENDING_MACHINE_CONTROL_I2C_BUS@,${VENDING_MACHINE_CONTROL_I2C_BUS},g' \
"${D}${systemd_system_unitdir}/${BPN}.service"
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment