Hi all,
I've added some detailed info on the wiki about how to go about
building bootable images for the big.LITTLE components, here:
https://wiki.linaro.org/Internal/Projects/Big.Little.Switcher/ARMFastModels…
For the benefit of anyone who can't see that page, I've also pasted it
here -- if anyone knows a better place to post this stuff, please let
me know!
Note that although the instructions give details of how to build a
filesystem image, there is essentially nothing b.L or model-specific
there -- it just serves as background for explaining how to work
around some issues which you may encounter.
These images are not supposed to present a fully working big.LITTLE
system -- they are there to help people understand how booting works,
where the sources are and how to work with the model.
Note also that the bootwrapper will change soon (when I get there) to
support loading of the kernel, initramfs from the host filesystem
using semihosting, just like the kvm bootwrapper, but this isn't
implemented for now.
Cheers
---Dave
== Filesystem ==
We need to create an SD card image with a filesystem on it, with the
rootfs partition matching the bootargs set previously. The following
example generates a suitable image using developer. The hardware pack
is largely irrelevant because we're not getting the kernel, modules,
bootloader or command-line from there -- but it keeps l-m-c happy.
{{{
$ wget http://releases.linaro.org/12.02/ubuntu/oneiric-images/developer/linaro-o-d…
$ wget http://releases.linaro.org/12.02/ubuntu/oneiric-images/developer/hwpack_lin…
}}}
Note that the ARM fast model's MMC interface emulation is currently
limited to 2G. Make the image a bit smaller than that to be on the
safe side:
{{{
$ sudo linaro-media-create --dev vexpress --image_file mmc.bin
--image_size 2000M --hwpack
hwpack_linaro-lt-vexpress-a9_20120221-1_armel_suupported.tar.gz
--binary linaro-o-developer-tar-20120221-0.tar.gz
}}}
After generating the filesystem, you probably want to customize it:
* Disable address layout randomization (mitigates a memory
consumption issue with the model, but not so important on host
machines with >4GB of RAM):
{{{
echo sys.kernel.randomize_va_space = 0 >>etc/sysctl.conf
}}}
* Disable DHCP for the network (otherwise boot will stall):
{{{
sed -i '/auto.*eth0/d; s/^\(iface.*eth0.*\)dhcp/\1manual/'
etc/network/interfaces
}}}
* Edit fstab to put the real device name into /etc/fstab in place of
UUID=<uuid>. This may not be necessary (mountall was getting
confused, but that may have been caused by not having an initramfs).
Finally, extract the initramfs image (whatever /initrd.img in the
filesystem image points to).
== Kernel, switcher and bootwrapper ==
Clone the big.LITTLE switcher:
{{{
$ git clone --branch gnu-build git://git.linaro.org/people/dmart/arm-virt-bl.git
}}}
Clone the kernel to run on the model. (Eventually we shouldn't need a
special tree for this. There are a few model-specific tweaks in this
tree, but nothing big.LITTLE-specific yet.)
{{{
$ git clone --branch arm/vexpressdt-rtsm
git://git.linaro.org/people/dmart/linux-2.6-arm.git
}}}
Now build the kernel:
{{{
$ cd linux-2.6-arm/
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- vexpress_rtsm_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage dtbs
}}}
The bootwrapper doesn't support device tree yet, so for now append a
suitable device tree blob to the zImage. This should match the model
you intend to run on:
{{{
$ cat arch/arm/boot/zImage arch/arm/boot/vexprress-v2p-ca15x4-rtsm.dtb >../zBlob
}}}
Now, build the bootwrapper using the kernel you just built:
{{{
$ cd ../arm-virt-bl/bootwrapper
}}}
Configure some things:
In Makefile, add the following argument to BOOTARGS:
{{{
root=/dev/mmcblk0p2
}}}
Due to current bugginess introduced by the ARM->GNU toolchain
migration, the switcher is not currently stable. For now, we turn off
autonomous asynchronous switching so that we can see the system
booting:
In big-little/Makefile, add change the line
{{{
ASYNC ?= TRUE
}}}
to
{{{
ASYNC ?= FALSE
}}}
Plug in the kernel and initramfs images from the previous steps:
{{{
$ : >payload/fsimg
$ cp ../../zBlob payload/kernel
$ cp initrd.img payload/fsimg
}}}
... and build:
{{{
$ make
[...]
LD img.axf
}}}
img.axf is the boot payload which is needed to start the model. It
contains the big.LITTLE switcher code and the kernel, along with a
minimal bootloader.
== Running ==
OK, so now we have:
* A boot image containing the switcher and kernel: img.axf
* A filesystem MMC card image: mmc.bin
* A model binary
Sample payload images can be found in
http://people.linaro.org/~dmart/bl-images/model-images-20120228.tar.bz2
Run like this:
{{{
$ ./RTSM_VE_Cortex-A15x4-A7x4 -C motherboard.mmc.p_mmc_file=mmc.bin -a
coretile.cluster0.*=img.axf
}}}
This should be enough to boot to a prompt on the simulated UART.
Beware though -- it can take up to 10 minutes or so to get there,
depending on your machine.
== Omar Ramirez <omarrmz> ==
=== Highlights ===
* Attended Linaro Connect from Feb 6 - 10
* Rebased iommu hwmod work onto Ohad's rpmsg-branch, created github
tree for him to check on the changes.
* Setting up OMAP3 ISP testing environment, to test iommu changes
without a sensor, following instructions received from Laurent
Pinchart.
* Looking at device tree for mailbox.
* Tidspbridge work:
- Tracking inclusion of memory leak fixes for tidspbridge.
- Patch to solve a L3 warning due to a missing wdt clock on the dsp side.
== Thomas Abraham <thomas-ab> ==
=== Highlights ===
* Posted revised device tree support patches for wakeup interrupts (v3),
max8997 mfd/regulator (v4) and interrupt combiner (v4). Reworked
the patches for the v5 of irq_domain generalization patches.
=== Plans ===
* Revised device tree support patches for display controller.
* Generic bindings for IOMMU controller.
Got ill at the start of this week, plus the holidays pretty much
distracted my usual workflow.
== Highlights ==
* Found a serious bug in the cgroups memory controller, prepared and
send the fix upstream;
* Got a drop-in userspace replacement for the kernel LMK driver, it is
using cgroups memory notifications;
* Started working on shm+liburcu-cds support for the userspace-LMK
daemon, this will let Activity Manager and ulmk daemon efficiently
exchange PIDs and their priorities, so that ulmk wouldn't need to
traverse the whole /proc directory.
--
Anton Vorontsov
Email: cbouatmailru(a)gmail.com
=== Device Tree ===
* Refine imx sound Kconfig and imx ASoC driver to get imx-pcm-dma
work independently with imx-ssi, so that it's possible to get it
work with fsl_ssi driver.
* Factor out the common functions among Freescale PowerPC ASoC
machine drivers into a utility module, so that these common bits
do not need to get duplicated again when IMX machine driver is
added to work with fsl_ssi driver.
=== IMX Maintenance ===
* Posted a few updates on imx_v6_v7_defconfig and imx5/6 dts
* Tested a couple of ASoC dmaengine backed pcm driver consolidation
patches on IMX and MXS
* Collected a number of imx6 patches from Freescale Landing Team
--
Regards,
Shawn
== Dave Martin <dmart> ==
=== Activity Summary ===
* A bit of cleanup progress on the hyp-entry patches, but more is needed.
* Addressed review comments on the hyp-entry patches locally (not reposted yet)
* Progressed deployment of the ARM task migration (switcher)
implementation: merged in ARM's recent fixes; still discussing on how
best to publish this. Debugging still appears to be needed.
* Specification/planning discussions for the big.LITTLE work after
Linaro Connect.
=== Plans ===
* Continue debugging ARM switcher
* Clean up and post hyp-entry RFC
* Attempt to implement cpufreq backend to drive the ARM switcher from userspace
=== Work Items ===
https://blueprints.launchpad.net/linux-linaro/+spec/big-little-reference-sw…:
[dave-martin-arm] integrate reference switcher bug fixes from ARM: INPROGRESS
[dave-martin-arm] debug reference switcher: INPROGRESS
(i.e., work on-going)
=== Absences ===
none planned yet
== Niklas Hernaeus <nhe> ==
=== General activity ===
* Made patches apply and build on both next-kernel and
igloo-kernel
* Made the discovery that my problems with running with DT on
snowball seems
to be due to a lockup in the boot. The speculation so far is that this is
due to a different access of hw when using DT, where some boot sw
accesses
some hw that have not any clock or power yet. At the moment it seems
to be the gpio that is the problem.
== Rajendra Nayak <rnayak> ==
=== Highlights ===
* Posted cleanups for twl4030-gpio and mmc dependencies
during init since mmc card detect uses twl4030 gpio.
* Posted v2 of the pdev->id cleanup for omap hsmmc driver.
Asked Chris to pull for 3.4.
* Posted v3 of twl regulator DT adaptation patches. Still
got dependency with Benoit's i2c-twl series.
* Posted omap hsmmc driver DT adaptation patches. Have
dependency on the pdev->id cleanup and twl regulator DT
series.
=== Plans ===
* Repost twl regulator DT patches on top of Tero's changes as
requested by Mark.
* twl4030-gpio DT conversion.
* System control module driver for OMAP.
=== Misc ===
* None
=== Highlights ===
* Finish writeup of android meeting summary got it reviewed and acked by
the participants and sent to lwn. Hoping it will be published this weds.
* Handled Android-subteam meeting
* Finally got to testing Rafael's wakelock patches on an x86 system.
Found an issue and reported it. Worked on getting suspend/resume working
on my panda board so I can test there, but so far no luck.
* Reviewed the released Android 3.3 tree from Google. Its much smaller,
which is great. Also they are using my alarm-timer cleanups, which might
help get those ready for mainline inclusion. We should note that the
release is really just a development snapshot, so its likey to change a
bit.
* Sent some email to Colin Cross about cgroup patches that I thought he
was going to drop, but he explained why they were still necessary.
* Met with Mark Gross of Intel (also a Portlander) who's name came up
during the Android meeting with regards to runtime pm vs wakelocks.
Talked to him a bit about his thoughts on wakelocks and talked about
what went on at the Android meeting.
* Started looking at what is required to get ADB into staging
=== Plans ===
* Continue working on testing Rafael's wakelocks & try to integrate them
with the alarmtimer work
* Get some time to work on another iteration of fadvise volatile
=== Issues ===
* NA