DELETEME

Framebuffer console

Here we will discuss howto get a (working) framebuffer console with Android kernel. Traditionally, framebuffer console are used to output logs at early stage of booting process of any linux distribution (can be hidden with a boot image however). In Android, support for such console is disabled, which make debugging quite dificult.

Step 1 : Build the framebuffer console As Toshiba does not provide kernel source yet, we will use nvidia tegra kernel. To do this, you need git (available from most linux packaging tool) and Code Sourcery GCC (See external resources). Retrieve the source :

git clone git:nv-tegra.nvidia.com/linux-2.6.git cd linux-2.6 git checkout -f remotes/origin/android-tegra-2.6.29 Now create and copy the content of Kernel Config in linux-2.6/.config (available on this wiki, see on the left). Edit .config and replace #CONSOLE_FRAMEBUFFER_SUPPORT is not set with CONSOLE_FRAMEBUFFER_SUPPORT=m type 'make' You will be prompted with a series of questions. When you're asked if you want to use the primary display device for framebuffer console, say 'Y'. For all others questions, default choice are ok. If everything goes well, you should have softcursor.ko, font.ko, bitblit.ko and fbcon.ko in drivers/video/console/ Step 2 : Make your own ramdisk To make thing easy, you can decompress the ramdisk from your 6th partition to get a ramdisk that you can edit to fill your need. Your ramdisk must contain at least the following directories : bin, dev, modules, proc, sys, system Copy busybox executable into bin/ , and create a link to busybox called insmod : ln -s bin/busybox bin/insmod Create a init file at the root of your ramdisk fs, with the following content : #!/bin/sh insmod /modules/softcursor.ko insmod /modules/font.ko insmod /modules/tileblit.ko insmod /modules/bitblit.ko insmod /modules/fbcon.ko And make it executable (chmod +x init) Copy all .ko file from drivers/video/console/ in your kernel source tree to the modules/ directory in your ramdisk tree : cp /path/to/kernel/drivers/video/console/*.ko modules/ Compress your ramdisk : find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz Step 3: Build the boot image mkbootimg –kernel mykernel –ramdisk newramdisk.cpio.gz –cmdline 'mem=448M@0M nvmem=64M@448M vmalloc=320M' -o newboot.img You can then upload newboot.img to the 6th partition of your AC100. The cursor may still not be shown by default. After insmod-ing the softcursor.ko module, it can be configured as described in Documentation/VGA-Softcursor.txt . The tegrafb driver doesn't initialize the console text palette correctly. You'll notice this if you want to use color ls, ncurses programs (aptitude, mutt, text-mode browsers) etc. on the console rather than in an X terminal emulator. If you want to fix it, you'll have to apply the attached patch tegra-fb.c.diff to the kernel sources. Unfortunately, tegrafb is compiled into the stock kernel, so you'll have to recompile the whole kernel. FAQ : Where can I get busybox ? It is stored in the 8th partition of your device. If you have an image of this partition, you can get the binary by mounting it to loopback device : mkdir tmp mount -o loop part8.img tmp cp tmp/system/bin/busybox . How can I upload to the 6th partition ? LD_LIBRARY_PATH=. ./nvflash –bl fastboot.bin –download 6 newboot.img –go Next step: udev setup

Log In