Jump to content
sparky

New $45 Beaglebone

Recommended Posts

Couple good tips to keep in mind:

 

System logs are stored in some organized journal, "journalctl" can show you.  "journalctl -b" shows all messages from the current boot...

 

I ran opkg update; opkg upgrade now that I have an ethernet connection hooked up.  Takes a while, some of it bombed trying to resolve the repo address (not sure why) but I ended up having to edit /etc/resolv.conf to manually put my local DNS server in there, then it all went through.

Except it didn't boot; had 3 of the 4 user LEDs lit and it was hung.  Hooked up the FTDI, hit RESET and found it couldn't find the kernel file (/boot/uImage).  The bootloader on these, BTW, bring you to a "uBoot" prompt which is very cool; it's a bootloader CLI.  I think it's actually present on the MMC flash device, but it gives you some troubleshooting info and there are environment variables you can tweak to change the boot image file.  Looks like the upgrade went through but "kernel-image-3.8.8" refused to install b/c it would overwrite the kernel-image-3.8.6 stuff, rather bizarre... I had it boot with "env set bootfile uImage-3.8.6" and issued the "boot" cmd, then had to do "opkg --force-overwrite install kernel-image-3.8.8"

 

The 'bone rebooted fine after that.

Share this post


Link to post
Share on other sites

Couple good tips to keep in mind:

 

System logs are stored in some organized journal, "journalctl" can show you.  "journalctl -b" shows all messages from the current boot...

 

I ran opkg update; opkg upgrade now that I have an ethernet connection hooked up.  Takes a while, some of it bombed trying to resolve the repo address (not sure why) but I ended up having to edit /etc/resolv.conf to manually put my local DNS server in there, then it all went through.

Except it didn't boot; had 3 of the 4 user LEDs lit and it was hung.  Hooked up the FTDI, hit RESET and found it couldn't find the kernel file (/boot/uImage).  The bootloader on these, BTW, bring you to a "uBoot" prompt which is very cool; it's a bootloader CLI.  I think it's actually present on the MMC flash device, but it gives you some troubleshooting info and there are environment variables you can tweak to change the boot image file.  Looks like the upgrade went through but "kernel-image-3.8.8" refused to install b/c it would overwrite the kernel-image-3.8.6 stuff, rather bizarre... I had it boot with "env set bootfile uImage-3.8.6" and issued the "boot" cmd, then had to do "opkg --force-overwrite install kernel-image-3.8.8"

 

The 'bone rebooted fine after that.

You are good at this. do you have prior u-boot experience? I've used u-boot on ADI Blackfins.

Share this post


Link to post
Share on other sites

You are good at this. do you have prior u-boot experience? I've used u-boot on ADI Blackfins.

Never heard of it until now, but it vaguely reminds me of the OpenBoot CLI on Sun Solaris boxes (*SHUDDER*)... Alas my Linux experience goes back to about 1996 or so, so this crap doesn't really scare me :D

Share this post


Link to post
Share on other sites

Ok for what it's worth, the current state of PinMuxing in kernel 3.8 (BBBlack ships with 3.8) is in a state of flux and is currently a complete clusterfuck.  There used to be an "omap" debugfs driver that gave you access to modify the pin mux state of the various I/O pins via /sys/kernel/debug, but it's gone, and the future of pin muxing is "devicetrees" which are special files/driver descriptions that tell the kernel how pins should work.  Currently the CapeMgr makes use of these so when new capes are plugged in and the kernel queries their onboard EEPROM, it can figure out which devicetrees to load & get the kernel drivers configured properly.

 

Here's a workable 3.8 kernel example of how to do it though: https://github.com/jadonk/validation-scripts/tree/master/test-capemgr

I've yet toyed with this yet but will soon.  I'm interested in exposing the other UARTs.  I think they're in the process of working it out so Node.JS/Bonescript can twiddle these; it works with the old 3.6 kernel BeagleBones but no longer with 3.8, so that part of Bonescript is broken.  (pinMode() has extra options to specify the pinmux functions for the various pins).

 

edit: IRC guys posted another link, intro to devicetree stuff with capes- http://hipstercircuits.com/adding-beaglebone-cape-support-to-a-kernel-with-device-tree-in-ubuntu/

several articles on that same site: http://hipstercircuits.com/

Share this post


Link to post
Share on other sites

