Hi,

We're working on a better supported Linux kernel for Overo at the
moment.  Recently, some changes were made to u-boot for Overo  which
fix some of the power-off and watchdog issues.  The kernel is a little
harder to keep pace with...

Unfortunately, ad-hoc mode for wireless is not supported by the
open-source libertas drivers and requires direct support from wi2wi.

In case it is useful, I've attached my steps/notes about how to make a
custom hardware pack right from linux and u-boot source as well as a
custom live-build (thanks to Tom Gall's help) rootfs.  These were made
as my own notes so in some places I've been rather brief and in other
places, a little verbose (debian packaging confuses me some days).
Idefinitely welcome comment/questions/suggestions though.

-Ash

On Mon, Jul 2, 2012 at 8:56 PM, Sudhangathan B S <sudhangat...@gmail.com> wrote:
> To argue, I'm with Steffen Hemer,
>
> I'm working for a practical project, I'm trying to include MADC module and
> trying to compile a kernel for lot while now, without success, to be more
> serious, my boss is counting on me.
> Is it worthwhile trying this at all...?
>
> Every time i follow instructions at
> https://wiki.linaro.org/Resources/HowTo/KernelDeploy , I end up with a
> non-working image, or kernel that panics, doesn't boot finally. I have all
> the problems that Stefen Hemer says, though haven't tried 12.06. I have only
> tried upto 12.03 since 11.07 and also an old and stable 11.05 Ubuntu
> Desktop, which I downloaded long back. 11.05 is an image that i'm using
> since long for all activities now. I was pretty impressed with it, inspite
> of it being a little slow.
>
> Please advice which version should I use with LinaroMediaCreate and which
> version of kernel should I compile.
> I need these features: Stable Bluetooth, Wi-Fi with fully working Ad-Hoc
> mode, MADC, GPIO controls (which I never had problems),
> And also later dreaming to include advanced power management features and
> XIP kernel.
> I can share more detailed info if anybody out there says it's solvable..
>
> Counting....
> ---------------------------------
> Sudhangathan BS
> Ph:(+91) 9731-905-205
> ---------------------------------
>
>
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>
== Custom Gumstix Image ==
We can make a custom linaro-based image by creating either or both a
 1. Hardware pack
 2. Root file system

The hardware pack is a tar.gz file containing bootloaders, a kernel, and as 
well as a few hardware specific packages.
A root file system is, well, a Debian, plain ol' rootfs.

Combining these two ingredients makes a bootable microSD card:

 $ linaro-media-create --rootfs ext3 --mmc /dev/mmcblk0 --dev overo --hwpack 
<hwpack.tar.gz> --binary <rootfs.tar.gz>

-- or a qemu image --

 $ linaro-media-create --hwpack-force-yes --image_file overo.img --dev overo 
--image_size 3G --swap_file 500 --hwpack <hwpack.tar.gz> --binary 
<rootfs.tar.gz>

=== HWPACK ===
At the top level, hardware packs (see https://wiki.linaro.org/HardwarePacks) 
are generated by the linaro-hwpack-create utility distributed as part of 
linaro-image-tools (sudo apt-get install linaro-image-tools).

 $ linaro-hwpack-create <config-file> 0

The <config-file> used to make Overo hwpacks is maintained in a Bazaar 
repository.

 $ bzr branch lp:~linaro-maintainers/linaro-images/hwpack.precise.linaro-overo

Likely you're making a hardware pack because you want a custom u-boot or 
kernel.  To include a custom debian in a hardware pack, use the '--local-deb' 
switch (unless you happen to have a debian repository or PPA in which to dump 
packages in which case add the source to the <config-file>).

 $ linaro-hwpack-create --local-deb <my-super-uboot.deb> --local-deb 
<snazzy-kernel.deb> linaro-overo 0

=== Making a U-Boot Debian ===
To create a Debian package, both the (upstream) source code and a suitable 
packaging files (the 'debian' directory) are needed.

https://wiki.linaro.org/Boards/ST-Ericsson/Snowball/building_uboot offers a
detailed summary.  In short, you need both a u-boot git repo and a Bazaar
packaging repository.

==== U-boot Git Repository ====
Linaro maintains two u-boot repositories but any u-boot git will work:
 * git://git.linaro.org/boot/u-boot-linaro-stable.git
 * git://git.linaro.org/boot/u-boot-linaro-next.git

Build u-boot.

 $ make CROSS_COMPILE=arm-linux-gnueabi- omap3_overo

The packaging scripts need a tarball of the u-boot sources to package.  You can 
directly export a tarball directly from the git repository.

 $ git archive HEAD --prefix='u-boot/' | gzip > 
u-boot-linaro_2012.02.3.orig.tar.gz

The file name 'u-boot-linaro_2012.02.3.orig.tar.gz' depends on the packaging 
scripts.

Note: Equally, you can instead hack the packaging rules file to suck code 
directly from your git repository.

==== U-Boot Packaging Repository ====
First, grab the pre-existing packaging repository.

 $ bzr branch lp:u-boot-linaro

Next, add a changelog entry.  This adds your name to the debian/changlog file 
so the generated packages are signed with your GPG key.

 $ dch -i (increment...new section)
 $ dch -a (append...add to existing change)
 $ dch -r (change to released)

The release version number in the changlog should match the version number 
found in the name of the source tarball.

Now, from within the u-boot-linaro packaging repository, build the source 
package.

 $ bzr builddeb  -S

This generates sources packages in the parent directory.  Make a new directory
and build the binary packages
  $ cd ..
  $ dpkg-source -x *.dsc
  $ cd <newly created directory>
  $ debuild -eCROSS_COMPILE=arm-linux-gnueabi- -b -aarmel -k$GPGKEY

== Kernel ==
The kernel is regrettably tricky as it requires two debian packages:
 A) a package containing the kernel.  Simple enough right?
 B) a meta-package that depends on the the kernel package.  This way, the 
