livebox:beagleboneporting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
livebox:beagleboneporting [2014/01/23 23:36] – created brettlivebox:beagleboneporting [2015/03/13 04:29] (current) – [Beagle bone notes] brett
Line 2: Line 2:
  
  
-Note on building the HAH for the beagle bone.  These note really aren't for consumption by anybody but me as reminders for things I did whilst investing porting the HAH system to the Beagle Bone.+Notes on porting the HAH for the beagle bone.  These notes really aren't for consumption by anybody but me as reminders for things I did whilst playing around on the Beagle Bone.
  
 +The Angstrom distribution was just too warty for my liking and I moved everything to UBUNTU which also allows the Raspberry PI and other embedded boards to also join the fun.
 +
 +<note>See [[/livebox/portable]]</note>
 ===== Validating the cross compiler works ===== ===== Validating the cross compiler works =====
  
Line 158: Line 161:
 drwxr-xr-x. 2 brett brett   4096 Apr 28  2012 ./etc/init.d drwxr-xr-x. 2 brett brett   4096 Apr 28  2012 ./etc/init.d
 -rwxr-xr-x. 1 brett brett   2445 Apr 28  2012 ./etc/init.d/hwclock.sh -rwxr-xr-x. 1 brett brett   2445 Apr 28  2012 ./etc/init.d/hwclock.sh
-</code>+
 Packaged contents of busybox_1.19.4-r6_armv7a into /tmp/busybox_1.19.4-r6_armv7a.ipk Packaged contents of busybox_1.19.4-r6_armv7a into /tmp/busybox_1.19.4-r6_armv7a.ipk
 +</code>
  
 There is going to be a requirement here that the packages are built as root or at least their permissions and ownerships are setup by root prior to building. There is going to be a requirement here that the packages are built as root or at least their permissions and ownerships are setup by root prior to building.
