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

Re: [PATCH V2] d-i hd-media support for armhf



On Wed, Oct 01, 2014 at 07:01:44AM +0200, Cyril Brulebois wrote:
> Karsten Merker <merker@debian.org> (2014-10-01):
> > Vagrant is right, the script fragment added in V2 for conditionally
> > setting the console parameter is the wrong way round.  I am very
> > much in a hurry now to catch a train and don't want to risk
> > breaking anything by rushing an untested last-minute change into
> > the archive, so I'll wait with pushing this until after the Beta
> > 2 upload.
> 
> Ah, the pitchfork thing worked. :D
> 
> More seriously that looks like a reasonable approach, thanks for the
> quick feedback.

Hello,

attached is V3 of the patch. I have run a full armhf installer
build with it without problems and I have done two test installs
on a Cubietruck with the result (one from USB to SATA and one from
USB to MMC).  Those also have shown no problems.

I have seen that you have not yet marked current git for the
Jessie Beta 2 upload, so I leave the decision to you whether you
would like to include the V3 patch into Beta 2 or not.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
>From 1d6e0175731c9bbbdc8da3686ac9d57bf2e511c9 Mon Sep 17 00:00:00 2001
From: Karsten Merker <merker@debian.org>
Date: Sat, 20 Sep 2014 07:02:54 +0200
Subject: [PATCH V3] Add hd-media support for the armhf platform

---
 build/boot/arm/bootscr.mainline_common | 33 +++++++++++++++++++++++++++++++++
 build/config/armhf.cfg                 |  2 +-
 build/config/armhf/hd-media.cfg        | 30 ++++++++++++++++++++++++++++++
 build/pkg-lists/hd-media/armhf.cfg     | 27 +++++++++++++++++++++++++++
 4 files changed, 91 insertions(+), 1 deletion(-)
 create mode 100644 build/boot/arm/bootscr.mainline_common
 create mode 100644 build/config/armhf/hd-media.cfg
 create mode 100644 build/pkg-lists/hd-media/armhf.cfg

diff --git a/build/boot/arm/bootscr.mainline_common b/build/boot/arm/bootscr.mainline_common
new file mode 100644
index 0000000..4dc6bf5
--- /dev/null
+++ b/build/boot/arm/bootscr.mainline_common
@@ -0,0 +1,33 @@
+# Bootscript using the new unified bootcmd handling
+# introduced with u-boot v2014.10
+
+if test -n "${boot_targets}"; then
+  echo "Mainline u-boot / new-style environment detected."
+else
+  echo "Non-mainline u-boot or old-style mainline u-boot detected."
+  echo "This boot script uses the unified bootcmd handling of mainline"
+  echo "u-boot >=v2014.10, which is not available on your system."
+  echo "Please boot the installer manually."
+  exit 0
+fi
+
+if test -z "${fdtfile}"; then
+  echo 'fdtfile environment variable not set. Aborting boot process.'
+  exit 0
+fi
+
+if test ! -e ${devtype} ${devnum}:${bootpart} dtbs/${fdtfile}; then
+  echo "This installer medium does not contain a suitable device-tree file for"
+  echo "this system (${fdtfile}). Aborting boot process."
+  exit 0
+fi
+
+if test -n "${console}"; then
+  setenv bootargs "${bootargs} console=${console}"
+fi
+
+load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} vmlinuz \
+&& load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} dtbs/${fdtfile} \
+&& load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} initrd.gz \
+&& echo "Booting the Debian installer..." \
+&& bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
diff --git a/build/config/armhf.cfg b/build/config/armhf.cfg
index 681eae2..1332c3a 100644
--- a/build/config/armhf.cfg
+++ b/build/config/armhf.cfg
@@ -1,4 +1,4 @@
-MEDIUM_SUPPORTED = netboot network-console netboot-gtk device-tree
+MEDIUM_SUPPORTED = hd-media netboot network-console netboot-gtk device-tree
 
 MKLIBS = mklibs --ldlib=/lib/ld-linux-armhf.so.3
 
diff --git a/build/config/armhf/hd-media.cfg b/build/config/armhf/hd-media.cfg
new file mode 100644
index 0000000..31d3583
--- /dev/null
+++ b/build/config/armhf/hd-media.cfg
@@ -0,0 +1,30 @@
+FLAVOUR_SUPPORTED = ""
+
+GZIPPED = .gz
+EXTRANAME = hd-media/
+
+TARGET = $(KERNEL) $(INITRD) hd-media_dtbs hd-media_bootscript hd-media_tarball
+
+MANIFEST-INITRD = "Initrd for use on USB memory sticks"
+MANIFEST-KERNEL = "Kernel for use on USB memory sticks"
+
+.PHONY: hd-media_dtbs
+hd-media_dtbs: $(TEMP_DTBS)
+	mkdir -p $(SOME_DEST)/$(EXTRANAME)dtbs
+	set -ex ; for dtb in $(TEMP_DTBS)/*.dtb ; do \
+		tgt=$(SOME_DEST)/$(EXTRANAME)dtbs/$$(basename $$dtb); \
+		cp $$dtb $$tgt ; \
+		update-manifest $$tgt "Device Tree Blob: $$(basename $$dtb)";\
+	done
+	cp boot/README.device-tree $(SOME_DEST)/$(EXTRANAME)dtbs/README
+	update-manifest $(SOME_DEST)/$(EXTRANAME)dtbs/README  "Device Tree Blobs README"
+
+.PHONY: hd-media_bootscript
+hd-media_bootscript:
+	mkimage -T script -A arm -d boot/arm/bootscr.mainline_common $(SOME_DEST)/$(EXTRANAME)boot.scr
+	update-manifest $(SOME_DEST)/$(EXTRANAME)boot.scr "Universal boot script for mainline u-boot (>= v2014.10)"
+
+.PHONY: hd-media_tarball
+hd-media_tarball: $(KERNEL) $(INITRD) hd-media_dtbs hd-media_bootscript
+	tar -C $(SOME_DEST)/$(EXTRANAME) -zcf $(TEMP)/hd-media.tar.gz boot.scr initrd.gz vmlinuz dtbs/
+	mv  $(TEMP)/hd-media.tar.gz $(SOME_DEST)/$(EXTRANAME)
diff --git a/build/pkg-lists/hd-media/armhf.cfg b/build/pkg-lists/hd-media/armhf.cfg
new file mode 100644
index 0000000..01dfd26
--- /dev/null
+++ b/build/pkg-lists/hd-media/armhf.cfg
@@ -0,0 +1,27 @@
+console-setup-pc-ekmap
+
+console-setup-udeb
+kbd-udeb
+bogl-bterm-udeb
+hw-detect
+
+fat-modules-${kernel:Version}
+ext4-modules-${kernel:Version}
+fuse-modules-${kernel:Version}
+isofs-modules-${kernel:Version}
+udf-modules-${kernel:Version}
+
+ata-modules-${kernel:Version}
+sata-modules-${kernel:Version}
+pata-modules-${kernel:Version}
+mmc-modules-${kernel:Version}
+usb-modules-${kernel:Version}
+usb-storage-modules-${kernel:Version}
+scsi-core-modules-${kernel:Version}
+scsi-modules-${kernel:Version}
+virtio-modules-${kernel:Version}
+
+loop-modules-${kernel:Version}
+
+input-modules-${kernel:Version} ?
+fb-modules-${kernel:Version} ?
-- 
2.1.1


Reply to: