From 771f754516b161f248c132ee9d698e33a6330de0 Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Fri, 20 Aug 2010 15:04:23 +0000 Subject: [PATCH] Add support for the kfreebsd ports. Closes: #593629 --- Makefile | 2 +- build_all.sh | 2 +- data/squeeze/exclude-udebs-kfreebsd-amd64 | 26 ++++++ data/squeeze/exclude-udebs-kfreebsd-i386 | 26 ++++++ data/squeeze/kfreebsd-amd64__udeb_include | 2 + .../kfreebsd-amd64_businesscard_udeb_include | 3 + .../kfreebsd-amd64_netinst_udeb_include | 2 + .../kfreebsd-i386_businesscard_udeb_include | 3 + .../kfreebsd-i386_netinst_udeb_include | 2 + data/squeeze/kfreebsd-i386_udeb_include | 2 + debian/changelog | 3 + tools/boot/squeeze/boot-kfreebsd | 90 +++++++++++++++++++ tools/boot/squeeze/boot-kfreebsd-amd64 | 2 + tools/boot/squeeze/boot-kfreebsd-i386 | 2 + tools/generate_di+k_list | 13 +++ tools/generate_di_list | 6 +- tools/grab_md5 | 2 +- 17 files changed, 182 insertions(+), 6 deletions(-) create mode 100644 data/squeeze/exclude-udebs-kfreebsd-amd64 create mode 100644 data/squeeze/exclude-udebs-kfreebsd-i386 create mode 100644 data/squeeze/kfreebsd-amd64__udeb_include create mode 100644 data/squeeze/kfreebsd-amd64_businesscard_udeb_include create mode 100644 data/squeeze/kfreebsd-amd64_netinst_udeb_include create mode 100644 data/squeeze/kfreebsd-i386_businesscard_udeb_include create mode 100644 data/squeeze/kfreebsd-i386_netinst_udeb_include create mode 100644 data/squeeze/kfreebsd-i386_udeb_include create mode 100644 tools/boot/squeeze/boot-kfreebsd create mode 100755 tools/boot/squeeze/boot-kfreebsd-amd64 create mode 100755 tools/boot/squeeze/boot-kfreebsd-i386 diff --git a/Makefile b/Makefile index 9b537e36..e4cf68c9 100755 --- a/Makefile +++ b/Makefile @@ -310,7 +310,7 @@ $(BDIR)/rawlist: fi $(Q)for ARCH in $(ARCHES_NOSRC); do \ - ARCHDEFS="$$ARCHDEFS -D ARCH_$(subst -,_,$$ARCH)"; \ + ARCHDEFS="$$ARCHDEFS -D ARCH_`echo $$ARCH | sed 's/-/_/'`"; \ ARCHUNDEFS="$$ARCHUNDEFS -U $$ARCH"; \ done; \ for VARIANT in $(VARIANTS); do \ diff --git a/build_all.sh b/build_all.sh index 591684af..bbde18df 100755 --- a/build_all.sh +++ b/build_all.sh @@ -40,7 +40,7 @@ if [ -z "$IMAGETARGET" ] ; then IMAGETARGET="official_images" fi -for ARCHES in i386 amd64 alpha arm hppa ia64 m68k mips mipsel powerpc s390 sparc source +for ARCHES in i386 amd64 alpha arm hppa ia64 m68k mips mipsel powerpc s390 sparc kfreebsd-amd64 kfreebsd-i386 source do export ARCHES echo "Now we're going to build CD for $ARCHES !" diff --git a/data/squeeze/exclude-udebs-kfreebsd-amd64 b/data/squeeze/exclude-udebs-kfreebsd-amd64 new file mode 100644 index 00000000..55c25e28 --- /dev/null +++ b/data/squeeze/exclude-udebs-kfreebsd-amd64 @@ -0,0 +1,26 @@ +# These udebs build the d-i cdrom initrd. As such, there is no reason +# to keep another copy of them on the CD in udeb form. +# +acpi-modules-* +cdrom-modules-* +i2c-modules-* +isofs-modules-* +kernel-image-* +parport-modules-* +sata-modules-* +scsi-core-modules-* +scsi-extra-modules-* +scsi-modules-* +serial-modules-* + +# Not yet support on GNU/kFreeBSD +partman-auto-crypto +partman-auto-lvm +partman-auto-raid +partman-crypto-dm +partman-crypto-loop +partman-ext3 +partman-jfs +partman-lvm +partman-md +partman-multipath diff --git a/data/squeeze/exclude-udebs-kfreebsd-i386 b/data/squeeze/exclude-udebs-kfreebsd-i386 new file mode 100644 index 00000000..55c25e28 --- /dev/null +++ b/data/squeeze/exclude-udebs-kfreebsd-i386 @@ -0,0 +1,26 @@ +# These udebs build the d-i cdrom initrd. As such, there is no reason +# to keep another copy of them on the CD in udeb form. +# +acpi-modules-* +cdrom-modules-* +i2c-modules-* +isofs-modules-* +kernel-image-* +parport-modules-* +sata-modules-* +scsi-core-modules-* +scsi-extra-modules-* +scsi-modules-* +serial-modules-* + +# Not yet support on GNU/kFreeBSD +partman-auto-crypto +partman-auto-lvm +partman-auto-raid +partman-crypto-dm +partman-crypto-loop +partman-ext3 +partman-jfs +partman-lvm +partman-md +partman-multipath diff --git a/data/squeeze/kfreebsd-amd64__udeb_include b/data/squeeze/kfreebsd-amd64__udeb_include new file mode 100644 index 00000000..6f1c801c --- /dev/null +++ b/data/squeeze/kfreebsd-amd64__udeb_include @@ -0,0 +1,2 @@ +netcfg +ethdetect diff --git a/data/squeeze/kfreebsd-amd64_businesscard_udeb_include b/data/squeeze/kfreebsd-amd64_businesscard_udeb_include new file mode 100644 index 00000000..6326d6c5 --- /dev/null +++ b/data/squeeze/kfreebsd-amd64_businesscard_udeb_include @@ -0,0 +1,3 @@ +choose-mirror +netcfg +ethdetect diff --git a/data/squeeze/kfreebsd-amd64_netinst_udeb_include b/data/squeeze/kfreebsd-amd64_netinst_udeb_include new file mode 100644 index 00000000..6f1c801c --- /dev/null +++ b/data/squeeze/kfreebsd-amd64_netinst_udeb_include @@ -0,0 +1,2 @@ +netcfg +ethdetect diff --git a/data/squeeze/kfreebsd-i386_businesscard_udeb_include b/data/squeeze/kfreebsd-i386_businesscard_udeb_include new file mode 100644 index 00000000..6326d6c5 --- /dev/null +++ b/data/squeeze/kfreebsd-i386_businesscard_udeb_include @@ -0,0 +1,3 @@ +choose-mirror +netcfg +ethdetect diff --git a/data/squeeze/kfreebsd-i386_netinst_udeb_include b/data/squeeze/kfreebsd-i386_netinst_udeb_include new file mode 100644 index 00000000..6f1c801c --- /dev/null +++ b/data/squeeze/kfreebsd-i386_netinst_udeb_include @@ -0,0 +1,2 @@ +netcfg +ethdetect diff --git a/data/squeeze/kfreebsd-i386_udeb_include b/data/squeeze/kfreebsd-i386_udeb_include new file mode 100644 index 00000000..6f1c801c --- /dev/null +++ b/data/squeeze/kfreebsd-i386_udeb_include @@ -0,0 +1,2 @@ +netcfg +ethdetect diff --git a/debian/changelog b/debian/changelog index 6f138882..a16d04e7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -40,6 +40,9 @@ debian-cd (3.1.4) UNRELEASED; urgency=low and replace with hard links. * CONF.sh: Don't reset the value of $VARIANTS by default. + [ Aurelien Jarno ] + * Add support for the kfreebsd ports. Closes: #593629 + -- Steve McIntyre <93sam@debian.org> Tue, 27 Feb 2010 12:24:29 +0100 debian-cd (3.1.3) unstable; urgency=low diff --git a/tools/boot/squeeze/boot-kfreebsd b/tools/boot/squeeze/boot-kfreebsd new file mode 100644 index 00000000..6a402f24 --- /dev/null +++ b/tools/boot/squeeze/boot-kfreebsd @@ -0,0 +1,90 @@ +# This script gets sourced from boot-kfreebsd-i386 and boot-kfreebsd-amd64. +# +# Do install stuff for kfreebsd, including making bootable CDs +# Works with debian-installer +# +# $1 is the CD number +# $2 is the temporary CD build dir + +. $BASEDIR/tools/boot/$DI_CODENAME/common.sh +. $BASEDIR/tools/boot/$DI_CODENAME/x86-desktop.sh + +set -e +#set -x + +N=$1 +CDDIR=$2 +BOOTDIR= +if [ "$DI_WWW_HOME" = "default" ];then + DI_WWW_HOME="http://d-i.debian.org/daily-images/$ARCH/daily" + if [ -n "$DI_DIR" ];then + DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}" + DI_WWW_HOME="" + echo "Using images from $DI_DIR" + fi +fi +if [ ! "$DI_DIST" ]; then + DI_DIST="$DI_CODENAME" +fi + +cd $CDDIR/.. + +# Only disc 1 bootable +if [ $N != 1 ]; then + add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long" + exit 0 +fi + +# Download boot images. +BOOT_IMAGES="cdrom/debian-cd_info.tar.gz cdrom/kfreebsd.gz cdrom/initrd.gz" + +for image in $BOOT_IMAGES; do + if [ ! -e "$image" ]; then + dir=$(dirname $image) + mkdir -p $dir + if [ ! "$DI_WWW_HOME" ];then + if [ ! "$DI_DIR" ];then + DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images" + fi + cp "$DI_DIR/$image" $image + else + wget "$DI_WWW_HOME/$image" -O $image + fi + fi +done + +# Install kernel and initrd +mkdir -p $CDDIR/boot/kernel/ +cp "cdrom/kfreebsd.gz" "$CDDIR/boot/kernel/kfreebsd.gz" +cp "cdrom/initrd.gz" "$CDDIR/boot/mfsroot.gz" + +# Install bootloader +tar -C $CDDIR -zxf cdrom/debian-cd_info.tar.gz +add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long" +add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b boot/grub/grub_eltorito" +add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c boot/boot.cat" +add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot" +add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-load-size 4" +add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-info-table" +add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes" + +# Add autorun +if [ -f $CDDIR/README.html ]; then + todos > $CDDIR/autorun.inf < $CDDIR/autorun.bat <> $OUT ;; - alpha|amd64|arm|armel|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc) + alpha|amd64|arm|armel|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc|kfreebsd-amd64|kfreebsd-i386) FILES=`find $LOCATIONS -name Packages.gz | grep binary-$ARCH` echo "Using MD5 sums from Packages files:" echo $FILES