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

Re: upcoming point releases



I'd like to add support for the D-Link DNS-323 to the upcoming point
release: these patches were available before lenny was out, have been
tested in the meantime by a number of people and are very small and
low impact.  The tools and kernel needed to support this device are
already in lenny, so we just need to add some patches to the
installer:

 - Add DNS-323 support to oldsys-preseed
 - Generate DNS-323 installer images.

Can someone review these patches and give me the OK to apply?

-- 
Martin Michlmayr
http://www.cyrius.com/
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 57798)
+++ debian/changelog	(working copy)
@@ -1,3 +1,14 @@
+oldsys-preseed (3.2lenny1) unstable; urgency=low
+
+  * Add support for the D-Link DNS-323, thanks to a patch from
+    Matt Palmer.  Closes: #502821.
+  * Generate DHCP fallback information on the D-Link DNS-323, thanks
+    Laurie Bradshaw.
+  * Don't use the default hostname on the D-Link DNS-323 and Conceptronic
+    CH3SNAS.
+
+ -- Martin Michlmayr <tbm@cyrius.com>  Mon, 09 Mar 2009 20:21:36 +0100
+
 oldsys-preseed (3.2) unstable; urgency=low
 
   * Revert the change from 3.1 since my analysis was wrong.  Everything
Index: functions
===================================================================
--- functions	(revision 57798)
+++ functions	(working copy)
@@ -104,6 +104,15 @@
 	echo "$1" | grep "^$2=" | sed "s/^$2=//"
 }
 
+# Get the value from a string in the form of var = "value" from a file.
+# Named for the sib.conf file on the D-Link DNS-323 that this function
+# was originally written for.
+# $1 = file to read
+# $2 = var to read
+get_sib_var() {
+	grep "^$2[[:space:]]*=" $1 | sed "s/^$2[[:space:]]*=[[:space:]]*\"\(.*\)\"[[:space:]]*$/\1/"
+}
+
 # Add a string to a variable; deals with the fact when a string is empty
 # $1 = variable name
 # $2 = string
@@ -143,6 +152,19 @@
 	DOMAIN=$(get_var "$sysconf" "domain_name")
 }
 
+# Parse the sib.conf file, as found in the D-Link DNS-323
+# $1 = path to sib.conf
+parse_sib_conf() {
+	if [ "$(get_sib_var "$1" "CF-IP-DHCP-ENABLE")" = "0" ]; then
+		NET_CONFIG=static
+	fi
+	IPADDRESS="$(get_sib_var "$1" "CF-IP-STATIC-IP")"
+	NETMASK="$(get_sib_var "$1" "CF-IP-STATIC-IP-NETMASK")"
+	GATEWAY="$(get_sib_var "$1" "CF-IP-STATIC-IP-GATEWAY")"
+	var_add NAMESERVERS "$(get_sib_var "$1" "CF-IP-DNS1")"
+	var_add NAMESERVERS "$(get_sib_var "$1" "CF-IP-DNS2")"
+	HOSTNAME="$(get_sib_var "$1" "CF-SYS-MODEL-STR")"
+}
 
 # Generating
 
Index: oldsys-preseed
===================================================================
--- oldsys-preseed	(revision 57798)
+++ oldsys-preseed	(working copy)
@@ -156,6 +156,30 @@
 			fi
 			umount $path/rootfs || true
 			rmdir $path/rootfs $path || true
+		elif echo "$machine" | grep -q "^D-Link DNS-323"; then
+			check_file /proc/mtd
+			rootfs=$(get_mtdblock "MTD1")
+			if [ -z "$rootfs" ]; then
+				log "Can't find rootfs MTD partition"
+				exit 0
+			fi
+			INTERFACE=eth0
+			path=/tmp/oldsys-preseed
+			mkdir -p $path/rootfs
+			mount -t minix -o ro /dev/$rootfs $path/rootfs
+			parse_sib_conf $path/rootfs/sib.conf
+			unset_matching_var "HOSTNAME" "DNS-323"
+			unset_matching_var "HOSTNAME" "CH3SNAS"
+			umount $path/rootfs
+			rmdir $path/rootfs $path || true
+			sanity_check_static_config
+			if [ "$NET_CONFIG" != "static" ]; then
+				IPADDRESS=192.168.0.32
+				NETMASK=255.255.255.0
+				GATEWAY=192.168.0.1
+				[ -z "$NAMESERVERS" ] && NAMESERVERS=192.168.0.1
+				dhcp_fallback $FILE
+			fi
 		elif echo "$machine" | grep -q "^HP Media Vault mv2120"; then
 			path=/tmp/oldsys-preseed
 			mkdir -p $path/sda5
Index: build/config/armel/orion5x/netboot.cfg
===================================================================
--- build/config/armel/orion5x/netboot.cfg	(revision 57798)
+++ build/config/armel/orion5x/netboot.cfg	(working copy)
@@ -1,9 +1,24 @@
 MEDIA_TYPE = netboot image
 
-TARGET = $(TEMP_INITRD) $(TEMP_KERNEL) kuroboxpro mv2120 ts209 ts409
+TARGET = $(TEMP_INITRD) $(TEMP_KERNEL) dns-323 kuroboxpro mv2120 ts209 ts409
 EXTRANAME = $(MEDIUM)
 TYPE = netboot/network-console
 
+# D-Link DNS-323 / Conceptronic CH3SNAS
+dns-323:
+	mkdir -p $(SOME_DEST)/$(EXTRANAME)/d-link/dns-323
+	mkdir -p $(TEMP)/dns-323
+	# Set machine id 1542 (0x0606)
+	devio > $(TEMP)/dns-323/kernel 'wl 0xe3a01c06,4' 'wl 0xe3811006,4'
+	cat $(TEMP_KERNEL) >> $(TEMP)/dns-323/kernel
+	mkimage -A arm -O linux -T kernel -C none -e 0x00008000 -a 0x00008000 -n "Debian kernel" -d $(TEMP)/dns-323/kernel $(TEMP)/dns-323/kernel.uboot
+	mkimage -A arm -O linux -T ramdisk -C gzip -e 0x00800000 -a 0x00800000 -n "debian-installer ramdisk" -d $(TEMP_INITRD) $(TEMP)/dns-323/initrd.uboot
+	mkdns323fw -k $(TEMP)/dns-323/kernel.uboot -i $(TEMP)/dns-323/initrd.uboot -p 7 -c 1 -m 1 -o $(SOME_DEST)/$(EXTRANAME)/d-link/dns-323/netboot.img
+	update-manifest $(SOME_DEST)/$(EXTRANAME)/d-link/dns-323/netboot.img "netboot image for D-Link DNS-323"
+	mkdir -p $(SOME_DEST)/$(EXTRANAME)/conceptronic/ch3snas
+	mkdns323fw -k $(TEMP)/dns-323/kernel.uboot -i $(TEMP)/dns-323/initrd.uboot -p 7 -c 2 -m 1 -o $(SOME_DEST)/$(EXTRANAME)/conceptronic/ch3snas/netboot.img
+	update-manifest $(SOME_DEST)/$(EXTRANAME)/conceptronic/ch3snas/netboot.img "netboot image for Conceptronic CH3SNAS"
+
 # Buffalo Kurobox Pro
 kuroboxpro:
 	mkdir -p $(SOME_DEST)/$(EXTRANAME)/buffalo/kuroboxpro
Index: build/pkg-lists/netboot/network-console/arm/orion5x.cfg
===================================================================
--- build/pkg-lists/netboot/network-console/arm/orion5x.cfg	(revision 57798)
+++ build/pkg-lists/netboot/network-console/arm/orion5x.cfg	(working copy)
@@ -5,6 +5,8 @@
 sata-modules-${kernel:Version}
 ext2-modules-${kernel:Version}
 ext3-modules-${kernel:Version}
+# needed by oldsys-preseed on the D-Link DNS-323
+minix-modules-${kernel:Version}
 # needed by oldsys-preseed on the Kurobox Pro
 jffs2-modules-${kernel:Version}
 # To control the LED and beeper on QNAP devices
Index: debian/control
===================================================================
--- debian/control	(revision 57798)
+++ debian/control	(working copy)
@@ -7,7 +7,7 @@
 Vcs-Svn: svn://svn.debian.org/d-i/trunk/installer
 Build-Conflicts: libnewt-pic [mipsel]
 # NOTE: Do not edit the next line by hand. See comment below.