So for my weird USB network problem with my Mac, I think it's the Mac at fault here.  The problem consistently disappears when I reboot my Mac, then consistently returns when I unplug/re-plug the BeagleBone (power-cycling it too).  And the problem will disappear if I reboot my Mac.  My guess is the Mac's USB drivers aren't releasing state properly when the beaglebone gets unplugged, and when they're plugged in again it ends up ignoring traffic coming from the beaglebone.  This doesn't seem to affect the USB mass storage drive that shows up as "BEAGLEBONE", just the networking part.

 

What's strange is from the beaglebone's perspective, tcpdump shows no traffic on usb0 originating from the bone, just the DHCP broadcast traffic coming from the Mac.  Perhaps it is a beaglebone issue but it's being instigated by some quirk in the Mac, I suspect.

 

Bottom line: If you're on a Mac and can't seem to connect to your beaglebone over the USB network properly, try a reboot of the Mac.

Share this post


Link to post
Share on other sites

Would setting up one of these be a pain if I'm a Linux n00b?

Nah, it's meant to make things easy although I'll say, the whole Arduino-esque node.js thing is in a bit of flux at the moment.  It should work, but the ability to modify what peripheral each I/O pin is set to (the pinmux stuff) currently doesn't work with Bonescript.  Work in progress, and actually part of a larger shift in Linux's support for ARM and embedded stuff in general.

 

Using it as a straight PC though, you'll have to get used to the Linux desktop stuff since that's what it is (GNOME-based, I believe).  Should have apps to do what you need though, although I can't say for sure what all's installed since I haven't used it as a standalone HDMI-attached PC beyond checking that it works.

 

I also suspect the next release or 2 of firmware will be worth waiting for b/c there are definite bugs in this one.  I tried plugging in an SD card and it wouldn't boot, haven't yet dug down to find out why.  It's not supposed to do that--it should only try booting from SD card if you hold down the S2 button.

Share this post


Link to post
Share on other sites

Ok I think this is really stupid and I made my opinion known on the beaglebone forum and one of the founders saw it...

 

