From 58fa34bf8aa9719f4dddfaf7d4f03614c1c6bc65 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 29 Apr 2010 14:41:49 +0200 Subject: [PATCH] overo-writeprom: rename to omap3-writeprom and make it work on both overo and beagleboard --- recipes/i2c-tools/omap3-writeprom.bb | 16 +++++++ .../omap3-writeprom}/writeprom.sh | 48 ++++++++++++------- recipes/overo-scripts/overo-writeprom.bb | 16 ------- 3 files changed, 46 insertions(+), 34 deletions(-) create mode 100644 recipes/i2c-tools/omap3-writeprom.bb rename recipes/{overo-scripts/files => i2c-tools/omap3-writeprom}/writeprom.sh (61%) delete mode 100644 recipes/overo-scripts/overo-writeprom.bb diff --git a/recipes/i2c-tools/omap3-writeprom.bb b/recipes/i2c-tools/omap3-writeprom.bb new file mode 100644 index 0000000000..485d06fe43 --- /dev/null +++ b/recipes/i2c-tools/omap3-writeprom.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Writeprom script for omap3 boards with EEPROM on there expansionboard - see http://www.elinux.org/BeagleBoardPinMux#Vendor_and_Device_IDs" + + +SRC_URI = "file://writeprom.sh" + +S = "${WORKDIR}" + +do_install () { + install -d ${D}${bindir}/ + install -m 0755 ${WORKDIR}/writeprom.sh ${D}${bindir}/ +} + +PACKAGE_ARCH = "all" +RDEPENDS_${PN} = "i2c-tools" +FILES_${PN} = "${bindir}" + diff --git a/recipes/overo-scripts/files/writeprom.sh b/recipes/i2c-tools/omap3-writeprom/writeprom.sh similarity index 61% rename from recipes/overo-scripts/files/writeprom.sh rename to recipes/i2c-tools/omap3-writeprom/writeprom.sh index e18dcb0f7a..d1e2b09dcc 100755 --- a/recipes/overo-scripts/files/writeprom.sh +++ b/recipes/i2c-tools/omap3-writeprom/writeprom.sh @@ -1,20 +1,16 @@ #!/bin/sh -if [ $# -ne 3 ] && [ $# -ne 5 ]; +machine_id() { # return the machine ID + awk 'BEGIN { FS=": " } /Hardware/ { gsub(" ", "_", $2); print tolower($2) } '