-Build-Depends: debhelper (>= 4), apt, apt-utils, gnupg, debian-archive-keyring (>= 2006.11.22), dpkg (>= 1.13.9), dctrl-tools, wget, bc, debiandoc-sgml, xsltproc, docbook-xml, docbook-xsl, libbogl-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], glibc-pic, libslang2-pic (>= 2.0.6-4), libnewt-pic (>= 0.52.2-11.3) [!mipsel], libnewt-dev (>= 0.52.2-11.3) [mipsel], libgcc1 [i386 amd64], cramfsprogs [powerpc ppc64 ia64 mips mipsel arm armeb armel], genext2fs (>= 1.3-7.1), e2fsprogs, mklibs (>= 0.1.25), mklibs-copy [mips mipsel], genisoimage [!s390 !s390x], genromfs [sparc], hfsutils [powerpc ppc64], dosfstools [i386 ia64 m68k amd64], cpio, devio [arm armeb armel], slugimage (>= 0.10+r58-6) [arm armeb armel], nwutil [arm], uboot-mkimage [arm armel], syslinux (>= 2:3.63+dfsg-2) [i386 amd64], palo [hppa], elilo [ia64], yaboot [powerpc ppc64], aboot (>= 0.9b-2) [alpha], silo [sparc], sparc-utils [sparc], genisovh [mips], tip22 [mips], colo (>= 1.21-1) [mipsel], sibyl [mips mipsel], atari-bootstrap [m68k], vmelilo [m68k], m68k-vme-tftplilo [m68k], amiboot [m68k], emile [m68k], emile-bootblocks [m68k], apex-nslu2 [arm armeb armel], tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64], mtools (>= 3.9.9-1) [i386 ia64 m68k amd64 kfreebsd-i386 kfreebsd-amd64], module-init-tools [i386 arm armeb armel amd64 alpha hppa ia64 m68k mips mipsel powerpc ppc64 s390 sparc], bf-utf-source [!s390 !s390x], upx-ucl (>= 3) [i386], mkvmlinuz [powerpc ppc64], openssl [arm armel], win32-loader [i386 amd64 kfreebsd-i386 kfreebsd-amd64]
+Build-Depends: debhelper (>= 4), apt, apt-utils, gnupg, debian-archive-keyring (>= 2006.11.22), dpkg (>= 1.13.9), dctrl-tools, wget, bc, debiandoc-sgml, xsltproc, docbook-xml, docbook-xsl, libbogl-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], glibc-pic, libslang2-pic (>= 2.0.6-4), libnewt-pic (>= 0.52.2-11.3) [!mipsel], libnewt-dev (>= 0.52.2-11.3) [mipsel], libgcc1 [i386 amd64], cramfsprogs [powerpc ppc64 ia64 mips mipsel arm armeb armel], genext2fs (>= 1.3-7.1), e2fsprogs, mklibs (>= 0.1.25), mklibs-copy [mips mipsel], genisoimage [!s390 !s390x], genromfs [sparc], hfsutils [powerpc ppc64], dosfstools [i386 ia64 m68k amd64], cpio, devio [arm armeb armel], slugimage (>= 0.10+r58-6) [arm armeb armel], dns323-firmware-tools [armel], nwutil [arm], uboot-mkimage [arm armel], syslinux (>= 2:3.63+dfsg-2) [i386 amd64], palo [hppa], elilo [ia64], yaboot [powerpc ppc64], aboot (>= 0.9b-2) [alpha], silo [sparc], sparc-utils [sparc], genisovh [mips], tip22 [mips], colo (>= 1.21-1) [mipsel], sibyl [mips mipsel], atari-bootstrap [m68k], vmelilo [m68k], m68k-vme-tftplilo [m68k], amiboot [m68k], emile [m68k], emile-bootblocks [m68k], apex-nslu2 [arm armeb armel], tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64], mtools (>= 3.9.9-1) [i386 ia64 m68k amd64 kfreebsd-i386 kfreebsd-amd64], module-init-tools [i386 arm armeb armel amd64 alpha hppa ia64 m68k mips mipsel powerpc ppc64 s390 sparc], bf-utf-source [!s390 !s390x], upx-ucl (>= 3) [i386], mkvmlinuz [powerpc ppc64], openssl [arm armel], win32-loader [i386 amd64 kfreebsd-i386 kfreebsd-amd64]
 # This package has the worst Build-Depends in Debian, so it deserves some
 # explanation. Note that this comment can also be used to generate a
 # Build-Depends line, by running the debian/genbuilddeps program.
@@ -95,6 +95,8 @@
 #		kernels and add nslu2 boot magic.
 #	- slugimage (>= 0.10+r58-6) [arm armeb armel]
 #		For building nslu2 firmware images.
+#	- dns323-firmware-tools [armel]
+#		For building firmware images for the D-Link DNS-323.
 #	- nwutil [arm]
 #		For building netwinder netinst images.
 #	- uboot-mkimage [arm armel]
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 57798)
+++ debian/changelog	(working copy)
@@ -1,3 +1,13 @@
+debian-installer (20090XXXlenny1) unstable; urgency=low
+
+   [ Martin Michlmayr ]
+  * Include minix-modules on the orion5x image for the D-Link DNS-323,
+    thanks Matt Palmer.
+  * Generate images for the D-Link DNS-323 and Conceptronic CH3SNAS,
+    thanks Matt Palmer.  Closes: #503040.
+
+ -- Martin Michlmayr <tbm@cyrius.com>  Mon, 09 Mar 2009 20:28:49 +0100
+
 debian-installer (20090123) unstable; urgency=low
 
   [ Frans Pop ]

Reply to: