diff options
author | Vyacheslav Pedash <vyacheslav.pedash@globallogic.com> | 2022-08-11 20:43:47 +0300 |
---|---|---|
committer | Vyacheslav Pedash <vyacheslav.pedash@globallogic.com> | 2022-08-23 16:59:29 +0300 |
commit | 2f09803636b700a0f5a252b1afca72603cc454f7 (patch) | |
tree | 5d18fdb92eb3dbbbd66514f1f77b8e0b68d1cc65 /recipes-bsp/multitech/mt-dt-overlay/init-mtcpmhs | |
parent | 3dffdad6aecc7e9f933aca82851d3d25bba5226d (diff) | |
download | meta-multitech-2f09803636b700a0f5a252b1afca72603cc454f7.tar.gz meta-multitech-2f09803636b700a0f5a252b1afca72603cc454f7.tar.bz2 meta-multitech-2f09803636b700a0f5a252b1afca72603cc454f7.zip |
MTX-4571 MTCDT3-AC: Read HW version from the Base Board EEPROM
Diffstat (limited to 'recipes-bsp/multitech/mt-dt-overlay/init-mtcpmhs')
-rwxr-xr-x | recipes-bsp/multitech/mt-dt-overlay/init-mtcpmhs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/recipes-bsp/multitech/mt-dt-overlay/init-mtcpmhs b/recipes-bsp/multitech/mt-dt-overlay/init-mtcpmhs index defb318..9c3c066 100755 --- a/recipes-bsp/multitech/mt-dt-overlay/init-mtcpmhs +++ b/recipes-bsp/multitech/mt-dt-overlay/init-mtcpmhs @@ -6,7 +6,7 @@ sysdir=/sys/devices/platform/mts-io I2CDIR="/sys/bus/i2c/devices" -eepromPath="${I2CDIR}/0-0056/eeprom" +eepromPath="${I2CDIR}/1-0050/eeprom" DEVTREE="/sys/kernel/config/device-tree/overlays/" SYSFS="/usr/sbin/mts-io-sysfs" @@ -63,6 +63,10 @@ install_dtbo_dir() { # [file1] [file2] [file3] setdevtree() { eeprom=$(mts-id-eeprom --in-file "$eepromPath" 2>/dev/null) + if (( $? != 0 )); then + echo "Failed to read EEPROM from the Base Board" + return 1 + fi [[ $eeprom =~ [[:space:]]hw-version:[[:space:]]*\"([^\"]+) ]] hw=${BASH_REMATCH[1]} mach=${hw/%-*} |