Line 174: Line 178:
 # mkdir -p /var/www/html/feeds/eglibc/ipkg/armv7a/hah # mkdir -p /var/www/html/feeds/eglibc/ipkg/armv7a/hah
 </code> </code>
 +
 +Place the HAH package in the directory and build the Package files.
 +<code>
 +[root@bb-dev hah]# pwd
 +/var/www/html/feeds/eglibc/ipkg/armv7a/hah
 +[root@bb-dev hah]# /home/brett/opkg-utils/opkg-make-index -p Packages -m .
 +/home/brett/opkg-utils/opkg.py:39: DeprecationWarning: the md5 module is deprecated; use hashlib instead
 +  import md5
 +Lost field license, GPLv2+
 +
 +[root@bb-dev hah]# ls -l
 +total 1328
 +-rw-r--r--. 1 root root 1334146 Jan 24 19:59 hah_0.1_armv7a.ipk
 +-rw-r--r--. 1 root root     447 Jan 24 20:02 Packages
 +-rw-r--r--. 1 root root    8233 Jan 24 20:02 Packages.filelist
 +-rw-r--r--. 1 root root     332 Jan 24 20:02 Packages.gz
 +-rw-r--r--. 1 root root      30 Jan 24 20:02 Packages.stamps
 +[root@bb-dev hah]#
 +</code>
 +
 +Update the package caches on the BB - yes mine is in there now (look hard).
 +<code>
 +root@beaglebone:/etc/opkg# opkg update
 +Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/base/Packages.gz.
 +Inflating http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/base/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/base.
 +Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/machine/beaglebone/Packages.gz.
 +Inflating http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/machine/beaglebone/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/beaglebone.
 +Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/debug/Packages.gz.
 +Inflating http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/debug/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/debug.
 +Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/gstreamer/Packages.gz.
 +Inflating http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/gstreamer/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/gstreamer.
 +Downloading http://bb-dev.local/feeds/eglibc/ipkg/armv7a/hah/Packages.gz.
 +Inflating http://bb-dev.local/feeds/eglibc/ipkg/armv7a/hah/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/hah.
 +Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/all/Packages.gz.
 +Inflating http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/all/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/no-arch.
 +Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/perl/Packages.gz.
 +Inflating http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/perl/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/perl.
 +Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/python/Packages.gz.
 +Inflating http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv7a/python/Packages.gz.
 +Updated list of available packages in /var/lib/opkg/lists/python.
 +root@beaglebone:/etc/opkg#
 +</code>
 +
 +Installing the HAH package
 +<code>
 +root@beaglebone:/etc/opkg# opkg install hah
 +Installing hah (0.1) to root...
 +Downloading http://bb-dev.local/feeds/eglibc/ipkg/armv7a/hah/hah_0.1_armv7a.ipk.
 +Configuring hah.
 + Adding system startup for /etc/init.d/xap.
 +root@beaglebone:/etc/opkg#
 +</code>
 +
 +===== connman is shit =====
 +
 +Connman has no right to be used on MY embedded hardware, yeah yeah I know all the argument about fall back and what if the network isn't etc etc... But really I don't give a shit, if the network is not up we are hosed.
 +
 +I don't want connman anywhere near my beaglebone.
 +
 +I want this -> http://www.unix.com/man-page/Linux/5/interfaces/
 +
 +How to remove connman and revert to traditional network interface start up.
 +
 +<code>
 +systemctl disable connman.service
 +
 +for i in  pre-up up post-up pre-down down post-down; do
 +  mkdir -p /etc/network/if-${i}.d
 +done
 +
 +cat > /etc/network/interfaces <<EOF
 +auto lo
 +iface lo inet loopback
 +
 +auto eth0
 +iface eth0 inet static
 +address 192.168.1.100
 +netmask 255.255.255.0
 +gateway 192.168.1.1
 +EOF
 +
 +cat >/etc/resolv.conf <<EOF
 +search local
 +nameserver 192.168.1.20
 +EOF
 +
 +cat > /lib/systemd/system/network.service <<EOF
 +[Unit]
 +Description=Network interfaces
 +After=remount-rootfs.service
 +
 +[Service]
 +RemainAfterExit=yes
 +ExecStart=/sbin/ifup -a
 +ExecStop=/sbin/ifdown -a
 +
 +[Install]
 +WantedBy=basic.target
 +EOF
 +
 +systemctl enable network.service
 +</code>
 +
 +===== dmesg log filled with hdmi messages? =====
 +
 +After running the Beaglebone for a while you may notice messages like this
 +
 +<code>
 +[drm:output_poll_execute], [CONNECTOR:5:HDMI-A-1] status updated from 2 to 2
 +</code>
 +
 +in the log called with dmesg. It's not really a problem unless you are trying to debug but still annoying.
 +
 +To stop these edit the uEnv.txt file on the FAT partition (not uEnv.txt in /boot)
 +
 +Mount the partition
 +<code>
 +mount /dev/mmcblk0p1  /mnt/card
 +</code>
 +
 +edit the uEnv.txt file to remove the drm_debug part
 +<code>
 +nano /mnt/card/uEnv.txt
 +</code>
 +
 +and remove drm.debug=7
 +
 +Save the file:
 +<code>
 +Ctrl-X, Y
 +</code>
 +
 +Unmount the partition:
 +<code>
 +umount /mnt/card
 +</code>
 +
 +Reboot the board:
 +<code>
 +shutdown -r now
 +</code>
 +
 +===== backing up the BeagleBone Black eMMC =====
 +
 +After you have got the BBB up and running how you like it, backing up is always a good idea.
 +
 +You can of course back up the ini settings, plugboard scripts etc using the web GUI but I like to keep a backup of the entire eMMC.
 +
 +There are a few methods to be found on the 'net that require the use of a script on a microSD card. This is ideally the best way but requires
 +stopping the BBB (and if SWMBO is expecting things to happen, that's never good)
 +
 +So here is an option to use dd over ssh to backup to another PC (in my case a mac)
 +
 +on the BBB
 +<code>
 +sudo dd if=/dev/mmcblk0 bs=1M | ssh themac@192.168.0.X "dd of=/Users/themac/Desktop/BBB_Backup_date.img bs=1m"
 +</code>
 +
 +n.b. the block size is set on the BBB using bs=1M but on the mac HAS to be bs=1m (lowercase) (I'm not sure if this is the case :) on a pc)
 +
 +To restore. This needs to be done after booting from an SD card to free up the eMMC
 +The eMMC is then mmcblk1 not mmcblk0
 +<code>
 +ssh themac@192.168.0.X "dd of=/Users/themac/Desktop/BBB_Backup_date.img bs=1m” | sudo dd of=/dev/mmcblk1 bs=1M
 +</code>
 +
 +Then power down, remove the SD card and reboot.
  • livebox/beagleboneporting.txt
  • Last modified: 2015/03/13 04:29
  • by brett