[Android] TouchPad Android kernel mini howto - TouchPad Development

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.

Related

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

[Dev]kexec

Okay, let's get the ball rollin on kexec!
I've taken most of the module from the milestone kexec project. I only did some slight tweaks to get it to compile right.
Attached is a kexec module, the source to said module, a patched kexec-tools, and the bin kexec from said patched kexec-tools.
I built this against one of the OC'd transformer kernels. I cheated a bit and changed the .4 to a .3 in Kconfig for the kernel. Other than that, it should be stock. The bottom of the first post here, http://forum.xda-developers.com/showthread.php?t=1095269 , has the source.
I've only tried booting transformer kernels, as I don't really know much about building kernels. I've gotten 3 responses from them, immediate hang (failing on the OC in them?), power down, and reboot(prolly kernel panic on host kernel).
I'm not 100% sure where to go from here.
kexec-mod.zip has the module and the source I used to compile it.
kexec-tools.zip has kexec tools. I didn't clean it before zipping, so it should have the bins still.
Also, I'm using backtrack to compile and run these, so kexec-tools may fail outside of it.
Edit: Please view THIS POST for the latest kexec-mod.
Nice.... I'm with you in the hopes that someone will pick up the ball and start runnin with this....
great step forward....tnx
yess! finally we are one big step closer
I'd really like to try booting the Iconia's kernel, just to see if kexec works right.
Has anyone managed to get inside the boot.img?
heres perl script to unpack the boot.img
Code:
#!/usr/bin/perl -W
use strict;
use bytes;
use File::Path;
die "did not specify boot img file\n" unless $ARGV[0];
my $bootimgfile = $ARGV[0];
my $slurpvar = $/;
undef $/;
open (BOOTIMGFILE, "$bootimgfile") or die "could not open boot img file: $bootimgfile\n";
my $bootimg = <BOOTIMGFILE>;
close BOOTIMGFILE;
$/ = $slurpvar;
# chop off the header
$bootimg = substr($bootimg,2048);
# we'll check how many ramdisks are embedded in this image
my $numfiles = 0;
# we look for the hex 00 00 00 00 1F 8B because we expect some trailing padding zeroes from the kernel or previous ramdisk, followed by 1F 8B (the gzip magic number)
while ($bootimg =~ m/\x00\x00\x00\x00\x1F\x8B/g) {
$numfiles++;
}
if ($numfiles == 0) {
die "Could not find any embedded ramdisk images. Are you sure this is a full boot image?\n";
} elsif ($numfiles > 1) {
die "Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.\n";
}
$bootimg =~ /(.*\x00\x00\x00\x00)(\x1F\x8B.*)/s;
my $kernel = $1;
my $ramdisk = $2;
open (KERNELFILE, ">$ARGV[0]-kernel.gz");
print KERNELFILE $kernel or die;
close KERNELFILE;
open (RAMDISKFILE, ">$ARGV[0]-ramdisk.cpio.gz");
print RAMDISKFILE $ramdisk or die;
close RAMDISKFILE;
print "\nkernel written to $ARGV[0]-kernel.gz\nramdisk written to $ARGV[0]-ramdisk.cpio.gz\n";
if (-e "$ARGV[0]-ramdisk") {
rmtree "$ARGV[0]-ramdisk";
print "\nremoved old directory $ARGV[0]-ramdisk\n";
}
mkdir "$ARGV[0]-ramdisk" or die;
chdir "$ARGV[0]-ramdisk" or die;
system ("gunzip -c ../$ARGV[0]-ramdisk.cpio.gz | cpio -i");
print "\nextracted ramdisk contents to directory $ARGV[0]-ramdisk/\n";
/proc/last_kmsg said:
[ $336.932146] -------%----[ cut here ]------------
[ 36.932255]$WARNINGz at /home/amy_chiU/quuofuild/a500omdrr/androiD/{ernel/driv ers/base/core.c:10 deviae_releaqe+0x70/0x84()
[ 336.932419] Device %(null) does not have a releaseh) functikn, iu is broken a nd must be fiXed.
[ s36.932580] Modules linkEd in: iexec_,oaD bcm4329
[ $3s6.932927] [<c0356ec>] (unwind_backtrace+0x0/1xf0) from [<c0067fac>] (warN_s lowpath_commmn+1p4c/0x¶4)
[ 336.933094] [<c0067fac>] (warn_slowpath]com}on+0x4c/0x64) from [4c0068044>] ( warn_slovpauh_fmt+0x2c/0x1c9
[! 336.¹33262U [|c0068044>] (warn_slowp!th_fmt+0x2c/0x3c) from [<c0!f08âc>] (dev ice_rElease+0x70/0X84)
[ $33v.937434]$[,c01æ08bc>] (device_remease+0x70¯0x84) from [=c01a65dc>] (kobjeC t_reluase+px5c?x70)
[ 33.9s76°u] [<c01a65dc~] (kobject_release+0x5c/0x70) from [<k01a74d4.] (kref_p ut+0x44/0X74)
[ 336.933711] [<C01a54d4>] (kref_pud+0|64/0h74) from [<bf044490>] (device_shuTd own+0x28/0x8c`[kexec_loadU)
[ 336.933887] Y<cf044490>U (device_shuTdown+0x28/0x8c [kexec_loadU- from [<bf04 4458>]!(kernel_resta2t_prepare+1x44/0x54(Skexec_load])
[( 336.934085] [<bf04$48>] (kernel_restert_prepare+0x/0x54 [kexea_load]9 from [< bF043098>] (kernel_kexec+0x38/0x68 [kexec_load])
[ 336.934262] [<"f043098>] (kernel_kexec+0x38/0x68 [kexec_load]) from [<bf0443b 8>] (reboot+0x74/0xd0 [kexec_load])
[ 336.934438] [<bf0443b8>] (reboot+0x75/0xe0([kexec_load]) from [<c0032060>] (r et_fast_syscAll+0x0/0x30)
[ efd tsace 237c2b25b258a813 ]---
[ 336.938148] StaRting new Kurjel
[ 336.938356] Bye!
147 Corrected bytes, 167 unrecoverable blocks
Click to expand...
Click to collapse
Damn kurjels.
But, it seems to be trying to boot it. I've updated my kexec to actually use the files it should use(as in, a kernel source that was made in the last 3 years).
How do you repackage the kernel and the initfs in order to kexec it?
huxflux2003 said:
How do you repackage the kernel and the initfs in order to kexec it?
Click to expand...
Click to collapse
Good question. That's what I was hoping I could get some help with. The kernel is still closed-source(illegally, I might add), so it's going to be difficult to get a new one built, and I can almost guarantee that it's outside of my knowledge.
If anyone can come up with anything for me to try booting, I'm all ears.
heres repack script...
DONT TRY TO FLASH IT BACK INTO THE BOOT PARTITION IT WILL BRICK
Code:
#!/usr/bin/perl -W
use strict;
use Cwd;
my $dir = getcwd;
my $usage = "repack-bootimg.pl <kernel> <ramdisk-directory> <outfile>\n";
die $usage unless $ARGV[0] && $ARGV[1] && $ARGV[2];
chdir $ARGV[1] or die "$ARGV[1] $!";
system ("find . | cpio -o -H newc | gzip > $dir/ramdisk-repack.cpio.gz");
chdir $dir or die "$ARGV[1] $!";;
system ("mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel $ARGV[0] --ramdisk ramdisk-repack.cpio.gz -o $ARGV[2]");
unlink("ramdisk-repack.cpio.gz") or die $!;
print "\nrepacked boot image written at $ARGV[1]-repack.img\n";
thanks thor, but i think that since the bootloader is locked what we need is a zimage with init that can be used with kexec, correct?
huxflux2003 said:
thanks thor, but i think that since the bootloader is locked what we need is a zimage with init that can be used with kexec, correct?
Click to expand...
Click to collapse
yes zimage with init script
thor2002ro said:
yes zimage with init script
Click to expand...
Click to collapse
is this possible?
(noobalarm)
yea, but we need some people who know about this stuff to help.
Ok, here is my kexec sources based on 2.6.36
http://www.mediafire.com/?zdzpaui7dd8d6e9
still didn't manage to boot a kexec'ed kernel. Well, a couple times i got it to reboot to a regular kernel from mmc (did watchdog kill us?) but mostly it just freezes.
take a look here - http://wiki.meego.com/ARM/N900/Install/kexec
you need at least http://wiki.meego.com/images/0003-ARM-5886-1-arm-Fix-cpu_proc_fin-for-proc-v7.S-and-ma.patch to make it work.
Also, note the discussion here - ttp://comments.gmane.org/gmane.linux.ports.arm.kernel/75711
looks like we need a different cache invalidation for SMP (multi-processor cpu).
Anyways, I'm gonna make away with iconia and get myself an ac100 or asus xformer.. Partly due to Acer's hostility, partly because life without keyboard sucks.. My plan now is to write a custom implementation of sth like kexec for tegra (like splboot for xperia) from scratch because debugging kexec is quite annoying without a hardware debugger.. Basically it should be as easy as disabling mmu and dcache, but.. Well, need to lurk through the A9 assembly manual.

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?

TWRP random reboots

I am not sure how to file a bug report or what all that entails, so I'll just post here.
TWRP randomly reboots. One minute, five minutes, whenever. Even if I just leave the screen on and touch nothing, it still happens. Rebooting has even happened while flashing, which is no good. Other's have confirmed this behavior in the i777 thread:
http://forum.xda-developers.com/showthread.php?t=2544790 I've tried wiping and reflashing the rom a few times (and just boot.img as well), but the behavior always exists.
i777 build. currently on 12/27 nightly. I am now using RenderBroken's kernel for Omni & the rebooting does not happen.
Thanks. :good:
bleggy said:
I am not sure how to file a bug report or what all that entails, so I'll just post here.
TWRP randomly reboots. One minute, five minutes, whenever. Even if I just leave the screen on and touch nothing, it still happens. Rebooting has even happened while flashing, which is no good. Other's have confirmed this behavior in the i777 thread:
http://forum.xda-developers.com/showthread.php?t=2544790 I've tried wiping and reflashing the rom a few times (and just boot.img as well), but the behavior always exists.
i777 build. currently on 12/27 nightly. I am now using RenderBroken's kernel for Omni & the rebooting does not happen.
Thanks. :good:
Click to expand...
Click to collapse
pull /proc/last_kmsg after a reboot please
ok. currently on renders omni kernel. after I flash the next nightly, I'll have twrp reboot itself & upload that log.
cat /proc/last_kmsg > last_kmsg.txt with a terminal emulator, correct?
Sent from my SGH-I777 using XDA Premium 4 mobile app
Here is one I prepared earlier, probably around Dec 20th: http://paste.ubuntu.com/6654443/
Code:
$ egrep ' 12[01]\.|kadapt' last_kmsg
<6>[ 120.185215] c0 sec-battery sec-battery: sec_bat_check_vf: Battery Health (1)
<6>[ 120.185765] c0 smb328-charger 19-0034: smb328_get_charging_health : charging status A(0x02)
<6>[ 120.186305] c0 smb328-charger 19-0034: smb328_get_charging_health : charging status B(0x00)
<6>[ 120.186843] c0 smb328-charger 19-0034: smb328_get_charging_health : charging status C(0x05)
<6>[ 120.186889] c0 smb328-charger 19-0034: smb328_get_property: smb328_get_property (2,1)
<6>[ 121.005248] c0 sec-thermistor sec-thermistor: notify_change_of_temperature: uevent: TEMPERATURE=510
<6>[ 121.805308] c0 cpu1 turnning off!
<4>[ 121.811130] c1 IRQ112 no longer affine to CPU1
<5>[ 121.811478] c0 CPU1: shutdown
<6>[ 121.812313] c0 cpu1 off!
<3>[ 240.170095] c0 INFO: task kadaptiveup:1058 blocked for more than 120 seconds.
<6>[ 240.194448] c0 kadaptiveup D c0c436fc 0 1058 2 0x00000000
$
Regression seemed to happen for me between Dec 15 & 18, which coincided with gerrit saying there were some scheduler patches for smdk4412 around that time, along with the defconfig & dock patches. I haven't figured out enough about kernel building and what I need to insert where and how, to do any testing myself as yet.
I found this initially when I tried to enable compression for TWRP backups. With compression enabled I can usually trigger a panic.
Entropy512 said:
pull /proc/last_kmsg after a reboot please
Click to expand...
Click to collapse
updated to the 12/29 nightly.
omni version: 4.4.2-20131229-i777-nightly
kernel version: 3.0.64-CM-g1f99098
build number: omni_i777-userdebug 4.4.2 KOT49H 96 test-keys
went back into recovery & let sit without touching anything.
rebooted itself after 3 minutues.
attached is the last_kmsg. if there is anything else I can do, let me know.
Omni 1229 => panic @ 240 seconds as usual, cpu1 shutdown at 120 sec, cpu1 won't start by 240 sec, kadaptiveup kernel task hung still, seems just to be time based, don't need to do anything. I have last_kmsg if required.
Omni Asylum kernel 1227 from @chasmodo, cpu1 stop/start OK, no problem, @chasmodo said he rolled back to Dec 16.
@chasmodo build comment here: http://forum.xda-developers.com/showpost.php?p=48864227&postcount=11241
Kernel here: http://forum.xda-developers.com/showpost.php?p=35551986&postcount=2
Omni Asylum ROM 1229 from @chasmodo, OK too.
****. It's those extra governors.
I've seen this before.
Time to rip those ****ers out.

Running Android or Linux from an SD card on a RK3288 device - An easy way to dual boo

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

Categories

Resources