Running Android or Linux from an SD card on a RK3288 device - An easy way to dual boo - Android Stick & Console RockChip based Computers

If you are interested in dual booting Android and Linux on your RK3288 device or you simply want to try a different Android ROM or Linux distro without flashing the device, then use this method of booting from an SD card.
You will need a PC running Linux and an SD card of 8 GB or more, at least class 10 speed.
Download the tools from 'https://drive.google.com/file/d/0B99O3A0dDe67bGVqWkZMRGFCSjg'. After unzipping you will see two shell scripts called 'create-android-sdcard' and 'create-linux-sdcard', a directory called 'Tools', a file called 'RK3288Loader_uboot_V2.17.02.bin' and some '.img' files together with a 'parameter' file.
To be able to dual boot (i.e. boot directly from the device or from an SD card), you will first need to update the bootloader on your device. Either use 'AndroidTool v2.3' on Windows or 'upgrade_tool' on Linux to flash just the 'Loader' with the 'RK3288Loader_uboot_V2.17.02.bin' file.
To create a bootable SD card first put it into your PC and use a command like 'blkid' or 'lsblk' to identify its device name (e.g. /dev/sdc).
For Android, run the script 'create-android-sdcard' and pass the name and location of the Android ROM you want to install onto the SD card, e.g.:
./create-android-sdcard radxa_rock_android_kitkat_140909_update.img
The program will prompt you to confirm the name of the device for the SD card. Once confirmed it will then unpack the Android ROM, create partitions on the SD card that mimic the ROM including a 'user' partition that will use the remaining space of the SD card. It will then install the Android ROM to the SD card and notify you when complete.
For Linux, as currently no standard approach to creating a Linux distro exists, to allow flexibility you will have to perform some initial set up steps. I've included example kernel and resource images which work fine on the Firefly, MK802V (et al) and Orion R28 (et al). I've also included download links for example root file systems (RFSs). Download either the Ubuntu 12.04 or Xubuntu/Lubuntu 14.10 RFS and unzip and rename as 'linux-rfs.img'. If you want to try a different kernel/resource combo simply rename them as 'kernel-linux.img' and 'resource-linux.img'. You can also use the tools in the 'Tools' directory to unpack Linux distros for those who want to experiment. Just don't modify the 'boot-linux.img' or 'parameter-linux' files as these must be used rather than any supplied as part of a Linux distro for Linux to boot from SD card.
Once set up, simply run:
./create-linux-sdcard
The program will initially prompt you to confirm the name the device for the SD card and then it will create a bootable Linux SD card from the images defined in the'*.img' files.
Now just take the SD card and insert into your RK3288 device and power on to enjoy booting either Android or Linux.
The Android script will work with any Android ROM packed as an image with a separate 'data' and 'user' partition. I recently saw a ROM with the 'user' partition effectively combined with the 'data' partition. My sketchy knowledge of Android includes the memory of some requirement to have the 'user' partition as type 'vfat' as some programs expected or required that format. So until I can confirm this, or identify which Android version release it pertains to, I've not included it yet within the script.
Both scripts work for RK3288 and RK3188 devices. They utilize the excellent work from Fukaumi-san (naobsd) who provided the binary headers required to boot from SD card (see the 'README.txt' in the 'Tools' directory for further details and the required copyright notice, conditions and disclaimer).
The other key advantage of these scripts is that they allow you to boot a 'bricked' device. Some time ago I managed to break my Orion R28 Meta such that it would not boot and could not be flashed. I've included the required functionality in the scripts to boot even if no memory can be found on the device. So now I have a working Orion R28 again, albeit just from SD card.
Enjoy!

Alternatively use https://drive.google.com/file/d/0B99O3A0dDe67VFRucUM0bS1CWUE for undefined 'user' partition Android ROMs.

can´t creat sd card ubuntu image
first of all let me give congratulations for the excelent work for the community including the creation of tuturiais.
I have a firefly rk3288 and tried to install ubuntu 14.04 through this method in sd card. But doesn´t work for me. it gives an error at line 116 of rkcrc file and does not create the desired image.
the steps I took were these:
[email protected]:/media/sda2/xxx$ ls
boot-linux.img linux-rfs.img rkcrc
create-android-sdcard mkkrnlimg rkunpack
create-linux-sdcard parameter-linux sdboot_rk3188.img
create-sdcard.7z README.txt sdboot_rk3288.img
downloadable-rfs-examples resource-linux.img split_bootimg_pl
kernel-linux.img RK3288Loader_uboot_V2.17.02.bin Tools
[email protected]:/media/sda2/xxx$./create-linux-sdcard
./create-linux-sdcard: Is your SD card loaded as '/dev/sdc' (y/n)? n
./create-linux-sdcard: Do you want to use a different device? y
./create-linux-sdcard: Enter new device name? /dev/sdb
./create-linux-sdcard: Is your SD card loaded as '/dev/sdb' (y/n)? y
./create-linux-sdcard: Unmounting partitions on '/dev/sdb' ... done.
./create-linux-sdcard: Formatting SD card '/dev/sdb' ... done.
./create-linux-sdcard: Flashing bootloader 'sdboot_rk3288.img' to '/dev/sdb' ... done.
./create-linux-sdcard: Updating partition table on '/dev/sdb' ... done.
./create-linux-sdcard: Calculating partition size for '/dev/sdb' ... done.
./create-linux-sdcard: Creating 'linux' partition as '/dev/sdb1' on /dev/sdb ...done.
./create-linux-sdcard: Making 'ext4' file system for 'linux' partition on '/dev/sdb1' ... done.
./create-linux-sdcard: Creating 'parameter-linux.img' from 'parameter-linux' ... ./create-linux-sdcard: line 116: /media/sda2/xxx/Tools/rkcrc: cannot execute binary file
done.
./create-linux-sdcard: Cannot create 'parameter-linux.img' ... exiting.
Can you help me? Is there any thing wrong in my steps?
Thanks
João Xavier

Building a kernel to work with this...
Hi Ian,
Thanks for your work on this. I've managed to get my Q8 RK3288(Board xt-q8l-v10) box booting into Linux from the SD card using your installation scripts.
However what I would really like to do is experiment with OpenCL on the GPU. Do do this I need compile a new kernel with the kernel source from ARM that matches the user space binary ARM posted.
The problem is that I can't get any of the kernels I compile to boot. Like the HDMI doesn't even initialise, so no logging. I've included my .config file that I'm using with the code from here:
https://github.com/linux-rockchip/linux-rockchip/tree/mirror/rk3288-rbox-kk
It's the 3.10.37 kernel.
Is there some unusual config to get the kernel to boot with the RK bootloader? I assume I can replace the kernel-linux.img without replacing the resource-linux.img given that the kernels are both 3.10.*
To flash the zImage I use the provided mkkrnlimg to create kernel-linux.img, and then do:
dd if=kernel-linux.img of=/dev/sdb conv=sync,fsync seek=$((0xC000))
replacing the kernel-linux.img with the one you provide makes the sdcard boot successfully again.
Any help would be great!
Tim.
UPDATE 22nd March
I managed to get access to the serial console. See here http://www.freaktab.com/showthread.php?24293-Serial-port-on-XT-Q8L-V10
The kernel I compiled reboots before flushing all data to the port. It's in a boot-loop logging
Code:
U-Boot 2014.10-RK3288-02 (Nov 10 2014 - 03:41:49)
CPU: rk3288
CPU's clock information:
arm pll = 600000000HZ
periph pll = 300000000HZ
ddr pll = 200000000HZ
codec pll = 594000000HZ
Board: Rockchip platform Board
DRAM: Found dram banks:1
Adding bank:0000000000000000(0000000080000000)
128 MiB
SDCard Boot.
storage init OK!
Using default environment
GetParam
check parameter success
Unknow param: MACHINE_MODEL:linuxium-sdcard-parameter!
Unknow param: MACHINE_ID:007!
Unknow param: MANUFACTURER:RK30SDK!
Unknow param: PWR_HLD: 0,0,A,0,1!
failed to prepare fdt from boot!
power key: bank-0 pin-5
Enter power_led_init
can't find dts node for ricoh619
pmic:act8846
Can't find dts node for fuel guage cw201x
SecureBootEn = 0, SecureBootLock = 0
#Boot ver: 0000-00-00#0.00
empty serial no.
no fuel gauge found
no fuel gauge found
read logo_on switch from dts [0]
checkKey
vbus = 1
no fuel gauge found
failed to find part:misc
misc partition not found!
Hit any key to stop autoboot: 0
failed to load fdt from boot!
kernel @ 0x02000000 (0x005f4e38)
ramdisk @ 0x059fc000 (0x0015b520)
Secure Boot state: 0
bootrk: do_bootm_linux...
Loading Device Tree to 0561c000, end 05636f1c ... OK
Add bank:0000000000000000, 0000000080000000
Starting kernel ...
<hit enter to activate fiq debugger>
[ 0.000000] Booting Linux on physical CPU 0x500
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.0 ([email protected]) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #8 SMP PREEMPT Sat Mar 21 18:24:56 CET 2015
[ 0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Rockchip RK3288 (Flattened Device Tree), model: rockchip,rk3288
[ 0.000000] rockchip_ion_reserve
[ 0.000000] cma: CMA: reserved 16 MiB at 2e800000
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] Boot mode: PANIC (7) flag: NORMAL (0xc3524200)
[ 0.000000] PERCPU: Embedded 9 pages/cpu @c1ce0000 s14016 r8192 d14656 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522768
[ 0.000000] Kernel command line: console=tty0 init=/sbin/init mtdparts=rk29xxnand:[email protected](resource),[email protected](kernel),[email protected](boot) storagemedia=sd loader.timestamp=2014-11-10_03:41:49
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 2048MB = 2048MB total
[ 0.000000] Memory: 2048728k/2048728k available, 48424k reserved, 1318912K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0a95bcc (10807 kB)
[ 0.000000] .init : 0xc0a96000 - 0xc0aeb6c0 ( 342 kB)
[ 0.000000] .data : 0xc0aec000 - 0xc0b8bb08 ( 639 kB)
[ 0.000000] .bss : 0xc0b8bb08 - 0xc0ca8a44 (1140 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU dyntick-idle
The bits about device trees and fdt? in the boot-loader's output look suspicious... How does the kernel get the device tree in this setup? Device trees are new to me as this is my first time building ARM kernels.
UPDATE 26nd March
Turns out the hang kernel startup is due to having 'Framebuffer Console support' enabled. Compiling it as a module and loading once the systems up gives a SEGV. I've now got the Q8 booting into a basic Debian install but without Wifi or HDMI output.
UPDATE 5th April
I've got ARM's OpenCL working with the firefly kernel. I've started a project with wiki on BitBucket
https://bitbucket.org/DengueTim/q8-rk3288-kernel/wiki/Home

Timp74 said:
Hi Ian,
Thanks for your work on this. I've managed to get my Q8 RK3288(Board xt-q8l-v10) box booting into Linux from the SD card using your installation scripts.
.........------...........
UPDATE 5th April
I've got ARM's OpenCL working with the firefly kernel. I've started a project with wiki on BitBucket
https://bitbucket.org/DengueTim/q8-rk3288-kernel/wiki/Home
Click to expand...
Click to collapse
I am damn happy to read your post and see your work on that rockchip based low-budged device.
I also own XT-Q8L-V10 pcb, another label but same board.
Sorry for my question, but when you can run ARM's OpenCL working on that device, does that mean that I can:
-Kind of unlock the bootloader to run wasser-rom or other rk-based rom's?
-Running standalone kodi (in the past openELEC or xbmc) as system?
-Get more system speed by using the a good-class external sd-card for os instead of low-budget nand (foresee) on-board?
-In anyway to run hdmi-cec?
I would be so happy to hear from you!
Greetings by I_did_it_just_tmrrow

Right now I am using UGOOS UT3S Tv box based on RK3288 chipset using dualboot. Android 4.4 and xubuntu 15.04 firmware released in july or august. As for me a rather stable decision for RK3288 devices

Linuxium said:
Alternatively use https://drive.google.com/file/d/0B99O3A0dDe67VFRucUM0bS1CWUE for undefined 'user' partition Android ROMs.
Click to expand...
Click to collapse
Hi friend . I wish my box was RK3288 but I have RK3229 . I would like to use your tutorial to boot any Ubuntu distro on my MXQ mini ( fake copy) box to get chrome desktop + netflix+amazon video through browser working ...
Where could I find .bin file to modify my bootloader ....I guess that's the big question ...Any suggestions..if I have to make it _ could you send me in the right direction.

Linuxium said:
If you are interested in dual booting Android and Linux on your RK3288 device or you simply want to try a different Android ROM or Linux distro without flashing the device, then use this method of booting from an SD card.
You will need a PC running Linux and an SD card of 8 GB or more, at least class 10 speed.
Download the tools from 'https://drive.google.com/file/d/0B99O3A0dDe67bGVqWkZMRGFCSjg'. After unzipping you will see two shell scripts called 'create-android-sdcard' and 'create-linux-sdcard', a directory called 'Tools', a file called 'RK3288Loader_uboot_V2.17.02.bin' and some '.img' files together with a 'parameter' file.
To be able to dual boot (i.e. boot directly from the device or from an SD card), you will first need to update the bootloader on your device. Either use 'AndroidTool v2.3' on Windows or 'upgrade_tool' on Linux to flash just the 'Loader' with the 'RK3288Loader_uboot_V2.17.02.bin' file.
To create a bootable SD card first put it into your PC and use a command like 'blkid' or 'lsblk' to identify its device name (e.g. /dev/sdc).
For Android, run the script 'create-android-sdcard' and pass the name and location of the Android ROM you want to install onto the SD card, e.g.:
./create-android-sdcard radxa_rock_android_kitkat_140909_update.img
The program will prompt you to confirm the name of the device for the SD card. Once confirmed it will then unpack the Android ROM, create partitions on the SD card that mimic the ROM including a 'user' partition that will use the remaining space of the SD card. It will then install the Android ROM to the SD card and notify you when complete.
For Linux, as currently no standard approach to creating a Linux distro exists, to allow flexibility you will have to perform some initial set up steps. I've included example kernel and resource images which work fine on the Firefly, MK802V (et al) and Orion R28 (et al). I've also included download links for example root file systems (RFSs). Download either the Ubuntu 12.04 or Xubuntu/Lubuntu 14.10 RFS and unzip and rename as 'linux-rfs.img'. If you want to try a different kernel/resource combo simply rename them as 'kernel-linux.img' and 'resource-linux.img'. You can also use the tools in the 'Tools' directory to unpack Linux distros for those who want to experiment. Just don't modify the 'boot-linux.img' or 'parameter-linux' files as these must be used rather than any supplied as part of a Linux distro for Linux to boot from SD card.
Once set up, simply run:
./create-linux-sdcard
The program will initially prompt you to confirm the name the device for the SD card and then it will create a bootable Linux SD card from the images defined in the'*.img' files.
Now just take the SD card and insert into your RK3288 device and power on to enjoy booting either Android or Linux.
The Android script will work with any Android ROM packed as an image with a separate 'data' and 'user' partition. I recently saw a ROM with the 'user' partition effectively combined with the 'data' partition. My sketchy knowledge of Android includes the memory of some requirement to have the 'user' partition as type 'vfat' as some programs expected or required that format. So until I can confirm this, or identify which Android version release it pertains to, I've not included it yet within the script.
Both scripts work for RK3288 and RK3188 devices. They utilize the excellent work from Fukaumi-san (naobsd) who provided the binary headers required to boot from SD card (see the 'README.txt' in the 'Tools' directory for further details and the required copyright notice, conditions and disclaimer).
The other key advantage of these scripts is that they allow you to boot a 'bricked' device. Some time ago I managed to break my Orion R28 Meta such that it would not boot and could not be flashed. I've included the required functionality in the scripts to boot even if no memory can be found on the device. So now I have a working Orion R28 again, albeit just from SD card.
Enjoy!
Click to expand...
Click to collapse
Hello
Does anyone else have these files with scripts for creating an SD card with booting android? I would like to try to combine with RK3318.
Thanks in advance

Related

/system writable with unionfs

Hi,
I've followed the instructions on how to build froyo on Ubuntu 10.04 32Bit,
I had to disable gdb in /buildroot/local/g8_arm/g8_arm.config
or shot make -i world
make menuconfig breaks everything
....so edit configs by hand.....
then it builds fine.....
thanks to his patch:
www android-hilfe de /android-os-entwicklung-customize/4801-kernel-module-kompilieren-erster-versuch.html
it runs (else unionfs complains about missing symbols..)
Code:
adb push unionfs.ko /data/local/tmp
adb push ntfs.ko /data/local/tmp
I've created a second 2GB ext3 partition on my sdhc class6
Code:
insmod /data/local/tmp/unionfs.ko
mount /dev/block/vold/179:18 /data/newroot
mount -t unionfs -o dirs="/data/newroot/rootfs=rw:/system=ro" unionfs /system
and now i've things like a writeble host file .....
it runs since yesterday here - and is fine.
jens
jensbln said:
Hi,
I've followed the instructions on how to build froyo on Ubuntu 10.04 32Bit,
I had to disable gdb in /buildroot/local/g8_arm/g8_arm.config
or shot make -i world
make menuconfig breaks everything
....so edit configs by hand.....
then it builds fine.....
thanks to his patch:
www android-hilfe de /android-os-entwicklung-customize/4801-kernel-module-kompilieren-erster-versuch.html
it runs (else unionfs complains about missing symbols..)
Code:
adb push unionfs.ko /data/local/tmp
adb push ntfs.ko /data/local/tmp
I've created a second 2GB ext3 partition on my sdhc class6
Code:
insmod /data/local/tmp/unionfs.ko
mount /dev/block/vold/179:18 /data/newroot
mount -t unionfs -o dirs="/data/newroot/rootfs=rw:/system=ro" unionfs /system
and now i've things like a writeble host file .....
it runs since yesterday here - and is fine.
jens
Click to expand...
Click to collapse
For morons like me what does that mean....root access??
Sorry if that is a dumb question
@mothy
so far, temporary root with writable /system directory
So just to be clear. Do you replace the kernel at all?
And do you have to mount the sd partition every time you boot up?
It's for the original Archos Kernel 2.6.29-omap1
Code:
# lsmod
ntfs 213028 0 - Live 0xbf276000
unionfs 74364 1 - Live 0xbf211000
this means you have to
temproot+"re"mount
the writable places, maybe soft-reboot (i use LCDDensity, it's soft-rebooting) and all your're changes are magicly there
instead of using sd, you can just create /data/newroot and let the things go there
Code:
# df -h
/dev/block/mmcblk0p4 299.4M 205.1M 78.9M 72% /data
i don't see any new rom's soon, unless we get a new bootloader, Archos uses mmcblk0 (an SD-Card device) and not mtd, so i think we can forget all that fastboot, flash_unlock mtd stuff.
this is very annoying, maybe i'm wrong,
but it looks like they don't want us to reflash the device :-(
unionfs usually need a own kernel, but the "ugly patches" make it run with the archos gen8 kernel
So i use temproot, gscript, LCDDensity after each reboot - and have all my settings back, apps like adsfree runs...
jens
forgive my lack of knowledge but you keep mentioning ntfs in the code fragments but you havent actually said that this is giving you ntfs support. does your kernal changes allow for reading ntfs volumes?
yes, i hope so, but i havn't tested it until now, minimum is that you can mount ntfs volumes by hand - but maybe it's automounting....
i want test a HD movie from sd, but mine doesnt fit in 4Gig (fat)
jens
i've connected same ntfs disk and:
Code:
usb 2-1:1.0: uevent
usb-storage 2-1:1.0: usb_probe_interface
usb-storage 2-1:1.0: usb_probe_interface - got id
devdb: devpath usb-musb_hdrc-1 not found
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
/mnt/flash/releases/G8A/v2.0.53-r80341/arcbuild/linux/drivers/usb/core/inode.c: creating file '002'
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 2-0:1.0: port 1 enable change, status 00000503
scsi 0:0:0:0: Direct-Access SAMSUNG HM160HI PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 38 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 38 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
usb-storage: device scan complete
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda1.
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 2-0:1.0: port 1, status 0100, change 0001, 12 Mb/s
usb 2-1: USB disconnect, address 2
usb 2-1: unregistering device
usb 2-1: usb_disable_device nuking all URBs
usb 2-1: unregistering interface 2-1:1.0
same things more need to be done, a trick could be having a small fat partition, so the system has it's sda1 as fas as expecting .....
jens

Flashed a kernel? Now your xoom is on fire...

I think the most common problem we are seeing is people not clearing the old files. Before you download a new kernel and extract it, delete the old files from your SDK directory on your computer. Everyone that has had a problem so far, either screwed up a step or flashed a combo of new files and old files (ie the wifi not working after). So again BEFORE you extract the new kernel, REMOVE all old kernel files from the SDK directory on your computer.
List of files:
boot.img
/system/lib/modules/bcm4329.ko
/system/lib/modules/tun.ko
/system/lib/modules/scsi_wait_scan.ko
/system/lib/modules/cifs.ko
/system/etc/vold.fstab
You may ask why i didn't post this in the development forum, cause i'm not developing anything.
upgrading from Tiaman 1.1.6 to 1.3.1 just overwrites them ... you mean changing kernels completely right?
MitchRapp said:
upgrading from Tiaman 1.1.6 to 1.3.1 just overwrites them ... you mean changing kernels completely right?
Click to expand...
Click to collapse
No i mean the files on your computer, not the xoom. People are extracting the files into the SDK directory. Then leaving them there to mix with the new files. The xoom will overwrite what it needs to.
bwcorvus said:
I think the most common problem we are seeing is people not clearing the old files. Before you download a new kernel and extract it, delete the old files from your SDK directory on your computer. Everyone that has had a problem so far, either screwed up a step or flashed a combo of new files and old files (ie the wifi not working after). So again BEFORE you extract the new kernel, REMOVE all old kernel files from the SDK directory on your computer.
List of files:
boot.img
/system/lib/modules/bcm4329.ko
/system/lib/modules/tun.ko
/system/lib/modules/scsi_wait_scan.ko
/system/lib/modules/cifs.ko
/system/etc/vold.fstab
You may ask why i didn't post this in the development forum, cause i'm not developing anything.
Click to expand...
Click to collapse
This is why I always copy my files into a temp directory as shown in this post
Or just use a different folder for each version, and cd to the directory before you flash.
Also, you can do adb push system /system, and it'll put them in the right folders if you have it mirrored in your PC's folders.
Mine doesn't power up after following the procedure, it stays in the Motorola Dual Core logo..
I guess no XOOM for me until tomorrow
dmesg output:
Code:
<4>[ 18.182391] Primary GPT is invalid, using alternate GPT.
<6>[ 18.182577] mmcblk1: p1 (ebb) p2 (pdsb) p3 (misc) p4 (logo.bin) p5 (kpanic) p6 (recovery) p7 (boot) p8 (system) p9 (cache) p10 (userdata)
<6>[ 18.567134] android_usb gadget: high speed config #1: android
<6>[ 18.572291] EXT4-fs (mmcblk1p8): INFO: recovery required on readonly filesystem
<6>[ 18.572602] EXT4-fs (mmcblk1p8): write access will be enabled during recovery
<6>[ 18.603790] EXT4-fs (mmcblk1p8): recovery complete
<6>[ 18.606421] EXT4-fs (mmcblk1p8): mounted filesystem with ordered data mode. Opts: (null)
<6>[ 18.682391] EXT4-fs (mmcblk1p10): recovery complete
<6>[ 18.683460] EXT4-fs (mmcblk1p10): mounted filesystem with ordered data mode. Opts: (null)
<6>[ 18.701587] EXT4-fs (mmcblk1p9): recovery complete
<6>[ 18.702643] EXT4-fs (mmcblk1p9): mounted filesystem with ordered data mode. Opts: (null)
<4>[ 18.740397] init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
<3>[ 18.745288] init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
<6>[ 18.844887] enabling adb
<6>[ 18.861463] adb_open
<6>[ 18.924122] warning: `rild' uses 32-bit capabilities (legacy support in use)
<6>[ 18.928677] gps_brcm4750_ioctl: Setting gps gpio reset pin: 0
<6>[ 18.928769] stingray_gps_reset_gpio: setting GPS Reset GPIO to 0
<6>[ 18.928937] gps_brcm4750_ioctl: Setting gps gpio standby pin to: 0
<6>[ 18.929026] stingray_gps_standby_gpio: setting GPS standby GPIO to 0
<6>[ 18.930479] gps_brcm4750_ioctl: Setting gps gpio reset pin: 1
<6>[ 18.930572] stingray_gps_reset_gpio: setting GPS Reset GPIO to 1
<6>[ 19.003124] adb_release
<6>[ 19.003397] adb_open
<6>[ 19.028708] gps_brcm4750_ioctl: Setting gps gpio standby pin to: 1
<6>[ 19.029017] stingray_gps_standby_gpio: setting GPS standby GPIO to 1
<6>[ 19.261164] android_usb gadget: high speed config #1: android
<6>[ 19.577060] tear_down_dma
<6>[ 19.577183] setup_dma
<6>[ 37.780346] gps_brcm4750_ioctl: Setting gps gpio standby pin to: 0
<6>[ 37.780512] stingray_gps_standby_gpio: setting GPS standby GPIO to 0

[Android] TouchPad Android kernel mini howto

It seems there is little information on the internet regarding how to compile the kernel and how to convert to the correct image format so the boot loader will recognise and how to transfer it over to the touchpad. I ended up spent a few hours and finally figured out. I hope this will be useful for someone. I will try to make it concise as this is mainly aimed for developers.
What you will need
A linux development machine with uboot mkimage tool installed.
Sourcery G++ Lite 2010q1-188 for ARM EABI cross compile tool chain
https://sourcery.mentor.com/sgpp/lite/arm/portal/release1294
Touchpad kernel source
https://github.com/CyanogenMod/hp-kernel-tenderloin
CM7 Alpha 3 image (zip file)
http://goo-inside.me/roms/cmtouchpad/alpha3/update-cm-7.1.0-tenderloin-a3-fullofbugs-signed.zip
Prepare
Download CM7 Alpha 3 image and extract the boot.img to a temporary place.
Download Sourcery G++ Lite and install it. Add the G++ Lite tool chain binaray path to the PATH env variable. Get the kernel source from git hub and extract to local disk and change directory to the kernel source.
Compile the kernel
Still in the kernel source directory run
Code:
make ARCH=arm CROSS_COMPILE=arm-none-eabi- tenderloin_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-eabi- uImage
Prepare the initramfs U-boot image
Extract the initramfs from the boot.img saved in temporary folder and convert it to uboot-image format
Code:
dd if=boot.img bs=1 skip=3577748 of=img.gz
mkimage -A arm -O linux -T ramdisk -C none -a 0x60000000 -e 0x60000000 -n "Image" -d ./img.gz arch/arm/boot/uRamdisk
(The dd offset for alpha 2.1 image is 3561152)
Combine the kernel and initramfs into a single U-boot image
Create a combined U-boot image (kernel and initramfs)
Code:
mkimage -A arm -O linux -T multi -a 0x40208000 -e 0x40208000 -C none -n "multi image" -d arch/arm/boot/uImage:arch/arm/boot/uRamdisk uImage.CyanogenMod.new
Transfer it to the device
Boot your touchpad into recovery mode and run
Code:
adb shell mount /dev/block/mmcblk0p13 /boot
adb push uImage.CyanogenMod.new /boot/uImage.CyanogenMod.new
adb shell umount /boot
adb shell reboot
After it reboot you should be able to see a new CyanogenMod.new item from the boot menu.
That's it!
Optimisation
For those who wants to experiment with GCC build options you can update the entry "arch-$(CONFIG_CPU_32v7" in file arch/arm/Makefile and I set mine to
Code:
arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -O2 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
Warning
Please be aware you are working on the bleeding edge kernel for touchpad and there is no guarantee that the latest git version will work for you. Please try an earlier version if that's the case.
As of 2011-11-23 you will need the latest kernel source to build kernel for alpha 3. Please do not mix the kernel with an initramfs from a different version, i.e. don't use initramfs extracted from alpha 2.1 and use it with alpha3.
Thanks for this. Last weekend spent a while trying to figure this out.
Sent from my HP Touchpad using Tapatalk
x2. Huge thanks
Thank you soooooo much for this guide. Quick question if you don't mind though.. I am using an mkimage that goes back to my nook kernel days. Is there anything newer out, or would this still be ok,?
Divine_Madcat said:
Thank you soooooo much for this guide. Quick question if you don't mind though.. I am using an mkimage that goes back to my nook kernel days. Is there anything newer out, or would this still be ok,?
Click to expand...
Click to collapse
As long as the mkimage can generate a standard U-boot image it should be fine.
You can always try it yourself. In worst case you have to hard reboot the touchpad by pressing the power button and home button at the same time for more than 10 minutes. As long as you keep the original image files (UImage.*) untouched I don't think you can brick it even if you want to.
S7
I have been trying to compile the kernel for some time now, and was hopeful reading your guide (and this last post) However, still following the steps to merge the ramdisk, i cannot make a booting kernel. I can get it flashed, as i am using the update.zip method, but moboot always gives me a crc error when booting it.
Though, before i totally go nuts, i think i need to try the source forgery toolchain, as i am using the Android ndk r6b...
Divine_Madcat said:
S7
I have been trying to compile the kernel for some time now, and was hopeful reading your guide (and this last post) However, still following the steps to merge the ramdisk, i cannot make a booting kernel. I can get it flashed, as i am using the update.zip method, but moboot always gives me a crc error when booting it.
Though, before i totally go nuts, i think i need to try the source forgery toolchain, as i am using the Android ndk r6b...
Click to expand...
Click to collapse
Could you check the md5sum of the u-boot image crated on disk and the one installed by update.zip file? Do they match? If they do then you probably will need to upgrade your mkimage tool.
s7mx1 said:
Could you check the md5sum of the u-boot image crated on disk and the one installed by update.zip file? Do they match? If they do then you probably will need to upgrade your mkimage tool.
Click to expand...
Click to collapse
I will give it a check; just in case, know where to get a newer mkimage?
Thanks so much for this guide
s7mx1 said:
You can always try it yourself. In worst case you have to hard reboot the touchpad by pressing the power button and home button at the same time for more than 10 minutes.
Click to expand...
Click to collapse
It feels like 10 mins.. doesn't it
WEll, i checked the MD5 sums, and it looks good. So, i guess it is time to try again with the toolchain listed here, and perhaps a new mkimage (if there is a "modern" one i should using, please point me to it...)
edit: Never mind.. in all my looking, i never saw that ubuntu had a nice one waiting for me.... doh
edit2: Woo! After getting the probably correct mkimage, and the CS toolchain, looks like i finally got it to pass the crc check. Now, lets see if it finishes booting. Thanks again for the guide!
Nope.. no boot. I get a dmesg with this:
<3>[ 69.978716] init: untracked pid 224 exited
<6>[ 70.086076] android_usb gadget: high speed config #1: android
<6>[ 70.086209] gadget_event: schedule host_connected
<6>[ 70.096953] max8903b_current_setup: CURRENT_500MA
<6>[ 70.097040] gadget_event: source=bus mA=500 (no change)
<4>[ 70.910953] UDC-CHG (2-2-2): usb_multi_chg_detect (591) : USB host Adaptor
(500mA)!
<6>[ 70.912805] gadget_event: schedule host_disconnected
<6>[ 70.925482] max8903b_current_setup: CURRENT_ZERO
<6>[ 71.164066] android_usb gadget: high speed config #1: android
<6>[ 71.164220] gadget_event: schedule host_connected
<6>[ 71.173640] max8903b_current_setup: CURRENT_500MA
<6>[ 71.178212] gadget_event: source=bus mA=500 (no change)
<6>[ 72.160955] gadget_event: host_connected=1 (no change)
<6>[ 74.142224] request_suspend_state: wakeup (0->0) at 74121495501 (2011-11-1
1 22:49:33.378031648 UTC)
<3>[ 74.143675] init: untracked pid 266 exited
<3>[ 74.155217] init: untracked pid 273 exited
<6>[ 79.285016] request_suspend_state: wakeup (0->0) at 79264287462 (2011-11-1
1 22:49:38.520824942 UTC)
The last three lines repeat alot, with different pid's .
Alrighty.. figured this one out - You cannot use the latest repository commits with the 2.1 alpha build. However, i was able to build commit fd70bb7aae, and it builds and actually boots. Now, i can actually play around and tweak it. Thank you again for the guide, and sorry for the edit spamming.. heh.
myn said:
x2. Huge thanks
Click to expand...
Click to collapse
Myn, do you have a touchpad???!!!? God I hope so!
vinscuzzy said:
Myn, do you have a touchpad???!!!? God I hope so!
Click to expand...
Click to collapse
He does
Sent from my PG86100 using Tapatalk
Divine_Madcat said:
WEll, i checked the MD5 sums, and it looks good. So, i guess it is time to try again with the toolchain listed here, and perhaps a new mkimage (if there is a "modern" one i should using, please point me to it...)
edit: Never mind.. in all my looking, i never saw that ubuntu had a nice one waiting for me.... doh
edit2: Woo! After getting the probably correct mkimage, and the CS toolchain, looks like i finally got it to pass the crc check. Now, lets see if it finishes booting. Thanks again for the guide!
Nope.. no boot. I get a dmesg with this:
<3>[ 69.978716] init: untracked pid 224 exited
<6>[ 70.086076] android_usb gadget: high speed config #1: android
<6>[ 70.086209] gadget_event: schedule host_connected
<6>[ 70.096953] max8903b_current_setup: CURRENT_500MA
<6>[ 70.097040] gadget_event: source=bus mA=500 (no change)
<4>[ 70.910953] UDC-CHG (2-2-2): usb_multi_chg_detect (591) : USB host Adaptor
(500mA)!
<6>[ 70.912805] gadget_event: schedule host_disconnected
<6>[ 70.925482] max8903b_current_setup: CURRENT_ZERO
<6>[ 71.164066] android_usb gadget: high speed config #1: android
<6>[ 71.164220] gadget_event: schedule host_connected
<6>[ 71.173640] max8903b_current_setup: CURRENT_500MA
<6>[ 71.178212] gadget_event: source=bus mA=500 (no change)
<6>[ 72.160955] gadget_event: host_connected=1 (no change)
<6>[ 74.142224] request_suspend_state: wakeup (0->0) at 74121495501 (2011-11-1
1 22:49:33.378031648 UTC)
<3>[ 74.143675] init: untracked pid 266 exited
<3>[ 74.155217] init: untracked pid 273 exited
<6>[ 79.285016] request_suspend_state: wakeup (0->0) at 79264287462 (2011-11-1
1 22:49:38.520824942 UTC)
The last three lines repeat alot, with different pid's .
Alrighty.. figured this one out - You cannot use the latest repository commits with the 2.1 alpha build. However, i was able to build commit fd70bb7aae, and it builds and actually boots. Now, i can actually play around and tweak it. Thank you again for the guide, and sorry for the edit spamming.. heh.
Click to expand...
Click to collapse
That's because dalingrin has updated the default configuration to use the HIGHMEM which seems to kill all the apps. The latest git actually works if you disable all the HIGHMEM related stuff.
decalex said:
Thanks so much for this guide
It feels like 10 mins.. doesn't it
Click to expand...
Click to collapse
Absolutely
I just hope there is a rest button as the touchscreen occasionally will not respond at all after wake up and I have to reboot to webos and then reboot back to get the touchscreen back.
Great guide and I got the kernel all built, but how do you change the kernel arguments for booting? e.g. where does moboot get its whole root=/dev/ram0 ro fb...stuff, and how does the CyanogenMod kernel know where to look for the rootfs partition?
crimsonredmk said:
Great guide and I got the kernel all built, but how do you change the kernel arguments for booting? e.g. where does moboot get its whole root=/dev/ram0 ro fb...stuff, and how does the CyanogenMod kernel know where to look for the rootfs partition?
Click to expand...
Click to collapse
The root parameter (root=/dev/ram0) that passed to kernel is not useful to you. The root / is mere extracted initramfs in memory. I assume you are looking for system, data partitions etc. With TP we have LVM partitions which you can do really fancy stuff with. The actual mount device and mount point is defined (hard coded) in file init.tenderloin.rc which you can find in the initramfs (i.e. the img.gz which is a gzipped cpio file). You can extract all the contents out from img.gz and modify init.tenderloin.rc to suit your need and then create an updated initramfs file to go with the kernel.
Since Android (at least CM7 on TP) does not use pivot_root any changes made to the initramfs will appear automatically when you boot up the device.
You can google if you are not sure how to work with initramfs file.

Linux Distro on Nexus 7

In the same vein of a similar question asked not too long ago about Win 8, do you guys think we could get Ubuntu, Linux Mint or any other distro on our tablets? Seems far more plausible and I'd love to see this
Try the "complete Linux installer" from the play store I haven't tried it yet but it said it was compatible with the n7
Sent from my Nexus 7 using xda premium
I've been trying to, and I've had some success.
I installed Ubuntu ARM to my /cache partition (/dev/mmcblk0p4)
Then I compiled my own kernel from the official sources, only adding TTY and framebuffer console support to the config.
Then I made it into a boot.img like this:
Code:
$ touch initrd.cpio
$ mkbootimg --kernel zImage --ramdisk initrd.cpio --cmdline "console=tty0 root=/dev/mmcblk0p4 rootfstype=ext4 init=/sbin/init" -o boot.img
Now I can load Ubuntu from fastboot:
Code:
$ fastboot boot boot.img
Well kinda... I can boot to a command line session fine, but I haven't gotten Xorg to work yet.
When I try to start X the kernel panics and the device reboots.
Does anybody know if there's an Xorg driver for Tegra 3?
Good luck! I hope to see it work.
Sent from my Nexus 7 using xda premium
Ubuntu on android
I am currently trying to implement ubuntu on my nexus 7 as well, rather than running it through a vnc viewer, which I think its very slow.
Help
How do you extract the ubuntu image and where do you place it?
steevp said:
I've been trying to, and I've had some success.
I installed Ubuntu ARM to my /cache partition (/dev/mmcblk0p4)
Then I compiled my own kernel from the official sources, only adding TTY and framebuffer console support to the config.
Then I made it into a boot.img like this:
Code:
$ touch initrd.cpio
$ mkbootimg --kernel zImage --ramdisk initrd.cpio --cmdline "console=tty0 root=/dev/mmcblk0p4 rootfstype=ext4 init=/sbin/init" -o boot.img
Now I can load Ubuntu from fastboot:
Code:
$ fastboot boot boot.img
Well kinda... I can boot to a command line session fine, but I haven't gotten Xorg to work yet.
When I try to start X the kernel panics and the device reboots.
Does anybody know if there's an Xorg driver for Tegra 3?
Click to expand...
Click to collapse
http://www.nvidia.com/content/devzone/linux-for-tegra.html
That seems to be the link to the Nvidia drivers
thanks Grey Goshawk. I will try it out.
robbalmbra said:
How do you extract the ubuntu image and where do you place it?
Click to expand...
Click to collapse
I started with Ubuntu core armhf and added what I wanted.
https://wiki.ubuntu.com/Core
If you're looking for a pre-built image you might try lilstevie's Ubuntu image for the transformer prime. I think it includes the tegra driver so maybe it will work better.
Once I was finished I tarred up my Ubuntu rootfs, copied it to the internal storage, and then extracted it like this (requires busybox):
Code:
tar xvf /sdcard/myrootfs.tar -C /cache
I believe the /cache partition is only 512 MB, so there's not a lot of room for Ubuntu. If you need more space you might want to try /data or maybe a USB drive instead.
Sent from my Nexus 7 using Tapatalk 2
I will try 'lilstevie's Ubuntu image' and report back. Thanks
I have tried the nvidia tegra link, however when it comes to the stage of flashing to the apx it fails and i feel if i muck this up i may brick my nexus 7. I have tried to boot up using 'steevp' method, however it doesn't work.
If possible could you attach your root fs and kernel and or boot.img? That would be a great help.
bump
I'd love to see this come to fruition, it would be cool to run gnome on it, and id use it heavy duty. It would be cool to safe strap it, and have a dual boot. now if only someone would port safe strap >.<
Agreed if Ubuntu or similar could dual boot on this I would be so stoked.
Sent from my Galaxy Nexus using xda premium
For my part, I have played with a chrooted Debian Wheezy and a modified kernel (to enable some toys, such as the virtual frame buffer, binfmt_misc (useful when I will try a x86 chrooted Debian system), all kind of USB drivers...).
Most tools seems to be working fine ; however I have not been able to start an X server (after stopping Android with : setprop ctl.stop zygote; setprop ctl.stop bootanim). I have tried several alternatives :
Xorg with fbdev module
Nothing showing up on screen. Logs flooded with
Code:
[ 9838.003] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
Xorg with tegra driver
I untar-ed the driver from NVIDIA to the root filesystem and made a symbolic link from the API-12 driver to tegra_drv.so. Then I copied all tegra-related device to the chrooted /dev.
Still nothing showing up on screen. The server crashes when loading icewm with :
Code:
[ 9810.410] (WW) TEGRA(0): Error flipping DC window (head 0): Permission denied.
[ 9813.217] (WW) TEGRA(0): LVDS-1: Error querying display modes: No such device.
[ 9813.219]
[ 9813.221] Backtrace:
[ 9813.221]
[ 9813.223] Segmentation fault at address 0x28
[ 9813.224]
Fatal server error:
[ 9813.225] Caught signal 11 (Segmentation fault). Server aborting
[ 9813.225]
[ 9813.226]
Please consult the The X.Org Foundation support
at [I cannot post link as a new user]
for help.
[ 9813.226] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 9813.227]
[ 9813.228] (II) device control: off
[ 9813.250] (II) pointer_property
[ 9813.250] (II) pointer_property
[ 9813.250] (II) device control: close
[ 9813.250] (II) UnloadModule: "multitouch"
[ 9813.250] (WW) TEGRA(0): Error putting cursor for head 0: Permission denied.
[ 9813.250] (WW) TEGRA(0): Error putting ARGB cursor window for head 0: Permission denied.
[ 9813.256] (WW) TEGRA(0): Error putting display window 0 on head 0: Permission denied.
[ 9813.257] (WW) TEGRA(0): Error putting cursor for head 1: Permission denied.
[ 9813.257] (WW) TEGRA(0): Error putting ARGB cursor window for head 1: Permission denied.
[ 9813.257] (WW) TEGRA(0): Error putting display window 0 on head 1: Permission denied.
[ 9813.258] Server terminated with error (1). Closing log file.
Xfbdev server
Both server and icewm are able to start. Everything displays correctly on screen. However, no mouse driver, so no interaction are possible...
It would seem that, for the time being, the best solution is tightvncserver combined with android-vnc.
I have also tried to play with qemu-system-i386, but my pre-installed windows systems (98 and XP) don't start, printing "Input/output error" when booting.
However, playing with FUSE and sshfs (or mount.cifs) can enable transparent access from Android apps to an ssh (or windows) file server
Okay you got a nice way done in that work! I'll try to setup VirtualGL instead of a regular VNC server. Still less efficient than a native output but could help. I will work with the linuxonandroid stuff to help this team as much as I can.
Bodhi Linux for Nexus 7
http://jeffhoogland.blogspot.in/2012/12/bodhi-armhf-alpha-for-nexus-7.html
Anyone tried this yet?

Odroid u2 Won't boot to recovery

My Odroid won't boot to CWM recovery with CM10.1 installed on the emmc.
I extracted the three files from here: http://cyanogenmod.org/rc/odroidu2-recovery.zip and placed them on the root of the emmc but every time I boot up I get this
Code:
U-Boot 2010.12-svn (Jan 28 2013 - 14:10:19) for Exynox4412
CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]
APLL = 1000MHz, MPLL = 880MHz
DRAM: 2047 MiB
PMIC VERSION : 0x00, CHIP REV : 2
TrustZone Enabled BSP
BL1 version: 20121128
Checking Boot Mode ... EMMC4.41
REVISION: 2.0
Manufacturer TOSHIBA [ 15028MB ]
NAME: S5P_MSHC4
MMC Device 0: 15028 MB
MMC Device 1: 0 MB
MMC Device 2 not found
*** Warning - using default environment
ModeKey Check... run normal_boot
Net: No ethernet found.
Hit any key to stop autoboot: 0
NAME: S5P_MSHC4
NAME: S5P_MSHC4
>>> Load Boot Script from mmc 0:1 <<<
NAME: S5P_MSHC4
Partition1: Start Address(0x520000), Size(0x181a000)
reading boot.scr
Warning : Reads a file that is smaller than the cluster size.
623 bytes read
## Executing script at 40008000
Wrong image format for "source" command
Exynos4412 #
how can i get past this?
deleted

Categories

Resources