Package: flash-kernel-installer Severity: wishlist Tags: patch Please add support for the gta02.
-- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (990, 'testing'), (120, 'unstable'), (105, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.35-rc3+ (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
>From b66179b25fc65dab8dee7cb3b867ca54bc8cee5c Mon Sep 17 00:00:00 2001 From: Thibaut Girka <t...@sitedethib.com> Date: Sun, 15 Aug 2010 13:39:35 +0200 Subject: [PATCH 4/9] flash-kernel: add s3c24xx/gta02 support --- packages/flash-kernel/debian/control | 2 +- .../debian/flash-kernel-installer.isinstallable | 3 +++ .../debian/flash-kernel-installer.postinst | 16 ++++++++++++++++ packages/flash-kernel/flash-kernel | 16 ++++++++++++++++ .../initramfs-tools/hooks/flash_kernel_set_root | 3 +++ 5 files changed, 39 insertions(+), 1 deletions(-) diff --git a/packages/flash-kernel/debian/control b/packages/flash-kernel/debian/control index 7d1fc1a..1cc6427 100644 --- a/packages/flash-kernel/debian/control +++ b/packages/flash-kernel/debian/control @@ -23,7 +23,7 @@ Section: debian-installer Priority: standard XC-Package-Type: udeb Architecture: arm armel armeb -XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x +XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x s3c24xx Provides: bootable-system Depends: cdebconf-udeb, installed-base XB-Installer-Menu-Item: 7300 diff --git a/packages/flash-kernel/debian/flash-kernel-installer.isinstallable b/packages/flash-kernel/debian/flash-kernel-installer.isinstallable index fb56721..bd1b2af 100755 --- a/packages/flash-kernel/debian/flash-kernel-installer.isinstallable +++ b/packages/flash-kernel/debian/flash-kernel-installer.isinstallable @@ -2,6 +2,9 @@ set -e case "`archdetect`" in + arm*/s3c24xx) + exit 0 + ;; arm*/iop32x) exit 0 ;; diff --git a/packages/flash-kernel/debian/flash-kernel-installer.postinst b/packages/flash-kernel/debian/flash-kernel-installer.postinst index 164e464..eb7690a 100755 --- a/packages/flash-kernel/debian/flash-kernel-installer.postinst +++ b/packages/flash-kernel/debian/flash-kernel-installer.postinst @@ -33,6 +33,9 @@ write_to_flash() { "GLAN Tank") return 1 ;; + "GTA02") + return 1 + ;; "HP t5325 Thin Client") return 1 ;; @@ -104,6 +107,19 @@ case "$machine" in "GLAN Tank") in-target update-initramfs -u || true ;; + "GTA02") + in-target update-initramfs -u || true + if ! apt-install uboot-mkimage; then + error "apt-install uboot-mkimage failed" + fi + if ! apt-install uboot-envtools; then + error "apt-install uboot-envtools failed" + fi + # Modify u-boot environment + rootfs=$(findfs /) + bootfs=$(findfs /boot) + modify_uboot_env $rootfs $bootfs + ;; "HP t5325 Thin Client") in-target update-initramfs -u || true if ! apt-install uboot-mkimage; then diff --git a/packages/flash-kernel/flash-kernel b/packages/flash-kernel/flash-kernel index abf4849..06d29a0 100755 --- a/packages/flash-kernel/flash-kernel +++ b/packages/flash-kernel/flash-kernel @@ -85,6 +85,7 @@ fi if [ "x$1" = "x--supported" ]; then case "$machine" in + "GTA02") exit 0 ;; "Buffalo Linkstation Pro/Live") exit 0 ;; "Buffalo/Revogear Kurobox Pro") exit 0 ;; "D-Link DNS-323") exit 0 ;; @@ -140,6 +141,21 @@ fi subarch=$(echo "$kfile" | sed -e 's/.*-//') case "$machine" in + "GTA02") + check_subarch "s3c24xx" + tmp="$(tempfile)" + printf "Generating u-boot image..." >&2 + gzip -9 -c "$kfile" > "$tmp" + mkimage -A arm -O linux -T multi -C gzip -a 0x30008000 \ + -e 0x30008000 -n "$desc" -d "$tmp":"$ifile" "$tmp.uboot" >&2 1>/dev/null + echo "done." >&2 + rm -f "$tmp" + if [ -e /boot/uImage.bin ]; then + echo "Creating backup of /boot/uImage.bin." >&2 + mv /boot/uImage.bin /boot/uImage.bin.bak + fi + mv "$tmp.uboot" /boot/uImage.bin + ;; "Buffalo Linkstation Pro/Live" | "Buffalo/Revogear Kurobox Pro") check_subarch "orion5x" tmp="$(tempfile)" diff --git a/packages/flash-kernel/initramfs-tools/hooks/flash_kernel_set_root b/packages/flash-kernel/initramfs-tools/hooks/flash_kernel_set_root index 8163f68..abddadd 100755 --- a/packages/flash-kernel/initramfs-tools/hooks/flash_kernel_set_root +++ b/packages/flash-kernel/initramfs-tools/hooks/flash_kernel_set_root @@ -23,6 +23,9 @@ pause_error() { # device? root_type() { case "$1" in + "GTA02") + echo "override" + ;; "Buffalo Linkstation Pro/Live") echo "override" ;; -- 1.7.1