Quick jump:  What's new

 
Go to:
 
Weblog: Android   
in Dobrica Pavlinušić's random unstructured stuff
Toshiba AC100
Compal_LA-6352P_PAZ00_AC100.pdf

Contents: [Dobrica Pavlinušić's random unstructured stuff]


Tegra 2 device

kernel

cpuinfo

$ cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 1998.84

Features        : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0xc09
CPU revision    : 0

Hardware        : NVIDIA Harmony Development System
Revision        : 0000
Serial          : 0000000000000000

$ cat /proc/meminfo
MemTotal:         383348 kB
MemFree:          106528 kB
Buffers:           30116 kB
Cached:           123316 kB
SwapCached:            0 kB
Active:           164792 kB
Inactive:          85020 kB
Active(anon):      96692 kB
Inactive(anon):        0 kB
Active(file):      68100 kB
Inactive(file):    85020 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         96412 kB
Mapped:            44536 kB
Shmem:               312 kB
Slab:               8940 kB
SReclaimable:       4848 kB
SUnreclaim:         4092 kB
KernelStack:        2528 kB
PageTables:         8324 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      191672 kB
Committed_AS:    6569284 kB
VmallocTotal:     614400 kB
VmallocUsed:       30656 kB
VmallocChunk:     520068 kB

Rooting

nvflash

Press CTRL + ESC + power button to get into APX mode

[Thu Oct 11 06:31:57 2018] usb 2-2.4: new high-speed USB device number 13 using xhci_hcd
[Thu Oct 11 06:31:57 2018] usb 2-2.4: New USB device found, idVendor=0955, idProduct=7820, bcdDevice= 1.02
[Thu Oct 11 06:31:57 2018] usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Thu Oct 11 06:31:57 2018] usb 2-2.4: Product: APX
[Thu Oct 11 06:31:57 2018] usb 2-2.4: Manufacturer: NVIDIA Corp.

In theory. In practice driver package from

is everything you need. It's from http://developer.nvidia.com/content/linux-tegra-release-12-alpha-1-released

fastboot.stock.bin

t61p:/home/dpavlin/Downloads/ldk/bootloader/alt# wget https://github.com/muromec/putusb/raw/master/bin/fastboot.stock.bin
--2011-09-12 20:40:17--  https://github.com/muromec/putusb/raw/master/bin/fastboot.stock.bin
Resolving github.com (github.com)... 207.97.227.239
Connecting to github.com (github.com)|207.97.227.239|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.github.com/muromec/putusb/master/bin/fastboot.stock.bin [following]
--2011-09-12 20:40:19--  https://raw.github.com/muromec/putusb/master/bin/fastboot.stock.bin
Resolving raw.github.com (raw.github.com)... 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 936016 (914K) [application/octet-stream]
Saving to: `fastboot.stock.bin'

100%[=====================================================>] 936,016      645K/s   in 1.4s    

2011-09-12 20:40:22 (645 KB/s) - `fastboot.stock.bin' saved [936016/936016]

t61p:/home/dpavlin/Downloads/ldk/bootloader/alt# md5sum fastboot.stock.bin 
9197365fb42c5801b4124e75ea00512c  fastboot.stock.bin

backup

Following instructions at http://gitorious.org/ac100/pages/Installation

t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash --bl fastboot.stock.bin --go
Nvflash started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 2
   chip sku: 0x8
   chip uid: 0x1700618943a00317
   macrovision: disabled
   hdcp: enabled
   sbk burned: false
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: fastboot.stock.bin
| 936016/936016 bytes sent
fastboot.stock.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully


t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --getpartitiontable partitiontable.txt
Nvflash started
[resume mode]
Succesfully updated partition table information to partitiontable.txt


t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 2 part-2.img
Nvflash started
[resume mode]
receiving file: part-2.img, expected size: 3145728 bytes
/ 3145728/3145728 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 3 part-3.img
Nvflash started
[resume mode]
receiving file: part-3.img, expected size: 524288 bytes
/ 524288/524288 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# /nvflash -r --read 4 part-4.img
bash: /nvflash: No such file or directory
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 4 part-4.img
Nvflash started
[resume mode]
receiving file: part-4.img, expected size: 2097152 bytes
/ 2097152/2097152 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 5 part-5.img
Nvflash started
[resume mode]
receiving file: part-5.img, expected size: 5242880 bytes
/ 5242880/5242880 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 6 part-6.img
Nvflash started
[resume mode]
receiving file: part-6.img, expected size: 8388608 bytes
/ 8388608/8388608 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 7 part-7.img
Nvflash started
[resume mode]
receiving file: part-7.img, expected size: 1048576 bytes
/ 1048576/1048576 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 8 part-8.img
Nvflash started
[resume mode]
receiving file: part-8.img, expected size: 314572800 bytes
/ 314572800/314572800 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 9 part-9.img
Nvflash started
[resume mode]
receiving file: part-9.img, expected size: 419430400 bytes
/ 419430400/419430400 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 10 part-10.img
Nvflash started
[resume mode]
receiving file: part-10.img, expected size: 2097152 bytes
/ 2097152/2097152 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 11 part-11.img
Nvflash started
[resume mode]
receiving file: part-11.img, expected size: 524288 bytes
/ 524288/524288 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 12 part-12.img
Nvflash started
[resume mode]
receiving file: part-12.img, expected size: 1294991360 bytes
/ 1294991360/1294991360 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 13 part-13.img
Nvflash started
[resume mode]
receiving file: part-13.img, expected size: 524288 bytes
/ 524288/524288 bytes received
file received successfully
t61p:/home/dpavlin/Downloads/ldk/bootloader# ./nvflash -r --read 14 part-14.img
Nvflash started
[resume mode]
receiving file: part-14.img, expected size: 5891424256 bytes
/ 5891424256/5891424256 bytes received
file received successfully



