Skip to content

Commit

Permalink
hw_mainline.js: use 4.4 kernel eeprom data location
Browse files Browse the repository at this point in the history
This will break compatibility with the 4.1 kernel. 4.1 kernel
distribution is hopefully fairly limited as we will migrate all
production images to 4.4.
  • Loading branch information
Jason Kridner committed May 13, 2016
1 parent 0b5d713 commit afc6322
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"gpio",
"arduino"
],
"version": "0.5.0-beta5",
"version": "0.5.0-beta6",
"homepage": "http://beagleboard.org/bonescript",
"repository": {
"type": "git",
Expand Down
14 changes: 7 additions & 7 deletions src/hw_mainline.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,21 +269,21 @@ exports.writePWMFreqAndValue = function(pin, pwm, freq, value, resp, callback) {

exports.readEeproms = function(eeproms) {
var EepromFiles = {
'/sys/bus/i2c/devices/0-0050/at24-0/nvmem': { type: 'bone' },
'/sys/bus/i2c/devices/2-0054/at24-1/nvmem': { type: 'cape' },
'/sys/bus/i2c/devices/2-0055/at24-2/nvmem': { type: 'cape' },
'/sys/bus/i2c/devices/2-0056/at24-3/nvmem': { type: 'cape' },
'/sys/bus/i2c/devices/2-0057/at24-4/nvmem': { type: 'cape' }
'/sys/bus/i2c/devices/0-0050/at24-0/eeprom': { type: 'bone' },
'/sys/bus/i2c/devices/2-0054/at24-1/eeprom': { type: 'cape' },
'/sys/bus/i2c/devices/2-0055/at24-2/eeprom': { type: 'cape' },
'/sys/bus/i2c/devices/2-0056/at24-3/eeprom': { type: 'cape' },
'/sys/bus/i2c/devices/2-0057/at24-4/eeprom': { type: 'cape' }
};
eeproms = eeprom.readEeproms(EepromFiles);
return(eeproms);
};

exports.readPlatform = function(platform) {
var eeproms = eeprom.readEeproms({
'/sys/bus/i2c/devices/0-0050/at24-0/nvmem': { type: 'bone' }
'/sys/bus/i2c/devices/0-0050/at24-0/eeprom': { type: 'bone' }
});
var x = eeproms['/sys/bus/i2c/devices/0-0050/at24-0/nvmem'];
var x = eeproms['/sys/bus/i2c/devices/0-0050/at24-0/eeprom'];
platform.name = fs.readFileSync('/proc/device-tree/model', 'ascii').trim();
if(platform.name.indexOf('Green') > 0) {
platform.name = platform.name.replace('TI AM335x', 'SeeedStudio')
Expand Down

0 comments on commit afc6322

Please sign in to comment.