Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernels: Gentoo vs. Ångström
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
jlpoole
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 217
Location: Napa, CA

PostPosted: Sat Sep 01, 2012 2:12 am    Post subject: Kernels: Gentoo vs. Ångström Reply with quote

I bought a Beagle Bone and shipped with it was Ångström:
Code:
root@beaglebone:~# uname -a
Linux beaglebone 3.2.18 #1 Thu Jun 14 23:26:20 CEST 2012 armv7l GNU/Linux
root@beaglebone:~#


Here's the current build of Ångström: http://www.angstrom-distribution.org/demo/beaglebone/ and here are instructions on building Ångström Here's the Ångström Manual

I've installed Gentoo (using Raul's how to) on it as well (3 times using 4, 16, & 32 GB SDHC Class 4 boards). When I was following some postings about accessing the General Purpose Input/Output ("GPIO") pins, I tried accessing some of the files and directories in my Gentoo build only to find that the files and paths present in an Ångström build are not present in the Gentoo build. So I popped the Ångström SDHC back in and was able to access a desired GPIO.

My question is: could someone here familiar with Ångström and Gentoo comment on what it would take to have the Gentoo kernel be close to what the Ångström kernel exposes. I'd like the best of both worlds, the ease of Gentoo plus whatever Ångström exposes to make bread board and development easier. I'm hoping someone with familiarity of both system might comment. Is the very nature of the Ångström build such that there is an entire dependency tree that would have to be integrated to offer the same features in Gentoo? Or is it more specific to modules, say for the GPIOs? I'm wondering if it is worth trying to compare the two systems, or would that be like trying to port something over from an Intell based processor to an AMD? I know nothing of Ångström and wonder if it is so varied that merging its benefits into a special Gentoo build would be a formidable task.

Lastly, the Ångström build shipping with the Beagle Bone has the Cloud 9 IDE. It looks sexy and I wonder if it has integrated features making working with the Beagle Bone a snap rather than spending hours configuring something. I spent a few minutes learning about Cloud 9 and wonder if the unit shipping with the Beagle Bone is a cloud based system... I'm not into clouds.
Back to top
View user's profile Send private message
jlpoole
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 217
Location: Napa, CA

PostPosted: Sat Sep 01, 2012 4:51 pm    Post subject: Reply with quote

I researched the matter further.

What drove me to this topic is that I wanted to read a $4 temperature sensor, Dallas Semiconducter 1–WireTM Digital Thermometer DS1820 (accuracy+/- .5 Celsius). This sensor utilizes Dallas 1-Wire technology. The various postings from the BeagleBone [Google] forum had command console listings under /sys that did not appear in my Gentoo build, but did appear in the Ångström. For example, using Ångström I finally got my bread-boarded sensor tied into the Beagle Bone to give me a temperature reading:
Code:
beaglebone:~#  cat /sys/bus/w1/devices/10-000801e97d95/w1_slave |tail -n1 | awk -F= '{print (($2/1000)*9/5 + 32) " degrees Fahrenheit"}'
73.4 degrees Fahrenheit
beaglebone:~#


I'll be documenting how I accomplished this later.

What I learned is that Ångström is a monolithic build kernel with a slant towards minimalism to make it desirable for embedded processors that have limited processor and memory. It also favors development based upon the General Purpose Input/Output ("gpio") pins of a processor and makes the read/write values of the pins easily accessible under the /sys directory. Here's an example of a session where I activate one of the LEDs on the BeagleBone:
Code:
bone gpio # pwd
/sys/class/gpio
bone gpio # ls
export  gpiochip0  gpiochip32  gpiochip64  gpiochip96  unexport
bone gpio # echo 53 >export
bone gpio # ls
export  gpio53  gpiochip0  gpiochip32  gpiochip64  gpiochip96  unexport
bone gpio # ls gpio53
active_low  direction  edge  power  subsystem  uevent  value
bone gpio # echo high >gpio53/direction
bone gpio # echo low >gpio53/direction
bone gpio # echo 53 >unexport
bone gpio # ls
export  gpiochip0  gpiochip32  gpiochip64  gpiochip96  unexport
bone gpio #


