Bug#596889: flash-kernel: please add ARM-Versatile Express CA9x4 support
Package: flash-kernel
Version: 2.13ubuntu17
Severity: wishlist
Tags: patch
-- System Information:
Debian Release: squeeze/sid
APT prefers lucid
APT policy: (500, 'lucid')
Architecture: armel (armv7l)
Kernel: Linux 2.6.35-1005-linaro-vexpress (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages flash-kernel depends on:
ii devio 1.2-1build1 correctly read (or write) a region
ii initramfs-tools 0.92bubuntu78 tools for generating an initramfs
ii redboot-tools 0.7build1 Collection of utilities to manipul
flash-kernel recommends no packages.
Versions of packages flash-kernel suggests:
pn uboot-envtools <none> (no description available)
ii uboot-mkimage 0.4build1 generate kernel image for U-Boot
-- no debconf information
-- The list of supported architectures seems pretty much alphabetical. So I
put this one at the top. Hope that's OK.
Index: flash-kernel
===================================================================
--- flash-kernel (revision 64675)
+++ flash-kernel (working copy)
@@ -85,6 +85,7 @@
if [ "x$1" = "x--supported" ]; then
case "$machine" in
+ "ARM-Versatile Express CA9x4") exit 0 ;;
"Buffalo Linkstation Pro/Live") exit 0 ;;
"Buffalo/Revogear Kurobox Pro") exit 0 ;;
"D-Link DNS-323") exit 0 ;;
@@ -140,6 +141,48 @@
subarch=$(echo "$kfile" | sed -e 's/.*-//')
case "$machine" in
+ "ARM-Versatile Express CA9x4")
+ check_mtd
+ kmtd=$(mtdblock "kernel")
+ if [ -z "$kmtd" ]; then
+ error "Cannot find mtd partition 'kernel'"
+ fi
+ check_dev_mtdblock "$kmtd"
+ kmtdsize=$(mtdsize "kernel")
+ check_size "kernel" $(($kfilesize + 8 + 64)) $kmtdsize
+ printf "Generating a u-boot compatible kernel image... " >&2
+ tmp=$(tempfile)
+ cat $kfile >> $tmp
+ mkimage -A arm -O linux -T kernel -C none -a 0x60008000 \
+ -e 0x60008000 -n "Linaro Kernel" -d $tmp $tmp.uboot \
+ >&2 1>/dev/null
+ printf "Erasing Kernel NOR space... " >&2
+ dd if=/dev/zero of=$kmtd bs=$kmtdsize count=1 2>/dev/null
+ printf "Writing kernel to flash... " >&2
+ cat $tmp.uboot > $kmtd || error "failed."
+ echo "done." >&2
+ rm -f $tmp.uboot $tmp
+
+ initrd_nor_size=25165824
+ imtd=$(mtdblock "initrd")
+ if [ -z "$imtd" ]; then
+ error "Cannot find mtd partition for initrd"
+ fi
+ check_dev_mtdblock "$imtd"
+ check_size "initrd" $ifilesize $initrd_nor_size
+ printf "Generating u-boot compatible initrd image... " >&2
+ tmp=$(tempfile)
+ cat $ifile >> $tmp
+ mkimage -A arm -O linux -T ramdisk -C none -a 0x81000000 \
+ -e 0x81000000 -n "initramfs" -d $tmp $tmp.uboot \
+ >&2 1>/dev/null
+ printf "Erasing initrd NOR space... " >&2
+ dd if=/dev/zero of=$imtd bs=$initrd_nor_size count=1 2>/dev/null
+ printf "Writing initrd to flash... " >&2
+ cat $tmp.uboot > $imtd || error "failed."
+ echo "done." >&2
+ rm -f $tmp.uboot $tmp
+ ;;
"Buffalo Linkstation Pro/Live" | "Buffalo/Revogear Kurobox Pro")
check_subarch "orion5x"
tmp="$(tempfile)"
Index: README
===================================================================
--- README (revision 64675)
+++ README (working copy)
@@ -21,6 +21,7 @@
At the moment, the following systems are supported:
+ - ARM-Versatile Express CA9x4
- Buffalo Linkstation Live
- Buffalo Linkstation Pro
- Buffalo/Revogear Kurobox Pro
Reply to: