SlackwareOnMt6582Tablet: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
(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...")
 
No edit summary
Line 1: Line 1:


== specifications for the Tablet PC which was used here : ==
== Specifications of the Tablet PC which was used here ==


<pre>
<pre>
Line 12: Line 12:
Display  : 7" WVGA 800x480
Display  : 7" WVGA 800x480
OS        : Android 4.2 Jelly Bean
OS        : Android 4.2 Jelly Bean
        GPU      : Mali?
</pre>
</pre>
== Rooting the Tablet PC ==
== Rooting the Tablet PC ==


Line 41: Line 43:
If you don't have Slackware installation files, [http://arm.slackware.com/getslack/ Get Slackware Arm] first.  
If you don't have Slackware installation files, [http://arm.slackware.com/getslack/ Get Slackware Arm] first.  
<pre>
<pre>
        mkdir slackware14.1
        cd slackware14.1
(cd /path..to../slackware14.1 ; tar cfz - *) | (tar xfz - )
(cd /path..to../slackware14.1 ; tar cfz - *) | (tar xfz - )
</pre>
</pre>


Line 81: Line 86:
=== Running setup ===
=== Running setup ===


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


<pre>  
<pre>  
Line 87: Line 92:
Proceed and select /dev/mmcblk1p1 as target, no format
Proceed and select /dev/mmcblk1p1 as target, no format
For source, select pre mounted directory option, /slackware/slackware
For source, select pre mounted directory option, /slackware14.1/slackware
</pre>
</pre>
=== Complete installation, and configure. Once the installation is done, ===
 
=== Complete installation, and configuration ===
 
Once the complete installation is done,
 
<pre>
<pre>
umount proc
umount proc
Line 98: Line 107:
umount slackware
umount slackware
</pre>
</pre>
== Getting into installed Slackware: ==
== Getting into installed Slackware: ==
<pre>
<pre>
mount /dev/block/mmcblk1p1 slackware
mount /dev/block/mmcblk1p1 slackware
Line 108: Line 119:
chroot . /bin/bash
chroot . /bin/bash
</pre>
</pre>
From here you can do normal Slackware activities.
== Testing the framebuffer ==


Stop android "Surfaceflinger":
From here you can do "normal" Slackware activities, sort of. Main things that were lacking in my case
were VTs (ttys). Compiling programs and running programs that require no X windows worked fine. I ran
couple of frame buffer tests too.
== Testing the framebuffer ==
 
For these tests, I stopped android "SurfaceFlinger" and freed up /dev/graphics/fb0. by running "stop"
command. Before running stop, make sure that the display is on ( not blank ). For these tests, I had
two terminals up on the host PC with one of them running just adb shell with su, and other running
chrooted slackware shell. SurfaceFlinger was stopped from su shell, and tests from Slackware shell.
Please not Slackware shell is also running as user root.


make sure the display is on ( not blank ) and issue:
<pre>
<pre>
adb shell
adb shell
Line 121: Line 137:
stop
stop
</pre>
</pre>
Now the display goes blank, still with backlight on.


Now the display goes blank, with backlight on.


Get one of these tests.
Get one of these tests.
[https://gist.githubusercontent.com/rafalrusin/1482697/raw/32c6c0d79b870ffb618aa7b7c664736ca5e150fe/fbtest.c  fbtest] or  
[https://gist.githubusercontent.com/rafalrusin/1482697/raw/32c6c0d79b870ffb618aa7b7c664736ca5e150fe/fbtest.c  fbtest] or  
[http://stackoverflow.com/questions/4996777/paint-pixels-to-screen-via-linux-framebuffer Paint-pixels-to-screen-  via-linux-framebuffer] or  
[http://stackoverflow.com/questions/4996777/paint-pixels-to-screen-via-linux-framebuffer Paint-pixels-to-screen-  via-linux-framebuffer] or  
[http://cep.xray.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html qtopiacore-testingframebuffer] All these tests worked on the Tablet.
[http://cep.xray.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html qtopiacore-testingframebuffer] All these tests worked on the Tablet. Transfer the tests to tablet using adb push
command.


from Slackware shell:
from Slackware shell, running under adb shell:


<pre>
<pre>
Line 136: Line 152:
   ./a.out
   ./a.out
</pre>
</pre>
once done, go back to android su shell from adb, and:
once done, go back to android su shell from adb, and:
<pre>
<pre>
start
start
</pre>
</pre>
After few seconds android display will be back on.  
After few seconds android display will be back on.  


== Getting mali driver for Xorg ==
== Failed test of running an Xorg session ==
 
=== Getting Mali driver for Xorg ===
 
All these compilations are done under the chrooted Slackware environment on the Tablet PC, using gcc


All these compilations are done under the chrooted slackware environment on the Tablet PC, using gcc
<pre>
<pre>
gcc version 4.8.2 (GCC) ( arm-slackware-linux-gnueabi-gcc )
gcc version 4.8.2 (GCC) ( arm-slackware-linux-gnueabi-gcc )
</pre>
</pre>
[http://malideveloper.arm.com/downloads/drivers/DX910 Open Source Mali-200/300/400/450 GPU Kernel Dev]
[http://malideveloper.arm.com/downloads/drivers/DX910 Open Source Mali-200/300/400/450 GPU Kernel Dev]
[http://malideveloper.arm.com/develop-for-mali/drivers/open-source-mali-gpus-linux-exadri2-and-x11-display-drivers/ Open Source Mali GPUs Linux EXA/DRI2 and X11 Display Drivers]
[http://malideveloper.arm.com/develop-for-mali/drivers/open-source-mali-gpus-linux-exadri2-and-x11-display-drivers/ Open Source Mali GPUs Linux EXA/DRI2 and X11 Display Drivers]
Line 153: Line 176:
Get [http://malideveloper.arm.com/downloads/drivers/DX910/r4p1-01rel0/DX910-SW-99003-r4p1-01rel0.tgz DX910-SW-99003-r4p1-01rel0] or choose another version
Get [http://malideveloper.arm.com/downloads/drivers/DX910/r4p1-01rel0/DX910-SW-99003-r4p1-01rel0.tgz DX910-SW-99003-r4p1-01rel0] or choose another version


Once downloaded:
Once downloaded, and adb pushed to tablet:
 
<pre>
<pre>
tar xf DX910-SW-99003-r4p1-01rel0.tgz
tar xf DX910-SW-99003-r4p1-01rel0.tgz
Line 163: Line 187:
mali_drv_la_LDFLAGS = -module -avoid-version -L$(MALI_DDK)/lib -lUMP -lpthread
mali_drv_la_LDFLAGS = -module -avoid-version -L$(MALI_DDK)/lib -lUMP -lpthread
</pre>
</pre>
also get [http://malideveloper.arm.com/develop-for-mali/drivers/open-source-mali-gpus-ump-user-space-drivers-source-code-2 ] [http://malideveloper.arm.com/downloads/drivers/DX910/r4p1-01rel0/DX910-SW-99006-r4p1-01rel0.tgz].
 
also get [http://malideveloper.arm.com/develop-for-mali/drivers/open-source-mali-gpus-ump-user-space-drivers-source-code-2 ump]


<pre>
<pre>
make/install
make and install
</pre>
</pre>


Line 175: Line 200:
</pre>
</pre>


And do startx ( fails with following error ).
=== Run Xorg ===
 
And run startx, which fails with the following error.


<pre>
<pre>
Line 191: Line 218:
[  9131.463] (EE)
[  9131.463] (EE)
</pre>
</pre>
No further tests until I get to unlock bootloader or get a X server which requires no ttys!
No further tests until I get to unlock bootloader or get a X server which requires no ttys!

Revision as of 11:29, 25 August 2014

Specifications of 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
        GPU       : Mali?

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.

        mkdir slackware14.1
        cd slackware14.1
	(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 : /slackware14.1/slackware

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

Complete installation, and configuration

Once the complete 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, sort of. Main things that were lacking in my case were VTs (ttys). Compiling programs and running programs that require no X windows worked fine. I ran couple of frame buffer tests too.

Testing the framebuffer

For these tests, I stopped android "SurfaceFlinger" and freed up /dev/graphics/fb0. by running "stop" command. Before running stop, make sure that the display is on ( not blank ). For these tests, I had two terminals up on the host PC with one of them running just adb shell with su, and other running chrooted slackware shell. SurfaceFlinger was stopped from su shell, and tests from Slackware shell. Please not Slackware shell is also running as user root.

	adb shell
	su
	stop

Now the display goes blank, 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. Transfer the tests to tablet using adb push command.

from Slackware shell, running under adb 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.

Failed test of running an Xorg session

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, and adb pushed to tablet:

	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 ump

	make and install

Once make/install is done for both,

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

Run Xorg

And run startx, which fails with the 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!