[Folio 100 Android Development] momcilosystem:
This howto explains a lot of the work done to make possible to run Fedora 17 arm on Folio.

Edited 08.04.2013. to add support for NVIDIA Tegra proprietary driver.

You can go to the end of the post to see the steps as I will talk a little (read: bore you to death :)) on history of this project :)

You can see it in the action here:

http://www.youtube.com/watch?v=igTFZ3kiI_M&feature=youtu.be

So, you kept reading? Nice, make a cup of coffee, have a seat and let me tell you my story :)

I always found tablets to be such a cool devices but they are a bit useless (FOR ME! - I can't stress this part enough). I understand that there are a lot of people whose life is made easier by tablets as they are more portable than notebooks and have bigger screens than smartphones. I was always looking forward to x86 tablets but their prices makes them (even more) unaffordable for me.

As I work in computer shop as a repair guy (so unfulfilling :| ) I had one Folio brought in for broken screen. Repair cost was tremendous and the customer didn't want to go through with it (who can blame them when TOSHIBA asked ~ $400 for repair). Their tablet sat and sat for months waiting for them to come and take it home.

Then my mind started to wonder... there are projects for running arm gnu/linux on N900 why it couldn't be done on Folio?

Googling started and brought me to this page (Ubuntu on Folio: http://lguegan.free.fr/article.php3?id_article=29) which is, of course, inspired by guys here at XDA-Developers. I don't really like Ubuntu but it looked so good with LXDE running and PC-like experience so I got hooked immediately :)

Guy describes steps that needed to be done to run Ubuntu - unfortunately that guide is a little obsolete as I tried to follow it and came by a lot of 'deprecated' tools and applications. I gave up Ubuntu...

My next thought was - if I can use his guide for kernel (which wasn't obsolete) and just instead of Ubuntu's root filesystem I copied Fedora's filesystem I can maybe make it work.

I prepared kernel and update.zip for flashing. Took Folio with me home and started thinking that I could brick it without experience but it's already broken and they don't want it repaired - even if I can't roll back what I did, they wouldn't mind. Hooked up Folio on TV using HDMI and done the dirty deeds, rebooted and ... nothing :( .

Now, it could be any of the following scenarios:

a) I did everything perfectly, new kernel runs, boots fedora, starts graphical interface, BUT no HDMI support;

b) I made a mistake flashing the device, it's bricked and beyond repair (as I don't have original kernel to flash it again);

c) Kernel flashed nice but can't boot fedora for this or that reason;

d) Kernel doesn't even try to boot fedora but works and

e) some other completely unknown and unpredictable reason :)

I was so disappointed because I was really really hoping it would work - so naive :) I left it alone to wait for it's owners... but they still didn't came for months... My hope rises as I remembered that one of my friends owns Folio and I could borrow his screen to continue with the experiment :)

After quick swap of the displays I found out that scenario c) was true! My kernel worked and started booting fedora but with too many errors and fails. I tried debugging what's going on but errors were so early in the system I couldn't enable any logging service as system gave up before it can run all the services. I consulted with the guys at #fedora-arm @ irc.freenode.org and they said that that kernel is too old to be able to load Fedora 17 with systemd and that I need newer kernel... Where would I get newer kernel when the one I got TOSHIBA provided - am I to download vanilla kernel from kernel.org and try to cross compare them and make adjustments when needed?! I can't do that, not with my very basic knowledge of kernel and compiling (so few opportunities to learn in Serbia)... I again gave up... but not for long as I heard of sir DerArtem of xda-developers! Such a great man :)

I started following links on that Ubuntu guide page and started to explore xda-developers forum and found that he worked on kernel 3, which is exactly what I needed!

I cloned the git (read: downloaded his source for kernel) and compiled, flashed Folio and booted. No console... no matter what I did. I asked here for help, got few pointers, recompiled and console worked!

It still didn't boot fedora but I saw quite a drop in errors and fails... Googled a bit more and found kernel prerequisites for OSes using systemd. Changed those kernel options and recompiled again.

IT WORKS! I was so happy, so so happy. There wasn't much to be seen but the root@fedora-arm#: with the blinking cursor but it meant a world to me :victory:

I wasn't even troubled that it didn't start GUI as now I felt I can debug all the issues and work out all the problems - I was so ecstatic and confidant.

Then I started debugging graphical interface and just couldn't find the solution. When in doubt, go back to the beginning -> xda-developers forum, as guys here were keen to help. While waiting for a reply I was toying with Folio and made internet work via integrated wifi (which was a good sign that some of the drivers work) and updated my Fedora.

I still don't know why I even tried to start graphical interface as I did nothing other than update system and meddle with some other stuff... but I ran 'init 5' and there it was... at the corner of my screen... a busy cursor... the one cursor that when you see it you know your graphical system is working

If I were a president of the world at that time I would make a special announcement about my AWESOME GREAT ULTRA TABLET THAT RUNS GNU/LINUX OPERATING SYSTEM ! :) :) :)

Yeah, I know, I wouldn't be president for a long time :)

And before I start I wanted to say thanks to this great guys:

DerArtem, shidima_101, DerArtem, sader0, DerArtem, guys over at the #fedora-arm, DerArtem, guys over at the #fedora, DerArtem, guys at the #lugons, DerArtem, scredkiev, DerArtem, TOSHIBA, DerArtem and to all of you guys making this possible THANK YOU!

I was asked at #fedora-arm to post my findings somewhere and I promised here that I would; so

Here is the guide for installing Fedora 17 arm on TOSHIBA Folio 100:

