Productivity Sync

February 4, 2012

Ubuntu 11.04 on HP Envy 17t-3000 laptop

Filed under: Uncategorized — markgross @ 8:04 pm

Installing was a pain in the butt. The graphics would start flickering on modesets with the install kernel. After upgrading the kernel to 3.2.3 vanilla disabling modeset resulted in a black screen with a blinking cursor.

So, to install use the ubuntu-alt cd and do a text mode installation. (avoid the mode set epileptic fit inducing flicker.) After the install is finished within grub ad nomodeset to the kernel command line and / or remove the spash command line. Then after building 3.2.3 kenel and installing it change things by removing the nomodeset you added before and also remove the splash option. Now the system should boot ok to a usable home screen.

Also WRT graphics I have gone ahead and just blacklisted radeon as well. The radeon driver takes too long to boot and for my use I don’t really give a shit about having more graphics umph anyway.

Audio will not work (because the snd_usb_audio device confuses ALSA. Fix this by adding snd_usb_audio to the blacklist.cfg file in /etc/modeprobe.d diretory.

Now about the only thing not working is the clickpad.

hear I use may pad and work scripts.
pad:
#!/bin/sh
/usr/bin/synclient TapButton1=1 TapButton2=0 TapButton3=0 LBCornerButton=2 RBCornerButton=0 LTCornerButton=2 RTCornerButton=3 VertEdgeScroll=0 VertEdgeScroll=0 HorizEdgeScroll=0 CornerCoasting=0 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 PalmDetect=0 EmulateTwoFingerMinW=100 AreaBottomEdge=3900

work:
#!/bin/sh
/usr/bin/synclient TapButton1=0 TapButton2=0 TapButton3=0 LBCornerButton=2 RBCornerButton=0 LTCornerButton=2 RTCornerButton=3 VertEdgeScroll=0 VertEdgeScroll=0 HorizEdgeScroll=0 CornerCoasting=0 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 PalmDetect=1 EmulateTwoFingerMinW=100 AreaBottomEdge=3900

FWIW I have a Displayport to HDMI converter cable and it works very well for driving my external 1080p display.

January 1, 2012

Building AOSP on ubuntu 11.10 x86_64

Filed under: Uncategorized — markgross @ 12:18 am

The Android Open Source Project has issues with the newest GCC host compiler where the build of ICS falls over in annoying ways on the new distro.  To get around this issue I tried building my own compiler but, that was a pain in the ass with getting the multi-lib support working then in my googleing for how to do that with the old compilers I found the following blog post that is all gold to me.  Using it when building AOSP works well.  :)

Setup:

http://www.android-dev.ro/2011/12/13/building-android-4-0-on-ubuntu-11-10/
sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib gcc-4.4-multilib
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
cd to your AOSP ics directory: make CC=gcc-4.4 CXX=g++-4.4 -j4

Shiny!

Well, maybe not 100% shiny. Building rowboat for the beagle board falls over on the kernel and the sgx build using the CC=gcc-4.4 CXX=g++-4.4 command line hack. They get confused by the CC and the CXX.  The work around I have done for this is to hack the AOSP build/core/combo/select.mk file:


diff --git a/build/core/combo/select.mk b/build/core/combo/select.mk
index 916320b..8116723 100644
--- a/build/core/combo/select.mk
+++ b/build/core/combo/select.mk
@@ -25,8 +25,8 @@ combo_os_arch := $($(combo_target)OS)-$($(combo_target)ARCH)

 # Set reasonable defaults for the various variables

-$(combo_target)CC := $(CC)
-$(combo_target)CXX := $(CXX)
+$(combo_target)CC := gcc-4.4
+$(combo_target)CXX := g++-4.4
 $(combo_target)AR := $(AR)

 $(combo_target)BINDER_MINI := 0

Now its more shiny but not perfect. I don’t need to change my command line to build on 11.10 but, I do have to remember this hack every time I set up a project.

August 29, 2011

repo upload : Permission denied (publickey).

Filed under: Uncategorized — markgross @ 1:45 pm

make sure your .gitconfig has the correct user name:
i.e.:
[review "review.cyanogenmod.com"]
username = mgross

August 27, 2011

Cyanogen + kenrel build script for gTablet

Filed under: Uncategorized — markgross @ 4:08 pm

After weeks of farting around with the thing and multiple web sites for custom mods I’ve been able to build from SRC both CWM and Cyanogen mod 7 for the gTablet.  I lost a week on the assumption that the kernel was for the 1.2 version of the FW (For the default this is not the case) and hunting around for the right git tree, branch name and default config file for the kernel.

The following assumes that you have started with nvflashed gtab.nvflash.1.2.branch.20110508_with_cwm version of the system and then put CM7 on it from one of the ROM download sites.

All this BS is encapsulated in the bash script: cyanogen-build4gtablet.sh  if it works then you will have the following files:

out/target/product/smb_a1002/update-cm-7.1.0-RC1-smb_a1002-KANG-signed.zip <– the android build

out/ target/product/smb_a1002/utilities/update.zip <– recovery OS (ClockWorkMod)  (but the updater-scrip is no right.  It should use recovery.img and instead it does some other stuff attempting to update the current recovery partition when it really should just use the img file.  See http://review.cyanogenmod.com/#change,7626 to see how to fix that.)

Also if you where wondering what the mtd partition table is:

<6>[   12.356419] tegra_nand tegra_nand: tegra_nand_probe: probing (c06af4d0)
<6>[   12.364346] tegra_nand tegra_nand: tegra_nand_scan: found NAND chip (Vendor = 0xad, DevId = 0xdc)
<5>[   12.974292] 7 cmdlinepart partitions found on MTD device tegra_nand
<5>[   12.980549] Creating 7 MTD partitions on "tegra_nand":
<5>[   12.985690] 0x000000bc0000-0x000001bc0000 : "misc"
<5>[   12.991329] 0x000003cc0000-0x000004cc0000 : "recovery"
<5>[   12.997107] 0x000004d40000-0x000005d40000 : "boot"
<5>[   13.002522] 0x000005dc0000-0x000015580000 : "system"
<5>[   13.008779] 0x000015600000-0x00001ff80000 : "cache"
<5>[   13.014742] 0x000000740000-0x000000b40000 : "bootbmp"
<5>[   13.020397] 0x000001c40000-0x000003c40000 : "logodata"

August 19, 2011

Getting started with Cyanogen for the ViewSonic g-Tablet

Filed under: Uncategorized — markgross @ 9:46 am

This is just a bunch of notes and links gathered in the course of getting cyanogen onto a viewsonic gtablet:

First some background:

  1. The gtablet is a derivative of a few reference platforms and you may see the following “code names” that imply gTablet:
    • upc300 <– SKU ID ViewSonic uses
    • harmony <– what NVidea calls it
    • smb_a1002 <– what cyanogen mod calls it if you are building the image from scratch you’ll want to know this one.
  2. there are a number of forums and sites for information on the gTablet and building an image for it.  (it confused me)
  3. The gTablet has spiffy FW that makes it hard to brick (but you can get damn close).  There is a boot loader that can be reflashed and then there is the android recovery image that can also be reflashed.  You want the 1.2 branch of the nvflash.
  4. Building Cyanogen for the G-Tablet (using canned kernel)
    • follow the compile link above
    • Gotchas:
      • extract-files.sh disn’t find all the files the first time for me and I had to manually get the ones that didn’t get found.
      • don’t forget to run the get-rommanager step or the build will crap out (on the rommanager APK build)
        • vendor/cyanogen/get-rommanager
      • DO NOT EVER RUN THE ROM-MANAGER!!!! it will fsck your tablet and put you back to nvflashing (I had to crack open my tablet to hit a hidden reset button to power cycle to get back to nvflash.  Others just let the battery drain to zero to do the same thing)
      • 1.1 FW doesn’t boot with current kernel checked into the cyanogen tree.
      • DSP manager crashes and hoses audio (but if you unistall it using tatainium backup audio works again)
  5. Hacking the kernel for the gtablet
    • First there are at least 3 different kernels and I can’t say for sure which one is good for what:
    • for the pershoot kernel I’ve used both the “gingerbread” and “master” branches seem to work.
    • use the “pershoot_tegra_harmony_android-newbl_defconfig” to build the kernel.
    • The wifi driver “bcm4329.ko” is built as dhd.ko and you get to hand place it where it needs to go in the ROM image yourself.
      • note: I’m still not 100% the dhd.ko driver I build works yet.  (maybe later today I’ll have it working?)
    • CROSS=/home/mgross/work/cyanogen/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
      PATH=/home/mgross/work/cyanogen/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
      export CROSS
      export PATH
      make ARCH=arm CROSS_COMPILE=$CROSS mrproper
      make ARCH=arm CROSS_COMPILE=$CROSS pershoot_tegra_harmony_android-newbl_defconfig
      time make ARCH=arm CROSS_COMPILE=$CROSS -j 4
      • note: my cyanogen tree was checked into “/home/mgross/work/cyanogen” and I’m building the kernel with the same tool chain used to build the cyanogen ROM.
  6. Installation hacks / gotchas

August 4, 2011

Using mplabx on 64 bit linux.

Filed under: Uncategorized — markgross @ 8:54 pm

mplabx beta 7.01 is not good with JDK7 (32bit) but works fine with 64 bit.

Mostly I copying http://elco.crsndoo.com/wordpress/2011/03/how-to-make-mplab-x-work-properly-on-64bit-linux/ Only the first few times I tried it I was using jdk7 which does not work.

To install mplabx on ubutnu11.04-x86_64 I did the following:

  • download 32bit Linux JDK6 update 26 (jdk-6u26-linux-i586.bin) unpacked it and moved it to $HOME/bin/jdk1.6.0_26-32bit.
  • next I created 2 scripts one for installing as root and one for running mplabx.
  • I also modified the start up

To run MPLABX you need to set jdkhome == JAVA_HOME and PATH to point to the 32bit jdk6 first then you can run mplabx.

For installing MPLABX you need to expand $HOME such that it works properly. (you’ll need to update this script to match where you put the JDK2.6 – 32bit.)

Scripts:
To run mplabx
—-

#!/bin/sh
export JAVA_HOME=$HOME/bin/jdk1.6.0_26-32bit
export jdkhome=$JAVA_HOME
export PATH=$HOME/bin/jdk6.0_26-32bit/bin:$HOME/bin:$PATH

/usr/bin/mplab_ide
<EOF>

To install mplabx (update with your $HOME path if copying me) run this scrip as root.
—–

#!/bin/sh
JAVA_HOME=/home/mgross/bin/jdk1.6.0_26-32bit
PATH=/home/mgross/bin/jdk6.0_26-32bit/bin:$PATH

/home/mgross/Downloads/mplabx-ide-beta7.01-linux-32-bit-installer.bin
<EOF>

August 2, 2011

Getting started with the IOIO / Micorochip mplabx on ubuntu 11.04-i386

Filed under: Uncategorized — markgross @ 9:54 am

This is a outline on how to build the images to run the IOIO [http://codaset.com/ytai/ioio/wiki] with a nexus 1 phone.

HW:

  • rooted Nexus-1 running CyanogenMod 7.1.0-RC1-N1
  • PICkit3
  • IOIO board  The device is a “pic24jf256DA206″ board
  • 5V -12V DC PSU good to 2A output. (what I’m using is overkill 5V at 8A)

Downloads to get:

  • At the time of this writing the tip was: 8f8704f updated App-IOIO0300 to get rid of excessive logging

Pin outs between PICkit3 and IOIO:
The programmer : the IOIO

pin1 : MCLR,
pin2 : 3.3
pin3 : gnd
pin4 : 36
pin5 : 35
pin6 : no-connect

Pain points:

  • Android SDK installation
  • Eclipse setup with ADT
  • ADT / eclipse environment has gotchas WRT configuring builds and the need to clean the projects before a build will succeed.
  • MPLAB-X installation (have to play games with JAVA_HOME as root)
  • MPLAB-X beta 7.01 vrs jdk1.7.0 (hint you need to use jdk1.6.0_26 for now)
  • PICkit3 use from MPLAB-X (wasn’t so bad after I figured it out)
  • IOIO FW code structure and undocumented packaging tools for building boot FW and *.ioioapp files the ioio manager uses.
  • IOIO SW code structure and undocumented set up for building up ADK builds
  • IOIO git project has IDE config files in it that get changed by simply opening the projects.  (annoying but common with IDE use)
  • Not knowing MPLab, PIC, or JAVA very well.

Details:

First install the JDK, eclipse and android SDK all into $HOME:

  • I install the JDK into $HOME/bin and setup JAVA_HOME and PATH environment variables in my $HOME/.profile file:
    • mkdir $HOME/bin
    • cd $HOME/bin
    • tar -xf ../Downloads/android*.tgz
      • run the android-sdk-linux_x86/tools/android command and download the android SDK versions you want.  (I just go them all)
    • tar -xf ../Downloads/eclips*.tar.gz
    • chmod +x ../Downloads/jdk*.bin
    • ../Dowloads/jdk*.bin
  • Then set-up your environment variables in $HOME/.profile
JAVA_HOME=$HOME/bin/jdk1.6.0_26
PATH="$HOME/bin/eclipse:$HOME/bin/jdk1.6.0_26/bin:$HOME/bin/android-sdk-linux_x86/tools:$HOME/bin:$PATH"
  • mplabx beta 7.01 doesn’t install on x86_64 versions of Ubuntu.
    • I’m pretty sure there isn’t a good technical reason for this.  One can install on a 64bit Linux provided you set up the 32bit JDK and poin the JAVA_HOME to it.  Still this is a work around.
    • I’m running mplabx in its own virtual-box VM of ubuntu 11.04 32bit.
    • There is one link I found on the Internet calling out an mplabx install hack using JAVA_HOME and PATH names that worked for someone.  But, it didn’t work so much for me.
  • The mplabx installer looks in selected paths for the JDK installation.  Set up a JAVA_HOME environment variable to point to the JDK you want to be used with the installer program.
    • or use the following script run as root:
#!/bin/sh
JAVA_HOME=/home/mgross/bin/jdk1.6.0_26
PATH=/home/mgross/bin/jdk1.6.0_26/bin:$PATH
/home/mgross/Downloads/mplabx-ide-beta7.01-linux-32-bit-installer.bin
  • what system global configuration does it touch after installing????  It wants me to reboot to start using it?  This scares me.

 Building the APK’s

  • Install the ADT
  • configure android plugin to point to sdk
  • set android build output to verbose
  • set general / workspace to not “Build automatically”
  • use import existing project to import ioio_lib into workspace
  • use android tools > fix project properties (not sure what it does)
  • set project build target to Android 3.0
  • disable “Enable project specific settings” (if set under properties java compiler)
  • mkdir a directory “ioio/software/IOIOLib/res”
  • project / clean
  • build.
  • import ioiomanager project
  • android tools > fixproject properties
  • change android build target to android 3.0

HelloIOIO

  • import existing project ioio/software/applications/helloIOIO (leaving the lib and ioiomanager projects where they are in the IDE.
  • select project properties and set the build target to android 3.0
  • select project clean
  • build project
  • Run As 1 Android Application (with phone connected to development host) to load APK

Building the FW:

  • use Open Project to open the IOIO/firmware/bootloader and IOIO/firmware/app_layer_v1 projects
  • for the boot loader I needed to use the SPRK0016 target
    • if you are going to use the IOIOmanager built above instead of the one from the app-store, then you will want to disable the security check in the bootloader FW. (using the -DBYPASS_SECURITY compiler option.)
  • for the AppLayerV1 I needed the IOIO0003 target
  • both build.

building *.ioioapp files and using the IOIO Manager:

  • todo

Loading the FW with pickit3 through MPLabX

  • locate the *.hex files:  find ioio/firmware -name *.hex
  • concatenate them
    •  for b in `find ioio/firmware -name *.hex`;do cat $b >>flash.hex; done
  • edit flash.hex and clean out extra “:00000001FF” from middle of the file.
  • create a new project in mplabx category “Microchip Embedded” and project “Prebuilt (Hex,Loadable Image) project navigate to flash.hex and select ok, select the device (from me its pic24fj256da206)
  • finally select “make and program device to flash the IOIO

At this point you should be able to run the test apk on your Android phone and turn on the yellow LED.

There are a couple of painfully boring screen casts with audio that is way too quite walking through setting up a VBox guest with 11.04 and the above tools.

ioio-setup-1

ioio-setup-2

 

July 10, 2011

replicate a ubuntu install

Filed under: Uncategorized — markgross @ 9:58 am

Lifted from a few google searches:
dpkg –get-selections > mypackages.txt
sudo dpkg –set-selections < mypackages.txt
sudo apt-get dselect-upgrade

April 30, 2011

setting up my ubuntu 11.04

Filed under: Uncategorized — markgross @ 3:44 pm
  1. Intsall from CD.
  2. go to all installed apps and select login, choose classic no effects.
  3. install important stuff:
sudo apt-get install screen vim-gtk cscope ctags vim-doc minicom git-core curl ncftp seamonkey
sudo apt-get install mutt ca-certificates ssmtp msmtp fetchmail procmail ssh sshfs xchat openssl
sudo apt-get install nmap manpages-dev manpages-posix manpages-posix-dev quilt subversion
sudo apt-get install mercurial ipython gcc-avr gcc avr-libc gcc-avr binutils-avr avr-libc avrdude
sudo apt-get install sdcc gputils  python-profiler python-numpy python-matplotlib sdcc-ucsim
sudo apt-get install graphviz cscope-el xxdiff python-excelerator python-scipy python-numpy-doc
sudo apt-get build-dep linux-image-2.6.38-8-generic
sudo dpkg-reconfigure dash
(answer no)
  1. install Virtual box:
sudo apt-get install libqt4-network libqt4-opengl libqtcore4 libqtgui4 libqt4-dbus libqt4-xml
sudo dpkg -i virtualbox-4.0_4.0.6-71344~Ubuntu~natty_amd64.deb
  1. clean up
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean

next: install stuff needed to build android BSP:
 sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl \
 zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev \
 ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev tofrodos gawk

copy lots of junk from last HD to a "back" directory so I can have hours of fun deleting old junk.

December 12, 2010

Ubuntu 10.10 Mouse pad hot key settings

Filed under: Uncategorized — markgross @ 4:07 pm

This is a quick blog on how to use synclient to configure you Linux laptop mouse pad they way *I* like it.  This was needed for my new netbook.  Its mouse pad was “click pad” mouse pad.  This is a mouse pad that has a one button action under it.  Its an attempt to be more “mac like”, I think.  This is on my HP mini210 net-book (which I really like a lot), and I was lost without a left mouse button.  The default ubuntu 10.10 install that I like to use would have the synaptics mouse pad driver configured in a manner that just killed me to use.  The palm detection is a fail, and the scroll area would get triggered when I least expected it (typically with negative effects on my email or file I’m trying to edit)

First I need to follow :http://www.uluga.ubuntuforums.org/showthread.php?t=1388164&page=14

Specifically I need to add AreaBottomEdge=3900 and JumpyCursorThreshold=200 to synapitcs config.

Basically I need 2 modes of mouse pad behaviour.  1 for web browsing, and one for typing.  After some looking around and experimentation I’ve settled on the following configuration.

  1. work-mode: /usr/bin/synclient TapButton1=0 TapButton2=0 TapButton3=0 RBCornerButton=0 LTCornerButton=2 RTCornerButton=3 VertEdgeScroll=0
  2. browser mode: /usr/bin/synclient TapButton1=0 TapButton2=0 TapButton3=0 RBCornerButton=0 LTCornerButton=2 RTCornerButton=3 VertEdgeScroll=1

There are a LOT of different settings possible with synclient you should explore.  start with running synclient -l to list the current settings.

Next I needed these settings to get applied quickly and easily.  To do this I used the System/Preferences/Keyboard Shortcuts application form the ubuntu menu.  Simply go to the bottom of the list of items and select “Add” to add a Mouse-on short cut that executes #2 listed above, and map it to “windows-key-f6″ (on my keyboard this is “Mod4+F6″)  Do it again to make a Mouse-off short cut running #1 above and map it to “windows-key-f7″  or “Mod4+F7″.

Older Posts »

Powered by WordPress