kernel package can't be apt-get autoremoved.

== Kernel Package ==
Note, if you just want to test a kernel image on hardware, stop here and look 
at this page instead: https://wiki.linaro.org/Resources/HowTo/KernelDeploy

To build a kernel debian:
 $ dch --changelog debian.linaro/changelog --package linux-omap3 -v 
2.6.38-1002.4
 $ fdr clean
 $ fdr updateconfigs
 $ debuild -eCROSS_COMPILE=arm-linux-gnueabi- -k$GPGKEY -b -aarmel 
On the target,
 # dpkg -i <my-kernel.deb>

To build a kernel normally 
(https://wiki.linaro.org/Resources/HowTo/KernelDeploy):
 1. Get a config from an existing build e.g.:
 $ scp root@overo.local:/media/rootfs/boot/config-2.6.38-1002-linaro-omap 
.config
-- OR --
 $ cat debian.linaro/config/config.common.ubuntu 
debian.linaro/config/armel/config.common.armel 
debian.linaro/config/armel/config.linaro-omap > .config
2. Build
 $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage modules -j8
3. Install
 $ cp arch/arm/boot/uImage /media/boot/
 $ make ARCH=arm INSTALL_MOD_PATH=/media/rootfs/ modules_install
 $ make ARCH=arm INSTALL_FW_PATH=/media/rootfs/ firmware_install
4. Run (at the u-boot prompt)
 # setenv loadbootscript ''
 # setenv console 'ttyO2,115200n8'
 # saveenv
 # run bootcmd
5. Generate an initramfs (from running target)
 # update-initramfs -c -k `uname -r`
 # mount /dev/mmcblk0p1 /mnt
 # mkimage -A arm -T ramdisk -C none -n "MY RAMDISK" -d /boot/initrd.img-`uname 
-r` /mnt/uInitrd
(see https://wiki.linaro.org/Resources/HowTo/KernelDeviceTree for dtb)

Like u-boot, you need the kernel source and some debian packaging.  
Fortunately, Linaro regularly packages these together:
 $ git clone git://git.linaro.org/ubuntu/linux-linaro-precise.git
The debian.linaro directory contains all the debian magic that specifies the 
modules, abi, and the configuration file snippets that are concatenated to make 
the kernel configuration.  Read this page twice: 
https://wiki.edubuntu.org/KernelTeam/KernelMaintenance

The official procedure is 
https://wiki.linaro.org/Resources/HowTo/PackageYourOwnKernel but much of the 
work has been done already.  Just setup with
 $ fdr clean
 $ fdr updateconfigs

And then build:
 $ debuild -eCROSS_COMPILE=arm-linux-gnueabi- -b -aarmel -k$GPGKEY

== Meta Kernel Package ==
This one is a little easier than the kernel. Simply clone and build...
 $ git clone 
git://git.linaro.org/people/jcrigby/ubuntu/linux-meta-linaro-natty.git
 $ make binary
As you need to change the ABI etc., you'll want to modify the changelog.

To build a meta-package, use
 $ dch --changelog meta-source/debian/changelog --package linux-meta-linaro -v 
2.6.38.1002.4
 $ make binary

At this point, you have a custom u-boot, kernel and kernel meta package which 
can be specified as local-debs for linaro-hwpack-create.

== RootFS ==
Traditionally, Debian root file systems have been built natively. The 
Live-Build tool can be used to create a custom root file system in a 
cross-build environment such as multistrap. The instructions here 
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/LiveBuild summarize 
the process well.

Package seeds are here: https://code.launchpad.net/linaro

To customize the branding, modify these packages:
 * linaro-plymouth-theme-logo
 * linaro-overlay (firefox default page etc.)
https://wiki.linaro.org/TomGall/HowToBrand

== Entertaining Extras ==
To get the toolchain,
 $ sudo apt-get install gcc-arm-linux-gnueabi

To build QEMU (http://wiki.gumstix.org/index.php?title=Overo_emulation_in_qemu):
 $ ./configure --target-list=arm-softmmu
 $ make -j8

Tell bzr who you are
 $ bzr whoami "Ash Charles <a...@gumstix.com>"

Add some handy stuff to .bash_aliases:
  alias fdr='fakeroot ./debian/rules'
  export DEBEMAIL="ashchar...@gmail.com"
  export DEBFULLNAME="Ash Charles"
  export GPGKEY="869D18EC"

=== Useful Links ===
 * https://wiki.linaro.org/CategoryHowTo
 * https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/LiveBuild
 * https://wiki.linaro.org/Boards/ST-Ericsson/Snowball/building_uboot
 * http://wiki.gumstix.org/index.php?title=Overo_emulation_in_qemu
_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to