Dartium Build rev 116980 in 4 easy steps

At the moment Dartium builds are not available on Googles continuous integration server. So I decided to distribute a release build for Linux 32bit . Based on the wiki directions its simple enough for anyone to generate, I felt the need to distribute a build for those who don’t have the time to invest in downloading/configuring/building. An important tip testing dart code in Dartium is to include the additional script call that executes the entry into main(). This is done by adding an additional <script>{}</script> following the line where the dart code is loaded.

The build of Dartium provide is from Rev: 116980

  • Get the latest version of DartEditor and Dartium

wget http://gsdview.appspot.com/dart-editor-archive-continuous/latest/DartBuild-linux.gtk.x86.zip
wget http://dl.dropbox.com/u/33138127/dartium/dartium-linux-32bit-Release.tar.gz
wget http://dl.dropbox.com/u/33138127/dartium/dartium-linux-32bit-Release.tar.gz.md5
wget http://dl.dropbox.com/u/33138127/dartium/README.txt
md5sum -c dartium-linux-32bit-Release.tar.gz.md5
  • Register Dartium on Ubuntu as a registered application so DartEditor can pick it up. Modify dartium-browser.desktop to the chrome-wrapper where Dartium was unzipped.
wget http://dl.dropbox.com/u/33138127/dartium/dartium-browser.desktop
vim dartium-browser.desktop
wget http://dl.dropbox.com/u/33138127/dartium/dartium-browser.desktop.ubuntu.install.sh
sudo ./dartium-browser.desktop.ubuntu.install.sh
  • Register Dartium as the browser to launch in DartEditor


  • Create a famous HelloWorld.


Adjust the html to properly execute dart.



Watch dart in its metal state.

Links:

http://dl.dropbox.com/u/33138127/dartium/dartium-browser.desktop
http://dl.dropbox.com/u/33138127/dartium/dartium-browser.desktop.ubuntu.install.sh
http://dl.dropbox.com/u/33138127/dartium/dartium-linux-32bit-Release.tar.gz
http://dl.dropbox.com/u/33138127/dartium/dartium-linux-32bit-Release.tar.gz.md5
http://dl.dropbox.com/u/33138127/dartium/README.txt
Advertisements

Installing RabbitMQ on a local vcap

Assuming you have already done the https://github.com/cloudfoundry/vcap song and dance. I always have a terriable time trying to get items to work on cloudfoundry.com so decided to see how much of RabbitMQ is available in vcap. Here is a hack to getting RabbitMQ running. I could totally have a baked install and thus the reason why I went down this dark path.

Update and install the following decencies
cd ~/cloudfoundry/vcap
git pull
gem install bundler –no-rdock –no-ri
rake bundler:install
gem install amqp –version ‘0.7.1’
gem install daemons –version ‘1.1.0’
gem install thin –version ‘1.2.8’
cd ~
gem update vmc

Edit ~/cloudfoundry/vcap/bin/vcap and add rabbit as a service

Fire up the services by cd ~/cloudfoundry/vcap && bin/vcap start

Set target and login
vmc target api.vcap.me
vmc login –email blahblah@blahblah.com –passwd blahblahblah

BTW, if you forgot your username or password it can be found in ~/cloudfoundry/vcap/cloud_controller/db/cloudcontroller.sqlite3 . Just rip this file apart or add a new hash for the password.
Check to see the runtimes are correctly available


Check out the following sample to package up
git clone https://github.com/rabbitmq/rabbitmq-cloudfoundry-samples.git
cd ~/rabbitmq-cloudfoundry-samples/spring && mvn package && cd target && vmc push

You can follow http://support.cloudfoundry.com/entries/20322602-getting-started-with-the-rabbitmq-service-from-a-spring-application to deploy the app correctly.

Before you actually create the service you want to check the logs out… This is the issue I had with a local vcap and rabbit. The user and vhost never get added to rabbitmq, doing this manually will make the service work. Make sure to tail the logs before running the vmc create-service. That way you can pull out the actual username/password/vhost that vcap will try to send to rabbitmqctl.

tail -f ~/cloudfoundry/vcap/cloud_controller/log/development.log
vmc create-service rabbitmq
vmc bind-service rabbitmq-XXXXX rabbit-simple


After creating the service the logs will display the username/password/vhost but when you bind the service to an application the username and password change and you need to add those by hand with rabbitmqctl

The first set of username/password will not be used, after binding you need the current ones. In this case they were
user: uz25LQnFmJTrC
pass: pfah5U5dFiSRo
vhost: vf883c025ec524e55b11b0db4dcce928e

At this point you can add the data by hand, restart rabbitmq (sometimes queues decided to get eaten) and you should be ready to go.
sudo rabbitmqctl add_user uz25LQnFmJTrC pfah5U5dFiSRo
sudo rabbitmqctl add_vhost vf883c025ec524e55b11b0db4dcce928e
sudo rabbitmqctl set_permissions -p vf883c025ec524e55b11b0db4dcce928e uz25LQnFmJTrC “.*” “.*” “.*”
sudo /etc/init.d/rabbitmq-server restart




Some useful logs to keep tailed
~/cloudfoundry/vcap/cloud_controller/log/development.log
/var/log/rabbitmq/*

Did I need to go to all this trouble, probably not, but it was fun to investigate what vcap is made and how things are done internally. Since all the code looks like its in place, my guess on how to properly enable rabbit service is to find out what should triggers the calls to ~/cloudfoundry/vcap/services/rabbit/lib/rabbit_service/rabbit_node.rb and debug why the calls are actually failing to contact the local rabbitmq service.

Useful links
http://support.cloudfoundry.com/entries/20346977-rabbitmq-cloud-foundry-cloud-messaging-that-just-works
https://github.com/rabbitmq/rabbitmq-cloudfoundry-samples
http://support.cloudfoundry.com/entries/20322602-getting-started-with-the-rabbitmq-service-from-a-spring-application
https://github.com/cloudfoundry/vcap
http://support.cloudfoundry.com/entries/20012337-getting-started-guide-command-line-vmc-users
https://raw.github.com/cloudfoundry/vcap/master/setup/install
http://support.cloudfoundry.com/entries/20052116-rabbit-on-local-instance-of-vcap
http://www.rabbitmq.com/admin-guide.html
http://www.rabbitmq.com/man/rabbitmqctl.1.man.html

Creating new java project with Cloudfoundry and Spring Source Tool

After picking up SpringSource Tool Suite and Installing the Cloudfoundry plugins creating a new java project is painless, as long as you know which options to choose. From the New wizard you need to choose “Dynamic Web Project”



Target runtime at the time of this post was “Cloud Foundry (Runtime) v1.0” and Dynamic web module version “2.5” with a Configuration of “Default Configuration for Cloud Foundry (Runtime) v1.0”

The Project layout



Creating a new Package and class






Create a classic HelloWorld



Time to extend the HttpServlet and override doGet



Add entries of the servlet and servlet-mapping



Add Application



Start the service



And you have the basic hello world from the cloud foundry samples.


Building and Editing Linux Kernel in Eclipse for Android Rowboat

First off some references I used to complete this task. This was possibly the best so far
http://issaris.blogspot.com/2007/12/download-linux-kernel-sourcecode-from.html
Some other references also helped Ref1, Ref2, Ref3, Ref4
I had following file system layout when dealing with TI_DevKit V2.2


After you have everything imported per directions the next big step is getting the .config setup. Follow the directions on the android rowboat site for doing a first build of the linux kernel in commandline before trying to build from eclipse. This helps generate the .config file. Some additional settings needed was PATH and Build Command


/home/adam/BeagleBoard/rowboat-prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


BeagleTouch on TI_Android_Froyo_DevKit-V2.2

Liquidware’s BeagleTouch provides a nice display device for BeagleBoard developer. They provide non android linux kernel source code to jump in right away to use it. BeagleTouch blog post by will on antipastohw. Here is some crude patches to get started with it on rowboat / TI DevKit. I have my patches located on google docs:

BeagleTouch.TI_Android_Froyo_DevKit-V2.2.config

BeagleTouch.TI_Android_Froyo_DevKit-V2.2.patch

Apply the patch accordingly and copy over the config into the kernel source tree.


One issue that was noticeable from a direct patch of code was the y-axis being inverted. I corrected it with a hard coded reference value for now.



This patch doesn’t help when offset loss happens in the touch screen. Looking info using tslib to capture better data settings and a linear formula for pointer calculations. Some good instructions for compiling tslib on android can be found on wenes1’s blog. A different direction to fix this issue would be to use Y_AXIS_MAX constant.

It was hard for me to find any direct documentation on how touch screen drivers should be designed and configured in Android. If you know of any please ping me.