-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: grub-common
Severity: wishlist
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd


As Linux (and other systems), also the kfreebsd kernel supports command
line switches, the user might want to append upon boot through grub. See
[1] for a list of recognized boot options.

Therefore I'd like to suggest to add support for command line switches
through the Debian /etc/default/grub mechanism, namely
GRUB_CMDLINE_KFREEBSD and GRUB_CMDLINE_KFREEBSD_DEFAULT.

To achieve this, not only 10_kfreebsd.in needs to be patched, but also
grub-mkconfig.in. I attached a patch enabling support for the variables
above, which work very similar to the way of their LINUX counterparts.

Note I didn't test the result binary package, because building the grub2
binary package does not work in a pbuilder chroot and I didn't want to
trash my system with build dependencies of it. However I did test the
final scripts and they seem to work.

[1] http://www.freebsd.org/cgi/man.cgi?query=boot
- -- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOHic1AAoJEMcrUe6dgPNtIiMQAI2Cb6yVGBrDB1lNyrvJA+0B
Ns45x9mVVoy5wB+wFBGsTaBqTj2nVTFwLfN53HN8gLd5vuJLZ62zbgOZ0cfNXYsW
QILdDmyh9YLabZJwX6Jdb3ZLm0uG7uboEDN3Ps+O2Anq4Up+bunxdjj13rxM2WEU
/xruNELgfbKomb5lRI06xfJKUBpToYc87JS35Hg9mrkd6fGTbo9hULGs3aQwqF9X
ZvjIKb+yLAMMsEgd280D28lmAFCYSG0Q/kDi6i0mjXyDg2UGj0BbxDmqJKaSBqdu
aX/7erNeDfiYw2v/UN59+vkzJfn/wutA4mUKhwX/VIs7OPqEqydtN1OGnhBJhlZr
pQbLqgm38//+43BNqmQzKP/NExnbUiGfN4mAJTBfmhuHW4cSEzlVqJIF94k03B+R
SvtslJcSks1Dl2vvPGY6Y0u6K/bQRMhWTfovVXrvk+jbjAoEg1C/qBKwkTNl2894
h1osRFlbt95unRdvZVGX275c4nsRJXbxjP0AvytWOO2i3Pw2V481ILWE9S0qaq6K
LNcOX0g8oCD7Kq2mIzX4BjYfwrGR8loRd6DrZPZOCHthe7fhWHyupd5lD40+AJL7
moZuMj9EsrdnEmc3WmUFVmq2AZOA6EilXP/6jWmUkGIEbC20uEYUfI3cH1sXszXh
gdCHNlmWxMRJTc2pmR8K
=B+pe
-----END PGP SIGNATURE-----
diff -ruN grub2-1.99/debian//patches/add_kfreebsd_options.patch grub2-1.99.new/debian//patches/add_kfreebsd_options.patch
--- grub2-1.99/debian//patches/add_kfreebsd_options.patch	1969-12-31 19:00:00.000000000 -0500
+++ grub2-1.99.new/debian//patches/add_kfreebsd_options.patch	2011-07-13 20:54:43.118894160 -0400
@@ -0,0 +1,44 @@
+Description: Allow users to give command line options on KFreeBSD systems.
+Author: Arno Töll <deb...@toell.net>
+Last-Update: 2011-07-14
+
+--- a/docs/grub.info
++++ b/docs/grub.info
+@@ -1114,6 +1114,11 @@
+      As `GRUB_CMDLINE_LINUX' and `GRUB_CMDLINE_LINUX_DEFAULT', but for
+      NetBSD.
+ 
++`GRUB_CMDLINE_KFREEBSD'
++`GRUB_CMDLINE_KFREEBSD_DEFAULT'
++     As `GRUB_CMDLINE_LINUX' and `GRUB_CMDLINE_LINUX_DEFAULT', but for
++     KFreeBSD.
++
+ `GRUB_CMDLINE_XEN'
+ `GRUB_CMDLINE_XEN_DEFAULT'
+      As `GRUB_CMDLINE_LINUX' and `GRUB_CMDLINE_LINUX_DEFAULT', but for
+--- a/util/grub-mkconfig.in
++++ b/util/grub-mkconfig.in
+@@ -241,6 +241,8 @@
+   GRUB_CMDLINE_XEN_DEFAULT \
+   GRUB_CMDLINE_NETBSD \
+   GRUB_CMDLINE_NETBSD_DEFAULT \
++  GRUB_CMDLINE_KFREEBSD \
++  GRUB_CMDLINE_KFREEBSD_DEFAULT \
+   GRUB_TERMINAL_INPUT \
+   GRUB_TERMINAL_OUTPUT \
+   GRUB_SERIAL_COMMAND \
+--- a/util/grub.d/10_kfreebsd.in
++++ b/util/grub.d/10_kfreebsd.in
+@@ -183,9 +183,10 @@
+     module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
+   fi
+ 
+-  kfreebsd_entry "${OS}" "${version}" false
++  kfreebsd_entry "${OS}" "${version}" false \
++	"${GRUB_CMDLINE_KFREEBSD} ${GRUB_CMDLINE_KFREEBSD_DEFAULT}"
+   if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
+-    kfreebsd_entry "${OS}" "${version}" true "-s"
++    kfreebsd_entry "${OS}" "${version}" true "-s ${GRUB_CMDLINE_KFREEBSD}"
+   fi
+ 
+   list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '`
diff -ruN grub2-1.99/debian//patches/series grub2-1.99.new/debian//patches/series
--- grub2-1.99/debian//patches/series	2011-07-13 20:57:50.000000000 -0400
+++ grub2-1.99.new/debian//patches/series	2011-07-13 20:34:51.685190715 -0400
@@ -18,3 +18,4 @@
 mkrescue_efi_modules.patch
 mkconfig_loopback.patch
 lazy_stat.patch
+add_kfreebsd_options.patch

Reply via email to