SlackwareOnMt6582Tablet

From SlackWiki
Revision as of 07:56, 25 August 2014 by Gv (talk | contribs) (Created page with " == specifications for the Tablet PC which was used here : == <pre> Processor : Arm Cortex A7, 1.3 GHz dual core. : ARMv7 Processor rev 3 (v7l), Hardware : MT8312 SOC...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

specifications for the Tablet PC which was used here :

	Processor : Arm Cortex A7, 1.3 GHz dual core.
		  : ARMv7 Processor rev 3 (v7l),
	Hardware  : MT8312
	SOC       : mt6582.
	Memory    : 512MB RAM
	Storage   : 4GB Built in storage.
	Micro SD  : Slot for upto 32GB
	Display   : 7" WVGA 800x480
	OS        : Android 4.2 Jelly Bean

Rooting the Tablet PC

I used Framaroot-1.9.3.apk to root the device.

Installing Linux - Slackware 14.1 - sort of.

With the problem of not having kernel source for the SOC, and no no bootloader unlock possible yet, next best option was to use a chroot environment.

So far, command line mode works fine. Here is the description of how Slackware was installed on to external micro SD Card. Was able to do some basic tests on the frame buffer display. Since there is no VTs available was not able to test Xorg, though could get Mali module compiled and loaded. More details below.

Preparing SD Card on host computer

Use fdisk to create one or two partitions, one for ext4 and other ( optional ) swap partition. Once these are created, assuming the device on host is /dev/sdc,

	mkfs.ext4 /dev/sdc1
	sync
	eject sdc
	eject -t sdc
	mkdir slack
	mount /dev/sdc1 slack
	cd slack
	mkdir sl
	cd sl

If you don't have Slackware installation files, Get Slackware Arm first.

	(cd /path..to../slackware14.1 ; tar cfz - *) | (tar xfz - )

initrd-kirkwood.cpio contains the setup program, but since I couldn't boot with custom initrd, sdc1 /sl area is prepared to have the installation files.

	cpio -id < initrd-kirkwood.cpio
	sync
	umount slack

Now that the sd card is ready for installation:

	eject sdc

and plug it into the device. Once that is done,

chroot to installer:

Now plug the card in tablet pc, boot, from host computer,

	adb shell
	su
	cd /data/local/tmp
	mkdir slackware
	mount /dev/block/mmcblk1p1 slackware
	cd slackware/sl
	export PATH=/data/local/tmp/bin:$PATH
	mountpoint proc || mount -t proc none proc/
	mountpoint sys || mount -t sysfs sys sys/
	mountpoint dev || mount -o bind  /dev dev/
	export PATH=/usr/bin:/bin:/usr/lib/setup:$PATH
	pushd /dev
	ln -s /dev/block/mmc1blk* .
	popd
	chroot . /bin/bash
	mount -t ext4 /dev/mmcblk1p1 mnt

Running setup

Install Slackware onto mmcblk1p1, from pre mounted directory, sdc1 : /slackware/slackware

 
	setup
	
		Proceed and select /dev/mmcblk1p1 as target, no format
		For source, select pre mounted directory option, /slackware/slackware

Complete installation, and configure. Once the installation is done,

	umount proc
	umount sys
	umount dev
	sync
	cd ../..
	umount slackware

Getting into installed Slackware:

	mount /dev/block/mmcblk1p1 slackware
	cd slackware
	mountpoint proc || mount -t proc none proc/
        mountpoint sys || mount -t sysfs sys sys/
        mountpoint dev || mount -o bind  /dev dev/
        export PATH=/usr/bin:/bin:/usr/lib/setup:$PATH
	chroot . /bin/bash

From here you can do normal Slackware activities.


Testing the framebuffer

Stop android "Surfaceflinger":

make sure the display is on ( not blank ) and issue:

	adb shell
	su
	stop

Now the display goes blank, still with backlight on.


Get one of these tests. fbtest or Paint-pixels-to-screen- via-linux-framebuffer or qtopiacore-testingframebuffer All these tests worked on the Tablet.

from Slackware shell:

   gcc fbtest.c
   ./a.out

once done, go back to android su shell from adb, and:

	start

After few seconds android display will be back on.

Getting mali driver for Xorg

All these compilations are done under the chrooted slackware environment on the Tablet PC, using gcc

	gcc version 4.8.2 (GCC) ( arm-slackware-linux-gnueabi-gcc )

Open Source Mali-200/300/400/450 GPU Kernel Dev Open Source Mali GPUs Linux EXA/DRI2 and X11 Display Drivers

Get DX910-SW-99003-r4p1-01rel0 or choose another version

Once downloaded:

	tar xf DX910-SW-99003-r4p1-01rel0.tgz
	cd DX910-SW-99003-r4p1-01rel0/x11/xf86-video-mali-0.0.1
	./autogen.sh
	in src/Makefile:
	# mali_drv_la_LDFLAGS = -module -avoid-version -L$(MALI_DDK)/lib -lMali -lUMP -lpthread
	for now.
	mali_drv_la_LDFLAGS = -module -avoid-version -L$(MALI_DDK)/lib -lUMP -lpthread

also get [1] [2].

	make/install

Once make/install is done for both,

	cp src/.libs/mali_drv.* /usr/lib/xorg/modules/drivers/
	ldconfig

And do startx ( fails with following error ).

[  9131.458] (II) LoadModule: "mali"
[  9131.461] (II) Loading /usr/lib/xorg/modules/drivers/mali_drv.so
[  9131.461] (II) Module mali: vendor="X.Org Foundation"
[  9131.462]    compiled for 1.14.3, module version = 0.4.2
[  9131.462]    ABI class: X.Org Video Driver, version 14.1
[  9131.462] (II) MALI: driver for Mali Framebuffer: mali
[  9131.462] (EE)
Fatal server error:
[  9131.462] (EE) xf86OpenConsole: Cannot open /dev/tty0 (No such file or direct
ory)
[  9131.463] (EE)
[  9131.463] (EE)

No further tests until I get to unlock bootloader or get a X server which requires no ttys!