Merge lp:~mwaddel/ubuntu/maverick/flash-kernel/vexpress-support into lp:ubuntu/maverick/flash-kernel

Proposed by Matt Waddel
Status: Merged
Merged at revision: 376
Proposed branch: lp:~mwaddel/ubuntu/maverick/flash-kernel/vexpress-support
Merge into: lp:ubuntu/maverick/flash-kernel
Diff against target: 66 lines (+38/-0)
2 files modified
README (+1/-0)
flash-kernel (+37/-0)
To merge this branch: bzr merge lp:~mwaddel/ubuntu/maverick/flash-kernel/vexpress-support
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+36472@code.launchpad.net

Description of the change

Adds support for the ARM Versatile Express platform. This platform uses NOR flash so adding the kernel and initrd support simply required writing to the correct mtd partition.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2010-05-06 12:32:59 +0000
3+++ README 2010-09-23 16:50:55 +0000
4@@ -21,6 +21,7 @@
5
6 At the moment, the following systems are supported:
7
8+ - ARM-Versatile Express CA9x4
9 - Buffalo Linkstation Live
10 - Buffalo Linkstation Pro
11 - Buffalo/Revogear Kurobox Pro
12
13=== modified file 'flash-kernel'
14--- flash-kernel 2010-09-23 08:48:43 +0000
15+++ flash-kernel 2010-09-23 16:50:55 +0000
16@@ -310,6 +310,7 @@
17 fi
18
19 case "$machine" in
20+ "ARM-Versatile Express CA9x4") exit 0 ;;
21 "Buffalo Linkstation Pro/Live") exit 0 ;;
22 "Buffalo/Revogear Kurobox Pro") exit 0 ;;
23 "D-Link DNS-323") exit 0 ;;
24@@ -378,6 +379,42 @@
25 subarch=$(echo "$kfile" | sed -e 's/.*-//')
26
27 case "$machine" in
28+ "ARM-Versatile Express CA9x4")
29+ check_subarch "vexpress"
30+ check_mtd
31+
32+ kmtd=$(mtdblock "kernel")
33+ if [ -z "$kmtd" ]; then
34+ error "Cannot find mtd partition 'kernel'"
35+ fi
36+ check_dev_mtdblock "$kmtd"
37+ kmtdsize=$(mtdsize "kernel")
38+ check_size "kernel" $(($kfilesize + 64)) $kmtdsize
39+ printf "Generating a u-boot compatible kernel image... " >&2
40+ mkimage -A arm -O linux -T kernel -C none -a 0x60008000 \
41+ -e 0x60008000 -n "$desc" -d $kfile $kfile.uboot \
42+ >&2 1>/dev/null
43+ printf "Writing kernel to flash... " >&2
44+ cat $kfile.uboot > $kmtd || error "failed."
45+ echo "done." >&2
46+ rm -f $kfile.uboot
47+
48+ imtd=$(mtdblock "initrd")
49+ if [ -z "$imtd" ]; then
50+ error "Cannot find mtd partition for initrd"
51+ fi
52+ check_dev_mtdblock "$imtd"
53+ imtdsize=$(mtdsize "initrd")
54+ check_size "initrd" $ifilesize $imtdsize
55+ printf "Generating u-boot compatible initrd image... " >&2
56+ mkimage -A arm -O linux -T ramdisk -C none -a 0x81000000 \
57+ -e 0x81000000 -n "$idesc" -d $ifile $ifile.uboot \
58+ >&2 1>/dev/null
59+ printf "Writing initrd to flash... " >&2
60+ cat $ifile.uboot > $imtd || error "failed."
61+ echo "done." >&2
62+ rm -f $ifile.uboot
63+ ;;
64 "Buffalo Linkstation Pro/Live" | "Buffalo/Revogear Kurobox Pro")
65 check_subarch "orion5x"
66 tmp="$(tempfile)"

Subscribers

People subscribed via source and target branches

to all changes: