blob: c730a1aa5e87d8e1f1b027a9b8f36a785899b89c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
h1. Real-Time System Model (RTSM)
h2. Prerequisites
* Install the RTSM model(s) you wish to run. You must have a valid license and the environment set up to run models
* Install "linaro-image-tools":https://wiki.linaro.org/Linaro-Image-Tools
* Install kpartx which you can get by issuing the following command in your terminal
bc. sudo apt-get install kpartx
Linaro Ubuntu images are made up of two components. The "Hardware Pack":https://wiki.linaro.org/HardwarePacks, which contains the kernel, boot loader and/or Device Tree blob and a Root file system (RootFS) of your choice to generate an image.
The root file systems are described "here":http://releases.linaro.org/12.09/ubuntu/precise-images where you can also download them.
h3. Install Linaro Image Tools
There are multiple ways you can get the latest Linaro Image Tools:
** Method 1: Install them from the Linaro Image Tools "PPA":https://launchpad.net/~linaro-maintainers/+archive/tools
bc.
sudo add-apt-repository ppa:linaro-maintainers/tools@
sudo apt-get update@
sudo apt-get install linaro-image-tools@
** Method 2: Building from source.
bc. wget http://releases.linaro.org/12.10/components/platform/linaro-image-tools/linaro-image-tools-2012.10.1.tar.gz
h2. Create a 2GB image file
RTSM will only deal with file systems up to 2GB in size, however the pre-built image for Ubuntu requires a 4GB filesystem. Therefore we will build our own image using the pre-built artifacts, as obtained in the Binary Image Installation tab on this page.
We use a "Nano":http://releases.linaro.org/12.09/ubuntu/precise-images RootFS for this example, however, you could use other RootFS types so long as you can install it to a 2GB file. Note, you will also need the @boot.tar.bz2@ file from the Android release.
Using the following command, you will download the nano RootFS, the hardware back and the boot.tar.gz you need from the Android build.
bc.
wget \
http://releases.linaro.org/12.09/ubuntu/precise-images/nano/linaro-precise-nano-20120923-417.tar.gz \
http://releases.linaro.org/12.09/ubuntu/vexpress/hwpack_linaro-vexpress_20120925-322_armhf_supported.tar.gz \
http://releases.linaro.org/12.09/android/images/vexpress-jb-gcc47-armlt-tracking-open/boot.tar.bz2
Now you need to create the image using the following commands.
bc.
sudo linaro-media-create \
--dev vexpress \
--rootfs ext4 \
--image-file linaro.img \
--image-size 2000M \
--hwpack-force-yes \
--binary linaro-precise-nano-20120923-417.tar.gz \
--hwpack hwpack_linaro-vexpress_20120925-322_armhf_supported.tar.gz
bc.
sudo kpartx -a linaro.img
mkdir boot
sudo mount /dev/mapper/loop0p1 boot
cp boot/uImage .
cp boot/uInitrd .
sudo umount boot
tar jxvf boot.tar.bz2
h2. Run A15x4 model
This example shows how to run the Linaro kernel on a quad core A15 RTSM model:
bc.
RTSM_MODEL=$HOME/ARM/RTSM/Linux64_RTSM_VE_Cortex-A15x4/RTSM_VE_Cortex-A15x4
RTSM_BOOTWRAPPER=boot/rtsm/linux-system-semi.axf
RTSM_MMC=linaro.img
RTSM_KERNEL=uImage
RTSM_DTB=boot/rtsm/rtsm_ve-ca15x4.dtb
RTSM_INITRD=uInitrd
RTSM_CMDLINE="console=ttyAMA0,115200n8 root=/dev/mmcblk0p2 rootwait ro mem=1024M ip=dhcp"
bc.
$RTSM_MODEL \
$RTSM_BOOTWRAPPER \
-C motherboard.smsc_91c111.enabled=1 \
-C motherboard.hostbridge.userNetworking=1 \
-C motherboard.mmc.p_mmc_file="$RTSM_MMC" \
-C cluster.cpu0.semihosting-cmd_line="--kernel $RTSM_KERNEL --dtb $RTSM_DTB --initrd $RTSM_INITRD -- $RTSM_CMDLINE"
h2. Run A15x4-A7x4 model
This example shows how to run the Linaro kernel on a big.LITTLE RTSM model:
bc.
RTSM_MODEL=$HOME/ARM/RTSM/Linux64_RTSM_VE_Cortex-A15x4-A7x4/RTSM_VE_Cortex-A15x4-A7x4
RTSM_BOOTWRAPPER=boot/rtsm/linux-system-semi.axf
RTSM_MMC=linaro.img
RTSM_KERNEL=uImage
RTSM_DTB=boot/rtsm/rtsm_ve-ca15x4-ca7x4.dtb
RTSM_INITRD=uInitrd
RTSM_CMDLINE="console=ttyAMA0,115200n8 root=/dev/mmcblk0p2 rootwait ro mem=1024M ip=dhcp"
bc.
$RTSM_MODEL \
-a coretile.cluster0.*=$RTSM_BOOTWRAPPER \
-a coretile.cluster1.*=$RTSM_BOOTWRAPPER \
-C motherboard.smsc_91c111.enabled=1 \
-C motherboard.hostbridge.userNetworking=1 \
-C motherboard.mmc.p_mmc_file=$RTSM_MMC \
-C coretile.dualclustersystemconfigurationblock.CFG_ACTIVECLUSTER=0x3 \
-C coretile.cluster0.cpu0.semihosting-enable=1 \
-C coretile.cluster0.cpu0.semihosting-cmd_line="--kernel $RTSM_KERNEL --dtb $RTSM_DTB --initrd $RTSM_INITRD -- $RTSM_CMDLINE"
|