Android Tablets Forum banner
1 - 20 of 23 Posts

·
Registered
Joined
·
49 Posts
Unless you didn't get the News, at this point you're stupid to use Google Services. It's simple logic you cannot trust their OS Android either that's designed around Google Services. How about we install Debian?

This was done and tested on Crystal Tablet (Batch2). This should also work on Batch1 and Ainol ELF2. For Crystal Batch3 (and later) it probably doesn't work

Thanks to:
fuser with his Info Collection
fards with his compileable kernel
Christian Troy with his custom roms
AndrewDB with his Ubuntu for Elf2
...and more

You have to use Debian on your Desktop, NOT Ubuntu.


Setting up a SD
Please use gparted to create the neccessary Partitions on SD.
Code:
apt-get install gparted
Partition 1: a Primary Partition around 512mb sound good, format it fat32, name it boot
Partition 2: a Primary Partition that used most/all of your space (leave some free space, on cards >8GB make it 2GB), format it ext4, name it rootfs
Partition 3: a Primary Partition, all free space, format swap




Setting up Cross Compile Environment

To install Cross-development Toolchains for Debian follow the instructions on emdebian.org. Edit your /etc/apt/sources.list as approriate and advised above:
Code:
deb [URL=http://www.emdebian.org/debian/]http://www.emdebian.org/debian/[/URL] unstable main
Install Cross Compiler and build utilities:
Code:
apt-get update<br />
apt-get install emdebian-archive-keyring<br />
apt-get update<br />
apt-get install gcc-4.6-arm-linux-gnueabihf g++-4.6-arm-linux-gnueabihf<br />
apt-get install build-essential libncurses5-dev u-boot-tools qemu-user-static debootstrap git binfmt-support libusb-1.0-0-dev pkg-config
Create symlinks to specific version of the cross-compiler-tools:

Code:
ln -s /usr/bin/arm-linux-gnueabihf-gcc-4.6 /usr/bin/arm-linux-gnueabihf-gcc<br />
ln -s /usr/bin/arm-linux-gnueabihf-gcov-4.6 /usr/bin/arm-linux-gnueabihf-gcov<br />
ln -s /usr/bin/arm-linux-gnueabihf-g++-4.6 /usr/bin/arm-linux-gnueabihf-g++<br />
ln -s /usr/bin/arm-linux-gnueabihf-cpp-4.6 /usr/bin/arm-linux-gnueabihf-cpp
Kernel

Code:
git clone [URL=https://github.com/waschmi/buildroot-linux-kernel-m6.git]https://github.com/waschmi/buildroot-linux-kernel-m6.git[/URL] -b crystal<br />
cd buildroot-linux-kernel-m6
Code:
<br />
cp config-good1 .config<br />
check if you want to enable/disable some options, for exampe wifi and accelerator
Code:
<br />
make ARCH=arm menuconfig<br />
compile kernel
Code:
<br />
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules<br />
(if you have more cpus you can compile with "make -j4 ARCH=arm..." for 4 cpus or -j2 for two)

Rootfs
Howtos for arm chroot can be found on http://wiki.debian.org/EmDebian/CrossDebootstrap or http://tinkering-is-fun.blogspot.jp/2009/12/running-arm-linux-on-your-desktop-pc_12.html or https://wiki.ubuntu.com/ARM/BuildEABIChroot .

Simple bootstrap (you need to be root)
Code:
mkdir chroot-armhf<br />
 cd chroot-armhf<br />
 debootstrap --foreign --arch armhf wheezy .<br />
 cp /usr/bin/qemu-arm-static usr/bin<br />
 LC_ALL=C LANGUAGE=C LANG=C chroot . /debootstrap/debootstrap --second-stage<br />
 LC_ALL=C LANGUAGE=C LANG=C chroot . dpkg --configure -a
set root password
Code:
chroot . passwd
set hostname
Code:
 echo CRYSTAL > etc/hostname
Now in the chroot you will want to set up your system, install packages, etc.

copy file temporary from host
Code:
cp /etc/resolv.conf etc
add and update repository
Code:
<br />
 echo deb [URL=ftp://ftp2.de.debian.org/debian/]ftp://ftp2.de.debian.org/debian/[/URL] wheezy main contrib non-free > etc/apt/sources.list<br />
 echo deb [URL=http://security.debian.org/]http://security.debian.org/[/URL] wheezy/updates main contrib non-free >> etc/apt/sources.list<br />
 chroot . apt-get update<br />
 chroot . apt-get upgrade<br />
this is where you add software for example: nano mc dropbear
(adding a full desktop will get you errors, you should add that later and native on tablet with usb-keyboard or over ssh)
Code:
 chroot . apt-get install nano mc dropbear<br />
 chroot . apt-get clean
remove temporary file from chroot
Code:
<br />
rm etc/resolv.conf<br />
add follwing lines to etc/rc.local use for example
Code:
 chroot . nano etc/rc.local
it should look like this:

Code:
<br />
echo 0 > /sys/class/graphics/fb0/blank<br />
echo 0 > /sys/class/graphics/fb1/blank<br />
echo -n <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/mega_shok.gif' class='bbc_emoticon' alt='80' /> > /sys/class/backlight/aml-bl/brightness<br />
fbset -fb /dev/fb0 -a -g 1024 600 1024 600 24<br />
exit 0<br />
Fill SD

modules to chroot:

Code:
make -C .. INSTALL_MOD_PATH=`pwd` ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install
uImage to sd: (the mount point sometimes is also /media/usb0/)
Code:
<br />
cd ..<br />
cp ../arch/arm/boot/uImage /media/boot/uImage_recovery<br />
copy files from the ARM chroot to SD card partition (make sure rootfs is actually mounted)
Code:
 cd chroot-armhf<br />
 tar --exclude=qemu-arm-static -cf - . | tar -C /media/rootfs -xvfp<br />
 sync<br />
Boot tablet from SD with power-on and vol- pressed, enjoy! (It can take some time to boot, just wait for it)



little video of debian jessie
 

·
Registered
Joined
·
32 Posts
Your instructions is too difficult for me. Can you make tarball of working system?
 

·
Registered
Joined
·
26 Posts
Your instructions is too difficult for me. Can you make tarball of working system?
To be completely honest, if the instructions provided are too complex, then my guess is you probably shouldn't be trying this.. I think the OP makes it pretty clear that this is still very much in the testing stages. Can you imagine how many bricked tabs we would have around if this setup was as easy as downloading everything in a single file...? With the number of variations in just the "Ainol Novo7 Crystal" range, the thought of something like that scares me.
 

·
Registered
Joined
·
32 Posts
To be completely honest, if the instructions provided are too complex, then my guess is you probably shouldn't be trying this.. I think the OP makes it pretty clear that this is still very much in the testing stages. Can you imagine how many bricked tabs we would have around if this setup was as easy as downloading everything in a single file...? With the number of variations in just the "Ainol Novo7 Crystal" range, the thought of something like that scares me.
It's difficult for me because my english is very bad to understand how make chroot and my computer is too weak for cross compiling (athlon xp 2000+ processor).
 

Attachments

·
Registered
Joined
·
49 Posts
Discussion Starter · #8 ·
It's difficult for me because my english is very bad to understand how make chroot and my computer is too weak for cross compiling (athlon xp 2000+ processor).
I pretty much agree with ZaLiTHkA.

Even on your PC compiling a Kernel isn't too much, I do it on my Netbook sometimes. Providing a downloadable rootfs is problematic on various levels and I don't like it. Other then that, I am not a nativ english person myself and I am not exactly a Developer either. I don't think I'm the right person to do Debian port to the Ainol Crystal and I need a lot of time because I have to learn about things I don't know about but since it looks like nobody else is doing it... well... there I am.

People can learn things. I did and still do and make progress. I'm sure you can do it, too.
 

·
Registered
Joined
·
49 Posts
Discussion Starter · #13 ·
So back to the main question...
Does the touchscreen work?
The Touchpad like multitouch driver works/worked since before I started with Debian. So, yes Touchscreen works and you can install a onscreen keyboard and stuff but it's not nice to use. What I want and probaly other People to is Touchscreen working in absolute mode. It's not that simple with the provided driver, to say the truth it's pretty awful. I'm kinda waiting for a newer Kernel release by amlogic. I didn't have to write things from scratch, the Touchscreen Controller is already in upstream https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=43c4d13e901a8f37d9abbd410f093ebe885b5322 it shouldn't be to hard to adapt it for the ainol crystal but I'm not there yet. Today I found a bit more recent amlogic source but it looks like there are now various binarys include, replaceing parts of code. That's pretty bad and but pretty much puts a full stop in my efforts. For now, let's wait and see.
 

·
Registered
Joined
·
49 Posts
Discussion Starter · #15 ·
I just adapt touchscreen driver for my Elf II, it should work for Crystal too. Just repleace this file in customer directory. I don't know how to test multitouch but it should work too.
updated first post, also included your changes in source
 

·
Registered
Joined
·
49 Posts
is it possible to port this project: http://forum.xda-developers.com/showthread.php?t=2418029

to ainol tablets?
Does HDMI work?
Wow, someone actually posted in this thread! About XBMC and HDMI, I tried an older source Version of XBMC and it actually did work on the Crystal Tablet. The Problem is, XMBC does have a Hardcoded minimum Resolution. The internal Screen with 1024x600 Pixel isn't enough. While the HDMI connector should work I couldn't test it because I lack the Hardware. At least I see no reason why HDMI shouldn't work. In Theory XBMC can be made working if only HDMI and a external Screen with higher Resolution is used.

To Port XBMC, use this source https://github.com/Stane1983?tab=repositories

You'll have to fork it and do some changes. You can get an Idea by reading the commits in my Repository https://github.com/waschmi?tab=repositories but my Changes are incomplete.
 

·
Registered
Joined
·
39 Posts
Wow, someone actually posted in this thread! About XBMC and HDMI, I tried an older source Version of XBMC and it actually did work on the Crystal Tablet. The Problem is, XMBC does have a Hardcoded minimum Resolution. The internal Screen with 1024x600 Pixel isn't enough. While the HDMI connector should work I couldn't test it because I lack the Hardware. At least I see no reason why HDMI shouldn't work. In Theory XBMC can be made working if only HDMI and a external Screen with higher Resolution is used.

To Port XBMC, use this source https://github.com/Stane1983?tab=repositories

You'll have to fork it and do some changes. You can get an Idea by reading the commits in my Repository https://github.com/waschmi?tab=repositories but my Changes are incomplete.
Yeah! Thanks. Was interested on Debian ARMHF. Tried compiling with Xubuntu 14.04 with your steps just not the GCC stuffs. And i failed. Kept have errors and missing file from the source code. Even though I download it twice. Using GCC 4.8 will that make a different?
 

·
Registered
Joined
·
49 Posts
Discussion Starter · #20 ·
Yeah! Thanks. Was interested on Debian ARMHF. Tried compiling with Xubuntu 14.04 with your steps just not the GCC stuffs. And i failed. Kept have errors and missing file from the source code. Even though I download it twice. Using GCC 4.8 will that make a different?
I haven't touched anything Ubuntu in a very long Time. It got quite different to Debian. I suggest you look into Linaro and how to create BSP and how to work with systemd-init. I'm not too sure but I think I compiled Kernel with GCC 4.8 some time ago and it worked. You can post Details about your Problem, maybe I or someone else can give a hand.
 
1 - 20 of 23 Posts
Top