To get a data uSD card on this, you have to insert it before booting (it doesn't seem to auto-detect an inserted uSD card yet; probably yet another thing they need to fix up) however the bootloader interacts with it regardless of whether you're holding the S2 button.

 

The S2 button decides which card the CPU should boot from initially; with no bootloader on the uSD card, it loads the UBOOT image from the eMMC.

 

But the eMMC's UBOOT image has a default boot script which scans the uSD card first to see if there is a "uEnv.txt" file containing override environment variables for the boot environment.  Problem is, if that file doesn't exist, the boot process stops right there and doesn't recover.

 

So if you want to add a uSD card to your BeagleBone Black for data only, you must place a uEnv.txt file on there with statements inside telling it to use mmc dev #1 (eMMC) for its boot parameters.

 

Here's a copy of the file: http://spirilis.net/junk/uEnv.txt

Copy that file directly to the uSD card (right-click Save As...), do not copy & paste.  If carriage-return characters are added e.g. in Windows, UBOOT will complain that the contents are invalid.  The file needs to be "dos2unix"'d, in other words.

 

As a side note, I believe UBOOT can read FAT and EXT4 so you can format the uSD card with whatever filesystem you want, or leave it as is if it's brand new (and probably formatted with FAT).

 

Hopefully in future releases of the eMMC firmware, the default UBOOT script won't bother with this.  If I want the damned bootloader to have anything to do with my uSD card I'd rather hold down that S2 button!

Share this post


Link to post
Share on other sites

Ok I think this is really stupid and I made my opinion known on the beaglebone forum and one of the founders saw it...

 

To get a data uSD card on this, you have to insert it before booting (it doesn't seem to auto-detect an inserted uSD card yet; probably yet another thing they need to fix up) however the bootloader interacts with it regardless of whether you're holding the S2 button.

 

The S2 button decides which card the CPU should boot from initially; with no bootloader on the uSD card, it loads the UBOOT image from the eMMC.

 

But the eMMC's UBOOT image has a default boot script which scans the uSD card first to see if there is a "uEnv.txt" file containing override environment variables for the boot environment.  Problem is, if that file doesn't exist, the boot process stops right there and doesn't recover.

 

So if you want to add a uSD card to your BeagleBone Black for data only, you must place a uEnv.txt file on there with statements inside telling it to use mmc dev #1 (eMMC) for its boot parameters.

 

Here's a copy of the file: http://spirilis.net/junk/uEnv.txt

Copy that file directly to the uSD card (right-click Save As...), do not copy & paste.  If carriage-return characters are added e.g. in Windows, UBOOT will complain that the contents are invalid.  The file needs to be "dos2unix"'d, in other words.

 

As a side note, I believe UBOOT can read FAT and EXT4 so you can format the uSD card with whatever filesystem you want, or leave it as is if it's brand new (and probably formatted with FAT).

 

Hopefully in future releases of the eMMC firmware, the default UBOOT script won't bother with this.  If I want the damned bootloader to have anything to do with my uSD card I'd rather hold down that S2 button!

For what its worth, you can install and run ubuntu on the beaglebone, as demonstrated here by Derick Molloy. It's there somewhere, just need to look for it. There are other nifty videos in his channel too.

 

Spirilis, what does "dos2unix" mean ? Is this like UTF-8 file encoding or something ? I seem to recall that name, but what I remember is that is a disk image tool made by IBM or HP or something ?

 

Our BBB's came this morning btw, and I just now found them laying just inside our front gate . . . someone needs to fire that fedex idiot i tell you . . .

Share this post


Link to post
Share on other sites

@@spirilis Oh and yeah, this pin muxing you're speaking of is only effected in the node.js like language ? Or do I need to retrograde to 3.6.x to get decent compatibility using C/C++ too ?

 

For those interested . . .  installing on Windows 7 x64 was very painless. You plug the device in, it shows as a mass storage device,you open the device, and open START.htm with either Chrome or firefox, and you're off ! 

 

From here it guides you through installing the USB to ethernet drivers, gives you a link directly to the BBB web pages. Also I didnt see if Spirilis mentioned it or not, but lsmod reports it as having Bluetooth, which i was not personally aware of. SSH into 192.168.7.2 like spirilis said, user root, passwd root, and you're in.

 

cubeberg, best way to start learning Linux is like programming. Learn as you go, or by doing. One of the easiest ways perhaps would be setting up a virtual machine, and just start toying around. A good close to Angstrom way of doing this perhaps would be to install either ubuntu, or debian( assuming there is no VM image for Angstrom), on a virtual machine, and use putty to ssh in from the host PC. Anyway, Angstrom should be very close to debian as it is made with open embedded from what I understand.

Share this post


Link to post
Share on other sites

@@spirilis, yeah im just mentioning up a storm on you tonight lol.

 

So now I am curious. Wondering how difficult / easy it would be to modify Angstrom to use grub instead of uboot. Not like this device really needs uboot, as technically, at least in my mind, it is not really an embedded device. It's instead a whole embedded system, with plenty of ram, and storage capability. After that of course, again been a while since I have done anything like this. but make this device work how it really should. No idea really what all that implies. IMHO, this needs something akin to a BIOS, to automatically boot off of available devices. eMMC -> sd -> ethernet, and perhaps even USB. *shrug*

 

The cloud 9 IDE i think is a bit of a toy, as well as the scripting capabilities. However with that said, the scripting capabilities could come in very handy for web interface type designs, so yeah that is pretty nifty. Will need to see what I can get away with, programming on the PC, then transferring to the BBB. Source wise I mean. Typically in the past I have had pretty good luck with just using UTF-8 encoding, and another option which I forget ( been a while ) to save as UNIX style formatting or some such. Maybe thats whatyou were talking about in your other post?

Share this post


Link to post
Share on other sites

@@yyrkoon The device does not have bluetooth, but there is some module installed I guess for some daemon that can use it.  I checked with the folks on IRC to be sure.

 

dos2unix isn't about the character encoding, it's the newlines -- UNIX uses just a Linefeed character for a newline, Windows/DOS use Carriage-Return + Linefeed.  If the U-BOOT program finds a CR+LF at the end of each line in uEnv.txt it'll assume the CR character is part of the text and it'll complain (e.g. "Invalid partition specification 1:2

")

 

I'm not sure what the deal is between U-BOOT and Grub, if Grub runs on ARM then that's an option--you can certainly experiment with that with your SD card (holding the S2 button so it bootstraps from the SD).  I don't particularly mind U-BOOT as long as I can get rid of that stupid assumption in the bootcmd script... maybe learning how to build U-BOOT so I can replace the u-boot.img is what I should be thinking about.

Share this post


Link to post
Share on other sites

@@spirilis, yeah im just mentioning up a storm on you tonight lol.

 

So now I am curious. Wondering how difficult / easy it would be to modify Angstrom to use grub instead of uboot. Not like this device really needs uboot, as technically, at least in my mind, it is not really an embedded device. It's instead a whole embedded system, with plenty of ram, and storage capability. After that of course, again been a while since I have done anything like this. but make this device work how it really should. No idea really what all that implies. IMHO, this needs something akin to a BIOS, to automatically boot off of available devices. eMMC -> sd -> ethernet, and perhaps even USB. *shrug*

 

The cloud 9 IDE i think is a bit of a toy, as well as the scripting capabilities. However with that said, the scripting capabilities could come in very handy for web interface type designs, so yeah that is pretty nifty. Will need to see what I can get away with, programming on the PC, then transferring to the BBB. Source wise I mean. Typically in the past I have had pretty good luck with just using UTF-8 encoding, and another option which I forget ( been a while ) to save as UNIX style formatting or some such. Maybe thats whatyou were talking about in your other post?

Yeah the cloud9 stuff does feel toy-ish to me, but I'm willing to give it a shot.  Not too happy that the PinMux stuff is still "in development" but hey, I am an early adopter here--always some risk associated with that ;-)  The way I see it, it does sound like Node.JS is very powerful and if they are angling to make it a Standard for the beaglebone platform, which they are, then it seems like developing in Bonescript is the way to develop your software while maintaining maximum public re-use.  Arduino & Energia are the same way IMO...

 

I was having some issues with the IDE at first, it wasn't seeming to carry out the user LED changes I was doing unless I ran one of the canned javascript buttons in the Bonescript help page to reset the LEDs.  However I have since updated all the system packages and rebooted it so maybe cloud9 was updated since then...

 

PS- The Sitara does have a built in boot-order thing, the order is determined by the state of the SYS_BOOT I/O pins some of which are broken out to the headers (and as such, it's strongly recommended any capes that use those pins not drive them until after RESET is complete).  The S2 button is one of the SYS_BOOT pins that selects MMC1 first (if high) or MMC0 (if low, like if S2 is being held down).  I think it even has an SPI boot scheme, wanna say that's enabled in S2-pressed mode and has higher priority than MMC0.  The SRM manual on the beagleboard page has all those details and obviously the TI documentation does too.

Share this post


Link to post
Share on other sites

Now this is funny.

 

 


 

10:45 -!- Lola [6c1c25fe@gateway/web/freenode/ip.108.28.37.254] has joined #beagle
10:45 < mdp> thought
10:45 -!- Lola is now known as Guest77585
10:46 < Guest77585> sorry for being too slow
10:46 < tsquar3d> mdp: Well, let's do it! I am good with the data analysis and viz part per my physics background and research interests...
10:46 < Guest77585> I need some Beagle bevavior advice
10:47 < woglinde> Guest77585 guest throw some wood
10:47 < woglinde> beagle brings back
10:47 < Guest77585> my beagle is almost 7 is is now very aggressive with food
10:47 < Guest77585> bit my nephew when going for his food this morning
10:48 < Guest77585> any ideas as to what might have brought this on?
10:48 < tsquar3d> mdp: I will look further into sigrok this afternoon -- and update my proposal. I also need a mentor and someone else from the community that can write 1-3 paragraphs on how this would
                  benefit the community.
10:48 < Tartarus> Yeah, wrong channel Guest77585, sorry
10:48 < smith_> try a new power supply
10:48 < mdp> Guest77585, sorry, this is not a Beagle (the canine) channel
10:48 < Guest77585> sorry
10:48 < tsquar3d> Sorry, I only have a chihuahua.
10:48 < mdp> Guest77585, no problem ;)
10:48 -!- Guest77585 [6c1c25fe@gateway/web/freenode/ip.108.28.37.254] has quit [Client Quit]
10:49 < woglinde> hm I thought it was a joke
10:49 < woglinde> hm hm
10:49 < Spirilis> haha
10:49 < Spirilis> I was gonna say, who comes to IRC for advice on dogs?
10:49 < ka6sox> woglinde, we get them occasionally.
10:49 < tsquar3d> Food agression is not a joke.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×