Novena/Debian History

From Studio Kousagi Wiki
Revision as of 03:12, 22 January 2013 by Bnewbold (talk | contribs) (initial debian notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Porting

Debian would be a great linux distro to port to the Novena because of the large number of derivative distros (Ubuntu, gNewSense, TAILS, etc). The DFSG also set a high bar for "libre-ness".

As of January 2013 this may be pre-mature as there is no finalized application-specific Novena hardware. Nonetheless, it would be nice to get the ball rolling and clear any blockers to having debian run on generic Freescale i.mx6-based devices.

bnewbold will try to hand-hold this process. He will target the wheezy release, which is currently testing but will hopefully be released as stable in the next few months.

Device-specific debian support for Novena would be similar to the device-specific support for the Marvell Dreamplug device used by the FreedomBox project. Ian Campbell seems to have led upstreaming efforts for that device, here are some of the patches and emails from that process:

Subj: include DTB in linux-image files on armel
http://osdir.com/ml/debian-kernel/2012-04/msg00475.html
Subj: ARM: backporting dreamplug patches for Wheezy
Date: Thu, 01 Mar 2012
From: Ian Campbell <ijc@hellion.org.uk>
https://lists.debian.org/debian-kernel/2012/03/msg00006.html
Subj: flash-kernel: Please add support for Dreamplug / Marvell Kirkwood FDT
Date: April 05th, 2012
From: Ian Campbell
http://us.generation-nt.com/answer/bug-667681-flash-kernel-please-add-support-dreamplug-marvell-kirkwood-fdt-help-207026612.html#r
Mainline linux patches:
ARM: kirkwood: add dreamplug (fdt) support.
http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=commit;h=3d468b6d6052293ad3b8538b8277077981c28286
ARM: kirkwood: convert uart0 to devicetree.
http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=commit;h=759a45185ac0e4dfaf8bbfcb390ec73aca4b7a34 

So what needs to be done to run vanilla debian on the Novena hardware?

For basic (headless?) functionality the vanilla/mainline linux 3.7 kernel works fine because of patches already applied for the Sabre Lite i.mx6 development board. A Novena-specific device tree file needs to be applied to the kernel image to boot properly; this step happens at kernel installation/upgrade time (the flash-kernel package in debian?).

Customizations to the u-boot booatloader are more extensive and (at the moment) volatile. The way u-boot is installed (written to an offset on the SD card) is fairly unique and there is no "debian way" to do this at the moment. This operation is a bit risky and maybe should only be done by an image build script and not by an automatic u-boot-tools apt-get command?

Kosagi.com

  • build a Novena binary SD card image from scratch using debian tools
  • export device tree file (./arch/arm/boot/dts/imx6q-novena.dts?)
  • stabilize Novena-specific u-boot tweaks
  • write an image building script/process
  • (potentially) extend ``flash-kernel`` package to apply device tree file, allowing apt-get kernel updates

Debian.org

  • update u-boot and u-boot-tools packages to 2012.10 or newer
  • merge custom Novena-specific u-boot tweaks

Kernel.org

  • merge device tree (sabre lite one might be acceptable?)

Toolchain

There are many ways to set up cross-compiling on an x86 linux host targeting ARM devices like Novena. These directions for a debian host are pretty simple and up to date as of January 2013; note that you will need to add squeeze apt repositories to your host's /etc/apt/sources.list if you run wheezy or sid: Cross-compiling an Allwinner A10 ARM Linux kernel on Debian AMD64

Ultimately, of course, the Novena will be self-hosting and new kernels and packages could be built locally.

Notes

There is an 'mx5' flavor of the Debian armhf kernel (eg, wheezy/linux-image-mx5). A '-mx6' flavor might be created, or a '-mx' flavor might combine the two.

The Freescale i.mx6 would use the armhf architecture.

Set serial login on ttymxc1; append to /etc/inittab:

3:23:respawn:/sbin/getty 115200 ttymxc1

Set mac address; insert in /etc/network/interfaces:

hwaddress ether 00:1f:16:33:aa:aa