~ubuntu-branches/ubuntu/lucid/grub2/lucid

« back to all changes in this revision

Viewing changes to debian/patches/967_quiet_grub_loading.diff

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson
  • Date: 2010-03-03 20:33:03 UTC
  • Revision ID: james.westby@ubuntu.com-20100303203303-2iih7h6uulhnfpu5
Tags: 1.98~20100128-1ubuntu4
[ Colin Watson ]
* Update DM-RAID probing patch, removing some configure.ac cruft.
* Add patch from Colin King to shave eight bytes off the
  pre-partition-table part of boot.img.
* Don't display "GRUB loading" unless Shift is held down.
* Use light-gray as the default background for highlighted menu entries;
  white is not safe because some systems interpret the top bit as blink
  (thanks, proski; LP: #527334).
* Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
  our backport of the grub-doc split (LP: #493968).
* Optimise hostdisk device handling, substantially speeding up grub-probe
  filesystem reads (LP: #425650).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Suppress "GRUB loading" message unless Shift is held down.
 
2
UbuntuSpecific: yes
 
3
 
 
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
 
7
@@ -19,6 +19,7 @@
 
8
 
 
9
 #include <grub/symbol.h>
 
10
 #include <grub/boot.h>
 
11
+#include <grub/machine/memory.h>
 
12
 #include <grub/machine/boot.h>
 
13
 
 
14
 /*
 
15
@@ -147,9 +148,15 @@
 
16
        /* save drive reference first thing! */
 
17
        pushw   %dx
 
18
 
 
19
+       /* is either shift key held down? */
 
20
+       movw    $(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR + 0x17), %bx
 
21
+       andb    $3, (%bx)
 
22
+       jz      2f
 
23
+
 
24
        /* print a notification message on the screen */
 
25
        MSG(notification_string)
 
26
 
 
27
+2:
 
28
        /* set %si to the disk address packet */
 
29
        movw    $disk_address_packet, %si
 
30
 
 
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
 
34
@@ -17,6 +17,7 @@
 
35
  */
 
36
 
 
37
 #include <grub/symbol.h>
 
38
+#include <grub/machine/memory.h>
 
39
 #include <grub/machine/boot.h>
 
40
 
 
41
 /*
 
42
@@ -24,6 +25,7 @@
 
43
  */
 
44
 
 
45
 #define MSG(x) movw $x, %si; call LOCAL(message)
 
46
+#define SILENT(x)      call LOCAL(check_silent); jz LOCAL(x)
 
47
 
 
48
        .file   "diskboot.S"
 
49
 
 
50
@@ -50,11 +52,14 @@
 
51
        /* save drive reference first thing! */
 
52
        pushw   %dx
 
53
 
 
54
+       SILENT(after_notification_string)
 
55
+
 
56
        /* print a notification message on the screen */
 
57
        pushw   %si
 
58
        MSG(notification_string)
 
59
        popw    %si
 
60
 
 
61
+LOCAL(after_notification_string):
 
62
        /* this sets up for the first run through "bootloop" */
 
63
        movw    $(firstlist - GRUB_BOOT_MACHINE_LIST_SIZE), %di
 
64
 
 
65
@@ -279,7 +284,10 @@
 
66
        /* restore addressing regs and print a dot with correct DS
 
67
           (MSG modifies SI, which is saved, and unused AX and BX) */
 
68
        popw    %ds
 
69
+       SILENT(after_notification_step)
 
70
        MSG(notification_step)
 
71
+
 
72
+LOCAL(after_notification_step):
 
73
        popa
 
74
 
 
75
        /* check if finished with this dataset */
 
76
@@ -295,8 +303,11 @@
 
77
 /* END OF MAIN LOOP */
 
78
 
 
79
 LOCAL(bootit):
 
80
+       SILENT(after_notification_done)
 
81
        /* print a newline */
 
82
        MSG(notification_done)
 
83
+
 
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)
 
87
 
 
88
@@ -320,6 +331,12 @@
 
89
 /* go here when you need to stop the machine hard after an error condition */
 
90
 LOCAL(stop):   jmp     LOCAL(stop)
 
91
 
 
92
+LOCAL(check_silent):
 
93
+       /* is either shift key held down? */
 
94
+       movw    $(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR + 0x17), %bx
 
95
+       andb    $3, (%bx)
 
96
+       ret
 
97
+
 
98
 notification_string:   .asciz "loading"
 
99
 
 
100
 notification_step:     .asciz "."