[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#626434: marked as done (flash-kernel: please add u-boot script support)



Your message dated Wed, 24 Aug 2011 12:32:16 +0000
with message-id <E1QwCcy-0002PP-A7@franck.debian.org>
and subject line Bug#626434: fixed in flash-kernel 3.0~rc.1
has caused the Debian Bug report #626434,
regarding flash-kernel: please add u-boot script support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
626434: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626434
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: flash-kernel
Version: 2.40
Severity: wishlist
Tags: patch

Hi,

  I have been working out support for u-boot scripts.
  I would like to know your comments or input about it as might might push it
  to the efika flash-kernel branch which someday I hope to merge into master.
  Right now, I am a bit stuck on how to set ROOTPARTITION on the bootscript,
  at the moment I have it hardcoded, but hopefully we can find a way around it.

>From 93003a5b3affc1a5f3b3abac98d22d077a06f388 Mon Sep 17 00:00:00 2001
From: Hector Oron <zumbi@debian.org>
Date: Wed, 11 May 2011 23:15:17 +0000
Subject: [PATCH] flash-kernel: add u-boot script support

  * flash-kernel: add u-boot script support
  * bootscript/bootscr.mx5: u-boot script for mx5 supported devices.
  * debian/control: add devio as build-dep and armhf support.
  * debian/flash-kernel.install: install u-boot scripts

Signed-off-by: Hector Oron <zumbi@debian.org>
---
 bootscript/bootscr.mx5      |   12 ++++++++++++
 debian/control              |    8 ++++----
 debian/flash-kernel.install |    1 +
 flash-kernel                |   38 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 55 insertions(+), 4 deletions(-)
 create mode 100644 bootscript/bootscr.mx5

diff --git a/bootscript/bootscr.mx5 b/bootscript/bootscr.mx5
new file mode 100644
index 0000000..8f992e3
--- /dev/null
+++ b/bootscript/bootscr.mx5
@@ -0,0 +1,12 @@
+setenv ramdisk uInitrd;
+setenv kernel uImage;
+setenv bootargs console=ttymxc0,115200 console=tty1 root=@ROOTPARTITION@ rootwait rw;
+${loadcmd} ${ramdiskaddr} ${ramdisk};
+if imi ${ramdiskaddr}; then; else
+  setenv bootargs ${bootargs} noinitrd;
+  setenv ramdiskaddr "";
+fi;
+${loadcmd} ${kerneladdr} ${kernel}
+if imi ${kerneladdr}; then
+  bootm ${kerneladdr} ${ramdiskaddr}
+fi;
diff --git a/debian/control b/debian/control
index 465a495..2e50500 100644
--- a/debian/control
+++ b/debian/control
@@ -5,13 +5,13 @@ Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
 Uploaders: Loïc Minier <lool@debian.org>,
            Martin Michlmayr <tbm@cyrius.com>,
            Wouter Verhelst <wouter@debian.org>
-Build-Depends: debhelper (>= 7.3.10)
+Build-Depends: debhelper (>= 7.3.10), devio
 Standards-Version: 3.9.1
 Vcs-Browser: http://git.debian.org/?p=d-i/flash-kernel.git
 Vcs-Git: git://git.debian.org/d-i/flash-kernel.git
 
 Package: flash-kernel
-Architecture: arm armel armeb
+Architecture: arm armel armeb armhf
 Depends: ${misc:Depends}, devio, initramfs-tools (>= 0.92f)
 Suggests: uboot-mkimage
 Description: utility to make certain embedded devices bootable
@@ -25,8 +25,8 @@ Package: flash-kernel-installer
 Section: debian-installer
 Priority: standard
 XC-Package-Type: udeb
-Architecture: arm armel armeb
-XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x s3c24xx
+Architecture: arm armel armeb armhf
+XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x s3c24xx mx5
 Provides: bootable-system
 Depends: cdebconf-udeb, installed-base
 XB-Installer-Menu-Item: 7300
diff --git a/debian/flash-kernel.install b/debian/flash-kernel.install
index a9f5a6c..e3e5258 100644
--- a/debian/flash-kernel.install
+++ b/debian/flash-kernel.install
@@ -1,2 +1,3 @@
 flash-kernel usr/sbin
 initramfs-tools usr/share
+bootscript usr/share/flash-kernel
diff --git a/flash-kernel b/flash-kernel
index 6b6161c..4d038f4 100755
--- a/flash-kernel
+++ b/flash-kernel
@@ -210,6 +210,18 @@ mkimage_initrd() {
 	echo "done." >&2
 }
 
+mkimage_script() {
+	local baddr="$1"
+	local bdesc="$2"
+	local bdata="$3"
+	local bscript="$4"
+	
+	printf "Generating u-boot script image... " >&2
+	mkimage -A arm -O linux -a "$baddr" -e "$baddr" -T script -C none \
+		-n "$bdesc" -d "$bdata" "$bscript" >&2 1>/dev/null
+	echo "done." >&2
+}
+
 mkimage_multi() {
 	local maddr="$1"
 	local mdesc="$2"
@@ -297,15 +309,21 @@ Machine: Genesi EfikaMX nettop
 Kernel-Flavors: mx5
 U-Boot-Kernel-Address: 0x90008000
 U-Boot-Initrd-Address: 0x0
+U-Boot-Script-Address: 0x0
+U-Boot-Script-Name: bootscr.mx5
 Boot-Kernel-Path: /boot/uImage
 Boot-Initrd-Path: /boot/uInitrd
+Boot-Script-Path: /boot/boot.scr
 
 Machine: Genesi Efika Smartbook
 Kernel-Flavors: mx5
 U-Boot-Kernel-Address: 0x90008000
 U-Boot-Initrd-Address: 0x0
+U-Boot-Script-Address: 0x0
+U-Boot-Script-Name: bootscr.mx5
 Boot-Kernel-Path: /boot/uImage
 Boot-Initrd-Path: /boot/uInitrd
+Boot-Script-Path: /boot/boot.scr
 
 Machine: GLAN Tank
 Kernel-Flavors: iop32x
@@ -486,10 +504,13 @@ mtd_kernel="$(get_machine_field "$machine" "Mtd-Kernel")" || :
 mtd_initrd="$(get_machine_field "$machine" "Mtd-Initrd")" || :
 ukaddr="$(get_machine_field "$machine" "U-Boot-Kernel-Address")" || :
 uiaddr="$(get_machine_field "$machine" "U-Boot-Initrd-Address")" || :
+ubaddr="$(get_machine_field "$machine" "U-Boot-Script-Address")" || :
 umaddr="$(get_machine_field "$machine" "U-Boot-Multi-Address")" || :
 boot_kernel_path="$(get_machine_field "$machine" "Boot-Kernel-Path")" || :
 boot_initrd_path="$(get_machine_field "$machine" "Boot-Initrd-Path")" || :
+boot_script_path="$(get_machine_field "$machine" "Boot-Script-Path")" || :
 boot_multi_path="$(get_machine_field "$machine" "Boot-Multi-Path")" || :
+ubfile="$(get_machine_field "$machine" "U-Boot-Script-Name")" || :
 
 if [ -n "$mtd_kernel" ] || [ -n "$mtd_initrd" ]; then
 	if [ ! -e "$PROC_MTD" ]; then
@@ -594,6 +615,23 @@ case "$machine" in
 			flash_initrd "$initrd" "$imtd" $ipad
 			rm -f "$tmpdir/uInitrd"
 		fi
+		if [ -n "$ubfile" ]; then
+			ubdir="/boot/flash-kernel/"
+			ubdesc="Debian U-Boot Boot Script"
+			if [ ! -d "$ubdir" ]; then 
+				mkdir -p "$ubdir"
+				# XXX HACK: It needs better way of doing this
+				rootfs="\/dev\/sda2"
+				sed -e "s/@ROOTPARTITION@/$rootfs/" \
+					/usr/share/flash-kernel/bootscript/"$ubfile" \
+					>"$ubdir"/"$ubfile"
+			fi
+			if [ -e "$boot_script_path" ]; then
+				cp -a "$boot_script_path" "$boot_script_path".bak
+			fi
+			mkimage_script "$ubaddr" "$ubdesc" "$ubdir"/"$ubfile" \
+				"$boot_script_path"
+		fi
 	;;
 	"GLAN Tank")
 		rm -f /boot/initrd /boot/zImage
-- 
1.7.4.4

Bes regards

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



--- End Message ---
--- Begin Message ---
Source: flash-kernel
Source-Version: 3.0~rc.1

We believe that the bug you reported is fixed in the latest version of
flash-kernel, which is due to be installed in the Debian FTP archive:

flash-kernel-installer_3.0~rc.1_armel.udeb
  to main/f/flash-kernel/flash-kernel-installer_3.0~rc.1_armel.udeb
flash-kernel_3.0~rc.1.dsc
  to main/f/flash-kernel/flash-kernel_3.0~rc.1.dsc
flash-kernel_3.0~rc.1.tar.gz
  to main/f/flash-kernel/flash-kernel_3.0~rc.1.tar.gz
flash-kernel_3.0~rc.1_armel.deb
  to main/f/flash-kernel/flash-kernel_3.0~rc.1_armel.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 626434@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Hector Oron <zumbi@debian.org> (supplier of updated flash-kernel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 24 Aug 2011 12:47:34 +0100
Source: flash-kernel
Binary: flash-kernel flash-kernel-installer
Architecture: source armel
Version: 3.0~rc.1
Distribution: experimental
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Hector Oron <zumbi@debian.org>
Description: 
 flash-kernel - utility to make certain embedded devices bootable
 flash-kernel-installer - Make the system bootable (udeb)
Closes: 594878 612376 620888 626434 631396
Changes: 
 flash-kernel (3.0~rc.1) experimental; urgency=low
 .
   [ Loïc Minier ]
   * Bump Standards-Version to 3.9.2.
   * Add a testsuite and run it during build; change code a bit to be more
     easily tested.
   * Start reworking flash-kernel to be more data-driven.
     - Keep some machine data in a small embedded RFC 2822 style database; such
       as allowed kernel flavors, machine id to set before booting Linux,
       MTD names, U-Boot load addresses, /boot filenames etc.
     - Simplify code in the main "case" statement as much as possible by using
       functions for common code and splitting error handling, initialization,
       and sanity checks out.
     - Various syntax tweaks.
   * Only allow iop32x kernels on GLAN Tank.
   * Fix Lintian warnings.
     - Quote minus signs in man page.
     - Depend on ${misc:Depends}.
   * Add myself to Uploaders at tbm's proposal.
   * Add myself to flash-kernel's Copyright and to debian/copyright; thanks
     Martin Michlmayr.
 .
   [ Hector Oron ]
   * Add armhf to architecture list (Closes: #620888)
     - add mx5 as armhf subarchitecture
   * Add myself to Uploaders field.
   * Add preliminary mv78xx0 support. (Closes: #594878)
   * Add build dependency on devio, needed to run test-suite.
   * Upgrade major version to 3.0~rc.1
   * Add support for Genesi Efika MX nettops and smarttops. (Closes: #612376)
   * Add preliminary U-Boot script support (Closes: #626434)
 .
   [ Julian Andres Klode ]
   * Support for Toshiba AC100 (Closes: #631396)
 .
   [ Martin Michlmayr ]
   * Remove myself from the Uploaders field.
 .
   [ Updated translations ]
   * Bulgarian (bg.po) by Damyan Ivanov
   * German (de.po) by Holger Wansing
   * Esperanto (eo.po) by Felipe Castro
   * Basque (eu.po)
   * Hebrew (he.po) by Lior Kaplan
   * Italian (it.po) by Milo Casagrande
   * Korean (ko.po) by Changwoo Ryu
   * Macedonian (mk.po) by Arangel Angov
   * Romanian (ro.po) by Eddy Petrișor
   * Sinhala (si.po) by Danishka Navin
   * Slovak (sk.po) by Ivan Masár
   * Swedish (sv.po) by Daniel Nylander
   * Uyghur (ug.po) by Sahran
   * Simplified Chinese (zh_CN.po) by YunQiang Su
Checksums-Sha1: 
 80f72d07827f3e3fb0311e6400415b70d79e4cbd 1669 flash-kernel_3.0~rc.1.dsc
 98db3b825cbdcf449e82a42173c32f45b6d5a657 48850 flash-kernel_3.0~rc.1.tar.gz
 6561090adec3efa743950bba9557c28fc736fd57 19564 flash-kernel_3.0~rc.1_armel.deb
 db5018e174417a7c0b92ecfbc2398e0e6a98b510 12400 flash-kernel-installer_3.0~rc.1_armel.udeb
Checksums-Sha256: 
 0b3de1beb920ebdc80285f2312b0a195d042fce1b6ff83209afdb487d62af265 1669 flash-kernel_3.0~rc.1.dsc
 422619dc4ade7c490f3139a8386ed72e224a16983882a0baa35aca0252e65485 48850 flash-kernel_3.0~rc.1.tar.gz
 cce2713506fe636b5ca1ee930832cc7253da4c63ef93e2ef7e19257ec248a9e2 19564 flash-kernel_3.0~rc.1_armel.deb
 d703cb113b906edb16a7e8a882e1f82406d8fb734bd1720a1d911ddfc186c711 12400 flash-kernel-installer_3.0~rc.1_armel.udeb
Files: 
 ad0f758094ba7f81bfbb9c65f4786c45 1669 utils optional flash-kernel_3.0~rc.1.dsc
 8af5f8bef0803d1f56b947218338cd0b 48850 utils optional flash-kernel_3.0~rc.1.tar.gz
 8269fbc9175d560b3e93a9a0b2ce76ef 19564 utils optional flash-kernel_3.0~rc.1_armel.deb
 2847a63ac08f876984297eaabb1734b7 12400 debian-installer standard flash-kernel-installer_3.0~rc.1_armel.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOVOxjAAoJEK8ig6p24qx7ujEP/0B4HCtmv+Gs275pirssHdDB
yG2lB6FgMqCMlIQAuW7i4fyp7NpVpCNRVSovHDJk4ESOdSMXzLWnKRZw42DAfAQc
BQQTFKprJYk40LhgZt6Kk0d6hkq2op3H6YQGGaZQCgWgY2mGio2fptEImEraPn1+
Lz0XCg7Sl9fmoh9jswtsxYk344xHF+j1MVwqWRhytb3Ho1ouEjILgGOcWD8tyN97
kQlkCzdd0z75D78aIltv3zfC04hmTamX5CGXzSj8Y5wTGhOTYf+0k3ysw85Ub9UP
gslEOPy7zdGIgNQ9N29JT+8jvhBI1X1ig7Kwl4QJuzi0RaWYhPjiHv//gl849tVu
X0UHjBQ9+fz4bwDR/aNi3dp/MRZNH94f0Cec0l8No0irQDAADuW3WELijwrbj99H
Af4EmKeEmkDqkkX/wDLNWBxB6gggjEdVUhV5NZHZlMRgkiZC3VPnb+q25LkA1AKm
E2rzF+s7da3lTcnUIekbRMJRVMYVE4ZlRdX7kwYKveo3/lydl+99nwEFZJ+551Ph
W7Cm9wzpCGomciP3xH7pP4+JBg/h3QBzI9a765vveuHm3fZXx/93jzSPfUZq9+5L
+SG3S6QbpbtEFj+HGbpUb1FBZ5AGDyUSCXKnejdxphmBHbx29QBPSQUBZExvRB3t
NhhU3FKF6uU5wMjK0yGc
=D/ZR
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: