Giter Club home page Giter Club logo

beaglebone-ubuntu-scripts's Introduction

Beaglebone Ubuntu Scripts

A collection of scripts that are probably useful if you are playing with Ubuntu on a Beaglebone (Black). I use these not only to automate tasks, but also as a knowledge repository.

bb-enable-spi-devicetree

This script modifies the flattened device-tree blob used by uboot on 3.8 and later kernels for BeagleBone (Black) to enable SPI1 and export the first chip-select line (cs0) as spidev device. The pinmux settings will also be set. After running this script, a reboot is required to load the modified device-tree.

It should work on BeagleBone/Ubuntu, but might also work on other distros.

bb-get-rcn-kernel-source

This script downloads, patches and prepares the kernel sources for BeagleBone (Black) kernels distributed by http://rcn-ee.net in order to enable you to compile kernel modules right on the BeagleBone: After installing the kernel sources with this script, you should be able to build kernel modules via their respective makefile.

Note that this will only work for those kernels for which rcn-ee has a kernel-headers package as well โ€“ This should be the case for most older and some newer kernels, but there was a time where the kernel-headers package was missing from the distributions. The script will notify you if you want to run it for a kernel for which no kernel-headers package is available.

By default, the script will prepare the sources for the currently running kernel. However, you can also specify a different kernel version as the first script argument, e.g. ./bb-get-rcn-kernel-source.sh 3.8.13-bone19

The script tries to determine your linux distribution automatically, but if that fails or you want to manually specify one, edit the DIST variable at the top of the script.

Oh, and also ensure that you have all the necessary dependencies installed, since the script doesn't check: gcc, make and all the usual suspects for building kernel-related things.

I've only tested this on Ubuntu, but it should probably also work with Debian.

bb-show-serial

This script reads the serial number from the i2c-connected eeprom available on BeagleBone (Black). It should work both on device-tree and pre-device-tree kernels.

The serial number is unique for each BeagleBone (Black) and also includes the week/year of manufacture in the first 4 digits.

I only tested this on Ubuntu, but it should probably work on other distros as well.

beaglebone-ubuntu-scripts's People

Contributors

gkaindl avatar robertcnelson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

beaglebone-ubuntu-scripts's Issues

SPI doesn't work

Hello. I have used this script to enable the SPI on my beaglebone black with Debian. The spidev1.0 is present on /dev/, but if I short the pins 39 and 40, compile and run the spidev_test.c, the test fail. About the pin 0x190, there is in the script: <0x190> <0x13>, but in the page below, there is <0x190> <0x33>. I need some help to solve this.

http://elinux.org/BeagleBone_Black_Enable_SPIDEV

Check free space

Need to make a check in bb-get-rcn-kernel-source.sh to check free space first.

I'm running this before hand.

apt-get clean

root@arm:/usr/share/locale# rm -rf [a-d]*

root@arm:/usr/share/locale# rm -rf [f-k]*

root@arm:/usr/share/locale# rm -rf [m-z]*

root@arm:/usr/share/locale# rm -rf el/ eo/ es/ et/ et_EE/ eu/ lg/ lt/ lv/

I ran watch du -sh /tmp and saw the size get up to
702M

I started with 1005M free and in the end I had 296M free

You can use this to check for freespace

df -h | awk '$1=="rootfs"{print$4}' | sed 's/\M//'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.