Linux

fetchrss: http://feeds.delicious.com/v2/rss/dpavlin/ac100?count=15
  • There was an error: 500 Can't connect to feeds.delicious.com:80 (Bad hostname 'feeds.delicious.com')


phh 2.6.32 kernel with working suspend and audio

t61p:/home/dpavlin/ac100/linux4tegra_10.9.3# LD_LIBRARY_PATH=./nvflash/ ./nvflash/nvflash --bl ./prebuilt/fastboot.stock.bin --read 6 tegra_partition_6.bin --go
Nvflash started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 2
   chip sku: 0x8
   chip uid: 0x1700618943a00317
   macrovision: disabled
   hdcp: enabled
   sbk burned: false
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: ./prebuilt/fastboot.stock.bin
| 936016/936016 bytes sent
./prebuilt/fastboot.stock.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
receiving file: tegra_partition_6.bin, expected size: 8388608 bytes
/ 8388608/8388608 bytes received
file received successfully



t61p:/home/dpavlin/ac100/linux4tegra_10.9.3# LD_LIBRARY_PATH=./nvflash/ ./nvflash/nvflash --wait --bl ./prebuilt/fastboot.stock.bin --download 6 ../32.boot.menu.v1.img --go
Nvflash started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 2
   chip sku: 0x8
   chip uid: 0x1700618943a00317
   macrovision: disabled
   hdcp: enabled
   sbk burned: false
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: ./prebuilt/fastboot.stock.bin
| 936016/936016 bytes sent
./prebuilt/fastboot.stock.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
sending file: ../32.boot.menu.v1.img
/ 8388608/8388608 bytes sent
../32.boot.menu.v1.img sent successfully


mainline kernel

u-boot from APX

This should allow you to send u-boot, kernel and initramfs to any tegra2 board which can be in APX mode without
modifying internal storage.

build u-boot

dpavlin@klin:/klin/u-boot$ cat env.sh 
export CROSS_COMPILE="arm-none-eabi-" ARCH=arm
dpavlin@klin:/klin/u-boot$ . env.sh 

dpavlin@klin:/klin/u-boot$ make paz00_defconfig

make



build kernel

dpavlin@klin:/klin/Tegra/linux$ git remote -v
origin  https://github.com/grate-driver/linux (fetch)
origin  https://github.com/grate-driver/linux (push)
samsung-tab-10.1        https://github.com/Decatf/linux (fetch)
samsung-tab-10.1        https://github.com/Decatf/linux (push)

dpavlin@klin:/klin/Tegra/linux$ git branch -vv
* master 63a6317580f8 [origin/master] ARM: tegra: Clear EMC interrupts on resume from LP1 on Tegra30+

dpavlin@klin:/klin/Tegra/linux$ cat /klin/u-boot/env.sh 
export CROSS_COMPILE="arm-none-eabi-" ARCH=arm
dpavlin@klin:/klin/Tegra/linux$ . /klin/u-boot/env.sh

dpavlin@klin:/klin/Tegra/linux$ make tegra_defconfig

make



create initrd with new modules

dpavlin@klin:/klin/Tegra/linux$ cat tegra-ramdisk.sh 
#!/bin/sh -xe

test -d initrd && rm -Rf initrd

mkdir initrd
cd initrd

gzip -cd  /tmp/initrd.img | fakeroot -- cpio -i -d -H newc --no-absolute-filenames

