Skip to content

Commit

Permalink
use hardware ids from /media/internal
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidma committed Jun 29, 2024
1 parent 109db60 commit ccb9db3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 115 deletions.
2 changes: 1 addition & 1 deletion meta-hulks/conf/distro/HULKs-OS.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ SUMMARY = "HULKs flavoured Poky"

DISTRO = "HULKs-OS"
DISTRO_NAME = "HULKs-OS"
DISTRO_VERSION = "7.5.0"
DISTRO_VERSION = "7.5.1"
SDKIMAGE_FEATURES:remove = "dbg-pkgs src-pkgs"
4 changes: 0 additions & 4 deletions meta-hulks/recipes-hulks/network-config/network-config.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"

SRC_URI = "\
file://id_map.json;sha256sum=16e109281e2e4b119619dd721531e48d6634d64f6787bc45be0cb8e17087fa70 \
file://configure_network \
file://network-config.service \
file://SPL_HULKs.psk \
"

do_install() {
install -d ${D}${sysconfdir}/
install -m 0644 ${WORKDIR}/id_map.json ${D}${sysconfdir}/
install -d ${D}${sbindir}/
install -m 0755 ${WORKDIR}/configure_network ${D}${sbindir}/
install -d ${D}${systemd_unitdir}/system/
Expand All @@ -23,7 +20,6 @@ do_install() {
}

FILES:${PN} = " \
${sysconfdir}/id_map.json \
${sbindir}/configure_network \
/var/lib/iwd/ \
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
set -e

HEAD_ID="$(/opt/aldebaran/bin/head_id)"
QUERY_STRING=".\"idmap.nao\"[] | select(.headid == \"${HEAD_ID}\") | .name"
HOSTNAME="$(jq -r "${QUERY_STRING}" /etc/id_map.json)"
QUERY_STRING="to_entries | map(select(.value.head_id == \"${HEAD_ID}\")) | .[0].key"
NAO_NUMBER="$(jq -r "${QUERY_STRING}" /media/internal/hardware_ids.json)"

if [ -z "${HOSTNAME}" ]; then
if [ -z "${NAO_NUMBER}" ]; then
exit
fi

NAO_NUMBER="$(echo ${HOSTNAME} | cut -c8-)"
HOSTNAME="tuhhnao${NAO_NUMBER}"

echo "[Match]
Name=wlan*
Expand All @@ -33,5 +33,3 @@ Gateway=0.0.0.0
" > /etc/systemd/network/80-wired.network

hostnamectl set-hostname ${HOSTNAME}

systemctl disable network-config
104 changes: 0 additions & 104 deletions meta-hulks/recipes-hulks/network-config/network-config/id_map.json

This file was deleted.

0 comments on commit ccb9db3

Please sign in to comment.