Skip to content

Commit

Permalink
this build works, it includes labtool and networking binaries like ip…
Browse files Browse the repository at this point in the history
…erf, nmcli, etc
  • Loading branch information
vegano1 committed Aug 7, 2023
1 parent 1f1b0b8 commit 64b8828
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[submodule "layers/meta-toradex-bsp-common"]
path = layers/meta-toradex-bsp-common
url = https://git.toradex.com/meta-toradex-bsp-common.git
branch = dunfell-5.x.y
[submodule "layers/meta-toradex-demos"]
path = layers/meta-toradex-demos
url = https://git.toradex.com/meta-toradex-demos.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Protocol = TCP
;0 - EEPROM support
;1 - NO_EEPROM support
;2 - OTP support
NO_EEPROM=1
NO_EEPROM=2
NoEepromBtFlexFileName = BtCalData_ext.conf
NoEepromWlanFlexFileName = WlanCalData_ext.conf
Expand Down
9 changes: 9 additions & 0 deletions layers/meta-opentrons/recipes-apps/labtool/labtool.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FILESEXTRAPATHS_append := "${THISDIR}/files:"

SRC_URI += "file://opentrons-SetUp.ini"

do_install_append() {
# install custom SetUp.ini
install -d ${D}/home/root
install -m 755 ${WORKDIR}/opentrons-SetUp.ini ${D}/home/root/SetUp.ini
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/dev/root / auto ro 0 0
/dev/root / auto rw 0 0
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
Expand Down
17 changes: 3 additions & 14 deletions layers/meta-opentrons/recipes-images/images/opentrons-ot3-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,7 @@ IMAGE_INSTALL += " \
timestamp-service networkmanager crda ch341ser \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'timestamp-service systemd-analyze', '', d)} \
weston-xwayland weston weston-init imx-gpu-viv \
robot-app-wayland-launch opentrons-robot-app \
opentrons-robot-server opentrons-update-server \
python3 python3-misc python3-modules python3-jupyter \
opentrons-jupyter-notebook opentrons-usb-bridge \
opentrons-system-server opentrons-mcu-firmware \
opentrons-user-environment opentrons-module-firmware \
opentrons-systemd-units \
wifi-mode-switch \
"

# We do NOT want the toradex libusbgx packages that autoconfigure the OTG USB
Expand Down Expand Up @@ -99,12 +93,7 @@ python do_create_opentrons_manifest() {
}

# check that we have the expected version files and write them to the VERSION.json
expected_opentrons_versions = ["opentrons-robot-server-version.json", \
"opentrons-update-server-version.json", \
"opentrons-system-server-version.json", \
"opentrons-api-version.json", \
"opentrons-usb-bridge-version.json", \
"opentrons-firmware-version.json"]
expected_opentrons_versions = []

opentrons_versions_dir = "%s/opentrons_versions" % d.getVar('STAGING_DIR_HOST')
version_files_present = os.listdir(opentrons_versions_dir)
Expand Down Expand Up @@ -138,7 +127,7 @@ do_make_rootfs_changes() {
# add the VERSION.json file
cat ${DEPLOY_DIR_IMAGE}/VERSION.json > ${IMAGE_ROOTFS}${sysconfdir}/VERSION.json
# copy the release notes to the output dir
cat ${IMAGE_ROOTFS}${sysconfdir}/release-notes.md > ${DEPLOY_DIR_IMAGE}/release-notes.md
#cat ${IMAGE_ROOTFS}${sysconfdir}/release-notes.md > ${DEPLOY_DIR_IMAGE}/release-notes.md

# add hostname to rootfs
printf "opentrons" > ${IMAGE_ROOTFS}${sysconfdir}/hostname
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#! /bin/bash

PROFILE_ENV="/etc/profile.d/wifi-mode.sh"
WIFI_CONFIG="/etc/modprobe.d/toradex-wifi-config.conf"

print_menu() {
cat <<-EOF
Select Wifi Mode
0: Exit
1: Normal Mode - iperf, nmcli, etc
2: MFG Mode - labtool
EOF
}

main() {
# print options and get user input
print_menu
read INPUT
case $INPUT in
1)
echo "Setting WIFI Normal Mode"
cat <<-EOF > $WIFI_CONFIG
blacklist mlan bt8xxx
install mlan /bin/false
install bt8xxx /bin/false
EOF

# set profile.d
cat <<-EOF > $PROFILE_ENV
echo "Entered Normal Wifi Mode"
EOF
;;
2)
echo "Setting WIFI MFG Mode"
cat <<-EOF > $WIFI_CONFIG
blacklist mwifiex mwifiex_sdio btmrvl btmrvl_sdio
install mwifiex /bin/false
install btmrvl /bin/false
EOF

# set profile.d
cat <<-EOF > $PROFILE_ENV
echo "Entered MFG Wifi Mode"
EOF
;;
*)
echo "Cancelled"
return 0;
esac

echo "Rebooting the device to apply settings"
reboot -f
}

main "$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash

echo "Entered MFG Wifi Mode"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
SUMMARY = "Scripts for testing"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

RDEPENDS_${PN} += "bash"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI += "\
file://switch-wifi-mode.sh \
file://wifi-mode.sh \
"

do_install() {
install -d ${D}/home/root
install -m 755 ${WORKDIR}/switch-wifi-mode.sh ${D}/home/root/switch-wifi-mode.sh

# install prodile.d
install -d ${D}${sysconfdir}/profile.d/
install -m 755 ${WORKDIR}/wifi-mode.sh ${D}${sysconfdir}/profile.d/wifi-mode.sh
}

FILES_${PN} += "\
/home/root/switch-wifi-mode.sh \
${sysconfdir}/profile.d/wifi-mode.sh \
"
Binary file added tsc69zp48h6c1vr.zip
Binary file not shown.

0 comments on commit 64b8828

Please sign in to comment.