rm -R lib/modules/*

cd ..
make modules_install INSTALL_MOD_PATH=initrd/ INSTALL_MOD_STRIP=1

cd initrd

find . | cpio -o -R 0:0 -H newc > ../initrd.new.cpio

cd ..

gzip -f -6 initrd.new.cpio

/klin/u-boot/tools/mkimage -A arm -O linux -T ramdisk -C gzip -n uInitrd -d initrd.new.cpio.gz uInitrd.new

run it to create initrd:

dpavlin@klin:/klin/Tegra/linux$ ./tegra-ramdisk.sh 

Image Name:   uInitrd
Created:      Fri Oct 12 11:20:42 2018
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    4082917 Bytes = 3987.22 KiB = 3.89 MiB
Load Address: 00000000
Entry Point:  00000000


create bootloader file

latest version seems to be: https://gitlab.com/uboot-ac100/create_bootimage.git

dpavlin@nuc:/nuc/Tegra/ac100/create_bootimage/example$ ../create_image.pl /mnt/klin/klin/u-boot/u-boot-dtb-tegra.bin /m
nt/klin/klin/Tegra/linux/arch/arm/boot/zImage /tmp/postmarketOS-export/initrd.img /mnt/klin/klin/Tegra/linux/arch/arm/b
oot/dts/tegra20-paz00.dtb uboot.scr boot.img
Creating boot image for tegrarcm ...

./tmp_uboot.scr
image layout:
section  loadaddr       size
=================================
uboot   : 0x108000      505627
kernel  : 0x190000      6485800
initrd  : 0x7c0000      4082981
fdt     : 0xbb0000      29659
script  : 0xbc0000      226

image written to boot.img

Now press CTRL + ESC + power on to enter APX mode

dpavlin@nuc:/nuc/Tegra/ac100/create_bootimage/example$ sudo apt-get install libcrypto++6

dpavlin@nuc:/nuc/Tegra/ac100/create_bootimage/example$ /mnt/klin/klin/Tegra/tegrarcm/src/tegrarcm --bct paz00-micron-toshiba-8g.bct --bootloader boot.img --loadaddr 0x108000 
bct file: paz00-micron-toshiba-8g.bct
bootloader file: boot.img
load addr 0x108000
entry addr 0x108000
device id: 0x7820
uid:  0x1700618943a00317
RCM version: 2.1
downloading miniloader to target at address 0x40008000 (132976 bytes)...
miniloader downloaded successfully
Chip UID:                0x00000000000000001700618943a00317
Chip ID:                 0x20
Chip ID Major Version:   0x1
Chip ID Minor Version:   0x2
Chip SKU:                0x8 (t20)
Boot ROM Version:        0x1
Boot Device:             0x2 (EMMC)
Operating Mode:          0x3 (developer mode)
Device Config Strap:     0x0
Device Config Fuse:      0x0
SDRAM Config Strap:      0x0
sending file: paz00-micron-toshiba-8g.bct
- 4080/4080 bytes sent
paz00-micron-toshiba-8g.bct sent successfully
sending file: boot.img
- 11239650/11239650 bytes sent
boot.img sent successfully


u-boot loads detects initrd (it's small enough thanks to MODULES_STRIP to be detected without CRC errors) but no output from kernel.

https://archlinuxarm.org/forum/viewtopic.php?f=23&t=10044&p=51142&hilit=ac100#p51142

suggests CONFIG_TEGRA_DEBUG_UARTA instead of CONFIG_TEGRA_DEBUG_UART_AUTO_ODMDATA but it doesn't work for me.

dpavlin@klin:/klin/Tegra/linux$ grep 'TEGRA.*UART' .config
# CONFIG_TEGRA_DEBUG_UART_AUTO_ODMDATA is not set
CONFIG_TEGRA_DEBUG_UARTA=y
# CONFIG_TEGRA_DEBUG_UARTB is not set
# CONFIG_TEGRA_DEBUG_UARTC is not set
# CONFIG_TEGRA_DEBUG_UARTD is not set
# CONFIG_TEGRA_DEBUG_UARTE is not set
CONFIG_DEBUG_TEGRA_UART=y



serial port

https://ac100.grandou.net/serial_port_modification

IMG_20181014_181159-800px.jpg

The serial port is the JP1 connector, near the left speaker connector. Pinout, from right to left:

  • 1 - in - RX UART1
  • 2 - out - TX UART1
  • 3 - out - T20_WAKE#
  • 4 - out - +3V
  • 5 - out - +1.8V
  • 6
  • 7
  • 8 - in - SYSTEM_RESET#
  • 9 - in - EC_TX80_PDATA
  • 10 - in - GND

I decided to solder GND to outer pin of connector to the right of pin 1 as opposed to other side of connector.

After that, a peace of capton tape was put over solder connectors to somewhat re-enforce them and provide insulation
to keyboard cover.

Serial is 3.3V, 115200 8n1.

Output is:

dpavlin@nuc:/nuc/Tegra$ microcom -p /dev/ttyUSB2
connected to /dev/ttyUSB2
Escape character: Ctrl-\
Type the escape character to get to the prompt.

U-Boot SPL 2018.11-rc1-00130-g0a60a81ba3 (Oct 12 2018 - 11:18:01 +0200)
Trying to boot from RAM


U-Boot 2018.11-rc1-00130-g0a60a81ba3 (Oct 12 2018 - 11:18:01 +0200)

TEGRA20
Model: Toshiba AC100 / Dynabook AZ
Board: Compal Paz00
DRAM:  512 MiB
MMC:   sdhci@c8000000: 1, sdhci@c8000600: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   No ethernet found.
Hit any key to stop autoboot:  0
## Executing script at 00b30000
## Loading init Ramdisk from Legacy Image at 00700000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4269789 Bytes = 4.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00b20000
   Booting using the fdt blob at 0xb20000
   Using Device Tree in place at 00b20000, end 00b2a3da

Starting kernel ...


Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000c38, r2=0x00000000
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        NVIDIA Tegra SoC (Flattened Device Tree)

Please check your kernel config and/or bootloader.


According to http://billauer.co.il/blog/2014/02/uboot-linux-dtb-fdt-device-tree/ this means that kernel didn't found valid device tree and tries to detect board usin machine ID registrars.

Solution for this seems to use u-boot variables for loading kernel, ramfs and dtb as opposed to values which script creates,
so this works (loading from usb keychain):

fatload usb 0:1 ${kernel_addr_r} /boot/zImage
fatload usb 0:1 ${fdt_addr_r} /boot/tegra20-paz00.dtb
fatload usb 0:1 ${ramdisk_addr_r} /boot/uInitrd.new
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

Here are also known working addresses which u-boot uses:

Tegra20 (Paz00) MOD # echo ${kernel_addr_r}
0x01000000
Tegra20 (Paz00) MOD # echo ${fdt_addr_r}
0x02000000
Tegra20 (Paz00) MOD # echo ${ramdisk_addr_r} 
0x02100000

so much higher in memory map than create_image script. However, u-boot seems to want to load at 0x108000 so it's inpractical
to generate huge image to load kernel, dtb and initramfs at correct addresses.

bootstrap debian

based on https://wiki.debian.org/InstallingDebianOn/Toshiba/AC100

dpavlin@nuc:/mnt$ sudo debootstrap --foreign --arch=armhf stretch sdd1 http://ftp.hr.debian.org/debian

dpavlin@nuc:/mnt$ df sdd1/
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/sdd1        1021948 169056    784596  18% /mnt/sdd1

dpavlin@nuc:/mnt$ sudo cp /usr/bin/qemu-arm-static sdd1/usr/bin

dpavlin@nuc:/mnt$ sudo chroot sdd1 /debootstrap/debootstrap --second-stage

dpavlin@nuc:/mnt$ cd sdd1/
dpavlin@nuc:/mnt/sdd1$ sudo mount --bind /sys sys
dpavlin@nuc:/mnt/sdd1$ sudo mount --bind /dev dev
dpavlin@nuc:/mnt/sdd1$ sudo mount --bind /proc proc
dpavlin@nuc:/mnt/sdd1$ sudo chroot .

root@nuc:/# apt-get install u-boot-tools

root@ac100:/boot# cat boot.cmd 
ext2load usb 0:1 ${kernel_addr_r} /boot/zImage
ext2load usb 0:1 ${fdt_addr_r} /boot/tegra20-paz00.dtb
ext2load usb 0:1 ${ramdisk_addr_r} /boot/uInitrd
setenv bootargs root=/dev/sda1 rootwait CMA=64M tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr






u-boot over pax, usb filesystem

dpavlin@nuc:/nuc/Tegra/ac100/create_bootimage/example$ /mnt/klin/klin/Tegra/tegrarcm/src/tegrarcm --bct paz00-micron-toshiba-8g.bct --bootloader /mnt/klin/klin/Tegra/u-boot-tegra/u-boot-dtb-tegra.bin --loadaddr 0x108000
bct file: paz00-micron-toshiba-8g.bct


Serial output:

U-Boot SPL 2018.09-rc2-38340-g3d186cf3f3 (Oct 20 2018 - 10:46:53 +0200)
Trying to boot from RAM


U-Boot 2018.09-rc2-38340-g3d186cf3f3 (Oct 20 2018 - 10:46:53 +0200)

TEGRA20
Model: Toshiba AC100 / Dynabook AZ
Board: Compal Paz00
DRAM:  512 MiB
MMC:   sdhci@c8000000: 1, sdhci@c8000600: 0
Loading Environment from MMC... OK
In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   No ethernet found.
starting USB...
USB0:   USB EHCI 1.00
USB1:   No code to set up ULPI controller, please enableCONFIG_USB_ULPI and CONFIG_USB_ULPI_VIEWPORTprobe failed, error -38
USB2:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0
Tegra20 (Paz00) MOD # run usb_boot


wifi

root@ac100:/etc/network/interfaces.d# apt-get install firmware-ralink wpasupplicant

root@ac100:/etc/network/interfaces.d# cat wlx6c626d1788b3 
allow-hotplug wlx6c626d1788b3
iface wlx6c626d1788b3 inet dhcp
        wpa-ssid dreamhouse
        wpa-psk xxxxxxxx


disk speed

root@ac100:~# hdparm -tT /dev/sda /dev/mmcblk1

/dev/sda:
 Timing cached reads:   560 MB in  2.01 seconds = 279.14 MB/sec
 Timing buffered disk reads:  32 MB in  3.07 seconds =  10.43 MB/sec

/dev/mmcblk1:
 Timing cached reads:   598 MB in  2.00 seconds = 298.86 MB/sec
 Timing buffered disk reads: 108 MB in  3.01 seconds =  35.83 MB/sec

tuhing block size

root@ac100:/home/dpavlin/flashbench# ./flashbench -a /dev/mmcblk1 --blocksize=1024
align 2147483648        pre 727µs      on 1.07ms       post 784µs     diff 316µs
align 1073741824        pre 833µs      on 1.13ms       post 789µs     diff 320µs
align 536870912 pre 798µs      on 1.13ms       post 825µs     diff 317µs
align 268435456 pre 816µs      on 1.15ms       post 795µs     diff 342µs
align 134217728 pre 742µs      on 1.12ms       post 843µs     diff 327µs
align 67108864  pre 669µs      on 987µs       post 701µs     diff 303µs
align 33554432  pre 662µs      on 1.04ms       post 643µs     diff 385µs
align 16777216  pre 837µs      on 1.09ms       post 864µs     diff 242µs
align 8388608   pre 800µs      on 1.1ms        post 881µs     diff 262µs
align 4194304   pre 812µs      on 1.07ms       post 838µs     diff 246µs
align 2097152   pre 807µs      on 1.07ms       post 808µs     diff 258µs
align 1048576   pre 832µs      on 960µs       post 838µs     diff 125µs
align 524288    pre 833µs      on 959µs       post 838µs     diff 124µs
align 262144    pre 833µs      on 959µs       post 838µs     diff 124µs
align 131072    pre 833µs      on 962µs       post 840µs     diff 126µs
align 65536     pre 825µs      on 951µs       post 838µs     diff 120µs
align 32768     pre 826µs      on 956µs       post 825µs     diff 130µs
align 16384     pre 812µs      on 924µs       post 824µs     diff 106µs
align 8192      pre 809µs      on 841µs       post 808µs     diff 32.4µs
align 4096      pre 808µs      on 836µs       post 808µs     diff 27.7µs
align 2048      pre 808µs      on 836µs       post 809µs     diff 27.6µs

8192 seems good, re-test

root@ac100:/home/dpavlin/flashbench# ./flashbench -a /dev/mmcblk1 --blocksize=4096
align 2147483648        pre 696µs      on 1.04ms       post 725µs     diff 331µs
align 1073741824        pre 917µs      on 1.18ms       post 870µs     diff 289µs
align 536870912 pre 880µs      on 1.18ms       post 907µs     diff 291µs
align 268435456 pre 899µs      on 1.2ms        post 877µs     diff 311µs
align 134217728 pre 825µs      on 1.18ms       post 927µs     diff 300µs
align 67108864  pre 864µs      on 1.11ms       post 842µs     diff 253µs
align 33554432  pre 914µs      on 1.12ms       post 897µs     diff 212µs
align 16777216  pre 921µs      on 1.14ms       post 948µs     diff 210µs
align 8388608   pre 884µs      on 1.15ms       post 965µs     diff 229µs
align 4194304   pre 895µs      on 1.12ms       post 922µs     diff 215µs
align 2097152   pre 890µs      on 1.12ms       post 890µs     diff 227µs
align 1048576   pre 916µs      on 1.01ms       post 922µs     diff 89.7µs
align 524288    pre 916µs      on 1.01ms       post 922µs     diff 90µs
align 262144    pre 916µs      on 1.01ms       post 923µs     diff 89.1µs
align 131072    pre 916µs      on 1.01ms       post 924µs     diff 91.1µs
align 65536     pre 908µs      on 1ms  post 921µs     diff 85.9µs
align 32768     pre 911µs      on 1.01ms       post 908µs     diff 96.2µs
align 16384     pre 895µs      on 973µs       post 908µs     diff 71.4µs
align 8192      pre 892µs      on 896µs       post 892µs     diff 4.57µs

create filesystem

root@ac100:/home/dpavlin/flashbench# mkfs -t ext4 -v -b 4096 -E stride=2,stripe-width=2 /dev/mmcblk1p6 

cp -ax ....

root@ac100:~# mount /dev/mmcblk1p1 /tmp/1/
root@ac100:~# cat /tmp/1/boot/boot.cmd 
ext2load mmc 0:6 ${kernel_addr_r} /boot/zImage
ext2load mmc 0:6 ${fdt_addr_r} /boot/tegra20-paz00.dtb
ext2load mmc 0:6 ${ramdisk_addr_r} /boot/uInitrd
setenv bootargs root=/dev/mmcblk1p6 rootwait CMA=64M tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

# mkimage -C none -A arm -T script -d boot.cmd boot.scr



flash u-boot to mmc

based on https://paz00.ru/index.php?title=Flashing_Uboot_to_MMC&setlang=en

tegrarcm to get bct

dpavlin@nuc:/nuc/Tegra$ git clone https://github.com/NVIDIA/tegrarcm

dpavlin@nuc:/nuc/Tegra$ cd tegrarcm/

dpavlin@nuc:/nuc/Tegra/tegrarcm$ sudo apt-get install libcrypto++-dev

dpavlin@nuc:/nuc/Tegra/tegrarcm$ ./autogen.sh

dpavlin@nuc:/nuc/Tegra/tegrarcm$ make

dpavlin@nuc:/nuc/Tegra/tegrarcm$ ./src/tegrarcm --version
tegrarcm 1.8

create boot image

dpavlin@nuc:/nuc/Tegra/cbootimage$ git remote -v
origin  https://github.com/NVIDIA/cbootimage (fetch)
origin  https://github.com/NVIDIA/cbootimage (push)

dpavlin@nuc:/nuc/Tegra/cbootimage$ ./autogen.sh
dpavlin@nuc:/nuc/Tegra/cbootimage$ make


dpavlin@nuc:/nuc/Tegra/cbootimage$ cat > u-boot.cfg
Version       = 0x00020001;
Bctcopy       = 1;
Bctfile       = ac100.bct;
BootLoader    = u-boot.bin,0x00108000,0x00108000,Complete;


dpavlin@nuc:/nuc/Tegra/cbootimage$ cp ../ac100/create_bootimage/example/ac100-dpavlin.bct ac100.bct

dpavlin@nuc:/nuc/Tegra/cbootimage$ cp /mnt/klin/klin/Tegra/u-boot-tegra/u-boot-tegra.bin u-boot.bin

dpavlin@nuc:/nuc/Tegra/cbootimage$ ./src/cbootimage -d u-boot.cfg ac100.bct.new
bct size: 4080
**update_bl()
begin_update(): bct data: b=14 p=9
writing bootloader
  redundancy = 1
  BL[0]: 131073 0001 0000 518563 0x00108000 0x00108000
8e52c9639cb433e9e1e369cf718595c5
  BL[1]: 131073 0002 0000 302746 0x00108000 0x00108000
a9014f31e7ccafab319512de6bc48f81
**BL[2]: 0 0000 0000 0000 0x00000000 0x00000000
00000000000000000000000000000000
**BL[3]: 0 0000 0000 0000 0x00000000 0x00000000
00000000000000000000000000000000
Image file ac100.bct.new has been successfully generated!

dpavlin@nuc:/nuc/Tegra/cbootimage$ scp ac100.bct.new ac100:

dpavlin@nuc:/nuc/Tegra/cbootimage$ ssh root@ac100

# flash new boot image on ac100

root@ac100:~# echo 0 > /sys/block/mmcblk1boot0/force_ro
root@ac100:~# dd if=/home/dpavlin/ac100.bct.new of=/dev/mmcblk1boot0 
1045+0 records in
1045+0 records out
535040 bytes (535 kB, 522 KiB) copied, 0.135589 s, 3.9 MB/s
root@ac100:~# echo 1 > /sys/block/mmcblk1boot0/force_ro 




create bct backup

dpavlin@ac100:~$ sudo dd if=/dev/mmcblk1boot0 of=ac100-dpavlin-0.bct bs=4080 count=1
[sudo] password for dpavlin: 
1+0 records in
1+0 records out
4080 bytes (4.1 kB, 4.0 KiB) copied, 0.0018642 s, 2.2 MB/s
dpavlin@ac100:~$ sudo dd if=/dev/mmcblk1boot1 of=ac100-dpavlin-1.bct bs=4080 count=1
1+0 records in
1+0 records out
4080 bytes (4.1 kB, 4.0 KiB) copied, 0.0019622 s, 2.1 MB/s

in my case, first bct doesn't have OdmData, while 2nd does:

dpavlin@nuc:/nuc/Tegra$ grep Odm 0 1
0:OdmData       = 0x00000000;
1:OdmData       = 0x800c0075;



i2c

root@ac100:~# i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 4f 
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@ac100:~# i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@ac100:~# i2cdetect -y -r 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
permalink
A33


meanIT tablet Q70

7" IPS Quad Core

recovery: extdroid4.4.2_r2-a33-v2.0

adb shell

dpavlin@siobhan:~$ adb shell
root@astar-ococci:/ #

root@astar-ococci:/ # cat /proc/cmdline                                        
console=ttyS0,115200 root=/dev/nandd init=/init loglevel=4 specialstr= partitions=bootloader@nanda:env@nandb:boot@nandc:system@nandd:data@nande:misc@nandf:recovery@nandg:cache@nandh:metadata@nandi:private@nandj:UDISK@nandk boot_type=0 config_size=39716

root@astar-ococci:/ # cat /proc/cpuinfo                                        
Processor       : ARMv7 Processor rev 5 (v7l)
processor       : 0
BogoMIPS        : 5714.28

processor       : 1
BogoMIPS        : 4800.00

processor       : 3
BogoMIPS        : 4800.00

Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

Hardware        : sun8i
Revision        : 0000
Serial          : 1a884915


board

AL-AX3-751B-V1.0
2015.03.26

http://linux-sunxi.org/Aoson_M751s

https://github.com/Icenowy/linux-kernel-lichee-a33/tree/aoson-m751s

USB FEL

Vol+ to enter FEL mode

Bus 003 Device 004: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode

root@x230:~# sunxi-fel ver
AWUSBFEX soc=00001667(A33) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000

# read SID
root@x230:~# sunxi-fel readl 0x01c23800
0x0461872a

root@x230:~# sunxi-fel sid
0461872a:033c50c3:1a884915:00000000


device info

dpavlin@x230:~/a33$ sudo sunxi-fel read 0x42400000 0x82d0 boot1.header

# blocks and version doesn't work any more

root@x230:~# sunxi-fel -v read 0x43000000 0x20000 script.bin 

# also doesn't transfer anything and hangs



extract data from device

dpavlin@klin:/klin/armbian/sunxi-tools$ make CROSS_COMPILE=arm-linux-gnueabihf- sunxi-meminfo
arm-linux-gnueabihf-gcc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -static  -o sunxi-meminfo meminfo.c
dpavlin@klin:/klin/armbian/sunxi-tools$ make CROSS_COMPILE=arm-linux-gnueabihf- sunxi-script_extractor
arm-linux-gnueabihf-gcc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -static  -o sunxi-script_extractor script_extractor.c

# put files in /cache/ instead of /sdcard/ since /sdcard/ doesn't have executable permission
dpavlin@x230:/mnt/klin/klin/armbian/sunxi-tools$ adb push sunxi-script_extractor /cache/
[100%] /cache/sunxi-script_extractor
dpavlin@x230:/mnt/klin/klin/armbian/sunxi-tools$ adb push sunxi-meminfo /cache/
[100%] /cache/sunxi-meminfo

root@astar-ococci:/cache # ./sunxi-meminfo                                     
Error: unknown or unhandled Soc: 0x1667
255|
# urgh!

svroot@astar-ococci:/cache # ./sunxi-script_extractor > a33.bin                  
root@astar-ococci:/cache # ls -al a33.bin                                      
-rw-rw-rw- root     root       131072 2017-10-18 17:57 a33.bin





u-boot

dpavlin@klin:/klin/u-boot$ git remote -v
sunxi   git://git.denx.de/u-boot-sunxi.git (fetch)
sunxi   git://git.denx.de/u-boot-sunxi.git (push)

dpavlin@klin:/klin/u-boot$ git checkout -b sunxi/next sunxi/next
Branch 'sunxi/next' set up to track remote branch 'next' from 'sunxi'.
Switched to a new branch 'sunxi/next'

dpavlin@klin:/klin/u-boot$ make CROSS_COMPILE=arm-linux-gnueabihf- q8_a33_tablet_1024x600_defconfig

dpavlin@klin:/klin/u-boot$ make CROSS_COMPILE=arm-linux-gnueabihf- -j4


malware pre-installed

  • com.adups.fota
permalink
Android G1


If you are not into hardware Android development is better page for you.

Service manual

HTC Dream SM (A04).pdf

How to brick your phone

  • downgrade do RC29 to get root
  • this will install 1.22 radio
  • install AmonRA
  • be inpatient and flash DangerSPL
  • correct way would be to first flash Radio 2.22 (?)

How to unbrick your phone

Serial cable

ExtUSB connector

09167-01.jpg

09167-02.jpg

Nokia DKU-5

http://pinouts.ru/forum/index.php?PHPSESSID=f3d7d4eae7be553fc6847f227bda1330&topic=358.msg5390#msg5390

I got an ark3116-based DKU-5 cable, and its pin layout is as following.

1: blue (ground-shield)
3: yellow
4: orange (3.3v)
6: green (rx)
7: white (tx)
8: red (ground)

I haven't tested them yet, so before connecting them, check the voltage btw orange and red.

use only non-nokia CA-42 calble http://www.dealextreme.com/details.dx/sku.45715

home-made alternative

sim+cable strip

http://forum.xda-developers.com/showpost.php?p=7236424&postcount=724

output

x200:/virtual/openmoko# ./neocon/neocon /dev/ttyUSB0
[Open /dev/ttyUSB0]

boot reason: PM_KPD_PWR_KEY_ON_RT_ST

(PowerOn Status,Boot Reason)=(1,1)
NAND_FLASH_READ_ID : SAMSUNG_256MB_FLASH_128MB_SDRAM

ARM9_BOOT_MODE1

Boot loader

JTAG

G1_JTAG_signals.jpg

http://forum.xda-developers.com/showpost.php?p=6169249&postcount=481

arm-jtag-layout.gif

JTAG board with connector

product_1283419791_423993952_HTC_G1_RIFF_big.png

Low-power WIGGLER

Info

Reflash whole device: http://www.omnia-repair.com/forum/topic/htc-dream-g1-jtag/page/2

OpenMoko Debug Board

800px-Neo1973_debugboard_v3_top.jpg

ROM

http://code.google.com/p/htc-flasher/

Radio

recovery.img

http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images

Stats

camera+power

DREAM PVT 320 ENG S-OFF
HBOOT-1.33.2005 (DREA10000)
CPLD-4
RADIO-2.22.19.261
Apr 20 2009, 15:30:43

Board testpoints

Pictures are too large to be opened in browser!

permalink
HTC Dream G1 JTAG


related pages: Android G1 for JTAG info and Android development

JTAG

openocd

compilation

dpavlin@x200:/rest/cvs/openocd$ git remote -v
origin  git://openocd.git.sourceforge.net/gitroot/openocd/openocd (fetch)
origin  git://openocd.git.sourceforge.net/gitroot/openocd/openocd (push)
dpavlin@x200:/rest/cvs/openocd$ ./configure --enable-verbose --enable-verbose-usb-io --enable-ft2232_libftdi
dpavlin@x200:/rest/cvs/openocd$ make

info

flash

http://forum.xda-developers.com/showpost.php?p=6240836&postcount=503

If you have raw access to flash load a SPL+Recovery compatible with your radio

SPL starts at: 0x02400000 (block 288) hboot.img
Recovery starts at: 0x26c0000 (block 310) recovery.img

2005 SPL:

Tidus:spl ezterry$ ../fastboot-mac oem listpartition
... INFO[radio] start block=0, size=287 (36736 KB)
INFO[hboot] start block=288, size=6 (768 KB)
INFO[misc] start block=294, size=2 (256 KB)
INFO[mfg] start block=296, size=2 (256 KB)
INFO[sp1] start block=298, size=6 (768 KB)
INFO[misc2] start block=304, size=3 (384 KB)
INFO[mfg2] start block=307, size=3 (384 KB)
INFO[recovery] start block=310, size=40 (5120 KB)
INFO[boot] start block=350, size=20 (2560 KB)
INFO[system] start block=370, size=720 (92160 KB)
INFO[cache] start block=1090, size=240 (30720 KB)
INFO[userdata] start block=1330, size=718 (91904 KB)
INFO[cpld] start block=0, size=0 (0 KB)
INFO[microp] start block=0, size=0 (0 KB)
OKAY

Debugging

http://forum.xda-developers.com/showpost.php?p=6498820&postcount=621

That said before doing anything else take out your multi meter (and if you don't have one you are missing a tool for this type of work) and check the following:

blue-light mode

1) Put phone into blue light mode if serial is attached and power isn't: you will see bootmode 1

dpavlin@x200:/virtual/android$ ./neocon /dev/ttyUSB0 
[Closed]
[Open /dev/ttyUSB0]

boot reason: PM_KPD_PWR_KEY_ON_RT_ST

(PowerOn Status,Boot Reason)=(1,1)
NAND_FLASH_READ_ID : SAMSUNG_256MB_FLASH_128MB_SDRAM

ARM9_BOOT_MODE1
Invalid command : ?

v-ref = 2.6v

2) verify your v-ref is actually 2.6v (usually within 0.05v) when compared to the ground (any of the shielding) of the main board. You have one of the right points so there is an issue with the connection if its not.

oprnocd, trst-n = 2.6v

dpavlin@x200:/virtual/android/HTC-Dream-G1-JTAG$ sudo openocd 
Open On-Chip Debugger 0.4.0 (2010-02-23-17:04)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
dcc downloads are enabled
fast memory access is enabled
Info : clock speed 6000 kHz
Info : JTAG tap: arm9.cpu tap/device found: 0xa01700e1 (mfg: 0x070, part: 0x0170, ver: 0xa)
Info : Embedded ICE version 6
Info : arm9: hardware has 2 breakpoint/watchpoint units

3) now start open ocd: and check that trst-n is now also 2.6v when compared to ground. (if not your adapter is not working with the 2.6v.. very possible)

nTRST must be at high level (~2.6V) after openocd is launched.
With nTRST sticking low the MSM7201A debug unit is in reset state.

Maybe you'll have to tweak the cfg file. There are several options for the behaviour of nTRST.
If you don't manage to find a working cfg, you may cut the nTRST connection to your adaptor and pull the Dream's nTRST signal to Vref=2.6V permanently.
Normally this should also work... the debug unit will then leave reset state immediately after power up.

Maybe you'll have to tweak the cfg file. There are several options for the behaviour of nTRST.
If you don't manage to find a working cfg, you may cut the nTRST connection to your adaptor and pull the Dream's nTRST signal to Vref=2.6V permanently.
Normally this should also work... the debug unit will then leave reset state immediately after power up.

soldering

4) with that done and you are still having problems as we said before check the soldering work.. Here there are two possibilities:

    A) bridges - the wire is in contact with something in addition to the testpoint
    B) bad joints - while the wire may act attached it is not. (Others must be able to explain this better than myself..)

    The tiniest bit of flux goes a long way here..

    One quick thing you can test is that none of the 5 test points are connected to ground (disconnect rtck for now its one less variable) and that none are shorted to eachother.

other

Other things to check:

  • How long are the wires.. My setup runs much faster and the wires are not exactly short .. but the more wire the more chance for noise..
  • is the speed acceptable with the parport (if this is a real parport I'll hope openocd has sane defaults but it is something to keep in mind)
  • phone is in blue light mode (the phone can disable the jtag port.. this happens when amss is booted either via the GO2AMSS command or when the linux kernel is started. I also have no issue connecting to JTAG while the battery is charging.
  • Ensure the openocd application is not running when you boot the phone.

softload radio ROM

dpavlin@x200:~$ nc 127.0.0.1 4444
��������Open On-Chip Debugger
> halt
halt
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 read operation timed out
cp15 write operation timed out
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x00907aa0
MMU: disabled, D-Cache: enabled, I-Cache: enabled

> load_image /home/dpavlin/ipad/jtag-g1/flash/radio-3.22.26.17_dream.img 0x103B5300
load_image /home/dpavlin/ipad/jtag-g1/flash/radio-3.22.26.17_dream.img 0x103B5300
No working memory available. Specify -work-area-phys to target.
no working area available, falling back to memory writes
22020096 bytes written at address 0x103b5300
downloaded 22020096 bytes in 1208.393921s (17.796 kb/s)
> resume
resume
> shutdown
shutdown
permalink
Android development

I will try to collect here useful tips for making Android development work for command-line loving person like me. See Android G1 if you are interested in hardware.



ADB

Part of http://developer.android.com/sdk/index.html

Remote adb access

dpavlin@t61p:~/Downloads/android$ adb shell
# setprop service.adb.tcp.port 5555

dpavlin@t61p:~$ ssh -R 5555:192.168.1.40:5555 klin

dpavlin@klin:~$ adb connect 127.0.0.1:5555

dpavlin@klin:~$ adb devices
List of devices attached 
127.0.0.1:5555  device

provision device

adb shell
su
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
INSERT INTO system (name, value) VALUES ('device_provisioned', 1);
.exit

CyanogenMod

Google apps

dpavlin@android:/srv/cyanogen$ wget \
--referer=http://developer.htc.com/google-io-device.html \
-O dream_sapphire_update.zip \
http://member.america.htc.com/download/RomCode/ADP/signed-google_ion-ota-14721.zip?
--2010-10-01 17:42:10--  http://member.america.htc.com/download/RomCode/ADP/signed-google_ion-ota-14721.zip?
Resolving member.america.htc.com... 216.139.227.226
Connecting to member.america.htc.com|216.139.227.226|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 53965203 (51M) [application/x-zip-compressed]
Saving to: `dream_sapphire_update.zip'

100%[=========================================================================>] 53,965,203   376K/s   in 2m 29s  

2010-10-01 17:44:39 (354 KB/s) - `dream_sapphire_update.zip' saved [53965203/53965203]

dpavlin@android:/srv/cyanogen$ cd device/htc/dream_sapphire
dpavlin@android:/srv/cyanogen/device/htc/dream_sapphire$ ./unzip-files.sh

Build

A lot of host dependencies to install and build.

dpavlin@android:/srv/cyanogen$ . build/envsetup.sh
dpavlin@android:/srv/cyanogen$ lunch
dpavlin@android:/srv/cyanogen$ make -j8

flashing

Transfer files you just built:

dpavlin@x200:/virtual/android/cyanogen$ rsync -v android:/srv/cyanogen/out/target/product/dream_sapphire/{boot.img,recovery.img,system.img,android-info.txt} 2010-09-25/

Download fastboot from http://developer.htc.com/adp.html

Start G1 by pressing camera+power button

dpavlin@x200:/virtual/android/cyanogen$ sudo ./fastboot devices
HT840GZ00000    fastboot

dpavlin@x200:/virtual/android/cyanogen$ sudo sh -c "ANDROID_PRODUCT_OUT=2010-09-25/ ./fastboot flashall"
--------------------------------------------
Bootloader Version...: 1.33.2005
Baseband Version.....: 2.22.19.26I
Serial Number........: HT840GZ33728
--------------------------------------------
checking product... OKAY
checking version-bootloader... OKAY
sending 'boot' (2234 KB)... OKAY
writing 'boot'... OKAY
sending 'recovery' (3308 KB)... OKAY
writing 'recovery'... OKAY
sending 'system' (92239 KB)... OKAY
writing 'system'... OKAY
rebooting... 

SL4A

x86

froyo 2.2

dpavlin@android:/srv/android-x86$ repo init -u git://git.android-x86.org/manifest.git -b froyo-x86
dpavlin@android:/srv/android-x86$ repo sync

# configure build
dpavlin@android:/srv/android-x86$ . build/envsetup.sh
dpavlin@android:/srv/android-x86$ lunch

# build
dpavlin@android:/srv/android-x86$ make -j8

audio doesn't work

alternativly, you can build generix_x86

We need /sbin in PATH to access e2fsprogs utilities needed to build image

dpavlin@android:/srv/android-x86$ export PATH=/sbin:$PATH
dpavlin@android:/srv/android-x86$ make -j8 iso_img TARGET_PRODUCT=generic_x86

eclair 2.1

dpavlin@android:/srv/android-x86$ repo init -u git://git.android-x86.org/manifest.git -b eclair-x86
dpavlin@android:/srv/android-x86$ repo sync
dpavlin@android:/srv/android-x86$ make -j8 iso_img TARGET_PRODUCT=generic_x86
# doesn't work

dpavlin@android:/srv/android-x86$ make -j8 iso_img TARGET_PRODUCT=eeepc

Application build process

repo

repack applications

repository with scripts

fetchatom: http://github.com/dpavlin/android-command-line/commits/master.atom
  • There was an error: 500 SSL negotiation failed:

permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...