This guide is assuming you are running gnu/linux and have basic familiarity with the commands.

Kernel compilation, you can skip this if you use my kernel (update.zip from attachment) and proceed to Preparing filesystem:

Download the kernel source:

$cd ~/Documents
$git clone https://github.com/DerArtem/android_kernel_toshiba_betelgeuse
$cd android_kernel_toshiba_betelgeuse
$export ARCH=arm; export CROSS_COMPILE=arm-none-linux-gnueabi

Now, you need to change these kernel options to these values (use 'make menuconfig' or whatever method you like):

CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_DEVICE=y
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
# CONFIG_BLK_DEV_THROTTLING is not set
CONFIG_KEXEC=y
CONFIG_ATAGS_PROC=y
# CONFIG_ANDROID_PARANOID_NETWORK is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_VIDEO_VIVI is not set
CONFIG_FIRMWARE_EDID=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
CONFIG_FANOTIFY=y
CONFIG_AUTOFS4_FS=y

or if you prefer you can copy default config and patch it with config_patch.txt from attachments:

$cp arch/arm/configs/tegra_betelgeuse_android_defconfig ./.config
$patch -p0 .config config_patch.txt

Then we compile:

$make
$make modules

After a while it's finished and you have zImage in the folder arch/arm/boot/

Let's copy that to the other location:

$mkdir ~/kernel
$cp arch/arm/boot/zImage ~/kernel
$cd ~/kernel

extract update.zip (from attachments) to the ~/kernel so we can to zip it again with new kernel:

$unzip update.zip
$rm boot.img

Now we need to make boot.img from that kernel because that's what Folio wants (you'll need to copy mkbootimg from attachments to ~/kernel):

$./mkbootimg --kernel ./zImage --cmdline "mem=448M@0M nvmem=64M@448M vmalloc=192M video=tegrafb usbcore.old_scheme_first=1 tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 boardtype=PR root=/dev/mmcblk1p1 rw init=/sbin/init usb-storage.delay_use=0 rootdelay=1" -o boot.img --ramdisk boot.img-ramdisk-2.gz
$zip -r update.zip boot.img META-INF

Our kernel is now ready to be flashed to the Folio (in the ~/kernel/update.zip)!

If you used my kernel this is where you need to start with:

Preparing filesystem

Flash your new kernel to the Folio by copying update.zip (either my or one you made yourself) to the MMC, inserting it in tablet and performing System update on Folio:

Power Up

Power + Volume Up

Volume Up

Volume Down

Now that your kernel boots we do still need to prepare Fedora 17 filesystem. Shutdown Folio by holding Power button and remove MMC and format it (assuming your MMC is /dev/sdb1)

We became root for this and other commands:

$su -
#umount /dev/sdb1
#mkfs.ext3 /dev/sdb1
#mkdir /media/mmc1
#mount /dev/sdb1 /media/mmc1

We start by downloading filesystem and extracting it to the MMC (assuming here that /media/mmc is your MMC's path):

$wget http://ftp.df.lth.se/pub/fedora-secondary/releases/17/Images/armhfp/Fedora-17-armhfp-xfce.tar.xz
$tar xvf Fedora-17-armhfp-xfce.tar.xz -C /media/mmc1

We should install modules to the appropriate location on the MMC (from the kernel source directory):

$cd ~/Documents/kernel/android_kernel_toshiba_betelgeuse
$make modules_install INSTALL_MOD_PATH=/media/mmc1

Then we move on to configure Fedora to go to rescue so we can change root's password (still assuming here that /media/mmc is your MMC's path):

#ln -s /lib/systemd/system/rescue.target /media/mmc1/etc/systemd/system/default.target
#umount /media/mmc1

You now remove MMC and put it in your Folio, when it boots up and gives you the prompt:

root@fedora-arm:#

you need to type:

#passwd

to change root's password to you likings

You should create another user for GUI with the password:

#adduser foliouser
#passwd foliouser

Lleave rescue mode:

#ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
#reboot

When your system comes back up you should have something like this:

Fedora release 17 (Beefy Miracle)

Kernel 3.yeah.like.i.know.the.version on an arm

fedora-arm login:

You enter root username with password you chose and with luck you can just type:

#init 5

and be presented with the graphical login (you'll need USB keyboard to be able to log in)

While there you need to add your username to the sound and video groups to be able to play sounds and to use webcam.

After that you can connect to wireless, adjust properties, install on-screen-keyboard (florence is nice), etc..

VOILA, YOU'RE DONE! ENJOY!

I didn't have enough time to test everything but here are few what works and what doesn'ts :) :

What works:

Touchscreen

WiFi

Battery indicator

Charging indicator

Webcam

Sound

Volume Up + Down keys

Power key (you may want to reassign it to something else than Sleep)

USB (WHOLE LOT OF DEVICES) tried keyboard, mouse, N900 as modem, ...

...other...

what doesn't:

Screen rotation

HDMI

...other...

Mirrors:

(Screenshots)

http://momcilo.homeip.net/folio/Screenshot 1.png

http://momcilo.homeip.net/folio/Screenshot 2.png

http://momcilo.homeip.net/folio/Screenshot 4.png

http://momcilo.homeip.net/folio/Screenshot 5.png

(Other files)

http://momcilo.homeip.net/folio/config_patch.txt

http://momcilo.homeip.net/folio/update.zip

http://momcilo.homeip.net/folio/mkbootimg.tar.gz

http://momcilo.homeip.net/folio/boot.img-ramdisk-2.gz

I hope you enjoy your tablet as much as I did

these very, VERY short few days as I had to return Folio's display to my friend... :(