At any rate, I guess I'm going to approach my needs on a case by case basis. For the moment, I'd like to be able to utilize Dallas Semiconductors 1-Wire technology so I can string a bunch of temperature sensors on a 2 line circuit and query each sensor for its current value. What I have learned is that there are kernel modules for Dallas' 1-Wire technology so it appears to me I can simply go back to the kernel compile stage in Raul's guide Gentoo on the Beaglebone [sic] and configure the kernel to support 1-Wire technology. I'll report back here on whether I was successful after I attempt this kernel modification.

What's nifty with the BeagleBone is I can easily switch systems, Gentoo vs. Ångström, by simply switching SDHC cards. So I can run the BeagleBone on Ångström and develop my bread board circuit explore and learn what I need off the gpios, study the Ångström kernel, and then see what's available in the Gentoo kernel or kernel patches. I reckon this is getting the best of both worlds, using Ångström to develop the hardware and test the communication with sensors and then migrate it back to a Gentoo system.
Back to top
View user's profile Send private message
jlpoole
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 217
Location: Napa, CA

PostPosted: Thu Sep 06, 2012 8:03 am    Post subject: Reply with quote

Forgive me denizens of Gentoo, for I have sinned.

I finally built the Ångström kernel that shipped with my BeagleBone. Actually the kernel I built probably is in the next revision. Then I copy my Ångström based kernel, uImage, to the SDHC card I had diligently prepared following the sacred Gentoo on the BeagleBone. So I have a custom-built Gentoo distribution running on the Ångström kernel.

Is this going to cause problems, or what? I do not know much about kernels and wonder if I'm simply sitting on a time-bomb as I wonder if the Gentoo binaries may reference a kernel somehow and the one I built may not have what the binaries built on the kernel recommended by Armin in the afore-referenced guide. But, then again, the kernel Armin uses is from Texas Instruments at their repository: git://arago-project.org/git/projects/linux-am33x.git

So the big question I have is using an Ångström on my otherwise Gentoo built SDHC card just something destined to fail? Right now, I'm able to read my transistor:
Code:
Using username "root".
Using keyboard-interactive authentication.
Password:
Last login: Wed Sep  5 21:16:55 PDT 2012 from 192.168.168.3 on pts/0
bone ~ #  dmesg | grep w1
[    1.306793] BeagleBone cape: initializing w1-gpio
[    1.311828] w1-gpio connected to P8_6
bone ~ # ls  /sys/bus/w1/devices
10-000801e97d95  w1_bus_master1
bone ~ # cat /sys/bus/w1/devices/10-000801e97d95/w1_slave |tail -n1 | awk -F= '{print (($2/1000)*9/5 + 32) " degrees Fahrenheit"}'
78.2366 degrees Fahrenheit
bone ~ # uname -a
Linux bone 3.2.23 #1 Tue Sep 4 23:23:59 PDT 2012 armv7l ARMv7 Processor rev 2 (v7l) am335xevm GNU/Linux
bone ~ #

This is just like the system that shipped with the BeagleBone and that makes sense since the kernels are practically identical. I recall reading in this forum years ago a post where the writer indicated he was running his Gentoo distribution on some other kernel. So maybe it doesn't matter?

I wanted to post this on the regular Kernel Forum, but the rules state that only supported kernels should be posted there and I did not want to incur the wrath of some monitor.

If using the Ångström kernel is problematic, then I'm guessing the next step is to compare the build trees of the Ångström vs. the arago based one -- which seems to be someone at Texas Instrument's pet kernel. Perhaps the kernel and the operating system are segregated enough that I'm pretty safe not to encounter a fault or crash. If they are not, then migrating over a "bone" configuration and any of the special hardware code for the BeagleBone's processor would be in order and probably a formidable task.

I hope someone with the experience and credentials will chime in here.

At the recommendation of a friend who works in embedded devices, I plan to explore two other protocols: SPI and i2c.

The target is to have a Gentoo operating system on the BeagleBone that has reliable and functioning 1-wire, SPI, and i2c protocols. Then I can finally get the temperature and moisture monitoring project built.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum