Productivity Sync Just another WordPress weblog

August 29, 2011

repo upload : Permission denied (publickey).

Filed under: Uncategorized — admin @ 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 — admin @ 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 — admin @ 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 — admin @ 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 — admin @ 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

 

Powered by WordPress