Tuesday, 21 May 2013

Gentoo on the GK802

Here's a step by step account of my attempts to get gentoo running on the gk802 device.

You can find lots of information and software for the gk802 at the armtvtech.com forums and before you try following what I've done you should get ubuntu running first by following the instructions at jaz's hacks to see how linux performs and to familiarise yourself with the gk802 if you haven't played round with these arm devices before.


Here is a stage 3 gentoo image that you can put on a sdcard and boot.
Its based on a stage3-armv7a-20130208.tar.bz2 whose only modification is that
that the root password has been set to "gk802" and wpa_supplicant has been installed on it so you can access your wifi network.

bunzip2 -c gentoo_gk802_stage3.fs.bz2  | dd bs=1M of=/dev/yoursdcard

Insert the sdcard in the internal slot on the gk802 board and its ready to boot.

You now have a very basic gentoo setup running.

You can get the kernel source from https://github.com/imx6-dongle/linux-imx and to install your new kernel you'll need to:

emerge dev-embedded/u-boot-tools git
cd /usr/src/
git clone git://github.com/imx6-dongle/linux-imx.git linux
cd linux
gunzip -c /proc/config.gz  >  .config
make menuconfig
make -j4
make uImage
make modules_install
dd if=arch/arm/boot/uImage  of=/dev/mmcblk0 bs=1M seek=1

For configuration options that are known to work you can look at the freescale/gk802 package in my gentoo overlay at: https://github.com/danbrough/freescale-gk802 or just:

git clone git://github.com/danbrough/freescale-gk802.git

There are more ebuild's for getting hardware acceleration working but they are very much under development.
You will need the kernel sources configured and unpacked at /usr/src/linux.

You can use distcc to compile faster.
First you need to follow these instructions and in the process issue a command similar to this:
crossdev  --b 2.23.1 --g 4.7.3 --l 2.17  --k 3.1 --target armv7a-softfp-linux-gnueabi
.. if your gk802 happened to be running with binutils-2.23.1, gcc-4.7.3, glibc-2.17 and kernel headers 3.1

Enjoy.













No comments:

Post a Comment