Date: Mon, 1 May 2006 08:27:55 +0300 From: Giorgos Keramidas <keramida@freebsd.org> To: Eric Anderson <anderson@centtech.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Boot manager beep (revisited) Message-ID: <20060501052755.GA88897@gothmog.pc> In-Reply-To: <445581DE.50901@centtech.com> References: <445581DE.50901@centtech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-04-30 22:34, Eric Anderson <anderson@centtech.com> wrote: > This thread: > http://lists.freebsd.org/pipermail/freebsd-stable/2005-December/020572.html > > mentions a patch to disable the boot manager beep, and also > discusses having it optional. I don't have enough asm-fu to make > that option happen, but I can tell you, that on laptops, that beep > is really annoying, and amazingly loud. Is this just waiting for an > able minded person to code up the options and submit? I don't like the beep either, so I usually patch my systems manually to include something very similar: # Index: boot0.S # =================================================================== # --- boot0.S (.../branches/ncvs/src/sys/boot/i386/boot0) (revision 45) # +++ boot0.S (.../trunk/src/sys/boot/i386/boot0) (revision 45) # @@ -201,9 +201,7 @@ # /* # * Start of input loop. Beep and take note of time # */ # -main.10: movb $ASCII_BEL,%al # Signal # - callw putchr # beep! # - xorb %ah,%ah # BIOS: Get # +main.10: xorb %ah,%ah # BIOS: Get # int $0x1a # system time # movw %dx,%di # Ticks when # addw _TICKS(%bp),%di # timeout Since this is asm, and it runs very very early in the boot process, we don't have the luxury of making this tunable in `/boot/loader.conf', but there's nothing wrong with making it tunable through an option in our modern `/etc/src.conf' option system. We could use something like the following: WITHOUT_BOOTEASY_BEEP= yes and then we can add the necessary Makefile-foo in `/usr/src/sys/boot' to turn this to a preprocessor #define. Does something like the following sound reasonable (I haven't had a chance to run this through a build-test, so use with care). The default behavior should be to *include* a beep, but it can be turned off by setting WITHOUT_BOOTEASY_BEEP in `/etc/src.conf'. # Index: boot0.S # =================================================================== # --- boot0.S (.../branches/ncvs/src/sys/boot/i386/boot0) (revision 47) # +++ boot0.S (.../trunk/src/sys/boot/i386/boot0) (revision 47) # @@ -201,8 +201,11 @@ # /* # * Start of input loop. Beep and take note of time # */ # -main.10: movb $ASCII_BEL,%al # Signal # +main.10: # +#ifdef BOOTEASY_BEEP # + movb $ASCII_BEL,%al # Signal # callw putchr # beep! # +#endif # xorb %ah,%ah # BIOS: Get # int $0x1a # system time # movw %dx,%di # Ticks when # Index: Makefile # =================================================================== # --- Makefile (.../branches/ncvs/src/sys/boot/i386/boot0) (revision 47) # +++ Makefile (.../trunk/src/sys/boot/i386/boot0) (revision 47) # @@ -54,6 +54,10 @@ # -DTICKS=${BOOT_BOOT0_TICKS} \ # -DCOMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED} # # +.if !defined(WITHOUT_BOOTEASY_BEEP) || (${WITHOUT_BOOTEASY_BEEP} != "no" && ${WITHOUT_BOOTEASY_BEEP} != "NO") # +CFLAGS+=-DBOOTEASY_BEEP # +.endif # + # LDFLAGS=-N -e start -Ttext ${BOOT_BOOT0_ORG} -Wl,-S,--oformat,binary # # .include <bsd.prog.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060501052755.GA88897>