1
Description: Suppress "GRUB loading" message unless Shift is held down.
4
diff -Nur -x '*.orig' -x '*~' grub2/boot/i386/pc/boot.S grub2.new/boot/i386/pc/boot.S
5
--- grub2/boot/i386/pc/boot.S 2010-03-03 15:10:20.000000000 +0000
6
+++ grub2.new/boot/i386/pc/boot.S 2010-03-03 15:10:23.000000000 +0000
9
#include <grub/symbol.h>
10
#include <grub/boot.h>
11
+#include <grub/machine/memory.h>
12
#include <grub/machine/boot.h>
16
/* save drive reference first thing! */
19
+ /* is either shift key held down? */
20
+ movw $(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR + 0x17), %bx
24
/* print a notification message on the screen */
25
MSG(notification_string)
28
/* set %si to the disk address packet */
29
movw $disk_address_packet, %si
31
diff -Nur -x '*.orig' -x '*~' grub2/boot/i386/pc/diskboot.S grub2.new/boot/i386/pc/diskboot.S
32
--- grub2/boot/i386/pc/diskboot.S 2010-03-03 15:09:22.000000000 +0000
33
+++ grub2.new/boot/i386/pc/diskboot.S 2010-03-03 15:20:29.000000000 +0000
37
#include <grub/symbol.h>
38
+#include <grub/machine/memory.h>
39
#include <grub/machine/boot.h>
45
#define MSG(x) movw $x, %si; call LOCAL(message)
46
+#define SILENT(x) call LOCAL(check_silent); jz LOCAL(x)
51
/* save drive reference first thing! */
54
+ SILENT(after_notification_string)
56
/* print a notification message on the screen */
58
MSG(notification_string)
61
+LOCAL(after_notification_string):
62
/* this sets up for the first run through "bootloop" */
63
movw $(firstlist - GRUB_BOOT_MACHINE_LIST_SIZE), %di
66
/* restore addressing regs and print a dot with correct DS
67
(MSG modifies SI, which is saved, and unused AX and BX) */
69
+ SILENT(after_notification_step)
70
MSG(notification_step)
72
+LOCAL(after_notification_step):
75
/* check if finished with this dataset */
77
/* END OF MAIN LOOP */
80
+ SILENT(after_notification_done)
82
MSG(notification_done)
84
+LOCAL(after_notification_done):
85
popw %dx /* this makes sure %dl is our "boot" drive */
86
ljmp $0, $(GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
89
/* go here when you need to stop the machine hard after an error condition */
90
LOCAL(stop): jmp LOCAL(stop)
93
+ /* is either shift key held down? */
94
+ movw $(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR + 0x17), %bx
98
notification_string: .asciz "loading"
100
notification_step: .asciz "."