make sure your .gitconfig has the correct user name:
i.e.:
[review "review.cyanogenmod.com"]
username = mgross
August 29, 2011
repo upload : Permission denied (publickey).
August 27, 2011
Cyanogen + kenrel build script for gTablet
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
This is just a bunch of notes and links gathered in the course of getting cyanogen onto a viewsonic gtablet:
First some background:
- 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.
- there are a number of forums and sites for information on the gTablet and building an image for it. (it confused me)
- http://viewsonic-gtablet-for-dummies.webs.com/ <– this is the best one
- http://raywaldo.com/topic/gtab-tablet-computing/
- http://www.slatedroid.com/topic/17751-recovery-12-based-recovery-options-recovery-pack-cwm-standard-recovery-g-tablet/
- http://forum.xda-developers.com/forumdisplay.php?f=841 <– anoying but has a few of useful posts like the following:
- http://droidbasement.com/db-blog/ <– the blog of the developer of the kernel used by cyanogen
- https://github.com/pershoot/gtab-2632 <– kernel used by cyanoge lately…
- http://www.cyanogenmod.com/
- 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.
- http://viewsonic-gtablet-for-dummies.webs.com/nvflash.htm (flashing from linux works great don’t bother with the windows flash tool)
- if building the kernel (see below) be sure the CONFIG_NEWBL is set otherwise it will hang at boot time.
- Odds are if you got a gTablet lately its got 1.2 FW.
- Older versions of the Cyanogen ROM may assume 1.1 FW and fail to boot (don’t back rev your FW to fix this! You’ll just use a newer ROM that works with 1.2 FW)
- http://viewsonic-gtablet-for-dummies.webs.com/rom.htm
- The fist thing to do when you get the gTab is to put ClockworkMod (recovery tool) on it. http://viewsonic-gtablet-for-dummies.webs.com/clockworkmod.htm I’m having good luck with cwm v3028
- At this point you can install Honycomb or your own Cyanogen builds without too much trouble.
- 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)
- 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:
- pershoot : https://github.com/pershoot/gtab-2632 <–known to work by me and is used by cyanogen
- Clemsyn : https://github.com/search?q=clemsyn&type=Everything&repo=&langOverride=&start_value=1 but I can’t say which one to use or what branches
Note: I think one of the clemsyn kernels is used in a Honycom Rom) - http://www.linuxboxsolution.com/ has a HC ROM port and a git tree related to it is https://github.com/linuxboxsolution/LBSGtab.git The tree isn’t too nice as its hard to see a patch set in there. Its not much more than a tarball.
- 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.
- Installation hacks / gotchas
- http://review.cyanogenmod.com/#change,7464 <– is needed with the CWM v3028
August 4, 2011
Using mplabx on 64 bit linux.
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
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:
- android-sdk_r12-linux_x86.tgz
- eclipse-SDK-3.7-linux-gtk.tar.gz
- jdk-6u26-linux-i586.bin
- mplabc30-v3.30b-linux-installer.run
- mplabx-ide-beta7.01-linux-32-bit-installer.bin
- IOIO code base
-
git clone https://codaset.com/ytai/ioio.git
- 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_26PATH="$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/shJAVA_HOME=/home/mgross/bin/jdk1.6.0_26PATH=/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.