Merge mainline into fuse
This commit is contained in:
commit
62ee9685a4
562 changed files with 48310 additions and 9863 deletions
31
.bzrignore
31
.bzrignore
|
@ -26,12 +26,16 @@ docs/*.info
|
||||||
docs/stamp-vti
|
docs/stamp-vti
|
||||||
docs/version.texi
|
docs/version.texi
|
||||||
*.elf
|
*.elf
|
||||||
|
example_grub_script_test
|
||||||
|
example_scripted_test
|
||||||
|
example_unit_test
|
||||||
*.exec
|
*.exec
|
||||||
genkernsyms.sh
|
genkernsyms.sh
|
||||||
gensymlist.sh
|
gensymlist.sh
|
||||||
gentrigtables
|
gentrigtables
|
||||||
grub-bin2h
|
grub-bin2h
|
||||||
grub-dumpbios
|
grub_cmd_echo
|
||||||
|
grub_cmd_regexp
|
||||||
grub-editenv
|
grub-editenv
|
||||||
grub-emu
|
grub-emu
|
||||||
grub_emu_init.c
|
grub_emu_init.c
|
||||||
|
@ -45,15 +49,33 @@ grub-macho2img
|
||||||
grub-menulst2cfg
|
grub-menulst2cfg
|
||||||
grub-mk*
|
grub-mk*
|
||||||
grub-mount
|
grub-mount
|
||||||
grub-pbkdf2
|
|
||||||
grub-pe2elf
|
grub-pe2elf
|
||||||
grub-probe
|
grub-probe
|
||||||
grub_probe_init.c
|
grub_probe_init.c
|
||||||
grub_probe_init.h
|
grub_probe_init.h
|
||||||
grub-reboot
|
grub-reboot
|
||||||
|
grub_script_blanklines
|
||||||
|
grub_script_blockarg
|
||||||
|
grub_script_break
|
||||||
grub-script-check
|
grub-script-check
|
||||||
grub_script_check_init.c
|
grub_script_check_init.c
|
||||||
grub_script_check_init.h
|
grub_script_check_init.h
|
||||||
|
grub_script_comments
|
||||||
|
grub_script_continue
|
||||||
|
grub_script_dollar
|
||||||
|
grub_script_echo1
|
||||||
|
grub_script_echo_keywords
|
||||||
|
grub_script_expansion
|
||||||
|
grub_script_final_semicolon
|
||||||
|
grub_script_for1
|
||||||
|
grub_script_functions
|
||||||
|
grub_script_if
|
||||||
|
grub_script_not
|
||||||
|
grub_script_return
|
||||||
|
grub_script_setparams
|
||||||
|
grub_script_shift
|
||||||
|
grub_script_vars1
|
||||||
|
grub_script_while1
|
||||||
grub_script.tab.c
|
grub_script.tab.c
|
||||||
grub_script.tab.h
|
grub_script.tab.h
|
||||||
grub_script.yy.c
|
grub_script.yy.c
|
||||||
|
@ -77,6 +99,7 @@ Makefile
|
||||||
*.mod
|
*.mod
|
||||||
mod-*.c
|
mod-*.c
|
||||||
missing
|
missing
|
||||||
|
partmap_test
|
||||||
*.pf2
|
*.pf2
|
||||||
*.pp
|
*.pp
|
||||||
po/*.mo
|
po/*.mo
|
||||||
|
@ -111,6 +134,7 @@ grub-core/Makefile.gcry.def
|
||||||
grub-core/contrib
|
grub-core/contrib
|
||||||
grub-core/genmod.sh
|
grub-core/genmod.sh
|
||||||
grub-core/gensyminfo.sh
|
grub-core/gensyminfo.sh
|
||||||
|
grub-core/modinfo.sh
|
||||||
grub-core/*.module
|
grub-core/*.module
|
||||||
grub-core/*.pp
|
grub-core/*.pp
|
||||||
util/bash-completion.d/grub
|
util/bash-completion.d/grub
|
||||||
|
@ -135,3 +159,6 @@ grub-core/gnulib/wctype.h
|
||||||
grub-core/rs_decoder.S
|
grub-core/rs_decoder.S
|
||||||
widthspec.bin
|
widthspec.bin
|
||||||
widthspec.h
|
widthspec.h
|
||||||
|
docs/stamp-1
|
||||||
|
docs/version-dev.texi
|
||||||
|
Makefile.utilgcry.def
|
||||||
|
|
7
BUGS
Normal file
7
BUGS
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
GRUB team is aware of following problems:
|
||||||
|
- Currently search and assembling multidevice abstractions scans
|
||||||
|
all the devices which can be slow.
|
||||||
|
- Cache isn't used correctly for video which results in slowness.
|
||||||
|
|
||||||
|
While these are bugs their solution has a potential of breaking more and more
|
||||||
|
seriously. So it was decided for 1.99 that they aren't fixed.
|
12
Makefile.am
12
Makefile.am
|
@ -1,4 +1,4 @@
|
||||||
AUTOMAKE_OPTIONS = subdir-objects
|
AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
|
||||||
|
|
||||||
DEPDIR = .deps-util
|
DEPDIR = .deps-util
|
||||||
SUBDIRS = grub-core/gnulib . grub-core po docs util/bash-completion.d
|
SUBDIRS = grub-core/gnulib . grub-core po docs util/bash-completion.d
|
||||||
|
@ -147,28 +147,28 @@ linux.init.i386: $(srcdir)/grub-core/tests/boot/linux.init-i386.S
|
||||||
$(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
$(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||||
|
|
||||||
multiboot.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
|
multiboot.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
|
||||||
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
|
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
|
||||||
|
|
||||||
kfreebsd.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
|
kfreebsd.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
|
||||||
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
|
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
|
||||||
|
|
||||||
kfreebsd.aout: kfreebsd.elf
|
kfreebsd.aout: kfreebsd.elf
|
||||||
$(OBJCOPY) -O a.out-i386-linux $< $@ -R .note.gnu.build-id
|
$(OBJCOPY) -O a.out-i386-linux $< $@ -R .note.gnu.build-id
|
||||||
|
|
||||||
pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
|
pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
|
||||||
$(TARGET_CC) -o $@ $< -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x7c00 -m32
|
$(TARGET_CC) -o $@ $< -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x7c00 -m32
|
||||||
|
|
||||||
pc-chainloader.bin: pc-chainloader.elf
|
pc-chainloader.bin: pc-chainloader.elf
|
||||||
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
|
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
|
||||||
|
|
||||||
ntldr.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
|
ntldr.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
|
||||||
$(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0 -m32
|
$(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0 -m32
|
||||||
|
|
||||||
ntldr.bin: ntldr.elf
|
ntldr.bin: ntldr.elf
|
||||||
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
|
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
|
||||||
|
|
||||||
multiboot2.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
|
multiboot2.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
|
||||||
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1
|
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1
|
||||||
|
|
||||||
kfreebsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kfreebsd.init-x86_64.S
|
kfreebsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kfreebsd.init-x86_64.S
|
||||||
$(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@
|
$(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@
|
||||||
|
|
|
@ -9,7 +9,8 @@ library = {
|
||||||
common = grub-core/kern/command.c;
|
common = grub-core/kern/command.c;
|
||||||
common = grub-core/kern/device.c;
|
common = grub-core/kern/device.c;
|
||||||
common = grub-core/kern/disk.c;
|
common = grub-core/kern/disk.c;
|
||||||
common = grub-core/kern/emu/getroot.c;
|
common = util/getroot.c;
|
||||||
|
common = util/raid.c;
|
||||||
common = grub-core/kern/emu/hostdisk.c;
|
common = grub-core/kern/emu/hostdisk.c;
|
||||||
common = grub-core/kern/emu/misc.c;
|
common = grub-core/kern/emu/misc.c;
|
||||||
common = grub-core/kern/emu/mm.c;
|
common = grub-core/kern/emu/mm.c;
|
||||||
|
@ -20,12 +21,20 @@ library = {
|
||||||
common = grub-core/kern/list.c;
|
common = grub-core/kern/list.c;
|
||||||
common = grub-core/kern/misc.c;
|
common = grub-core/kern/misc.c;
|
||||||
common = grub-core/kern/partition.c;
|
common = grub-core/kern/partition.c;
|
||||||
|
common = grub-core/lib/crypto.c;
|
||||||
|
common = grub-core/disk/luks.c;
|
||||||
|
common = grub-core/disk/geli.c;
|
||||||
|
common = grub-core/disk/cryptodisk.c;
|
||||||
|
common = grub-core/disk/AFSplitter.c;
|
||||||
|
common = grub-core/lib/pbkdf2.c;
|
||||||
|
common = grub-core/commands/extcmd.c;
|
||||||
|
common = grub-core/lib/arg.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
library = {
|
library = {
|
||||||
name = libgrubmods.a;
|
name = libgrubmods.a;
|
||||||
cflags = '$(CFLAGS_GCRY)';
|
cflags = '$(CFLAGS_POSIX) -Wno-undef';
|
||||||
cppflags = '$(CPPFLAGS_GCRY)';
|
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(top_srcdir)/grub-core/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
|
||||||
|
|
||||||
common_nodist = grub_script.tab.c;
|
common_nodist = grub_script.tab.c;
|
||||||
common_nodist = grub_script.yy.c;
|
common_nodist = grub_script.yy.c;
|
||||||
|
@ -34,7 +43,8 @@ library = {
|
||||||
common_nodist = grub_script.tab.h;
|
common_nodist = grub_script.tab.h;
|
||||||
|
|
||||||
common = grub-core/commands/blocklist.c;
|
common = grub-core/commands/blocklist.c;
|
||||||
common = grub-core/commands/extcmd.c;
|
common = grub-core/commands/xnu_uuid.c;
|
||||||
|
common = grub-core/commands/testload.c;
|
||||||
common = grub-core/commands/ls.c;
|
common = grub-core/commands/ls.c;
|
||||||
common = grub-core/disk/dmraid_nvidia.c;
|
common = grub-core/disk/dmraid_nvidia.c;
|
||||||
common = grub-core/disk/loopback.c;
|
common = grub-core/disk/loopback.c;
|
||||||
|
@ -45,14 +55,13 @@ library = {
|
||||||
common = grub-core/disk/raid6_recover.c;
|
common = grub-core/disk/raid6_recover.c;
|
||||||
common = grub-core/disk/raid.c;
|
common = grub-core/disk/raid.c;
|
||||||
common = grub-core/fs/affs.c;
|
common = grub-core/fs/affs.c;
|
||||||
common = grub-core/fs/afs_be.c;
|
|
||||||
common = grub-core/fs/afs.c;
|
common = grub-core/fs/afs.c;
|
||||||
common = grub-core/fs/befs_be.c;
|
common = grub-core/fs/bfs.c;
|
||||||
common = grub-core/fs/befs.c;
|
|
||||||
common = grub-core/fs/btrfs.c;
|
common = grub-core/fs/btrfs.c;
|
||||||
common = grub-core/fs/cpio.c;
|
common = grub-core/fs/cpio.c;
|
||||||
common = grub-core/fs/ext2.c;
|
common = grub-core/fs/ext2.c;
|
||||||
common = grub-core/fs/fat.c;
|
common = grub-core/fs/fat.c;
|
||||||
|
common = grub-core/fs/exfat.c;
|
||||||
common = grub-core/fs/fshelp.c;
|
common = grub-core/fs/fshelp.c;
|
||||||
common = grub-core/fs/hfs.c;
|
common = grub-core/fs/hfs.c;
|
||||||
common = grub-core/fs/hfsplus.c;
|
common = grub-core/fs/hfsplus.c;
|
||||||
|
@ -60,29 +69,32 @@ library = {
|
||||||
common = grub-core/fs/jfs.c;
|
common = grub-core/fs/jfs.c;
|
||||||
common = grub-core/fs/minix.c;
|
common = grub-core/fs/minix.c;
|
||||||
common = grub-core/fs/minix2.c;
|
common = grub-core/fs/minix2.c;
|
||||||
|
common = grub-core/fs/minix3.c;
|
||||||
common = grub-core/fs/nilfs2.c;
|
common = grub-core/fs/nilfs2.c;
|
||||||
common = grub-core/fs/ntfs.c;
|
common = grub-core/fs/ntfs.c;
|
||||||
common = grub-core/fs/ntfscomp.c;
|
common = grub-core/fs/ntfscomp.c;
|
||||||
common = grub-core/fs/reiserfs.c;
|
common = grub-core/fs/reiserfs.c;
|
||||||
|
common = grub-core/fs/romfs.c;
|
||||||
common = grub-core/fs/sfs.c;
|
common = grub-core/fs/sfs.c;
|
||||||
|
common = grub-core/fs/squash4.c;
|
||||||
common = grub-core/fs/tar.c;
|
common = grub-core/fs/tar.c;
|
||||||
common = grub-core/fs/udf.c;
|
common = grub-core/fs/udf.c;
|
||||||
common = grub-core/fs/ufs2.c;
|
common = grub-core/fs/ufs2.c;
|
||||||
common = grub-core/fs/ufs.c;
|
common = grub-core/fs/ufs.c;
|
||||||
common = grub-core/fs/xfs.c;
|
common = grub-core/fs/xfs.c;
|
||||||
|
common = grub-core/fs/zfs/zfscrypt.c;
|
||||||
common = grub-core/fs/zfs/zfs.c;
|
common = grub-core/fs/zfs/zfs.c;
|
||||||
|
common = grub-core/fs/zfs/zfsinfo.c;
|
||||||
common = grub-core/fs/zfs/zfs_lzjb.c;
|
common = grub-core/fs/zfs/zfs_lzjb.c;
|
||||||
common = grub-core/fs/zfs/zfs_sha256.c;
|
common = grub-core/fs/zfs/zfs_sha256.c;
|
||||||
common = grub-core/fs/zfs/zfs_fletcher.c;
|
common = grub-core/fs/zfs/zfs_fletcher.c;
|
||||||
common = grub-core/lib/arg.c;
|
|
||||||
common = grub-core/lib/crypto.c;
|
|
||||||
common = grub-core/lib/envblk.c;
|
common = grub-core/lib/envblk.c;
|
||||||
common = grub-core/lib/hexdump.c;
|
common = grub-core/lib/hexdump.c;
|
||||||
common = grub-core/lib/libgcrypt-grub/cipher/sha512.c;
|
|
||||||
common = grub-core/lib/libgcrypt-grub/cipher/crc.c;
|
|
||||||
common = grub-core/lib/LzFind.c;
|
common = grub-core/lib/LzFind.c;
|
||||||
common = grub-core/lib/LzmaEnc.c;
|
common = grub-core/lib/LzmaEnc.c;
|
||||||
common = grub-core/lib/pbkdf2.c;
|
common = grub-core/lib/crc.c;
|
||||||
|
common = grub-core/lib/adler32.c;
|
||||||
|
common = grub-core/lib/crc64.c;
|
||||||
common = grub-core/normal/datetime.c;
|
common = grub-core/normal/datetime.c;
|
||||||
common = grub-core/normal/misc.c;
|
common = grub-core/normal/misc.c;
|
||||||
common = grub-core/partmap/acorn.c;
|
common = grub-core/partmap/acorn.c;
|
||||||
|
@ -91,6 +103,7 @@ library = {
|
||||||
common = grub-core/partmap/gpt.c;
|
common = grub-core/partmap/gpt.c;
|
||||||
common = grub-core/partmap/msdos.c;
|
common = grub-core/partmap/msdos.c;
|
||||||
common = grub-core/partmap/sun.c;
|
common = grub-core/partmap/sun.c;
|
||||||
|
common = grub-core/partmap/dvh.c;
|
||||||
common = grub-core/partmap/sunpc.c;
|
common = grub-core/partmap/sunpc.c;
|
||||||
common = grub-core/partmap/bsdlabel.c;
|
common = grub-core/partmap/bsdlabel.c;
|
||||||
common = grub-core/script/function.c;
|
common = grub-core/script/function.c;
|
||||||
|
@ -98,16 +111,21 @@ library = {
|
||||||
common = grub-core/script/main.c;
|
common = grub-core/script/main.c;
|
||||||
common = grub-core/script/script.c;
|
common = grub-core/script/script.c;
|
||||||
common = grub-core/script/argv.c;
|
common = grub-core/script/argv.c;
|
||||||
|
common = grub-core/io/gzio.c;
|
||||||
|
common = grub-core/io/lzopio.c;
|
||||||
|
common = grub-core/kern/ia64/dl_helper.c;
|
||||||
|
common = grub-core/lib/minilzo/minilzo.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
name = grub-bin2h;
|
name = grub-bin2h;
|
||||||
common = util/bin2h.c;
|
common = util/bin2h.c;
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER)';
|
||||||
mansection = 1;
|
installdir = noinst;
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -119,10 +137,11 @@ program = {
|
||||||
extra_dist = util/grub-mkimagexx.c;
|
extra_dist = util/grub-mkimagexx.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBLZMA)';
|
ldadd = '$(LIBLZMA)';
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"';
|
cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -133,9 +152,10 @@ program = {
|
||||||
common = util/grub-mkrelpath.c;
|
common = util/grub-mkrelpath.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -145,9 +165,10 @@ program = {
|
||||||
common = util/grub-script-check.c;
|
common = util/grub-script-check.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -157,9 +178,10 @@ program = {
|
||||||
common = util/grub-editenv.c;
|
common = util/grub-editenv.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -169,9 +191,10 @@ program = {
|
||||||
common = util/grub-mkpasswd-pbkdf2.c;
|
common = util/grub-mkpasswd-pbkdf2.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
cflags = '$(CFLAGS_GCRY)';
|
cflags = '$(CFLAGS_GCRY)';
|
||||||
cppflags = '$(CPPFLAGS_GCRY)';
|
cppflags = '$(CPPFLAGS_GCRY)';
|
||||||
};
|
};
|
||||||
|
@ -189,6 +212,7 @@ program = {
|
||||||
common = util/grub-pe2elf.c;
|
common = util/grub-pe2elf.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL)';
|
ldadd = '$(LIBINTL)';
|
||||||
|
@ -207,9 +231,10 @@ program = {
|
||||||
cppflags = '$(CPPFLAGS_GCRY)';
|
cppflags = '$(CPPFLAGS_GCRY)';
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -236,10 +261,11 @@ program = {
|
||||||
cflags = '$(freetype_cflags)';
|
cflags = '$(freetype_cflags)';
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(freetype_libs)';
|
ldadd = '$(freetype_libs)';
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
condition = COND_GRUB_MKFONT;
|
condition = COND_GRUB_MKFONT;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -256,9 +282,10 @@ program = {
|
||||||
sparc64_ieee1275 = util/ieee1275/devicemap.c;
|
sparc64_ieee1275 = util/ieee1275/devicemap.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -268,9 +295,10 @@ program = {
|
||||||
common = util/grub-probe.c;
|
common = util/grub-probe.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -278,7 +306,6 @@ program = {
|
||||||
installdir = sbin;
|
installdir = sbin;
|
||||||
mansection = 8;
|
mansection = 8;
|
||||||
common = util/grub-setup.c;
|
common = util/grub-setup.c;
|
||||||
common = util/raid.c;
|
|
||||||
common = util/lvm.c;
|
common = util/lvm.c;
|
||||||
common = grub-core/lib/reed_solomon.c;
|
common = grub-core/lib/reed_solomon.c;
|
||||||
|
|
||||||
|
@ -286,8 +313,9 @@ program = {
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
|
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
enable = sparc64_ieee1275;
|
enable = sparc64_ieee1275;
|
||||||
|
@ -296,13 +324,15 @@ program = {
|
||||||
program = {
|
program = {
|
||||||
name = grub-ofpathname;
|
name = grub-ofpathname;
|
||||||
installdir = sbin;
|
installdir = sbin;
|
||||||
|
mansection = 8;
|
||||||
ieee1275 = util/ieee1275/grub-ofpathname.c;
|
ieee1275 = util/ieee1275/grub-ofpathname.c;
|
||||||
ieee1275 = util/ieee1275/ofpath.c;
|
ieee1275 = util/ieee1275/ofpath.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBGEOM)';
|
||||||
|
|
||||||
enable = sparc64_ieee1275;
|
enable = sparc64_ieee1275;
|
||||||
};
|
};
|
||||||
|
@ -314,9 +344,10 @@ program = {
|
||||||
common = util/grub-mklayout.c;
|
common = util/grub-mklayout.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
@ -351,6 +382,13 @@ script = {
|
||||||
condition = COND_HOST_KFREEBSD;
|
condition = COND_HOST_KFREEBSD;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
script = {
|
||||||
|
name = '10_illumos';
|
||||||
|
common = util/grub.d/10_illumos.in;
|
||||||
|
installdir = grubconf;
|
||||||
|
condition = COND_HOST_ILLUMOS;
|
||||||
|
};
|
||||||
|
|
||||||
script = {
|
script = {
|
||||||
name = '10_netbsd';
|
name = '10_netbsd';
|
||||||
common = util/grub.d/10_netbsd.in;
|
common = util/grub.d/10_netbsd.in;
|
||||||
|
@ -396,13 +434,20 @@ script = {
|
||||||
x86 = util/grub-mkrescue.in;
|
x86 = util/grub-mkrescue.in;
|
||||||
powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in;
|
powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in;
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
enable = x86_efi;
|
enable = i386_efi;
|
||||||
|
enable = x86_64_efi;
|
||||||
enable = i386_qemu;
|
enable = i386_qemu;
|
||||||
enable = i386_multiboot;
|
enable = i386_multiboot;
|
||||||
enable = i386_coreboot;
|
enable = i386_coreboot;
|
||||||
enable = powerpc_ieee1275;
|
enable = powerpc_ieee1275;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
script = {
|
||||||
|
mansection = 1;
|
||||||
|
name = grub-mkstandalone;
|
||||||
|
common = util/grub-mkstandalone.in;
|
||||||
|
};
|
||||||
|
|
||||||
script = {
|
script = {
|
||||||
mansection = 8;
|
mansection = 8;
|
||||||
installdir = sbin;
|
installdir = sbin;
|
||||||
|
@ -624,9 +669,10 @@ program = {
|
||||||
common = grub-core/tests/lib/test.c;
|
common = grub-core/tests/lib/test.c;
|
||||||
cflags = -Wno-format;
|
cflags = -Wno-format;
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
|
@ -637,7 +683,8 @@ program = {
|
||||||
common = grub-core/lib/i386/pc/vesa_modes_table.c;
|
common = grub-core/lib/i386/pc/vesa_modes_table.c;
|
||||||
|
|
||||||
ldadd = libgrubmods.a;
|
ldadd = libgrubmods.a;
|
||||||
|
ldadd = libgrubgcry.a;
|
||||||
ldadd = libgrubkern.a;
|
ldadd = libgrubkern.a;
|
||||||
ldadd = grub-core/gnulib/libgnu.a;
|
ldadd = grub-core/gnulib/libgnu.a;
|
||||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
};
|
};
|
||||||
|
|
6
NEWS
6
NEWS
|
@ -29,7 +29,7 @@ New in 1.99:
|
||||||
|
|
||||||
* New `lsacpi' command.
|
* New `lsacpi' command.
|
||||||
|
|
||||||
* Basic btrfs support (detection and UUID).
|
* Btrfs support.
|
||||||
|
|
||||||
* New `--boot-directory' option to `grub-install', `grub-reboot', and
|
* New `--boot-directory' option to `grub-install', `grub-reboot', and
|
||||||
`grub-set-default', with clearer semantics than the previous
|
`grub-set-default', with clearer semantics than the previous
|
||||||
|
@ -83,10 +83,6 @@ New in 1.99:
|
||||||
|
|
||||||
* Extensive updates to the Texinfo documentation.
|
* Extensive updates to the Texinfo documentation.
|
||||||
|
|
||||||
* Add `grub-probe' support for the btrfs filesystem, permitting / to
|
|
||||||
reside on btrfs as long as /boot is on a filesystem natively supported
|
|
||||||
by GRUB.
|
|
||||||
|
|
||||||
* Handle symbolic links under /dev/mapper on GNU/Linux.
|
* Handle symbolic links under /dev/mapper on GNU/Linux.
|
||||||
|
|
||||||
* Handle installation across multiple partition table types.
|
* Handle installation across multiple partition table types.
|
||||||
|
|
16
acinclude.m4
16
acinclude.m4
|
@ -316,14 +316,14 @@ fi
|
||||||
dnl Check if the C compiler generates calls to `__enable_execute_stack()'.
|
dnl Check if the C compiler generates calls to `__enable_execute_stack()'.
|
||||||
AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[
|
AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[
|
||||||
AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()'])
|
AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()'])
|
||||||
AC_LANG_CONFTEST([[
|
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||||
void f (int (*p) (void));
|
void f (int (*p) (void));
|
||||||
void g (int i)
|
void g (int i)
|
||||||
{
|
{
|
||||||
int nestedfunc (void) { return i; }
|
int nestedfunc (void) { return i; }
|
||||||
f (nestedfunc);
|
f (nestedfunc);
|
||||||
}
|
}
|
||||||
]])
|
]])])
|
||||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -S conftest.c]) && test -s conftest.s; then
|
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -S conftest.c]) && test -s conftest.s; then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
|
@ -346,7 +346,9 @@ AC_DEFUN([grub_CHECK_STACK_PROTECTOR],[
|
||||||
ssp_possible=yes]
|
ssp_possible=yes]
|
||||||
AC_MSG_CHECKING([whether `$CC' accepts `-fstack-protector'])
|
AC_MSG_CHECKING([whether `$CC' accepts `-fstack-protector'])
|
||||||
# Is this a reliable test case?
|
# Is this a reliable test case?
|
||||||
AC_LANG_CONFTEST([[void foo (void) { volatile char a[8]; a[3]; }]])
|
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||||
|
void foo (void) { volatile char a[8]; a[3]; }
|
||||||
|
]])])
|
||||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
||||||
# `ac_compile' like this correct, after all?
|
# `ac_compile' like this correct, after all?
|
||||||
if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then]
|
if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then]
|
||||||
|
@ -364,7 +366,9 @@ AC_DEFUN([grub_CHECK_STACK_ARG_PROBE],[
|
||||||
[# Smashing stack arg probe.
|
[# Smashing stack arg probe.
|
||||||
sap_possible=yes]
|
sap_possible=yes]
|
||||||
AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe'])
|
AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe'])
|
||||||
AC_LANG_CONFTEST([[void foo (void) { volatile char a[8]; a[3]; }]])
|
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||||
|
void foo (void) { volatile char a[8]; a[3]; }
|
||||||
|
]])])
|
||||||
[if eval "$ac_compile -S -mstack-arg-probe -o conftest.s" 2> /dev/null; then]
|
[if eval "$ac_compile -S -mstack-arg-probe -o conftest.s" 2> /dev/null; then]
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||||
|
@ -399,7 +403,7 @@ AC_DEFUN([grub_CHECK_PIE],[
|
||||||
pie_possible=yes]
|
pie_possible=yes]
|
||||||
AC_MSG_CHECKING([whether `$CC' has `-fPIE' as default])
|
AC_MSG_CHECKING([whether `$CC' has `-fPIE' as default])
|
||||||
# Is this a reliable test case?
|
# Is this a reliable test case?
|
||||||
AC_LANG_CONFTEST([[
|
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||||
#ifdef __PIE__
|
#ifdef __PIE__
|
||||||
int main() {
|
int main() {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -407,7 +411,7 @@ int main() {
|
||||||
#else
|
#else
|
||||||
#error NO __PIE__ DEFINED
|
#error NO __PIE__ DEFINED
|
||||||
#endif
|
#endif
|
||||||
]])
|
]])])
|
||||||
|
|
||||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
||||||
# `ac_compile' like this correct, after all?
|
# `ac_compile' like this correct, after all?
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
export LC_CTYPE=C
|
||||||
|
export LC_COLLATE=C
|
||||||
|
unset LC_ALL
|
||||||
|
|
||||||
autogen --version >/dev/null || exit 1
|
autogen --version >/dev/null || exit 1
|
||||||
|
|
||||||
echo "Importing unicode..."
|
echo "Importing unicode..."
|
||||||
|
@ -22,7 +26,7 @@ if [ "x${GRUB_CONTRIB}" != x ]; then
|
||||||
[ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
|
[ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
UTIL_DEFS=Makefile.util.def
|
UTIL_DEFS='Makefile.util.def Makefile.utilgcry.def'
|
||||||
CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
|
CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
|
||||||
|
|
||||||
for extra in contrib/*/Makefile.util.def; do
|
for extra in contrib/*/Makefile.util.def; do
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
CFLAGS_PLATFORM=
|
CFLAGS_PLATFORM=
|
||||||
|
|
||||||
|
export LC_COLLATE := C
|
||||||
|
export LC_CTYPE := C
|
||||||
|
unexport LC_ALL
|
||||||
|
|
||||||
# Platform specific options
|
# Platform specific options
|
||||||
if COND_i386_pc
|
if COND_i386_pc
|
||||||
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
||||||
|
@ -21,13 +25,13 @@ endif
|
||||||
if COND_i386_ieee1275
|
if COND_i386_ieee1275
|
||||||
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
||||||
endif
|
endif
|
||||||
if COND_mips_yeeloong
|
if COND_mips_loongson
|
||||||
CFLAGS_PLATFORM += -mexplicit-relocs
|
CFLAGS_PLATFORM += -mexplicit-relocs
|
||||||
CPPFLAGS_PLATFORM = -DUSE_ASCII_FAILBACK
|
CPPFLAGS_PLATFORM = -DUSE_ASCII_FAILBACK
|
||||||
CCASFLAGS_PLATFORM = -march=mips3
|
|
||||||
endif
|
endif
|
||||||
if COND_mips
|
if COND_mips
|
||||||
CFLAGS_PLATFORM += -mflush-func=grub_cpu_flush_cache
|
CFLAGS_PLATFORM += -mflush-func=grub_cpu_flush_cache
|
||||||
|
CCASFLAGS_PLATFORM = -march=mips3
|
||||||
endif
|
endif
|
||||||
if COND_sparc64_ieee1275
|
if COND_sparc64_ieee1275
|
||||||
CFLAGS_PLATFORM += -mno-app-regs
|
CFLAGS_PLATFORM += -mno-app-regs
|
||||||
|
@ -67,7 +71,11 @@ CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
||||||
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc
|
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc
|
||||||
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
|
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
|
||||||
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
||||||
|
if COND_CYGWIN
|
||||||
|
STRIPFLAGS_KERNEL = -F elf32-i386 -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve
|
||||||
|
else
|
||||||
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment
|
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
||||||
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d
|
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d
|
||||||
|
|
|
@ -13,15 +13,9 @@ SECTIONS
|
||||||
__data_start__ = . ;
|
__data_start__ = . ;
|
||||||
*(.data)
|
*(.data)
|
||||||
__data_end__ = . ;
|
__data_end__ = . ;
|
||||||
}
|
|
||||||
.rdata :
|
|
||||||
{
|
|
||||||
__rdata_start__ = . ;
|
__rdata_start__ = . ;
|
||||||
*(.rdata)
|
*(.rdata)
|
||||||
__rdata_end__ = . ;
|
__rdata_end__ = . ;
|
||||||
}
|
|
||||||
.pdata :
|
|
||||||
{
|
|
||||||
*(.pdata)
|
*(.pdata)
|
||||||
edata = . ;
|
edata = . ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
#define NEED_ENABLE_EXECUTE_STACK @NEED_ENABLE_EXECUTE_STACK@
|
#define NEED_ENABLE_EXECUTE_STACK @NEED_ENABLE_EXECUTE_STACK@
|
||||||
/* Define to 1 if GCC generates calls to __register_frame_info(). */
|
/* Define to 1 if GCC generates calls to __register_frame_info(). */
|
||||||
#define NEED_REGISTER_FRAME_INFO @NEED_REGISTER_FRAME_INFO@
|
#define NEED_REGISTER_FRAME_INFO @NEED_REGISTER_FRAME_INFO@
|
||||||
|
/* Define to 1 to enable disk cache statistics. */
|
||||||
|
#define DISK_CACHE_STATS @DISK_CACHE_STATS@
|
||||||
|
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
#define NESTED_FUNC_ATTR __attribute__ ((__regparm__ (1)))
|
#define NESTED_FUNC_ATTR __attribute__ ((__regparm__ (1)))
|
||||||
|
|
117
configure.ac
117
configure.ac
|
@ -32,7 +32,7 @@ dnl type, so there is no conflict. Variables with the prefix "TARGET_"
|
||||||
dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
|
dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
|
||||||
dnl type.
|
dnl type.
|
||||||
|
|
||||||
AC_INIT([GRUB],[1.99~beta0],[bug-grub@gnu.org])
|
AC_INIT([GRUB],[1.99],[bug-grub@gnu.org])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ case "$target_cpu" in
|
||||||
amd64) target_cpu=x86_64 ;;
|
amd64) target_cpu=x86_64 ;;
|
||||||
sparc) target_cpu=sparc64 ;;
|
sparc) target_cpu=sparc64 ;;
|
||||||
mipsel|mips64el)
|
mipsel|mips64el)
|
||||||
target_cpu=mips;
|
target_cpu=mipsel;
|
||||||
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPSEL=1";
|
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPSEL=1";
|
||||||
;;
|
;;
|
||||||
mips|mips64)
|
mips|mips64)
|
||||||
|
@ -96,7 +96,9 @@ if test "x$with_platform" = x; then
|
||||||
powerpc-*) platform=ieee1275 ;;
|
powerpc-*) platform=ieee1275 ;;
|
||||||
powerpc64-*) platform=ieee1275 ;;
|
powerpc64-*) platform=ieee1275 ;;
|
||||||
sparc64-*) platform=ieee1275 ;;
|
sparc64-*) platform=ieee1275 ;;
|
||||||
mips-*) platform=yeeloong ;;
|
mipsel-*) platform=loongson ;;
|
||||||
|
mips-*) platform=arc ;;
|
||||||
|
ia64-*) platform=efi ;;
|
||||||
*) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;;
|
*) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
@ -122,8 +124,15 @@ case "$target_cpu"-"$platform" in
|
||||||
i386-qemu) ;;
|
i386-qemu) ;;
|
||||||
powerpc-ieee1275) ;;
|
powerpc-ieee1275) ;;
|
||||||
sparc64-ieee1275) ;;
|
sparc64-ieee1275) ;;
|
||||||
mips-qemu-mips) ;;
|
ia64-efi) ;;
|
||||||
mips-yeeloong) ;;
|
mips-qemu_mips) ;;
|
||||||
|
mips-qemu-mips) platform=qemu_mips;;
|
||||||
|
mips-arc) ;;
|
||||||
|
mipsel-qemu_mips) ;;
|
||||||
|
mipsel-qemu-mips) platform=qemu_mips;;
|
||||||
|
mipsel-yeeloong) platform=loongson ;;
|
||||||
|
mipsel-fuloong) platform=loongson ;;
|
||||||
|
mipsel-loongson) ;;
|
||||||
*-emu) ;;
|
*-emu) ;;
|
||||||
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
|
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
|
||||||
esac
|
esac
|
||||||
|
@ -145,6 +154,7 @@ case "$host_os" in
|
||||||
linux*) host_kernel=linux ;;
|
linux*) host_kernel=linux ;;
|
||||||
freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;;
|
freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;;
|
||||||
netbsd*) host_kernel=netbsd ;;
|
netbsd*) host_kernel=netbsd ;;
|
||||||
|
solaris*) host_kernel=illumos ;;
|
||||||
cygwin) host_kernel=windows ;;
|
cygwin) host_kernel=windows ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -156,14 +166,19 @@ case "$platform" in
|
||||||
qemu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
|
qemu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
|
||||||
pc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_PCBIOS=1" ;;
|
pc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_PCBIOS=1" ;;
|
||||||
emu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EMU=1" ;;
|
emu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EMU=1" ;;
|
||||||
yeeloong) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
loongson) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_LOONGSON=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||||
qemu-mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
qemu_mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||||
|
arc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARC=1" ;;
|
||||||
esac
|
esac
|
||||||
case "$target_cpu" in
|
case "$target_cpu" in
|
||||||
mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS=1" ;;
|
mips |mipsel) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS=1" ;;
|
||||||
sparc64) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
|
sparc64) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
|
||||||
esac
|
esac
|
||||||
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
|
if test x${target_cpu} = xmipsel ; then
|
||||||
|
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
|
||||||
|
else
|
||||||
|
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
|
||||||
|
fi
|
||||||
|
|
||||||
HOST_CPPFLAGS="$HOST_CPPFLAGS $machine_CPPFLAGS"
|
HOST_CPPFLAGS="$HOST_CPPFLAGS $machine_CPPFLAGS"
|
||||||
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CPPFLAGS"
|
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CPPFLAGS"
|
||||||
|
@ -219,8 +234,8 @@ for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xyeeloong ); then
|
if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xloongson ); then
|
||||||
AC_MSG_ERROR([qemu and yeeloong ports need unifont])
|
AC_MSG_ERROR([qemu and loongson ports need unifont])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST([FONT_SOURCE])
|
AC_SUBST([FONT_SOURCE])
|
||||||
|
@ -246,7 +261,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# These are not a "must".
|
# These are not a "must".
|
||||||
AC_PATH_PROG(MAKEINFO, makeinfo)
|
AC_PATH_PROGS(MAKEINFO, makeinfo true)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Checks for host programs.
|
# Checks for host programs.
|
||||||
|
@ -398,23 +413,6 @@ if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
|
||||||
TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
|
TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "${target_cpu}-${platform}" = mips-yeeloong; then
|
|
||||||
AC_CACHE_CHECK([whether -march=loongson2f works], [grub_cv_cc_march_loongson2f], [
|
|
||||||
SAVE_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS -march=loongson2f"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
|
||||||
[grub_cv_cc_march_loongson2f=yes],
|
|
||||||
[grub_cv_cc_march_loongson2f=no])
|
|
||||||
CFLAGS="$SAVE_CFLAGS"
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "x$grub_cv_cc_march_loongson2f" = xyes; then
|
|
||||||
TARGET_CFLAGS="$TARGET_CFLAGS -march=loongson2f"
|
|
||||||
else
|
|
||||||
TARGET_CFLAGS="$TARGET_CFLAGS -march=mips3"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
grub_apple_target_cc
|
grub_apple_target_cc
|
||||||
if test x$grub_cv_apple_target_cc = xyes ; then
|
if test x$grub_cv_apple_target_cc = xyes ; then
|
||||||
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DAPPLE_CC=1"
|
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DAPPLE_CC=1"
|
||||||
|
@ -454,7 +452,7 @@ fi
|
||||||
# For platforms where ELF is not the default link format.
|
# For platforms where ELF is not the default link format.
|
||||||
AC_MSG_CHECKING([for command to convert module to ELF format])
|
AC_MSG_CHECKING([for command to convert module to ELF format])
|
||||||
case "${host_os}" in
|
case "${host_os}" in
|
||||||
cygwin) TARGET_OBJ2ELF='$(grub_utildir)/grub-pe2elf';
|
cygwin) TARGET_OBJ2ELF='$(top_builddir)/grub-pe2elf';
|
||||||
# FIXME: put proper test here
|
# FIXME: put proper test here
|
||||||
NEED_REGISTER_FRAME_INFO=1
|
NEED_REGISTER_FRAME_INFO=1
|
||||||
;;
|
;;
|
||||||
|
@ -590,7 +588,7 @@ CFLAGS="$CFLAGS -Wl,--defsym,abort=main"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for libgcc symbols
|
# Check for libgcc symbols
|
||||||
AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x)
|
AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x __ia64_trampoline __udivsi3 __umoddi3 __udivdi3 __divsi3 __modsi3 __umodsi3 __moddi3 __divdi3 __ctzdi2 __ctzsi2)
|
||||||
|
|
||||||
if test "x$TARGET_APPLE_CC" = x1 ; then
|
if test "x$TARGET_APPLE_CC" = x1 ; then
|
||||||
CFLAGS="$TARGET_CFLAGS -nostdlib"
|
CFLAGS="$TARGET_CFLAGS -nostdlib"
|
||||||
|
@ -703,6 +701,17 @@ AC_ARG_ENABLE([mm-debug],
|
||||||
[AC_DEFINE([MM_DEBUG], [1],
|
[AC_DEFINE([MM_DEBUG], [1],
|
||||||
[Define to 1 if you enable memory manager debugging.])])
|
[Define to 1 if you enable memory manager debugging.])])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([cache-stats],
|
||||||
|
AS_HELP_STRING([--enable-cache-stats],
|
||||||
|
[enable disk cache statistics collection]))
|
||||||
|
|
||||||
|
if test x$enable_cache_stats = xyes; then
|
||||||
|
DISK_CACHE_STATS=1
|
||||||
|
else
|
||||||
|
DISK_CACHE_STATS=0
|
||||||
|
fi
|
||||||
|
AC_SUBST([DISK_CACHE_STATS])
|
||||||
|
|
||||||
AC_ARG_ENABLE([grub-emu-usb],
|
AC_ARG_ENABLE([grub-emu-usb],
|
||||||
[AS_HELP_STRING([--enable-grub-emu-usb],
|
[AS_HELP_STRING([--enable-grub-emu-usb],
|
||||||
[build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
|
[build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
|
||||||
|
@ -852,6 +861,9 @@ enable_grub_mkfont=yes
|
||||||
else
|
else
|
||||||
enable_grub_mkfont=no
|
enable_grub_mkfont=no
|
||||||
fi
|
fi
|
||||||
|
if test x"$enable_grub_mkfont" = xno && test "x$platform" = xloongson; then
|
||||||
|
AC_MSG_ERROR([loongson port needs grub-mkfont])
|
||||||
|
fi
|
||||||
AC_SUBST([enable_grub_mkfont])
|
AC_SUBST([enable_grub_mkfont])
|
||||||
AC_SUBST([freetype_cflags])
|
AC_SUBST([freetype_cflags])
|
||||||
AC_SUBST([freetype_libs])
|
AC_SUBST([freetype_libs])
|
||||||
|
@ -894,6 +906,12 @@ if test x"$enable_device_mapper" = xno ; then
|
||||||
device_mapper_excuse="explicitly disabled"
|
device_mapper_excuse="explicitly disabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$device_mapper_excuse" = x ; then
|
||||||
|
# Check for device-mapper header.
|
||||||
|
AC_CHECK_HEADER([libdevmapper.h], [],
|
||||||
|
[device_mapper_excuse="need libdevmapper header"])
|
||||||
|
fi
|
||||||
|
|
||||||
if test x"$device_mapper_excuse" = x ; then
|
if test x"$device_mapper_excuse" = x ; then
|
||||||
# Check for device-mapper library.
|
# Check for device-mapper library.
|
||||||
AC_CHECK_LIB([devmapper], [dm_task_create], [],
|
AC_CHECK_LIB([devmapper], [dm_task_create], [],
|
||||||
|
@ -915,6 +933,15 @@ fi
|
||||||
|
|
||||||
AC_SUBST([LIBDEVMAPPER])
|
AC_SUBST([LIBDEVMAPPER])
|
||||||
|
|
||||||
|
LIBGEOM=
|
||||||
|
if test x$host_kernel = xkfreebsd; then
|
||||||
|
AC_CHECK_LIB([geom], [geom_gettree], [],
|
||||||
|
[AC_MSG_ERROR([Your platform requires libgeom])])
|
||||||
|
LIBGEOM="-lgeom"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([LIBGEOM])
|
||||||
|
|
||||||
AC_CHECK_LIB([lzma], [lzma_code],
|
AC_CHECK_LIB([lzma], [lzma_code],
|
||||||
[LIBLZMA="-llzma"
|
[LIBLZMA="-llzma"
|
||||||
AC_DEFINE([HAVE_LIBLZMA], [1],
|
AC_DEFINE([HAVE_LIBLZMA], [1],
|
||||||
|
@ -961,22 +988,25 @@ AC_SUBST(NEED_REGISTER_FRAME_INFO)
|
||||||
AM_CONDITIONAL([COND_emu], [test x$platform = xemu])
|
AM_CONDITIONAL([COND_emu], [test x$platform = xemu])
|
||||||
AM_CONDITIONAL([COND_i386_pc], [test x$target_cpu = xi386 -a x$platform = xpc])
|
AM_CONDITIONAL([COND_i386_pc], [test x$target_cpu = xi386 -a x$platform = xpc])
|
||||||
AM_CONDITIONAL([COND_i386_efi], [test x$target_cpu = xi386 -a x$platform = xefi])
|
AM_CONDITIONAL([COND_i386_efi], [test x$target_cpu = xi386 -a x$platform = xefi])
|
||||||
|
AM_CONDITIONAL([COND_ia64_efi], [test x$target_cpu = xia64 -a x$platform = xefi])
|
||||||
AM_CONDITIONAL([COND_i386_qemu], [test x$target_cpu = xi386 -a x$platform = xqemu])
|
AM_CONDITIONAL([COND_i386_qemu], [test x$target_cpu = xi386 -a x$platform = xqemu])
|
||||||
AM_CONDITIONAL([COND_i386_ieee1275], [test x$target_cpu = xi386 -a x$platform = xieee1275])
|
AM_CONDITIONAL([COND_i386_ieee1275], [test x$target_cpu = xi386 -a x$platform = xieee1275])
|
||||||
AM_CONDITIONAL([COND_i386_coreboot], [test x$target_cpu = xi386 -a x$platform = xcoreboot])
|
AM_CONDITIONAL([COND_i386_coreboot], [test x$target_cpu = xi386 -a x$platform = xcoreboot])
|
||||||
AM_CONDITIONAL([COND_i386_multiboot], [test x$target_cpu = xi386 -a x$platform = xmultiboot])
|
AM_CONDITIONAL([COND_i386_multiboot], [test x$target_cpu = xi386 -a x$platform = xmultiboot])
|
||||||
AM_CONDITIONAL([COND_x86_64_efi], [test x$target_cpu = xx86_64 -a x$platform = xefi])
|
AM_CONDITIONAL([COND_x86_64_efi], [test x$target_cpu = xx86_64 -a x$platform = xefi])
|
||||||
AM_CONDITIONAL([COND_mips_yeeloong], [test x$target_cpu = xmips -a x$platform = xyeeloong])
|
AM_CONDITIONAL([COND_mips_loongson], [test x$target_cpu = xmipsel -a x$platform = xloongson])
|
||||||
AM_CONDITIONAL([COND_mips_qemu_mips], [test x$target_cpu = xmips -a x$platform = xqemu_mips])
|
AM_CONDITIONAL([COND_mips_qemu_mips], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips])
|
||||||
|
AM_CONDITIONAL([COND_mips_arc], [test x$target_cpu = xmips -a x$platform = xarc])
|
||||||
AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275])
|
AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275])
|
||||||
AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275])
|
AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275])
|
||||||
AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips])
|
AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel])
|
||||||
|
|
||||||
AM_CONDITIONAL([COND_HOST_HURD], [test x$host_kernel = xhurd])
|
AM_CONDITIONAL([COND_HOST_HURD], [test x$host_kernel = xhurd])
|
||||||
AM_CONDITIONAL([COND_HOST_LINUX], [test x$host_kernel = xlinux])
|
AM_CONDITIONAL([COND_HOST_LINUX], [test x$host_kernel = xlinux])
|
||||||
AM_CONDITIONAL([COND_HOST_NETBSD], [test x$host_kernel = xnetbsd])
|
AM_CONDITIONAL([COND_HOST_NETBSD], [test x$host_kernel = xnetbsd])
|
||||||
AM_CONDITIONAL([COND_HOST_WINDOWS], [test x$host_kernel = xwindows])
|
AM_CONDITIONAL([COND_HOST_WINDOWS], [test x$host_kernel = xwindows])
|
||||||
AM_CONDITIONAL([COND_HOST_KFREEBSD], [test x$host_kernel = xkfreebsd])
|
AM_CONDITIONAL([COND_HOST_KFREEBSD], [test x$host_kernel = xkfreebsd])
|
||||||
|
AM_CONDITIONAL([COND_HOST_ILLUMOS], [test x$host_kernel = xillumos])
|
||||||
|
|
||||||
AM_CONDITIONAL([COND_MAN_PAGES], [test x$cross_compiling = xno -a x$HELP2MAN != x])
|
AM_CONDITIONAL([COND_MAN_PAGES], [test x$cross_compiling = xno -a x$HELP2MAN != x])
|
||||||
AM_CONDITIONAL([COND_GRUB_EMU_USB], [test x$enable_grub_emu_usb = xyes])
|
AM_CONDITIONAL([COND_GRUB_EMU_USB], [test x$enable_grub_emu_usb = xyes])
|
||||||
|
@ -988,23 +1018,29 @@ AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x])
|
||||||
AM_CONDITIONAL([COND_GRUB_PE2ELF], [test x$TARGET_OBJ2ELF != x])
|
AM_CONDITIONAL([COND_GRUB_PE2ELF], [test x$TARGET_OBJ2ELF != x])
|
||||||
AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
|
AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
|
||||||
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
|
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
|
||||||
|
AM_CONDITIONAL([COND_ENABLE_CACHE_STATS], [test x$DISK_CACHE_STATS = x1])
|
||||||
|
|
||||||
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
|
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
|
||||||
|
AM_CONDITIONAL([COND_CYGWIN], [test x$host_os = xcygwin])
|
||||||
|
|
||||||
# Output files.
|
# Output files.
|
||||||
|
cpudir="${target_cpu}"
|
||||||
|
if test x${cpudir} = xmipsel; then
|
||||||
|
cpudir=mips;
|
||||||
|
fi
|
||||||
grub_CHECK_LINK_DIR
|
grub_CHECK_LINK_DIR
|
||||||
if test x"$link_dir" = xyes ; then
|
if test x"$link_dir" = xyes ; then
|
||||||
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu])
|
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$cpudir])
|
||||||
if test "$platform" != emu ; then
|
if test "$platform" != emu ; then
|
||||||
AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform])
|
AC_CONFIG_LINKS([include/grub/machine:include/grub/$cpudir/$platform])
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
mkdir -p include/grub 2>/dev/null
|
mkdir -p include/grub 2>/dev/null
|
||||||
rm -rf include/grub/cpu
|
rm -rf include/grub/cpu
|
||||||
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
|
cp -rp $srcdir/include/grub/$cpudir include/grub/cpu 2>/dev/null
|
||||||
if test "$platform" != emu ; then
|
if test "$platform" != emu ; then
|
||||||
rm -rf include/grub/machine
|
rm -rf include/grub/machine
|
||||||
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
cp -rp $srcdir/include/grub/$cpudir/$platform include/grub/machine 2>/dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1049,6 +1085,11 @@ echo With memory debugging: Yes
|
||||||
else
|
else
|
||||||
echo With memory debugging: No
|
echo With memory debugging: No
|
||||||
fi
|
fi
|
||||||
|
if [ x"$enable_cache_stats" = xyes ]; then
|
||||||
|
echo With disk cache statistics: Yes
|
||||||
|
else
|
||||||
|
echo With disk cache statistics: No
|
||||||
|
fi
|
||||||
if [ x"$efiemu_excuse" = x ]; then
|
if [ x"$efiemu_excuse" = x ]; then
|
||||||
echo efiemu runtime: Yes
|
echo efiemu runtime: Yes
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
AUTOMAKE_OPTIONS = subdir-objects
|
AUTOMAKE_OPTIONS = subdir-objects
|
||||||
|
|
||||||
# AM_MAKEINFOFLAGS = --no-split --no-validate
|
# AM_MAKEINFOFLAGS = --no-split --no-validate
|
||||||
info_TEXINFOS = grub.texi
|
info_TEXINFOS = grub.texi grub-dev.texi
|
||||||
grub_TEXINFOS = fdl.texi
|
grub_TEXINFOS = fdl.texi
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
docs/font_char_metrics.png
Normal file
BIN
docs/font_char_metrics.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
1
docs/font_char_metrics.txt
Normal file
1
docs/font_char_metrics.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Please fill this in.
|
1533
docs/grub-dev.texi
Normal file
1533
docs/grub-dev.texi
Normal file
File diff suppressed because it is too large
Load diff
1123
docs/grub.texi
1123
docs/grub.texi
File diff suppressed because it is too large
Load diff
|
@ -1,2 +0,0 @@
|
||||||
[NAME]
|
|
||||||
grub-bin2h \- convert a binary file to a C header
|
|
|
@ -1,2 +1,5 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-editenv \- edit GRUB environment block
|
grub-editenv \- edit GRUB environment block
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-reboot (8),
|
||||||
|
.BR grub-set-default (8)
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-emu \- GRUB emulator
|
grub-emu \- GRUB emulator
|
||||||
|
[SEE ALSO]
|
||||||
|
If you are trying to install GRUB, then you should use
|
||||||
|
.BR grub-install (8)
|
||||||
|
rather than this program.
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-fstest \- debug tool for GRUB filesystem drivers
|
grub-fstest \- debug tool for GRUB filesystem drivers
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-probe (8)
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-install \- install GRUB to a device
|
grub-install \- install GRUB to a device
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkconfig (8),
|
||||||
|
.BR grub-mkimage (1),
|
||||||
|
.BR grub-setup (8),
|
||||||
|
.BR grub-mkrescue (1)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-macho2img \- convert Mach-O to raw image
|
grub-macho2img \- convert Mach-O to raw image
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkimage (1)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-menulst2cfg \- transform legacy menu.lst into grub.cfg
|
grub-menulst2cfg \- transform legacy menu.lst into grub.cfg
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkconfig (8)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mkconfig \- generate a GRUB configuration file
|
grub-mkconfig \- generate a GRUB configuration file
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-install (8)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mkdevicemap \- generate a GRUB device map file automatically
|
grub-mkdevicemap \- generate a GRUB device map file automatically
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-install (8)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mkfont \- make GRUB font files
|
grub-mkfont \- make GRUB font files
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkconfig (8)
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mkimage \- make a bootable image of GRUB
|
grub-mkimage \- make a bootable image of GRUB
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-install (8),
|
||||||
|
.BR grub-setup (8),
|
||||||
|
.BR grub-mkrescue (1),
|
||||||
|
.BR grub-mknetdir (8)
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mklayout \- generate a GRUB keyboard layout file
|
grub-mklayout \- generate a GRUB keyboard layout file
|
||||||
|
[DESCRIPTION]
|
||||||
|
grub-mklayout processes a keyboard layout description in
|
||||||
|
.BR keymaps (5)
|
||||||
|
format into a format that can be used by GRUB's
|
||||||
|
.B keymap
|
||||||
|
command.
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkconfig (8)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mknetdir \- prepare a GRUB netboot directory.
|
grub-mknetdir \- prepare a GRUB netboot directory.
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkimage (1)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mkpasswd-pbkdf2 \- generate hashed password for GRUB
|
grub-mkpasswd-pbkdf2 \- generate hashed password for GRUB
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkconfig (8)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mkrelpath \- make a system path relative to its root
|
grub-mkrelpath \- make a system path relative to its root
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-probe (8)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-mkrescue \- make a GRUB rescue image
|
grub-mkrescue \- make a GRUB rescue image
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkimage (1)
|
||||||
|
|
4
docs/man/grub-mkstandalone.h2m
Normal file
4
docs/man/grub-mkstandalone.h2m
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[NAME]
|
||||||
|
grub-mkstandalone \- make a memdisk-based GRUB image
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkimage (1)
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-ofpathname \- find OpenBOOT path for a device
|
grub-ofpathname \- find OpenBOOT path for a device
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-probe (8)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-pe2elf \- convert PE image to ELF
|
grub-pe2elf \- convert PE image to ELF
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkimage (1)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-probe \- probe device information for GRUB
|
grub-probe \- probe device information for GRUB
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-fstest (1)
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-reboot \- set the default boot entry for GRUB, for the next boot only
|
grub-reboot \- set the default boot entry for GRUB, for the next boot only
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-set-default (8),
|
||||||
|
.BR grub-editenv (1)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-script-check \- check grub.cfg for syntax errors
|
grub-script-check \- check grub.cfg for syntax errors
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-mkconfig (8)
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-set-default \- set the saved default boot entry for GRUB
|
grub-set-default \- set the saved default boot entry for GRUB
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-reboot (8),
|
||||||
|
.BR grub-editenv (1)
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
[NAME]
|
[NAME]
|
||||||
grub-setup \- set up a device to boot using GRUB
|
grub-setup \- set up a device to boot using GRUB
|
||||||
|
[SEE ALSO]
|
||||||
|
.BR grub-install (8),
|
||||||
|
.BR grub-mkimage (1),
|
||||||
|
.BR grub-mkrescue (1)
|
||||||
|
|
149
gentpl.py
149
gentpl.py
|
@ -6,8 +6,9 @@
|
||||||
|
|
||||||
GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
|
GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
|
||||||
"i386_multiboot", "i386_ieee1275", "x86_64_efi",
|
"i386_multiboot", "i386_ieee1275", "x86_64_efi",
|
||||||
"mips_yeeloong", "sparc64_ieee1275",
|
"mips_loongson", "sparc64_ieee1275",
|
||||||
"powerpc_ieee1275" ]
|
"powerpc_ieee1275", "mips_arc", "ia64_efi",
|
||||||
|
"mips_qemu_mips" ]
|
||||||
|
|
||||||
GROUPS = {}
|
GROUPS = {}
|
||||||
|
|
||||||
|
@ -17,29 +18,31 @@ GROUPS["common"] = GRUB_PLATFORMS[:]
|
||||||
GROUPS["i386"] = [ "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_multiboot", "i386_ieee1275" ]
|
GROUPS["i386"] = [ "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_multiboot", "i386_ieee1275" ]
|
||||||
GROUPS["x86_64"] = [ "x86_64_efi" ]
|
GROUPS["x86_64"] = [ "x86_64_efi" ]
|
||||||
GROUPS["x86"] = GROUPS["i386"] + GROUPS["x86_64"]
|
GROUPS["x86"] = GROUPS["i386"] + GROUPS["x86_64"]
|
||||||
GROUPS["mips"] = [ "mips_yeeloong" ]
|
GROUPS["mips"] = [ "mips_loongson", "mips_qemu_mips", "mips_arc" ]
|
||||||
GROUPS["sparc64"] = [ "sparc64_ieee1275" ]
|
GROUPS["sparc64"] = [ "sparc64_ieee1275" ]
|
||||||
GROUPS["powerpc"] = [ "powerpc_ieee1275" ]
|
GROUPS["powerpc"] = [ "powerpc_ieee1275" ]
|
||||||
|
|
||||||
# Groups based on firmware
|
# Groups based on firmware
|
||||||
GROUPS["x86_efi"] = [ "i386_efi", "x86_64_efi" ]
|
GROUPS["efi"] = [ "i386_efi", "x86_64_efi", "ia64_efi" ]
|
||||||
GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ]
|
GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ]
|
||||||
|
|
||||||
# emu is a special case so many core functionality isn't needed on this platform
|
# emu is a special case so many core functionality isn't needed on this platform
|
||||||
GROUPS["noemu"] = GRUB_PLATFORMS[:]; GROUPS["noemu"].remove("emu")
|
GROUPS["noemu"] = GRUB_PLATFORMS[:]; GROUPS["noemu"].remove("emu")
|
||||||
|
|
||||||
# Groups based on hardware features
|
# Groups based on hardware features
|
||||||
GROUPS["cmos"] = GROUPS["x86"][:] + ["mips_yeeloong"]; GROUPS["cmos"].remove("i386_efi"); GROUPS["cmos"].remove("x86_64_efi")
|
GROUPS["cmos"] = GROUPS["x86"][:] + ["mips_loongson", "mips_qemu_mips",
|
||||||
GROUPS["pci"] = GROUPS["x86"] + GROUPS["mips"]
|
"sparc64_ieee1275", "powerpc_ieee1275"]
|
||||||
|
GROUPS["cmos"].remove("i386_efi"); GROUPS["cmos"].remove("x86_64_efi")
|
||||||
|
GROUPS["pci"] = GROUPS["x86"] + ["mips_loongson"]
|
||||||
GROUPS["usb"] = GROUPS["pci"]
|
GROUPS["usb"] = GROUPS["pci"]
|
||||||
|
|
||||||
# If gfxterm is main output console integrate it into kernel
|
# If gfxterm is main output console integrate it into kernel
|
||||||
GROUPS["videoinkernel"] = ["mips_yeeloong"]
|
GROUPS["videoinkernel"] = ["mips_loongson", "mips_qemu_mips"]
|
||||||
GROUPS["videomodules"] = GRUB_PLATFORMS[:];
|
GROUPS["videomodules"] = GRUB_PLATFORMS[:];
|
||||||
for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
|
for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
|
||||||
|
|
||||||
# Similar for terminfo
|
# Similar for terminfo
|
||||||
GROUPS["terminfoinkernel"] = ["mips_yeeloong"] + GROUPS["ieee1275"];
|
GROUPS["terminfoinkernel"] = ["mips_loongson", "mips_arc", "mips_qemu_mips" ] + GROUPS["ieee1275"];
|
||||||
GROUPS["terminfomodule"] = GRUB_PLATFORMS[:];
|
GROUPS["terminfomodule"] = GRUB_PLATFORMS[:];
|
||||||
for i in GROUPS["terminfoinkernel"]: GROUPS["terminfomodule"].remove(i)
|
for i in GROUPS["terminfoinkernel"]: GROUPS["terminfomodule"].remove(i)
|
||||||
|
|
||||||
|
@ -180,6 +183,17 @@ def foreach_platform_specific_value(platform, suffix, nonetag, closure):
|
||||||
r += "[+ ELSE +][+ FOR " + nonetag + " +]" + closure("[+ ." + nonetag + " +]") + "[+ ENDFOR +][+ ENDIF +]"
|
r += "[+ ELSE +][+ FOR " + nonetag + " +]" + closure("[+ ." + nonetag + " +]") + "[+ ENDFOR +][+ ENDIF +]"
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
#
|
||||||
|
# Returns autogen code that defines an autogen macro using the
|
||||||
|
# definition given in the 'snippet'.
|
||||||
|
#
|
||||||
|
def define_autogen_macro(name, snippet):
|
||||||
|
r = ""
|
||||||
|
r += "[+ DEFINE " + name + " +]"
|
||||||
|
r += snippet
|
||||||
|
r += "[+ ENDDEF +]\n"
|
||||||
|
return r
|
||||||
|
|
||||||
#
|
#
|
||||||
# Template for handling values from sum of all groups for a platform,
|
# Template for handling values from sum of all groups for a platform,
|
||||||
# for example:
|
# for example:
|
||||||
|
@ -238,14 +252,22 @@ def foreach_enabled_platform(closure):
|
||||||
# noemu = bus/usb/usbhub.c;
|
# noemu = bus/usb/usbhub.c;
|
||||||
# enable = emu;
|
# enable = emu;
|
||||||
# enable = i386;
|
# enable = i386;
|
||||||
# enable = mips_yeeloong;
|
# enable = mips_loongson;
|
||||||
# emu_condition = COND_GRUB_EMU_USB;
|
# emu_condition = COND_GRUB_EMU_USB;
|
||||||
# };
|
# };
|
||||||
#
|
#
|
||||||
|
def define_macro_for_platform_conditionals_if_statement(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"if_" + p + "_conditionals",
|
||||||
|
foreach_platform_specific_value(platform, "_condition", "condition", lambda cond: "if " + cond + "\n"))
|
||||||
|
def define_macro_for_platform_conditionals_endif_statement(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"endif_" + p + "_conditionals",
|
||||||
|
foreach_platform_specific_value(platform, "_condition", "condition", lambda cond: "endif " + cond + "\n"))
|
||||||
def under_platform_specific_conditionals(platform, snippet):
|
def under_platform_specific_conditionals(platform, snippet):
|
||||||
r = foreach_platform_specific_value(platform, "_condition", "condition", lambda cond: "if " + cond + "\n")
|
r = "[+ if_" + platform + "_conditionals +]"
|
||||||
r += snippet
|
r += snippet
|
||||||
r += foreach_platform_specific_value(platform, "_condition", "condition", lambda cond: "endif " + cond + "\n")
|
r += "[+ endif_" + platform + "_conditionals +]"
|
||||||
return r
|
return r
|
||||||
|
|
||||||
def platform_specific_values(platform, suffix, nonetag):
|
def platform_specific_values(platform, suffix, nonetag):
|
||||||
|
@ -258,18 +280,69 @@ def platform_values(platform, suffix):
|
||||||
def extra_dist():
|
def extra_dist():
|
||||||
return foreach_value("extra_dist", lambda value: value + " ")
|
return foreach_value("extra_dist", lambda value: value + " ")
|
||||||
|
|
||||||
def platform_sources(p): return platform_values(p, "")
|
def define_macro_for_platform_sources(p):
|
||||||
def platform_nodist_sources(p): return platform_values(p, "_nodist")
|
return define_autogen_macro(
|
||||||
def platform_dependencies(p): return platform_values(p, "dependencies", "_dependencies")
|
"get_" + p + "_sources",
|
||||||
|
platform_values(p, ""))
|
||||||
|
def define_macro_for_platform_nodist_sources(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_nodist_sources",
|
||||||
|
platform_values(p, "_nodist"))
|
||||||
|
def define_macro_for_platform_dependencies(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_dependencies",
|
||||||
|
platform_values(p, "dependencies", "_dependencies"))
|
||||||
|
def platform_sources(p): return "[+ get_" + p + "_sources +]"
|
||||||
|
def platform_nodist_sources(p): return "[+ get_" + p + "_nodist_sources +]"
|
||||||
|
def platform_dependencies(p): return "[+ get_" + p + "_dependencies +]"
|
||||||
|
|
||||||
def platform_startup(p): return platform_specific_values(p, "_startup", "startup")
|
#
|
||||||
def platform_ldadd(p): return platform_specific_values(p, "_ldadd", "ldadd")
|
# Returns Autogen code which defines the autogen macros that collect
|
||||||
def platform_cflags(p): return platform_specific_values(p, "_cflags", "cflags")
|
# platform specific values for cflags, ldflags, etc. tags.
|
||||||
def platform_ldflags(p): return platform_specific_values(p, "_ldflags", "ldflags")
|
#
|
||||||
def platform_cppflags(p): return platform_specific_values(p, "_cppflags", "cppflags")
|
def define_macro_for_platform_startup(p):
|
||||||
def platform_ccasflags(p): return platform_specific_values(p, "_ccasflags", "ccasflags")
|
return define_autogen_macro(
|
||||||
def platform_stripflags(p): return platform_specific_values(p, "_stripflags", "stripflags")
|
"get_" + p + "_startup",
|
||||||
def platform_objcopyflags(p): return platform_specific_values(p, "_objcopyflags", "objcopyflags")
|
platform_specific_values(p, "_startup", "startup"))
|
||||||
|
def define_macro_for_platform_cflags(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_cflags",
|
||||||
|
platform_specific_values(p, "_cflags", "cflags"))
|
||||||
|
def define_macro_for_platform_ldadd(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_ldadd",
|
||||||
|
platform_specific_values(p, "_ldadd", "ldadd"))
|
||||||
|
def define_macro_for_platform_ldflags(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_ldflags",
|
||||||
|
platform_specific_values(p, "_ldflags", "ldflags"))
|
||||||
|
def define_macro_for_platform_cppflags(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_cppflags",
|
||||||
|
platform_specific_values(p, "_cppflags", "cppflags"))
|
||||||
|
def define_macro_for_platform_ccasflags(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_ccasflags",
|
||||||
|
platform_specific_values(p, "_ccasflags", "ccasflags"))
|
||||||
|
def define_macro_for_platform_stripflags(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_stripflags",
|
||||||
|
platform_specific_values(p, "_stripflags", "stripflags"))
|
||||||
|
def define_macro_for_platform_objcopyflags(p):
|
||||||
|
return define_autogen_macro(
|
||||||
|
"get_" + p + "_objcopyflags",
|
||||||
|
platform_specific_values(p, "_objcopyflags", "objcopyflags"))
|
||||||
|
#
|
||||||
|
# Autogen calls to invoke the above macros.
|
||||||
|
#
|
||||||
|
def platform_startup(p): return "[+ get_" + p + "_startup +]"
|
||||||
|
def platform_ldadd(p): return "[+ get_" + p + "_ldadd +]"
|
||||||
|
def platform_cflags(p): return "[+ get_" + p + "_cflags +]"
|
||||||
|
def platform_ldflags(p): return "[+ get_" + p + "_ldflags +]"
|
||||||
|
def platform_cppflags(p): return "[+ get_" + p + "_cppflags +]"
|
||||||
|
def platform_ccasflags(p): return "[+ get_" + p + "_ccasflags +]"
|
||||||
|
def platform_stripflags(p): return "[+ get_" + p + "_stripflags +]"
|
||||||
|
def platform_objcopyflags(p): return "[+ get_" + p + "_objcopyflags +]"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Emit snippet only the first time through for the current name.
|
# Emit snippet only the first time through for the current name.
|
||||||
|
@ -486,7 +559,6 @@ def script_rules():
|
||||||
def data_rules():
|
def data_rules():
|
||||||
return rules("data", data)
|
return rules("data", data)
|
||||||
|
|
||||||
print "[+ AutoGen5 template +]\n"
|
|
||||||
a = module_rules()
|
a = module_rules()
|
||||||
b = kernel_rules()
|
b = kernel_rules()
|
||||||
c = image_rules()
|
c = image_rules()
|
||||||
|
@ -496,11 +568,28 @@ f = script_rules()
|
||||||
g = data_rules()
|
g = data_rules()
|
||||||
z = global_variable_initializers()
|
z = global_variable_initializers()
|
||||||
|
|
||||||
|
print ("[+ AutoGen5 template +]\n")
|
||||||
|
for p in GRUB_PLATFORMS:
|
||||||
|
print (define_macro_for_platform_sources(p))
|
||||||
|
print (define_macro_for_platform_nodist_sources(p))
|
||||||
|
# print define_macro_for_platform_dependencies(p)
|
||||||
|
|
||||||
|
print (define_macro_for_platform_startup(p))
|
||||||
|
print (define_macro_for_platform_cflags(p))
|
||||||
|
print (define_macro_for_platform_ldadd(p))
|
||||||
|
print (define_macro_for_platform_ldflags(p))
|
||||||
|
print (define_macro_for_platform_cppflags(p))
|
||||||
|
print (define_macro_for_platform_ccasflags(p))
|
||||||
|
print (define_macro_for_platform_stripflags(p))
|
||||||
|
print (define_macro_for_platform_objcopyflags(p))
|
||||||
|
|
||||||
|
print (define_macro_for_platform_conditionals_if_statement(p))
|
||||||
|
print (define_macro_for_platform_conditionals_endif_statement(p))
|
||||||
# print z # initializer for all vars
|
# print z # initializer for all vars
|
||||||
print a
|
print (a)
|
||||||
print b
|
print (b)
|
||||||
print c
|
print (c)
|
||||||
print d
|
print (d)
|
||||||
print e
|
print (e)
|
||||||
print f
|
print (f)
|
||||||
print g
|
print (g)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
AUTOMAKE_OPTIONS = subdir-objects
|
AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
|
||||||
|
|
||||||
DEPDIR=.deps-core
|
DEPDIR=.deps-core
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
|
||||||
|
|
||||||
|
@ -99,10 +99,12 @@ endif
|
||||||
|
|
||||||
if COND_i386_coreboot
|
if COND_i386_coreboot
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/i386/pc/int.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if COND_i386_multiboot
|
if COND_i386_multiboot
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/i386/pc/int.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if COND_i386_qemu
|
if COND_i386_qemu
|
||||||
|
@ -125,7 +127,39 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if COND_mips_yeeloong
|
if COND_ia64_efi
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/time.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
if COND_mips
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/kernel.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
if COND_mips_arc
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arc/arc.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
if COND_mips_qemu_mips
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/cache.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bitmap.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bitmap_scale.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
if COND_mips_loongson
|
||||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
||||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/cache.h
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/cache.h
|
||||||
|
@ -145,6 +179,11 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if COND_mips_qemu_mips
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||||
|
endif
|
||||||
|
|
||||||
if COND_powerpc_ieee1275
|
if COND_powerpc_ieee1275
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||||
|
@ -163,6 +202,7 @@ endif
|
||||||
if COND_emu
|
if COND_emu
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h
|
||||||
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/export.h
|
||||||
if COND_GRUB_EMU_SDL
|
if COND_GRUB_EMU_SDL
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
|
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
|
||||||
endif
|
endif
|
||||||
|
@ -303,8 +343,9 @@ platform_DATA += moddep.lst
|
||||||
CLEANFILES += config.log syminfo.lst moddep.lst
|
CLEANFILES += config.log syminfo.lst moddep.lst
|
||||||
|
|
||||||
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
|
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
|
||||||
sh $^ $@
|
TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
|
||||||
platform_DATA += $(MOD_FILES)
|
platform_DATA += $(MOD_FILES)
|
||||||
|
platform_DATA += modinfo.sh
|
||||||
CLEANFILES += $(MOD_FILES)
|
CLEANFILES += $(MOD_FILES)
|
||||||
|
|
||||||
if COND_ENABLE_EFIEMU
|
if COND_ENABLE_EFIEMU
|
||||||
|
|
|
@ -12,14 +12,26 @@ script = {
|
||||||
common = genmod.sh.in;
|
common = genmod.sh.in;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
script = {
|
||||||
|
installdir = noinst;
|
||||||
|
name = modinfo.sh;
|
||||||
|
common = modinfo.sh.in;
|
||||||
|
};
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
name = kernel;
|
name = kernel;
|
||||||
|
|
||||||
nostrip = emu;
|
nostrip = emu;
|
||||||
|
|
||||||
emu_ldflags = '-Wl,-r,-d';
|
emu_ldflags = '-Wl,-r,-d';
|
||||||
x86_efi_ldflags = '-Wl,-r,-d';
|
i386_efi_ldflags = '-Wl,-r,-d';
|
||||||
x86_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
|
i386_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
|
||||||
|
x86_64_efi_ldflags = '-Wl,-r,-d';
|
||||||
|
x86_64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
|
||||||
|
|
||||||
|
ia64_efi_cflags = '-fno-builtin -fpic -minline-int-divide-max-throughput';
|
||||||
|
ia64_efi_ldflags = '-Wl,-r,-d';
|
||||||
|
ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
|
||||||
|
|
||||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
|
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
|
||||||
|
@ -32,11 +44,13 @@ kernel = {
|
||||||
i386_coreboot_ldflags = '-Wl,-Ttext=0x8200';
|
i386_coreboot_ldflags = '-Wl,-Ttext=0x8200';
|
||||||
i386_multiboot_ldflags = '-Wl,-Ttext=0x8200';
|
i386_multiboot_ldflags = '-Wl,-Ttext=0x8200';
|
||||||
i386_ieee1275_ldflags = '-Wl,-Ttext=0x10000';
|
i386_ieee1275_ldflags = '-Wl,-Ttext=0x10000';
|
||||||
mips_yeeloong_ldflags = '-Wl,-Ttext,0x80200000';
|
mips_loongson_ldflags = '-Wl,-Ttext,0x80200000';
|
||||||
powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
|
powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
|
||||||
sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
|
sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
|
||||||
|
mips_arc_ldflags = '-Wl,-Ttext,0x8bd00000';
|
||||||
|
mips_qemu_mips_ldflags = '-Wl,-Ttext,0x80200000';
|
||||||
|
|
||||||
mips_yeeloong_cppflags = '-DUSE_ASCII_FAILBACK';
|
mips_loongson_cppflags = '-DUSE_ASCII_FAILBACK';
|
||||||
i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
|
i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
|
||||||
emu_cflags = '$(CFLAGS_GNULIB)';
|
emu_cflags = '$(CFLAGS_GNULIB)';
|
||||||
emu_cppflags = '$(CPPFLAGS_GNULIB)';
|
emu_cppflags = '$(CPPFLAGS_GNULIB)';
|
||||||
|
@ -48,7 +62,7 @@ kernel = {
|
||||||
i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
|
i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
|
||||||
i386_coreboot_startup = kern/i386/coreboot/startup.S;
|
i386_coreboot_startup = kern/i386/coreboot/startup.S;
|
||||||
i386_multiboot_startup = kern/i386/coreboot/startup.S;
|
i386_multiboot_startup = kern/i386/coreboot/startup.S;
|
||||||
mips_yeeloong_startup = kern/mips/startup.S;
|
mips_startup = kern/mips/startup.S;
|
||||||
sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
|
sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
|
||||||
powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
|
powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
|
||||||
|
|
||||||
|
@ -77,11 +91,10 @@ kernel = {
|
||||||
noemu_nodist = symlist.c;
|
noemu_nodist = symlist.c;
|
||||||
|
|
||||||
i386_pc = kern/generic/rtc_get_time_ms.c;
|
i386_pc = kern/generic/rtc_get_time_ms.c;
|
||||||
x86_efi = kern/generic/rtc_get_time_ms.c;
|
|
||||||
i386_qemu = kern/generic/rtc_get_time_ms.c;
|
i386_qemu = kern/generic/rtc_get_time_ms.c;
|
||||||
i386_coreboot = kern/generic/rtc_get_time_ms.c;
|
i386_coreboot = kern/generic/rtc_get_time_ms.c;
|
||||||
i386_multiboot = kern/generic/rtc_get_time_ms.c;
|
i386_multiboot = kern/generic/rtc_get_time_ms.c;
|
||||||
mips_yeeloong = kern/generic/rtc_get_time_ms.c;
|
mips = kern/generic/rtc_get_time_ms.c;
|
||||||
|
|
||||||
ieee1275 = disk/ieee1275/ofdisk.c;
|
ieee1275 = disk/ieee1275/ofdisk.c;
|
||||||
ieee1275 = kern/ieee1275/cmain.c;
|
ieee1275 = kern/ieee1275/cmain.c;
|
||||||
|
@ -89,6 +102,7 @@ kernel = {
|
||||||
ieee1275 = kern/ieee1275/mmap.c;
|
ieee1275 = kern/ieee1275/mmap.c;
|
||||||
ieee1275 = kern/ieee1275/openfw.c;
|
ieee1275 = kern/ieee1275/openfw.c;
|
||||||
ieee1275 = term/ieee1275/ofconsole.c;
|
ieee1275 = term/ieee1275/ofconsole.c;
|
||||||
|
ieee1275 = kern/ieee1275/init.c;
|
||||||
|
|
||||||
terminfoinkernel = term/terminfo.c;
|
terminfoinkernel = term/terminfo.c;
|
||||||
terminfoinkernel = term/tparm.c;
|
terminfoinkernel = term/tparm.c;
|
||||||
|
@ -105,18 +119,24 @@ kernel = {
|
||||||
|
|
||||||
x86 = kern/i386/pit.c;
|
x86 = kern/i386/pit.c;
|
||||||
|
|
||||||
x86_efi = disk/efi/efidisk.c;
|
efi = disk/efi/efidisk.c;
|
||||||
x86_efi = kern/efi/efi.c;
|
efi = kern/efi/efi.c;
|
||||||
x86_efi = kern/efi/init.c;
|
efi = kern/efi/init.c;
|
||||||
x86_efi = kern/efi/mm.c;
|
efi = kern/efi/mm.c;
|
||||||
x86_efi = kern/i386/efi/init.c;
|
efi = term/efi/console.c;
|
||||||
x86_efi = term/efi/console.c;
|
|
||||||
|
|
||||||
i386_efi = kern/i386/tsc.c;
|
i386_efi = kern/i386/tsc.c;
|
||||||
|
i386_efi = kern/i386/efi/init.c;
|
||||||
|
|
||||||
x86_64_efi = kern/i386/tsc.c;
|
x86_64_efi = kern/i386/tsc.c;
|
||||||
x86_64_efi = kern/x86_64/dl.c;
|
x86_64_efi = kern/x86_64/dl.c;
|
||||||
x86_64_efi = kern/x86_64/efi/callwrap.S;
|
x86_64_efi = kern/x86_64/efi/callwrap.S;
|
||||||
|
x86_64_efi = kern/i386/efi/init.c;
|
||||||
|
|
||||||
|
ia64_efi = kern/ia64/efi/startup.S;
|
||||||
|
ia64_efi = kern/ia64/efi/init.c;
|
||||||
|
ia64_efi = kern/ia64/dl.c;
|
||||||
|
ia64_efi = kern/ia64/dl_helper.c;
|
||||||
|
|
||||||
i386_pc = kern/i386/pc/init.c;
|
i386_pc = kern/i386/pc/init.c;
|
||||||
i386_pc = kern/i386/pc/mmap.c;
|
i386_pc = kern/i386/pc/mmap.c;
|
||||||
|
@ -124,7 +144,7 @@ kernel = {
|
||||||
i386_pc = term/i386/pc/console.c;
|
i386_pc = term/i386/pc/console.c;
|
||||||
|
|
||||||
i386_qemu = bus/pci.c;
|
i386_qemu = bus/pci.c;
|
||||||
i386_qemu = kern/i386/qemu/init.c;
|
i386_qemu = kern/vga_init.c;
|
||||||
i386_qemu = kern/i386/qemu/mmap.c;
|
i386_qemu = kern/i386/qemu/mmap.c;
|
||||||
i386_qemu = kern/i386/tsc.c;
|
i386_qemu = kern/i386/tsc.c;
|
||||||
|
|
||||||
|
@ -134,43 +154,55 @@ kernel = {
|
||||||
i386_multiboot = kern/i386/multiboot_mmap.c;
|
i386_multiboot = kern/i386/multiboot_mmap.c;
|
||||||
i386_multiboot = kern/i386/tsc.c;
|
i386_multiboot = kern/i386/tsc.c;
|
||||||
|
|
||||||
i386_ieee1275 = kern/ieee1275/init.c;
|
mips = kern/mips/cache.S;
|
||||||
|
mips = kern/mips/dl.c;
|
||||||
|
mips = kern/mips/init.c;
|
||||||
|
|
||||||
mips_yeeloong = term/ns8250.c;
|
mips_qemu_mips = kern/mips/qemu_mips/init.c;
|
||||||
mips_yeeloong = bus/bonito.c;
|
mips_qemu_mips = term/ns8250.c;
|
||||||
mips_yeeloong = bus/cs5536.c;
|
mips_qemu_mips = term/serial.c;
|
||||||
mips_yeeloong = bus/pci.c;
|
mips_qemu_mips = term/at_keyboard.c;
|
||||||
mips_yeeloong = kern/mips/cache.S;
|
mips_qemu_mips = commands/keylayouts.c;
|
||||||
mips_yeeloong = kern/mips/dl.c;
|
mips_qemu_mips = term/i386/pc/vga_text.c;
|
||||||
mips_yeeloong = kern/mips/init.c;
|
mips_qemu_mips = term/i386/vga_common.c;
|
||||||
mips_yeeloong = kern/mips/yeeloong/init.c;
|
mips_qemu_mips = kern/vga_init.c;
|
||||||
mips_yeeloong = term/at_keyboard.c;
|
|
||||||
mips_yeeloong = term/serial.c;
|
mips_arc = kern/mips/arc/init.c;
|
||||||
mips_yeeloong = video/sm712.c;
|
mips_arc = term/arc/console.c;
|
||||||
|
mips_arc = disk/arc/arcdisk.c;
|
||||||
|
|
||||||
|
mips_loongson = term/ns8250.c;
|
||||||
|
mips_loongson = bus/bonito.c;
|
||||||
|
mips_loongson = bus/cs5536.c;
|
||||||
|
mips_loongson = bus/pci.c;
|
||||||
|
mips_loongson = kern/mips/loongson/init.c;
|
||||||
|
mips_loongson = term/at_keyboard.c;
|
||||||
|
mips_loongson = term/serial.c;
|
||||||
|
mips_loongson = video/sm712.c;
|
||||||
|
mips_loongson = video/sis315pro.c;
|
||||||
|
mips_loongson = video/radeon_fuloong2e.c;
|
||||||
extra_dist = video/sm712_init.c;
|
extra_dist = video/sm712_init.c;
|
||||||
mips_yeeloong = commands/keylayouts.c;
|
mips_loongson = commands/keylayouts.c;
|
||||||
|
|
||||||
powerpc_ieee1275 = kern/ieee1275/init.c;
|
|
||||||
powerpc_ieee1275 = kern/powerpc/cache.S;
|
powerpc_ieee1275 = kern/powerpc/cache.S;
|
||||||
powerpc_ieee1275 = kern/powerpc/dl.c;
|
powerpc_ieee1275 = kern/powerpc/dl.c;
|
||||||
|
|
||||||
sparc64_ieee1275 = kern/sparc64/cache.S;
|
sparc64_ieee1275 = kern/sparc64/cache.S;
|
||||||
sparc64_ieee1275 = kern/sparc64/dl.c;
|
sparc64_ieee1275 = kern/sparc64/dl.c;
|
||||||
sparc64_ieee1275 = kern/sparc64/ieee1275/ieee1275.c;
|
sparc64_ieee1275 = kern/sparc64/ieee1275/ieee1275.c;
|
||||||
sparc64_ieee1275 = kern/sparc64/ieee1275/init.c;
|
|
||||||
|
|
||||||
emu = disk/host.c;
|
emu = disk/host.c;
|
||||||
emu = gnulib/progname.c;
|
emu = gnulib/progname.c;
|
||||||
emu = gnulib/error.c;
|
emu = gnulib/error.c;
|
||||||
emu = kern/emu/cache.S;
|
emu = kern/emu/cache_s.S;
|
||||||
emu = kern/emu/console.c;
|
emu = kern/emu/console.c;
|
||||||
emu = kern/emu/getroot.c;
|
|
||||||
emu = kern/emu/hostdisk.c;
|
emu = kern/emu/hostdisk.c;
|
||||||
emu = kern/emu/hostfs.c;
|
emu = kern/emu/hostfs.c;
|
||||||
emu = kern/emu/main.c;
|
emu = kern/emu/main.c;
|
||||||
emu = kern/emu/misc.c;
|
emu = kern/emu/misc.c;
|
||||||
emu = kern/emu/mm.c;
|
emu = kern/emu/mm.c;
|
||||||
emu = kern/emu/time.c;
|
emu = kern/emu/time.c;
|
||||||
|
emu = kern/emu/cache.c;
|
||||||
|
|
||||||
videoinkernel = term/gfxterm.c;
|
videoinkernel = term/gfxterm.c;
|
||||||
videoinkernel = font/font.c;
|
videoinkernel = font/font.c;
|
||||||
|
@ -178,6 +210,7 @@ kernel = {
|
||||||
videoinkernel = io/bufio.c;
|
videoinkernel = io/bufio.c;
|
||||||
videoinkernel = video/bitmap.c;
|
videoinkernel = video/bitmap.c;
|
||||||
videoinkernel = video/bitmap_scale.c;
|
videoinkernel = video/bitmap_scale.c;
|
||||||
|
videoinkernel = video/colors.c;
|
||||||
videoinkernel = video/fb/fbblit.c;
|
videoinkernel = video/fb/fbblit.c;
|
||||||
videoinkernel = video/fb/fbfill.c;
|
videoinkernel = video/fb/fbfill.c;
|
||||||
videoinkernel = video/fb/fbutil.c;
|
videoinkernel = video/fb/fbutil.c;
|
||||||
|
@ -186,6 +219,7 @@ kernel = {
|
||||||
|
|
||||||
videoinkernel = commands/boot.c;
|
videoinkernel = commands/boot.c;
|
||||||
|
|
||||||
|
extra_dist = kern/i386/int.S;
|
||||||
extra_dist = kern/i386/realmode.S;
|
extra_dist = kern/i386/realmode.S;
|
||||||
extra_dist = kern/i386/pc/lzma_decode.S;
|
extra_dist = kern/i386/pc/lzma_decode.S;
|
||||||
extra_dist = kern/mips/cache_flush.S;
|
extra_dist = kern/mips/cache_flush.S;
|
||||||
|
@ -200,7 +234,7 @@ program = {
|
||||||
|
|
||||||
ldadd = 'kernel.img$(EXEEXT)';
|
ldadd = 'kernel.img$(EXEEXT)';
|
||||||
ldadd = '$(MODULE_FILES)';
|
ldadd = '$(MODULE_FILES)';
|
||||||
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
|
|
||||||
enable = emu;
|
enable = emu;
|
||||||
};
|
};
|
||||||
|
@ -212,7 +246,7 @@ program = {
|
||||||
emu_nodist = symlist.c;
|
emu_nodist = symlist.c;
|
||||||
|
|
||||||
ldadd = 'kernel.img$(EXEEXT)';
|
ldadd = 'kernel.img$(EXEEXT)';
|
||||||
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
|
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||||
|
|
||||||
enable = emu;
|
enable = emu;
|
||||||
};
|
};
|
||||||
|
@ -295,12 +329,12 @@ image = {
|
||||||
common = lib/xzembed/xz_dec_lzma2.c;
|
common = lib/xzembed/xz_dec_lzma2.c;
|
||||||
common = lib/xzembed/xz_dec_stream.c;
|
common = lib/xzembed/xz_dec_stream.c;
|
||||||
|
|
||||||
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
|
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1';
|
||||||
|
|
||||||
mips_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
|
|
||||||
|
|
||||||
objcopyflags = '-O binary';
|
objcopyflags = '-O binary';
|
||||||
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
mips_loongson_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
||||||
|
mips_qemu_mips_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
||||||
|
mips_arc_ldflags = '-static-libgcc -Wl,-Ttext,0x8bc00000';
|
||||||
ldadd = '-lgcc';
|
ldadd = '-lgcc';
|
||||||
cflags = '-static-libgcc';
|
cflags = '-static-libgcc';
|
||||||
enable = mips;
|
enable = mips;
|
||||||
|
@ -311,10 +345,12 @@ image = {
|
||||||
mips = boot/mips/startup_raw.S;
|
mips = boot/mips/startup_raw.S;
|
||||||
common = boot/decompressor/none.c;
|
common = boot/decompressor/none.c;
|
||||||
|
|
||||||
mips_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
|
cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1';
|
||||||
|
|
||||||
objcopyflags = '-O binary';
|
objcopyflags = '-O binary';
|
||||||
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
mips_loongson_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
||||||
|
mips_qemu_mips_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
||||||
|
mips_arc_ldflags = '-static-libgcc -Wl,-Ttext,0x8bc00000';
|
||||||
ldadd = '-lgcc';
|
ldadd = '-lgcc';
|
||||||
cflags = '-static-libgcc';
|
cflags = '-static-libgcc';
|
||||||
enable = mips;
|
enable = mips;
|
||||||
|
@ -322,9 +358,18 @@ image = {
|
||||||
|
|
||||||
image = {
|
image = {
|
||||||
name = fwstart;
|
name = fwstart;
|
||||||
mips_yeeloong = boot/mips/yeeloong/fwstart.S;
|
mips_loongson = boot/mips/loongson/fwstart.S;
|
||||||
objcopyflags = '-O binary';
|
objcopyflags = '-O binary';
|
||||||
enable = mips_yeeloong;
|
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
|
||||||
|
enable = mips_loongson;
|
||||||
|
};
|
||||||
|
|
||||||
|
image = {
|
||||||
|
name = fwstart_fuloong2f;
|
||||||
|
mips_loongson = boot/mips/loongson/fuloong2f.S;
|
||||||
|
objcopyflags = '-O binary';
|
||||||
|
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
|
||||||
|
enable = mips_loongson;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -348,18 +393,22 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = lsspd;
|
name = lsspd;
|
||||||
mips_yeeloong = commands/mips/yeeloong/lsspd.c;
|
mips_loongson = commands/mips/loongson/lsspd.c;
|
||||||
enable = mips_yeeloong;
|
enable = mips_loongson;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = usb;
|
name = usb;
|
||||||
common = bus/usb/usb.c;
|
common = bus/usb/usb.c;
|
||||||
noemu = bus/usb/usbtrans.c;
|
common = bus/usb/usbtrans.c;
|
||||||
noemu = bus/usb/usbhub.c;
|
common = bus/usb/usbhub.c;
|
||||||
enable = emu;
|
|
||||||
enable = usb;
|
enable = usb;
|
||||||
emu_condition = COND_GRUB_EMU_USB;
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = emuusb;
|
||||||
|
common = bus/usb/usb.c;
|
||||||
|
condition = COND_GRUB_EMU_USB;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -394,17 +443,29 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = pci;
|
name = pci;
|
||||||
noemu = bus/pci.c;
|
common = bus/pci.c;
|
||||||
emu = bus/emu/pci.c;
|
|
||||||
emu = commands/lspci.c;
|
|
||||||
|
|
||||||
enable = emu;
|
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
enable = x86_efi;
|
enable = i386_efi;
|
||||||
|
enable = x86_64_efi;
|
||||||
enable = i386_ieee1275;
|
enable = i386_ieee1275;
|
||||||
enable = i386_coreboot;
|
enable = i386_coreboot;
|
||||||
enable = i386_multiboot;
|
enable = i386_multiboot;
|
||||||
emu_condition = COND_GRUB_EMU_PCI;
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = emupci;
|
||||||
|
common = bus/emu/pci.c;
|
||||||
|
common = commands/lspci.c;
|
||||||
|
|
||||||
|
condition = COND_GRUB_EMU_PCI;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = lsdev;
|
||||||
|
common = commands/arc/lsdev.c;
|
||||||
|
|
||||||
|
enable = mips_arc;
|
||||||
};
|
};
|
||||||
|
|
||||||
library = {
|
library = {
|
||||||
|
@ -439,12 +500,12 @@ module = {
|
||||||
name = acpi;
|
name = acpi;
|
||||||
|
|
||||||
common = commands/acpi.c;
|
common = commands/acpi.c;
|
||||||
x86_efi = commands/efi/acpi.c;
|
efi = commands/efi/acpi.c;
|
||||||
i386_pc = commands/i386/pc/acpi.c;
|
i386_pc = commands/i386/pc/acpi.c;
|
||||||
i386_coreboot = commands/i386/pc/acpi.c;
|
i386_coreboot = commands/i386/pc/acpi.c;
|
||||||
i386_multiboot = commands/i386/pc/acpi.c;
|
i386_multiboot = commands/i386/pc/acpi.c;
|
||||||
|
|
||||||
enable = x86_efi;
|
enable = efi;
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
enable = i386_coreboot;
|
enable = i386_coreboot;
|
||||||
enable = i386_multiboot;
|
enable = i386_multiboot;
|
||||||
|
@ -455,7 +516,7 @@ module = {
|
||||||
|
|
||||||
common = commands/lsacpi.c;
|
common = commands/lsacpi.c;
|
||||||
|
|
||||||
enable = x86_efi;
|
enable = efi;
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
enable = i386_coreboot;
|
enable = i386_coreboot;
|
||||||
enable = i386_multiboot;
|
enable = i386_multiboot;
|
||||||
|
@ -466,7 +527,7 @@ module = {
|
||||||
|
|
||||||
common = commands/efi/lsefisystab.c;
|
common = commands/efi/lsefisystab.c;
|
||||||
|
|
||||||
enable = x86_efi;
|
enable = efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -474,7 +535,7 @@ module = {
|
||||||
|
|
||||||
common = commands/efi/lssal.c;
|
common = commands/efi/lssal.c;
|
||||||
|
|
||||||
enable = x86_efi;
|
enable = efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -482,7 +543,7 @@ module = {
|
||||||
|
|
||||||
common = commands/efi/lsefimmap.c;
|
common = commands/efi/lsefimmap.c;
|
||||||
|
|
||||||
enable = x86_efi;
|
enable = efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -545,8 +606,9 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = fixvideo;
|
name = fixvideo;
|
||||||
x86_efi = commands/efi/fixvideo.c;
|
common = commands/efi/fixvideo.c;
|
||||||
enable = x86_efi;
|
enable = i386_efi;
|
||||||
|
enable = x86_64_efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -561,15 +623,30 @@ module = {
|
||||||
i386_pc = commands/acpihalt.c;
|
i386_pc = commands/acpihalt.c;
|
||||||
i386_coreboot = commands/acpihalt.c;
|
i386_coreboot = commands/acpihalt.c;
|
||||||
i386_multiboot = commands/acpihalt.c;
|
i386_multiboot = commands/acpihalt.c;
|
||||||
x86_efi = commands/acpihalt.c;
|
i386_efi = commands/acpihalt.c;
|
||||||
|
x86_64_efi = commands/acpihalt.c;
|
||||||
i386_multiboot = lib/i386/halt.c;
|
i386_multiboot = lib/i386/halt.c;
|
||||||
i386_coreboot = lib/i386/halt.c;
|
i386_coreboot = lib/i386/halt.c;
|
||||||
i386_qemu = lib/i386/halt.c;
|
i386_qemu = lib/i386/halt.c;
|
||||||
x86_efi = lib/efi/halt.c;
|
efi = lib/efi/halt.c;
|
||||||
ieee1275 = lib/ieee1275/halt.c;
|
ieee1275 = lib/ieee1275/halt.c;
|
||||||
emu = lib/emu/halt.c;
|
emu = lib/emu/halt.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = reboot;
|
||||||
|
i386 = lib/i386/reboot.c;
|
||||||
|
i386 = lib/i386/reboot_trampoline.S;
|
||||||
|
ia64_efi = lib/efi/reboot.c;
|
||||||
|
x86_64_efi = lib/efi/reboot.c;
|
||||||
|
powerpc_ieee1275 = lib/ieee1275/reboot.c;
|
||||||
|
sparc64_ieee1275 = lib/ieee1275/reboot.c;
|
||||||
|
mips_arc = lib/mips/arc/reboot.c;
|
||||||
|
mips_loongson = lib/mips/loongson/reboot.c;
|
||||||
|
mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
|
||||||
|
common = commands/reboot.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = hashsum;
|
name = hashsum;
|
||||||
common = commands/hashsum.c;
|
common = commands/hashsum.c;
|
||||||
|
@ -580,6 +657,7 @@ module = {
|
||||||
common = commands/hdparm.c;
|
common = commands/hdparm.c;
|
||||||
common = lib/hexdump.c;
|
common = lib/hexdump.c;
|
||||||
enable = pci;
|
enable = pci;
|
||||||
|
enable = mips_qemu_mips;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -600,8 +678,9 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = loadbios;
|
name = loadbios;
|
||||||
x86_efi = commands/efi/loadbios.c;
|
common = commands/efi/loadbios.c;
|
||||||
enable = x86_efi;
|
enable = i386_efi;
|
||||||
|
enable = x86_64_efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -663,22 +742,11 @@ module = {
|
||||||
common = commands/probe.c;
|
common = commands/probe.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
|
||||||
name = pxecmd;
|
|
||||||
i386_pc = commands/i386/pc/pxecmd.c;
|
|
||||||
enable = i386_pc;
|
|
||||||
};
|
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = read;
|
name = read;
|
||||||
common = commands/read.c;
|
common = commands/read.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
|
||||||
name = reboot;
|
|
||||||
common = commands/reboot.c;
|
|
||||||
};
|
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = search;
|
name = search;
|
||||||
common = commands/search_wrap.c;
|
common = commands/search_wrap.c;
|
||||||
|
@ -737,8 +805,6 @@ module = {
|
||||||
name = usbtest;
|
name = usbtest;
|
||||||
common = commands/usbtest.c;
|
common = commands/usbtest.c;
|
||||||
enable = usb;
|
enable = usb;
|
||||||
enable = emu;
|
|
||||||
emu_condition = COND_GRUB_EMU_USB;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -766,6 +832,22 @@ module = {
|
||||||
common = disk/loopback.c;
|
common = disk/loopback.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = cryptodisk;
|
||||||
|
common = disk/cryptodisk.c;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = luks;
|
||||||
|
common = disk/luks.c;
|
||||||
|
common = disk/AFSplitter.c;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = geli;
|
||||||
|
common = disk/geli.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = lvm;
|
name = lvm;
|
||||||
common = disk/lvm.c;
|
common = disk/lvm.c;
|
||||||
|
@ -810,14 +892,22 @@ module = {
|
||||||
name = ata;
|
name = ata;
|
||||||
common = disk/ata.c;
|
common = disk/ata.c;
|
||||||
enable = pci;
|
enable = pci;
|
||||||
|
enable = mips_qemu_mips;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = ata_pthru;
|
name = ahci;
|
||||||
common = disk/ata_pthru.c;
|
common = disk/ahci.c;
|
||||||
enable = pci;
|
enable = pci;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = pata;
|
||||||
|
common = disk/pata.c;
|
||||||
|
enable = pci;
|
||||||
|
enable = mips_qemu_mips;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = biosdisk;
|
name = biosdisk;
|
||||||
i386_pc = disk/i386/pc/biosdisk.c;
|
i386_pc = disk/i386/pc/biosdisk.c;
|
||||||
|
@ -828,8 +918,6 @@ module = {
|
||||||
name = usbms;
|
name = usbms;
|
||||||
common = disk/usbms.c;
|
common = disk/usbms.c;
|
||||||
enable = usb;
|
enable = usb;
|
||||||
enable = emu;
|
|
||||||
emu_condition = COND_GRUB_EMU_USB;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -888,23 +976,16 @@ module = {
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = afs_be;
|
name = bfs;
|
||||||
common = fs/afs_be.c;
|
common = fs/bfs.c;
|
||||||
};
|
|
||||||
|
|
||||||
module = {
|
|
||||||
name = befs;
|
|
||||||
common = fs/befs.c;
|
|
||||||
};
|
|
||||||
|
|
||||||
module = {
|
|
||||||
name = befs_be;
|
|
||||||
common = fs/befs_be.c;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = btrfs;
|
name = btrfs;
|
||||||
common = fs/btrfs.c;
|
common = fs/btrfs.c;
|
||||||
|
common = lib/crc.c;
|
||||||
|
cflags = '$(CFLAGS_POSIX) -Wno-undef';
|
||||||
|
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -922,6 +1003,11 @@ module = {
|
||||||
common = fs/fat.c;
|
common = fs/fat.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = exfat;
|
||||||
|
common = fs/exfat.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = fshelp;
|
name = fshelp;
|
||||||
common = fs/fshelp.c;
|
common = fs/fshelp.c;
|
||||||
|
@ -957,6 +1043,11 @@ module = {
|
||||||
common = fs/minix2.c;
|
common = fs/minix2.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = minix3;
|
||||||
|
common = fs/minix3.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = nilfs2;
|
name = nilfs2;
|
||||||
common = fs/nilfs2.c;
|
common = fs/nilfs2.c;
|
||||||
|
@ -977,11 +1068,21 @@ module = {
|
||||||
common = fs/reiserfs.c;
|
common = fs/reiserfs.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = romfs;
|
||||||
|
common = fs/romfs.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = sfs;
|
name = sfs;
|
||||||
common = fs/sfs.c;
|
common = fs/sfs.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = squash4;
|
||||||
|
common = fs/squash4.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = tar;
|
name = tar;
|
||||||
common = fs/tar.c;
|
common = fs/tar.c;
|
||||||
|
@ -1015,6 +1116,11 @@ module = {
|
||||||
common = fs/zfs/zfs_fletcher.c;
|
common = fs/zfs/zfs_fletcher.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = zfscrypt;
|
||||||
|
common = fs/zfs/zfscrypt.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = zfsinfo;
|
name = zfsinfo;
|
||||||
common = fs/zfs/zfsinfo.c;
|
common = fs/zfs/zfsinfo.c;
|
||||||
|
@ -1022,7 +1128,7 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = pxe;
|
name = pxe;
|
||||||
i386_pc = fs/i386/pc/pxe.c;
|
i386_pc = net/drivers/i386/pc/pxe.c;
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1049,7 +1155,6 @@ module = {
|
||||||
common = gfxmenu/gui_progress_bar.c;
|
common = gfxmenu/gui_progress_bar.c;
|
||||||
common = gfxmenu/gui_util.c;
|
common = gfxmenu/gui_util.c;
|
||||||
common = gfxmenu/gui_string_util.c;
|
common = gfxmenu/gui_string_util.c;
|
||||||
common = gfxmenu/named_colors.c;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1095,7 +1200,7 @@ module = {
|
||||||
x86_64 = lib/x86_64/relocator_asm.S;
|
x86_64 = lib/x86_64/relocator_asm.S;
|
||||||
x86 = lib/i386/relocator.c;
|
x86 = lib/i386/relocator.c;
|
||||||
ieee1275 = lib/ieee1275/relocator.c;
|
ieee1275 = lib/ieee1275/relocator.c;
|
||||||
x86_efi = lib/efi/relocator.c;
|
efi = lib/efi/relocator.c;
|
||||||
mips = lib/mips/relocator_asm.S;
|
mips = lib/mips/relocator_asm.S;
|
||||||
mips = lib/mips/relocator.c;
|
mips = lib/mips/relocator.c;
|
||||||
powerpc = lib/powerpc/relocator_asm.S;
|
powerpc = lib/powerpc/relocator_asm.S;
|
||||||
|
@ -1112,9 +1217,13 @@ module = {
|
||||||
module = {
|
module = {
|
||||||
name = datetime;
|
name = datetime;
|
||||||
cmos = lib/cmos_datetime.c;
|
cmos = lib/cmos_datetime.c;
|
||||||
x86_efi = lib/efi/datetime.c;
|
efi = lib/efi/datetime.c;
|
||||||
sparc64_ieee1275 = lib/ieee1275/datetime.c;
|
sparc64_ieee1275 = lib/ieee1275/datetime.c;
|
||||||
powerpc_ieee1275 = lib/ieee1275/datetime.c;
|
powerpc_ieee1275 = lib/ieee1275/datetime.c;
|
||||||
|
sparc64_ieee1275 = lib/ieee1275/cmos.c;
|
||||||
|
powerpc_ieee1275 = lib/ieee1275/cmos.c;
|
||||||
|
|
||||||
|
mips_arc = lib/arc/datetime.c;
|
||||||
enable = noemu;
|
enable = noemu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1126,6 +1235,7 @@ module = {
|
||||||
extra_dist = lib/x86_64/setjmp.S;
|
extra_dist = lib/x86_64/setjmp.S;
|
||||||
extra_dist = lib/sparc64/setjmp.S;
|
extra_dist = lib/sparc64/setjmp.S;
|
||||||
extra_dist = lib/powerpc/setjmp.S;
|
extra_dist = lib/powerpc/setjmp.S;
|
||||||
|
extra_dist = lib/ia64/setjmp.S;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1159,6 +1269,12 @@ module = {
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = freedos;
|
||||||
|
i386_pc = loader/i386/pc/freedos.c;
|
||||||
|
enable = i386_pc;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = multiboot2;
|
name = multiboot2;
|
||||||
cppflags = "-DGRUB_USE_MULTIBOOT2";
|
cppflags = "-DGRUB_USE_MULTIBOOT2";
|
||||||
|
@ -1184,6 +1300,7 @@ module = {
|
||||||
mips = loader/mips/linux.c;
|
mips = loader/mips/linux.c;
|
||||||
powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
|
powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
|
||||||
sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
|
sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
|
||||||
|
ia64_efi = loader/ia64/efi/linux.c;
|
||||||
common = lib/cmdline.c;
|
common = lib/cmdline.c;
|
||||||
enable = noemu;
|
enable = noemu;
|
||||||
};
|
};
|
||||||
|
@ -1203,16 +1320,19 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = appleldr;
|
name = appleldr;
|
||||||
x86_efi = loader/efi/appleloader.c;
|
common = loader/efi/appleloader.c;
|
||||||
enable = x86_efi;
|
enable = i386_efi;
|
||||||
|
enable = x86_64_efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = chain;
|
name = chain;
|
||||||
x86_efi = loader/efi/chainloader.c;
|
efi = loader/efi/chainloader.c;
|
||||||
i386_pc = loader/i386/pc/chainloader.c;
|
i386_pc = loader/i386/pc/chainloader.c;
|
||||||
|
i386_coreboot = loader/i386/coreboot/chainloader.c;
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
enable = x86_efi;
|
enable = i386_coreboot;
|
||||||
|
enable = efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1224,12 +1344,13 @@ module = {
|
||||||
i386_pc = mmap/i386/pc/mmap.c;
|
i386_pc = mmap/i386/pc/mmap.c;
|
||||||
i386_pc = mmap/i386/pc/mmap_helper.S;
|
i386_pc = mmap/i386/pc/mmap_helper.S;
|
||||||
|
|
||||||
x86_efi = mmap/efi/mmap.c;
|
efi = mmap/efi/mmap.c;
|
||||||
|
|
||||||
mips_yeeloong = mmap/mips/yeeloong/uppermem.c;
|
mips = mmap/mips/uppermem.c;
|
||||||
|
|
||||||
enable = x86;
|
enable = x86;
|
||||||
enable = mips_yeeloong;
|
enable = ia64_efi;
|
||||||
|
enable = mips;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1269,7 +1390,7 @@ module = {
|
||||||
extra_dist = script/yylex.l;
|
extra_dist = script/yylex.l;
|
||||||
extra_dist = script/parser.y;
|
extra_dist = script/parser.y;
|
||||||
|
|
||||||
cflags = '$(CFLAGS_POSIX) -Wno-error';
|
cflags = '$(CFLAGS_POSIX)';
|
||||||
cppflags = '$(CPPFLAGS_POSIX)';
|
cppflags = '$(CPPFLAGS_POSIX)';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1303,6 +1424,11 @@ module = {
|
||||||
common = partmap/sun.c;
|
common = partmap/sun.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = part_dvh;
|
||||||
|
common = partmap/dvh.c;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = part_bsd;
|
name = part_bsd;
|
||||||
common = partmap/bsdlabel.c;
|
common = partmap/bsdlabel.c;
|
||||||
|
@ -1335,10 +1461,7 @@ module = {
|
||||||
common = term/serial.c;
|
common = term/serial.c;
|
||||||
x86 = term/ns8250.c;
|
x86 = term/ns8250.c;
|
||||||
|
|
||||||
enable = emu;
|
enable = x86;
|
||||||
enable = i386;
|
|
||||||
enable = x86_64_efi;
|
|
||||||
emu_condition = COND_GRUB_EMU_USB;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1362,8 +1485,10 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = vga;
|
name = vga;
|
||||||
i386_pc = video/i386/pc/vga.c;
|
common = video/i386/pc/vga.c;
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
|
enable = i386_coreboot;
|
||||||
|
enable = i386_multiboot;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1413,14 +1538,15 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = efi_gop;
|
name = efi_gop;
|
||||||
x86_efi = video/efi_gop.c;
|
efi = video/efi_gop.c;
|
||||||
enable = x86_efi;
|
enable = efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = efi_uga;
|
name = efi_uga;
|
||||||
x86_efi = video/efi_uga.c;
|
efi = video/efi_uga.c;
|
||||||
enable = x86_efi;
|
enable = i386_efi;
|
||||||
|
enable = x86_64_efi;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1440,8 +1566,10 @@ module = {
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = vbe;
|
name = vbe;
|
||||||
i386_pc = video/i386/pc/vbe.c;
|
common = video/i386/pc/vbe.c;
|
||||||
enable = i386_pc;
|
enable = i386_pc;
|
||||||
|
enable = i386_coreboot;
|
||||||
|
enable = i386_multiboot;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1456,14 +1584,14 @@ module = {
|
||||||
module = {
|
module = {
|
||||||
name = video;
|
name = video;
|
||||||
common = video/video.c;
|
common = video/video.c;
|
||||||
|
common = video/colors.c;
|
||||||
enable = videomodules;
|
enable = videomodules;
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = ieee1275_fb;
|
name = ieee1275_fb;
|
||||||
ieee1275 = video/ieee1275.c;
|
ieee1275 = video/ieee1275.c;
|
||||||
enable = powerpc;
|
enable = powerpc_ieee1275;
|
||||||
enable = sparc64;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
|
@ -1478,6 +1606,40 @@ module = {
|
||||||
common = hook/datehook.c;
|
common = hook/datehook.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = net;
|
||||||
|
common = net/net.c;
|
||||||
|
common = net/bootp.c;
|
||||||
|
common = net/ip.c;
|
||||||
|
common = net/udp.c;
|
||||||
|
common = net/ethernet.c;
|
||||||
|
common = net/arp.c;
|
||||||
|
common = net/netbuff.c;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = tftp;
|
||||||
|
common = net/tftp.c;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = ofnet;
|
||||||
|
common = net/drivers/ieee1275/ofnet.c;
|
||||||
|
enable = ieee1275;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = efinet;
|
||||||
|
common = net/drivers/efi/efinet.c;
|
||||||
|
enable = efi;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = emunet;
|
||||||
|
emu = net/drivers/emu/emunet.c;
|
||||||
|
enable = emu;
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = legacycfg;
|
name = legacycfg;
|
||||||
common = commands/legacycfg.c;
|
common = commands/legacycfg.c;
|
||||||
|
@ -1501,6 +1663,14 @@ module = {
|
||||||
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
|
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = lzopio;
|
||||||
|
common = io/lzopio.c;
|
||||||
|
common = lib/minilzo/minilzo.c;
|
||||||
|
cflags = '$(CFLAGS_POSIX) -Wno-undef';
|
||||||
|
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
|
||||||
|
};
|
||||||
|
|
||||||
module = {
|
module = {
|
||||||
name = testload;
|
name = testload;
|
||||||
common = commands/testload.c;
|
common = commands/testload.c;
|
||||||
|
@ -1517,3 +1687,24 @@ module = {
|
||||||
common = commands/keylayouts.c;
|
common = commands/keylayouts.c;
|
||||||
enable = videomodules;
|
enable = videomodules;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = time;
|
||||||
|
common = commands/time.c;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = cacheinfo;
|
||||||
|
common = commands/cacheinfo.c;
|
||||||
|
condition = COND_ENABLE_CACHE_STATS;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = adler32;
|
||||||
|
common = lib/adler32.c;
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = crc64;
|
||||||
|
common = lib/crc64.c;
|
||||||
|
};
|
||||||
|
|
|
@ -25,6 +25,9 @@ grub_decompress_core (void *src, void *dest, unsigned long n,
|
||||||
char *d = (char *) dest;
|
char *d = (char *) dest;
|
||||||
const char *s = (const char *) src;
|
const char *s = (const char *) src;
|
||||||
|
|
||||||
|
if (d == s)
|
||||||
|
return;
|
||||||
|
|
||||||
if (d < s)
|
if (d < s)
|
||||||
while (n--)
|
while (n--)
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/boot.h>
|
|
||||||
#include <grub/machine/boot.h>
|
#include <grub/machine/boot.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/boot.h>
|
|
||||||
#include <grub/machine/boot.h>
|
#include <grub/machine/boot.h>
|
||||||
#include <grub/machine/kernel.h>
|
#include <grub/machine/kernel.h>
|
||||||
#include <multiboot.h>
|
#include <multiboot.h>
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/boot.h>
|
|
||||||
#include <grub/machine/boot.h>
|
#include <grub/machine/boot.h>
|
||||||
#include <grub/machine/kernel.h>
|
#include <grub/machine/kernel.h>
|
||||||
#include <multiboot.h>
|
#include <multiboot.h>
|
||||||
|
@ -178,8 +177,13 @@ real_code_2:
|
||||||
pushw %es
|
pushw %es
|
||||||
popw %ds
|
popw %ds
|
||||||
|
|
||||||
|
#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
|
||||||
movl $0x200, %ecx
|
movl $0x200, %ecx
|
||||||
addl %ecx, %esi
|
addl %ecx, %esi
|
||||||
|
#else
|
||||||
|
movl $(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4), %ecx
|
||||||
|
addl $0x200, %esi
|
||||||
|
#endif
|
||||||
movl $DATA_ADDR, %edi
|
movl $DATA_ADDR, %edi
|
||||||
|
|
||||||
call LOCAL(move_memory)
|
call LOCAL(move_memory)
|
||||||
|
@ -196,7 +200,11 @@ real_code_2:
|
||||||
1:
|
1:
|
||||||
|
|
||||||
movl %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE), %ecx
|
movl %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE), %ecx
|
||||||
|
#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
|
||||||
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - 0x200), %ecx
|
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - 0x200), %ecx
|
||||||
|
#else
|
||||||
|
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4)), %ecx
|
||||||
|
#endif
|
||||||
|
|
||||||
2:
|
2:
|
||||||
call LOCAL(move_memory)
|
call LOCAL(move_memory)
|
||||||
|
|
2
grub-core/boot/mips/loongson/fuloong2f.S
Normal file
2
grub-core/boot/mips/loongson/fuloong2f.S
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#define FULOONG2F 1
|
||||||
|
#include "fwstart.S"
|
|
@ -16,51 +16,73 @@
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/mips/yeeloong/serial.h>
|
#include <grub/mips/loongson/serial.h>
|
||||||
#include <grub/mips/yeeloong/pci.h>
|
#include <grub/mips/loongson/pci.h>
|
||||||
#include <grub/mips/loongson.h>
|
#include <grub/mips/loongson.h>
|
||||||
#include <grub/pci.h>
|
#include <grub/pci.h>
|
||||||
#include <grub/machine/serial.h>
|
#include <grub/machine/serial.h>
|
||||||
|
#include <grub/machine/kernel.h>
|
||||||
#include <grub/ns8250.h>
|
#include <grub/ns8250.h>
|
||||||
#include <grub/cs5536.h>
|
#include <grub/cs5536.h>
|
||||||
#include <grub/smbus.h>
|
#include <grub/smbus.h>
|
||||||
|
|
||||||
|
#ifdef FULOONG2F
|
||||||
|
#define GRUB_MACHINE_SERIAL_PORT GRUB_MACHINE_SERIAL_PORT2
|
||||||
|
#define GRUB_MACHINE_SERIAL_DIVISOR_115200 GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200
|
||||||
|
#else
|
||||||
|
#define GRUB_MACHINE_SERIAL_PORT GRUB_MACHINE_SERIAL_PORT0
|
||||||
|
#define GRUB_MACHINE_SERIAL_DIVISOR_115200 GRUB_MACHINE_SERIAL_PORT0_DIVISOR_115200
|
||||||
|
#endif
|
||||||
|
|
||||||
.set noreorder
|
.set noreorder
|
||||||
.set noat
|
.set noat
|
||||||
.set nomacro
|
.set nomacro
|
||||||
|
.set mips3
|
||||||
|
|
||||||
.global start,_start,__start
|
.global start,_start,__start
|
||||||
start:
|
start:
|
||||||
_start:
|
_start:
|
||||||
__start:
|
__start:
|
||||||
|
/* Put serial init as soon as possible. But on Fuloong2f serial is past
|
||||||
|
Geode, so on Fuloong2f we need Geode first.
|
||||||
|
*/
|
||||||
|
#ifndef FULOONG2F
|
||||||
bal serial_hw_init
|
bal serial_hw_init
|
||||||
nop
|
nop
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Find CS5536 controller. */
|
/* Find CS5536 controller. */
|
||||||
/* $t4 chooses device in priority encoding. */
|
/* $t4 chooses device in priority encoding. */
|
||||||
/* Resulting value is kept in GRUB_MACHINE_PCI_CONF_CTRL_REG.
|
/* Resulting value is kept in GRUB_MACHINE_PCI_CONF_CTRL_REG.
|
||||||
This way we don't need to sacrifice a register for it. */
|
This way we don't need to sacrifice a register for it. */
|
||||||
|
retry_cs5536:
|
||||||
/* We have only one bus (0). Function is 0. */
|
/* We have only one bus (0). Function is 0. */
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR)
|
lui $t0, %hi(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR)
|
||||||
lui $t1, %hi(GRUB_MACHINE_PCI_CONFSPACE)
|
lui $t1, %hi(GRUB_MACHINE_PCI_CONFSPACE)
|
||||||
lui $t3, %hi(GRUB_CS5536_PCIID)
|
lui $t3, %hi(GRUB_CS5536_PCIID)
|
||||||
addiu $t3, $t3, %lo(GRUB_CS5536_PCIID)
|
addiu $t3, $t3, %lo(GRUB_CS5536_PCIID)
|
||||||
ori $t4, $zero, 1
|
ori $t4, $zero, 1
|
||||||
lui $a0, %hi(no_cs5536)
|
|
||||||
1:
|
1:
|
||||||
andi $t4, $t4, ((1 << GRUB_PCI_NUM_DEVICES) - 1)
|
andi $t4, $t4, ((1 << GRUB_PCI_NUM_DEVICES) - 1)
|
||||||
beql $t4, $zero, fatal
|
/* In case of failure try again. CS5536 may be slow to come up. */
|
||||||
addiu $a0, $a0, %lo(no_cs5536)
|
beql $t4, $zero, retry_cs5536
|
||||||
|
nop
|
||||||
sw $t4, %lo(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR) ($t0)
|
sw $t4, %lo(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR) ($t0)
|
||||||
lw $t2, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_PCI_REG_PCI_ID) ($t1)
|
lw $t2, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_PCI_REG_PCI_ID) ($t1)
|
||||||
bnel $t2, $t3, 1b
|
bnel $t2, $t3, 1b
|
||||||
sll $t4, $t4, 1
|
sll $t4, $t4, 1
|
||||||
|
|
||||||
|
#ifndef FULOONG2F
|
||||||
bal message
|
bal message
|
||||||
addiu $a0, $a0, %lo(cs5536_found)
|
addiu $a0, $a0, %lo(cs5536_found)
|
||||||
bal printhex
|
bal printhex
|
||||||
move $a0, $t4
|
move $a0, $t4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
lui $t0, %hi(GRUB_MACHINE_PCI_CONFSPACE)
|
||||||
|
li $t1, GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED
|
||||||
|
sw $t1, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_CS5536_MSR_MAILBOX_CONFIG) ($t0)
|
||||||
|
|
||||||
/* Initialise SMBus controller. */
|
|
||||||
/* Set GPIO LBAR. */
|
/* Set GPIO LBAR. */
|
||||||
lui $a0, %hi(GRUB_CS5536_MSR_GPIO_BAR)
|
lui $a0, %hi(GRUB_CS5536_MSR_GPIO_BAR)
|
||||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_GPIO_BAR)
|
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_GPIO_BAR)
|
||||||
|
@ -70,6 +92,15 @@ __start:
|
||||||
ori $a2, $zero, ((GRUB_CS5536_LBAR_MASK_MASK \
|
ori $a2, $zero, ((GRUB_CS5536_LBAR_MASK_MASK \
|
||||||
| GRUB_CS5536_LBAR_ENABLE) >> 32)
|
| GRUB_CS5536_LBAR_ENABLE) >> 32)
|
||||||
|
|
||||||
|
bal gpio_init
|
||||||
|
nop
|
||||||
|
|
||||||
|
#ifdef FULOONG2F
|
||||||
|
bal serial_hw_init
|
||||||
|
nop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialise SMBus controller. */
|
||||||
/* Set SMBUS LBAR. */
|
/* Set SMBUS LBAR. */
|
||||||
lui $a0, %hi(GRUB_CS5536_MSR_SMB_BAR)
|
lui $a0, %hi(GRUB_CS5536_MSR_SMB_BAR)
|
||||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_SMB_BAR)
|
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_SMB_BAR)
|
||||||
|
@ -83,14 +114,6 @@ __start:
|
||||||
bal message
|
bal message
|
||||||
addiu $a0, $a0, %lo(smbus_enabled)
|
addiu $a0, $a0, %lo(smbus_enabled)
|
||||||
|
|
||||||
/* Enable SMBus controller pins. */
|
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO)
|
|
||||||
ori $t1, $zero, GRUB_GPIO_SMBUS_PINS
|
|
||||||
sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_OUT_EN) ($t0)
|
|
||||||
sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_OUT_AUX1) ($t0)
|
|
||||||
sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_IN_EN) ($t0)
|
|
||||||
sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_IN_AUX1) ($t0)
|
|
||||||
|
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS)
|
lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS)
|
||||||
|
|
||||||
/* Disable SMB. */
|
/* Disable SMB. */
|
||||||
|
@ -107,7 +130,7 @@ __start:
|
||||||
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL3) ($t0)
|
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL3) ($t0)
|
||||||
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
|
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
|
||||||
|
|
||||||
/* Yeeloong has only one memory slot. */
|
/* Yeeloong and Fuloong2f have only one memory slot. */
|
||||||
/* Output first byte on serial for debugging. */
|
/* Output first byte on serial for debugging. */
|
||||||
ori $a1, $zero, GRUB_SMB_RAM_START_ADDR
|
ori $a1, $zero, GRUB_SMB_RAM_START_ADDR
|
||||||
bal read_spd
|
bal read_spd
|
||||||
|
@ -120,7 +143,7 @@ __start:
|
||||||
ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2
|
ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2
|
||||||
lui $a0, %hi(unimplemented_memory_type)
|
lui $a0, %hi(unimplemented_memory_type)
|
||||||
bne $t0, $v0, fatal
|
bne $t0, $v0, fatal
|
||||||
addiu $a0, $a0, %hi(unimplemented_memory_type)
|
addiu $a0, $a0, %lo(unimplemented_memory_type)
|
||||||
|
|
||||||
/* And here is our goal: DDR2 controller initialisation. */
|
/* And here is our goal: DDR2 controller initialisation. */
|
||||||
lui $t0, %hi(GRUB_CPU_LOONGSON_CORECFG)
|
lui $t0, %hi(GRUB_CPU_LOONGSON_CORECFG)
|
||||||
|
@ -206,10 +229,54 @@ other_exception:
|
||||||
b fatal
|
b fatal
|
||||||
addiu $a0, $a0, %lo(unhandled_exception)
|
addiu $a0, $a0, %lo(unhandled_exception)
|
||||||
|
|
||||||
|
gpio_init:
|
||||||
|
lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO)
|
||||||
|
addiu $t0, $t0, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO)
|
||||||
|
lui $t1, %hi (gpio_dump)
|
||||||
|
addiu $t1, $t1, %lo (gpio_dump)
|
||||||
|
|
||||||
|
1:
|
||||||
|
lw $t2, 0($t1)
|
||||||
|
sw $t2, 0($t0)
|
||||||
|
addiu $t0, $t0, 4
|
||||||
|
addiu $t1, $t1, 4
|
||||||
|
lui $t2, %hi (gpio_dump_end)
|
||||||
|
addiu $t2, $t2, %lo (gpio_dump_end)
|
||||||
|
bne $t1, $t2, 1b
|
||||||
|
nop
|
||||||
|
jr $ra
|
||||||
|
nop
|
||||||
|
|
||||||
/* Same as similarly named C function but in asm since
|
/* Same as similarly named C function but in asm since
|
||||||
we need it early. */
|
we need it early. */
|
||||||
/* In: none. Out: none. Clobbered: $t0, $t1, $a0. */
|
/* In: none. Out: none. Clobbered: $t0, $t1, $t2, $a0, $a1, $a2. */
|
||||||
serial_hw_init:
|
serial_hw_init:
|
||||||
|
move $t2, $ra
|
||||||
|
#ifdef FULOONG2F
|
||||||
|
lui $a0, %hi(GRUB_CS5536_MSR_DIVIL_LEG_IO)
|
||||||
|
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_DIVIL_LEG_IO)
|
||||||
|
lui $a1, %hi (GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3 \
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP \
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86 \
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1)
|
||||||
|
ori $a1, $a1, (GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0 \
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1)
|
||||||
|
bal wrmsr
|
||||||
|
move $a2, $zero
|
||||||
|
|
||||||
|
lui $a0, %hi(GRUB_CS5536_MSR_DIVIL_UART1_CONF)
|
||||||
|
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_DIVIL_UART1_CONF)
|
||||||
|
li $a1, 2
|
||||||
|
bal wrmsr
|
||||||
|
move $a2, $zero
|
||||||
|
|
||||||
|
lui $a0, %hi(GRUB_CS5536_MSR_DIVIL_UART2_CONF)
|
||||||
|
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_DIVIL_UART2_CONF)
|
||||||
|
li $a1, 2
|
||||||
|
bal wrmsr
|
||||||
|
move $a2, $zero
|
||||||
|
#endif
|
||||||
|
|
||||||
lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
|
lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
|
||||||
|
|
||||||
/* Turn off the interrupt. */
|
/* Turn off the interrupt. */
|
||||||
|
@ -239,6 +306,7 @@ serial_hw_init:
|
||||||
/* Let message return to original caller. */
|
/* Let message return to original caller. */
|
||||||
lui $a0, %hi(notification_string)
|
lui $a0, %hi(notification_string)
|
||||||
addiu $a0, $a0, %lo(notification_string)
|
addiu $a0, $a0, %lo(notification_string)
|
||||||
|
move $ra, $t2
|
||||||
|
|
||||||
/* Print message on serial console. */
|
/* Print message on serial console. */
|
||||||
/* In: $a0 = asciiz message. Out: none. Clobbered: $t0, $t1, $a0. */
|
/* In: $a0 = asciiz message. Out: none. Clobbered: $t0, $t1, $a0. */
|
||||||
|
@ -379,7 +447,6 @@ read_spd_fail:
|
||||||
ori $v0, $v0, 0x100
|
ori $v0, $v0, 0x100
|
||||||
|
|
||||||
notification_string: .asciz "GRUB "
|
notification_string: .asciz "GRUB "
|
||||||
no_cs5536: .asciz "No CS5536 found.\n\r"
|
|
||||||
cs5536_found: .asciz "CS5536 at "
|
cs5536_found: .asciz "CS5536 at "
|
||||||
sm_failed: .asciz "SM transaction failed.\n\r"
|
sm_failed: .asciz "SM transaction failed.\n\r"
|
||||||
unhandled_tlb_refill: .asciz "Unhandled TLB refill.\n\r"
|
unhandled_tlb_refill: .asciz "Unhandled TLB refill.\n\r"
|
||||||
|
@ -404,14 +471,22 @@ regdump:
|
||||||
.quad 0x0100020200010101 /* 4 */
|
.quad 0x0100020200010101 /* 4 */
|
||||||
.quad 0x0a04030603050203 /* 6 */
|
.quad 0x0a04030603050203 /* 6 */
|
||||||
.quad 0x0f0e040000010a0b /* 7 */
|
.quad 0x0f0e040000010a0b /* 7 */
|
||||||
|
#ifdef FULOONG2F
|
||||||
|
.quad 0x0000000100000001 /* 8 */
|
||||||
|
#else
|
||||||
.quad 0x0000010200000102 /* 8 */
|
.quad 0x0000010200000102 /* 8 */
|
||||||
|
#endif
|
||||||
.quad 0x0000060c00000000 /* 9 */
|
.quad 0x0000060c00000000 /* 9 */
|
||||||
.quad 0x2323233f3f1f0200 /* a */
|
.quad 0x2323233f3f1f0200 /* a */
|
||||||
.quad 0x5f7f232323232323 /* b */
|
.quad 0x5f7f232323232323 /* b */
|
||||||
.quad 0x002a3c0615000000 /* c */
|
.quad 0x002a3c0615000000 /* c */
|
||||||
.quad 0x002a002a002a002a /* d */
|
.quad 0x002a002a002a002a /* d */
|
||||||
.quad 0x002a002a002a002a /* e */
|
.quad 0x002a002a002a002a /* e */
|
||||||
|
#ifdef FULOONG2F
|
||||||
|
.quad 0x00b40020005b0004 /* f */
|
||||||
|
#else
|
||||||
.quad 0x00b40020006d0004 /* f */
|
.quad 0x00b40020006d0004 /* f */
|
||||||
|
#endif
|
||||||
.quad 0x070007ff00000087 /* 10 */
|
.quad 0x070007ff00000087 /* 10 */
|
||||||
.quad 0x000000000016101f /* 11 */
|
.quad 0x000000000016101f /* 11 */
|
||||||
.quad 0x001c000000000000 /* 12 */
|
.quad 0x001c000000000000 /* 12 */
|
||||||
|
@ -426,6 +501,45 @@ regdump:
|
||||||
.quad 0 /* 1b */
|
.quad 0 /* 1b */
|
||||||
.quad 0 /* 1c */
|
.quad 0 /* 1c */
|
||||||
|
|
||||||
|
/* Dump of GPIO connections. FIXME: Remove useless and macroify. */
|
||||||
|
gpio_dump:
|
||||||
|
#ifdef FULOONG2F
|
||||||
|
.long 0xffff0000, 0x2eefd110, 0xffff0000, 0xffff0000
|
||||||
|
.long 0x2eefd110, 0xffff0000, 0x1000efff, 0xefff1000
|
||||||
|
.long 0x3df3c20c, 0xffff0000, 0xffff0000, 0xffff0000
|
||||||
|
.long 0x7df3820c, 0x3df3c20c, 0xffff0000, 0x00000000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0x3de3c21c, 0x3d83c27c
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0x0000ffff, 0xffff0000
|
||||||
|
.long 0xefff1000, 0xffff0000, 0xffff0000, 0xffff0000
|
||||||
|
.long 0xefff1000, 0xefff1000, 0xffff0000, 0x00000000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0xefff1000, 0xefff1000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
#else
|
||||||
|
.long 0xffff0000, 0x2ffdd002, 0xffff0000, 0xffff0000
|
||||||
|
.long 0x2fffd000, 0xffff0000, 0x1000efff, 0xefff1000
|
||||||
|
.long 0x3ffbc004, 0xffff0000, 0xffff0000, 0xffff0000
|
||||||
|
.long 0x3ffbc004, 0x3ffbc004, 0xffff0000, 0x00000000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0x3ffbc004, 0x3f9bc064
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0x0000ffff, 0xffff0000
|
||||||
|
.long 0xefff1000, 0xffff0000, 0xffff0000, 0xffff0000
|
||||||
|
.long 0xefff1000, 0xefff1000, 0xffff0000, 0x00000000
|
||||||
|
.long 0xffff0000, 0xffff0000, 0xefff1000, 0xffff0000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||||
|
.long 0x00000000, 0x50000000, 0x00000000, 0x00000000
|
||||||
|
#endif
|
||||||
|
gpio_dump_end:
|
||||||
|
|
||||||
.p2align
|
.p2align
|
||||||
|
|
||||||
write_dumpreg:
|
write_dumpreg:
|
||||||
|
@ -626,6 +740,10 @@ continue:
|
||||||
lui $t0, %hi(cached_continue - 0x20000000)
|
lui $t0, %hi(cached_continue - 0x20000000)
|
||||||
addiu $t0, $t0, %lo(cached_continue - 0x20000000)
|
addiu $t0, $t0, %lo(cached_continue - 0x20000000)
|
||||||
jr $t0
|
jr $t0
|
||||||
addiu $a2, $zero, -1
|
#ifdef FULOONG2F
|
||||||
|
addiu $a2, $zero, -(1 + GRUB_ARCH_MACHINE_FULOONG2F)
|
||||||
|
#else
|
||||||
|
addiu $a2, $zero, -(1 + GRUB_ARCH_MACHINE_YEELOONG)
|
||||||
|
#endif
|
||||||
|
|
||||||
cached_continue:
|
cached_continue:
|
|
@ -20,6 +20,7 @@
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/offsets.h>
|
#include <grub/offsets.h>
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
|
#include <grub/machine/kernel.h>
|
||||||
#include <grub/offsets.h>
|
#include <grub/offsets.h>
|
||||||
|
|
||||||
#define BASE_ADDR 8
|
#define BASE_ADDR 8
|
||||||
|
@ -43,21 +44,45 @@ compressed_size:
|
||||||
. = _start + GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE
|
. = _start + GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE
|
||||||
uncompressed_size:
|
uncompressed_size:
|
||||||
.long 0
|
.long 0
|
||||||
|
. = _start + GRUB_KERNEL_MACHINE_UNCOMPRESSED_ADDR
|
||||||
|
uncompressed_addr:
|
||||||
|
.long 0
|
||||||
codestart:
|
codestart:
|
||||||
/* Save our base. */
|
/* Save our base. */
|
||||||
move $s0, $ra
|
move $s0, $ra
|
||||||
|
|
||||||
/* Parse arguments. Has to be done before relocation.
|
/* Parse arguments. Has to be done before relocation.
|
||||||
So need to do it in asm. */
|
So need to do it in asm. */
|
||||||
#ifdef GRUB_MACHINE_MIPS_YEELOONG
|
#ifdef GRUB_MACHINE_MIPS_QEMU_MIPS
|
||||||
|
lui $t0, %hi (((16 << 20) - 264 + 4) | 0x80000000)
|
||||||
|
lw $t1, %lo (((16 << 20) - 264 + 4) | 0x80000000) ($t0)
|
||||||
|
|
||||||
|
lui $t2, 0x1234
|
||||||
|
ori $t2, 0x5678
|
||||||
|
|
||||||
|
bne $t1, $t2, 1f
|
||||||
|
nop
|
||||||
|
|
||||||
|
lui $t0, %hi (((16 << 20) - 264) | 0x80000000)
|
||||||
|
b 2f
|
||||||
|
lw $s4, %lo (((16 << 20) - 264) | 0x80000000) ($t0)
|
||||||
|
|
||||||
|
1:
|
||||||
|
li $s4, 0
|
||||||
|
2:
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||||
move $s2, $zero
|
move $s2, $zero
|
||||||
move $s3, $zero
|
move $s3, $zero
|
||||||
move $s4, $zero
|
move $s4, $zero
|
||||||
move $s5, $zero
|
move $s5, $zero
|
||||||
|
move $s7, $zero
|
||||||
|
|
||||||
/* $a2 has the environment. */
|
/* $a2 has the environment. */
|
||||||
addiu $t0, $a2, 1
|
addiu $t0, $zero, -0x10
|
||||||
beq $t0, $zero, argdone
|
and $t1, $a2, $t0
|
||||||
|
beq $t0, $t1, argfw
|
||||||
nop
|
nop
|
||||||
move $t0, $a2
|
move $t0, $a2
|
||||||
argcont:
|
argcont:
|
||||||
|
@ -73,10 +98,18 @@ argcont:
|
||||||
b 2f;\
|
b 2f;\
|
||||||
move reg, $v0; \
|
move reg, $v0; \
|
||||||
1:
|
1:
|
||||||
|
#define DO_CHECKT1(str, val) \
|
||||||
|
move $t6, $t1 ;\
|
||||||
|
addiu $t7, $s0, (str - base);\
|
||||||
|
bal do_check ;\
|
||||||
|
li $t2, val
|
||||||
|
|
||||||
DO_PARSE (busclockstr, $s2)
|
DO_PARSE (busclockstr, $s2)
|
||||||
DO_PARSE (cpuclockstr, $s3)
|
DO_PARSE (cpuclockstr, $s3)
|
||||||
DO_PARSE (memsizestr, $s4)
|
DO_PARSE (memsizestr, $s4)
|
||||||
DO_PARSE (highmemsizestr, $s5)
|
DO_PARSE (highmemsizestr, $s5)
|
||||||
|
DO_CHECKT1 (pmon_yeeloong_verstr, GRUB_ARCH_MACHINE_YEELOONG)
|
||||||
|
DO_CHECKT1 (pmon_fuloong2f_verstr, GRUB_ARCH_MACHINE_FULOONG2F)
|
||||||
2:
|
2:
|
||||||
b argcont
|
b argcont
|
||||||
addiu $t0, $t0, 4
|
addiu $t0, $t0, 4
|
||||||
|
@ -120,8 +153,49 @@ busclockstr: .asciiz "busclock="
|
||||||
cpuclockstr: .asciiz "cpuclock="
|
cpuclockstr: .asciiz "cpuclock="
|
||||||
memsizestr: .asciiz "memsize="
|
memsizestr: .asciiz "memsize="
|
||||||
highmemsizestr: .asciiz "highmemsize="
|
highmemsizestr: .asciiz "highmemsize="
|
||||||
|
machtype_yeeloong_str1: .asciiz "machtype=8.9"
|
||||||
|
machtype_yeeloong_str2: .asciiz "machtype=lemote-yeeloong-"
|
||||||
|
machtype_fuloong2f_str: .asciiz "machtype=lemote-fuloong-2f"
|
||||||
|
machtype_fuloong2e_str: .asciiz "machtype=lemote-fuloong-2e"
|
||||||
|
pmon_yeeloong_str: .asciiz "PMON_VER=LM8"
|
||||||
|
pmon_fuloong2f_str: .asciiz "PMON_VER=LM6"
|
||||||
|
pmon_yeeloong_verstr: .asciiz "Version=LM8"
|
||||||
|
pmon_fuloong2f_verstr: .asciiz "Version=LM6"
|
||||||
.p2align 2
|
.p2align 2
|
||||||
|
|
||||||
argdone:
|
argdone:
|
||||||
|
beq $a0, $zero, cmdlinedone
|
||||||
|
nop
|
||||||
|
#define DO_CHECKA1(str, val) \
|
||||||
|
lw $t6, 0($a1) ;\
|
||||||
|
addiu $t7, $s0, (str - base);\
|
||||||
|
bal do_check ;\
|
||||||
|
li $t2, val
|
||||||
|
DO_CHECKA1 (machtype_yeeloong_str1, GRUB_ARCH_MACHINE_YEELOONG)
|
||||||
|
DO_CHECKA1 (machtype_yeeloong_str2, GRUB_ARCH_MACHINE_YEELOONG)
|
||||||
|
DO_CHECKA1 (pmon_yeeloong_str, GRUB_ARCH_MACHINE_YEELOONG)
|
||||||
|
DO_CHECKA1 (machtype_fuloong2f_str, GRUB_ARCH_MACHINE_FULOONG2F)
|
||||||
|
DO_CHECKA1 (machtype_fuloong2e_str, GRUB_ARCH_MACHINE_FULOONG2E)
|
||||||
|
DO_CHECKA1 (pmon_fuloong2f_str, GRUB_ARCH_MACHINE_FULOONG2F)
|
||||||
|
addiu $a0, $a0, -1
|
||||||
|
b argdone
|
||||||
|
addiu $a1, $a1, 4
|
||||||
|
do_check:
|
||||||
|
lb $t4, 0($t7)
|
||||||
|
beq $t4, $zero, 1f
|
||||||
|
lb $t3, 0($t6)
|
||||||
|
bne $t3, $t4, 2f
|
||||||
|
addiu $t6, $t6, 1
|
||||||
|
b do_check
|
||||||
|
addiu $t7, $t7, 1
|
||||||
|
1:
|
||||||
|
move $s7, $t2
|
||||||
|
2:
|
||||||
|
jr $ra
|
||||||
|
nop
|
||||||
|
argfw:
|
||||||
|
not $s7, $a2
|
||||||
|
cmdlinedone:
|
||||||
#endif
|
#endif
|
||||||
/* Copy the decompressor. */
|
/* Copy the decompressor. */
|
||||||
lui $t1, %hi(base)
|
lui $t1, %hi(base)
|
||||||
|
@ -150,6 +224,13 @@ argdone:
|
||||||
b 1b
|
b 1b
|
||||||
addiu $t1, $t1, 1
|
addiu $t1, $t1, 1
|
||||||
2:
|
2:
|
||||||
|
lui $a0, %hi(base)
|
||||||
|
addiu $a0, $a0, %lo(base)
|
||||||
|
lui $a1, %hi(_end)
|
||||||
|
addiu $a1, %lo(_end)
|
||||||
|
subu $a1,$a1,$a0
|
||||||
|
|
||||||
|
#include "../../kern/mips/cache_flush.S"
|
||||||
|
|
||||||
/* Decompress the payload. */
|
/* Decompress the payload. */
|
||||||
lui $a0, %hi(__bss_start)
|
lui $a0, %hi(__bss_start)
|
||||||
|
@ -159,8 +240,7 @@ argdone:
|
||||||
subu $a0, $a0, $t0
|
subu $a0, $a0, $t0
|
||||||
addu $a0, $a0, $s0
|
addu $a0, $a0, $s0
|
||||||
|
|
||||||
lui $a1, %hi(GRUB_MACHINE_LINK_ADDR)
|
lw $a1, (GRUB_KERNEL_MACHINE_UNCOMPRESSED_ADDR - BASE_ADDR)($s0)
|
||||||
addiu $a1, %lo(GRUB_MACHINE_LINK_ADDR)
|
|
||||||
lw $a2, (GRUB_KERNEL_MACHINE_COMPRESSED_SIZE - BASE_ADDR)($s0)
|
lw $a2, (GRUB_KERNEL_MACHINE_COMPRESSED_SIZE - BASE_ADDR)($s0)
|
||||||
lw $a3, (GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE - BASE_ADDR)($s0)
|
lw $a3, (GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE - BASE_ADDR)($s0)
|
||||||
move $s1, $a1
|
move $s1, $a1
|
||||||
|
@ -170,9 +250,11 @@ argdone:
|
||||||
*/
|
*/
|
||||||
move $s6, $a3
|
move $s6, $a3
|
||||||
|
|
||||||
lui $sp, %hi(_start - 256)
|
lui $t0, %hi(EXT_C(grub_decompress_core))
|
||||||
|
addiu $t0, $t0, %lo(EXT_C(grub_decompress_core))
|
||||||
|
|
||||||
bal EXT_C(grub_decompress_core)
|
lui $sp, %hi(_start - 256)
|
||||||
|
jalr $t0
|
||||||
addiu $sp, $sp, %lo(_start - 256)
|
addiu $sp, $sp, %lo(_start - 256)
|
||||||
|
|
||||||
move $a0, $s1
|
move $a0, $s1
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/boot.h>
|
|
||||||
#include <grub/machine/boot.h>
|
#include <grub/machine/boot.h>
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
@ -29,9 +28,6 @@ pic_base:
|
||||||
call boot_continue
|
call boot_continue
|
||||||
mov %o4, CIF_REG
|
mov %o4, CIF_REG
|
||||||
|
|
||||||
. = _start + GRUB_BOOT_MACHINE_VER_MAJ
|
|
||||||
boot_version: .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
|
|
||||||
|
|
||||||
/* The offsets to these locations are defined by the
|
/* The offsets to these locations are defined by the
|
||||||
* GRUB_BOOT_MACHINE_foo macros in include/grub/sparc/ieee1275/boot.h,
|
* GRUB_BOOT_MACHINE_foo macros in include/grub/sparc/ieee1275/boot.h,
|
||||||
* and grub-setup uses this to patch these next three values as needed.
|
* and grub-setup uses this to patch these next three values as needed.
|
||||||
|
@ -44,6 +40,7 @@ boot_version: .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
|
||||||
* After loading in that block we will execute it by jumping to the
|
* After loading in that block we will execute it by jumping to the
|
||||||
* load address plus the size of the prepended A.OUT header (32 bytes).
|
* load address plus the size of the prepended A.OUT header (32 bytes).
|
||||||
*/
|
*/
|
||||||
|
. = _start + GRUB_BOOT_MACHINE_BOOT_DEVPATH
|
||||||
boot_path:
|
boot_path:
|
||||||
. = _start + GRUB_BOOT_MACHINE_KERNEL_BYTE
|
. = _start + GRUB_BOOT_MACHINE_KERNEL_BYTE
|
||||||
boot_path_end:
|
boot_path_end:
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/boot.h>
|
|
||||||
#include <grub/machine/boot.h>
|
#include <grub/machine/boot.h>
|
||||||
#include <grub/offsets.h>
|
#include <grub/offsets.h>
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ write_bases (void)
|
||||||
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
|
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
|
||||||
reg |= (((base_win[i] >> GRUB_MACHINE_PCI_WIN_SHIFT)
|
reg |= (((base_win[i] >> GRUB_MACHINE_PCI_WIN_SHIFT)
|
||||||
& GRUB_MACHINE_PCI_WIN_MASK)
|
& GRUB_MACHINE_PCI_WIN_MASK)
|
||||||
>> (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE));
|
<< (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE));
|
||||||
GRUB_MACHINE_PCI_IO_CTRL_REG = reg;
|
GRUB_MACHINE_PCI_IO_CTRL_REG = reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,13 @@
|
||||||
#include <grub/pci.h>
|
#include <grub/pci.h>
|
||||||
#include <grub/time.h>
|
#include <grub/time.h>
|
||||||
#include <grub/ata.h>
|
#include <grub/ata.h>
|
||||||
|
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||||
|
#include <grub/machine/kernel.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <grub/dl.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
int
|
int
|
||||||
grub_cs5536_find (grub_pci_device_t *devp)
|
grub_cs5536_find (grub_pci_device_t *devp)
|
||||||
|
@ -213,26 +220,6 @@ grub_cs5536_read_spd (grub_port_t smbbase, grub_uint8_t dev,
|
||||||
return GRUB_ERR_NONE;
|
return GRUB_ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dump of GPIO connections. FIXME: Remove useless and macroify. */
|
|
||||||
static grub_uint32_t gpiodump[] = {
|
|
||||||
0xffff0000, 0x2ffdd002, 0xffff0000, 0xffff0000,
|
|
||||||
0x2fffd000, 0xffff0000, 0x1000efff, 0xefff1000,
|
|
||||||
0x3ffbc004, 0xffff0000, 0xffff0000, 0xffff0000,
|
|
||||||
0x3ffbc004, 0x3ffbc004, 0xffff0000, 0x00000000,
|
|
||||||
0xffff0000, 0xffff0000, 0x3ffbc004, 0x3f9bc064,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000,
|
|
||||||
0xffff0000, 0xffff0000, 0x0000ffff, 0xffff0000,
|
|
||||||
0xefff1000, 0xffff0000, 0xffff0000, 0xffff0000,
|
|
||||||
0xefff1000, 0xefff1000, 0xffff0000, 0x00000000,
|
|
||||||
0xffff0000, 0xffff0000, 0xefff1000, 0xffff0000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x50000000, 0x00000000, 0x00000000,
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
set_io_space (grub_pci_device_t dev, int num, grub_uint16_t start,
|
set_io_space (grub_pci_device_t dev, int num, grub_uint16_t start,
|
||||||
grub_uint16_t len)
|
grub_uint16_t len)
|
||||||
|
@ -273,17 +260,6 @@ set_p2d (grub_pci_device_t dev, int num, int dest, grub_uint32_t start)
|
||||||
void
|
void
|
||||||
grub_cs5536_init_geode (grub_pci_device_t dev)
|
grub_cs5536_init_geode (grub_pci_device_t dev)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Make sure GPIO is where we expect it to be. */
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GPIO_BAR,
|
|
||||||
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_GPIO);
|
|
||||||
|
|
||||||
/* Setup GPIO. */
|
|
||||||
for (i = 0; i < (int) ARRAY_SIZE (gpiodump); i++)
|
|
||||||
((volatile grub_uint32_t *) (GRUB_MACHINE_PCI_IO_BASE
|
|
||||||
+ GRUB_CS5536_LBAR_GPIO)) [i] = gpiodump[i];
|
|
||||||
|
|
||||||
/* Enable more BARs. */
|
/* Enable more BARs. */
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IRQ_MAP_BAR,
|
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IRQ_MAP_BAR,
|
||||||
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_IRQ_MAP);
|
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_IRQ_MAP);
|
||||||
|
@ -295,11 +271,27 @@ grub_cs5536_init_geode (grub_pci_device_t dev)
|
||||||
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_PM);
|
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_PM);
|
||||||
|
|
||||||
/* Setup DIVIL. */
|
/* Setup DIVIL. */
|
||||||
|
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||||
|
switch (grub_arch_machine)
|
||||||
|
{
|
||||||
|
case GRUB_ARCH_MACHINE_YEELOONG:
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LEG_IO,
|
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LEG_IO,
|
||||||
GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86
|
GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1);
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1);
|
||||||
|
break;
|
||||||
|
case GRUB_ARCH_MACHINE_FULOONG2F:
|
||||||
|
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LEG_IO,
|
||||||
|
GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0
|
||||||
|
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_PRIMARY_MASK,
|
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_PRIMARY_MASK,
|
||||||
(~GRUB_CS5536_DIVIL_LPC_INTERRUPTS) & 0xffff);
|
(~GRUB_CS5536_DIVIL_LPC_INTERRUPTS) & 0xffff);
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_LPC_MASK,
|
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_LPC_MASK,
|
||||||
|
|
|
@ -20,23 +20,39 @@
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/pci.h>
|
#include <grub/pci.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
|
#include <grub/misc.h>
|
||||||
|
#include <grub/mm_private.h>
|
||||||
|
#include <grub/cache.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
/* FIXME: correctly support 64-bit architectures. */
|
/* FIXME: correctly support 64-bit architectures. */
|
||||||
/* #if GRUB_TARGET_SIZEOF_VOID_P == 4 */
|
/* #if GRUB_TARGET_SIZEOF_VOID_P == 4 */
|
||||||
struct grub_pci_dma_chunk *
|
struct grub_pci_dma_chunk *
|
||||||
grub_memalign_dma32 (grub_size_t align, grub_size_t size)
|
grub_memalign_dma32 (grub_size_t align, grub_size_t size)
|
||||||
{
|
{
|
||||||
return grub_memalign (align, size);
|
void *ret;
|
||||||
|
if (align < 64)
|
||||||
|
align = 64;
|
||||||
|
size = ALIGN_UP (size, align);
|
||||||
|
ret = grub_memalign (align, size);
|
||||||
|
if (!ret)
|
||||||
|
return 0;
|
||||||
|
grub_arch_sync_dma_caches (ret, size);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: evil. */
|
||||||
void
|
void
|
||||||
grub_dma_free (struct grub_pci_dma_chunk *ch)
|
grub_dma_free (struct grub_pci_dma_chunk *ch)
|
||||||
{
|
{
|
||||||
|
grub_size_t size = (((struct grub_mm_header *) ch) - 1)->size * GRUB_MM_ALIGN;
|
||||||
|
grub_arch_sync_dma_caches (ch, size);
|
||||||
grub_free (ch);
|
grub_free (ch);
|
||||||
}
|
}
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_MIPS_YEELOONG
|
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||||
volatile void *
|
volatile void *
|
||||||
grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
|
grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
|
||||||
{
|
{
|
||||||
|
@ -99,16 +115,6 @@ grub_pci_iterate (grub_pci_iteratefunc_t hook)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_MIPS_YEELOONG
|
|
||||||
/* Skip ghosts. */
|
|
||||||
if (id == GRUB_YEELOONG_OHCI_PCIID
|
|
||||||
&& dev.function == GRUB_YEELOONG_OHCI_GHOST_FUNCTION)
|
|
||||||
continue;
|
|
||||||
if (id == GRUB_YEELOONG_EHCI_PCIID
|
|
||||||
&& dev.function == GRUB_YEELOONG_EHCI_GHOST_FUNCTION)
|
|
||||||
continue;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (hook (dev, id))
|
if (hook (dev, id))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/usb.h>
|
#include <grub/usb.h>
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
|
|
||||||
static struct grub_usb_controller_dev usb_controller =
|
static struct grub_usb_controller_dev usb_controller =
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include <grub/cs5536.h>
|
#include <grub/cs5536.h>
|
||||||
#include <grub/loader.h>
|
#include <grub/loader.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
struct grub_ohci_hcca
|
struct grub_ohci_hcca
|
||||||
{
|
{
|
||||||
/* Pointers to Interrupt Endpoint Descriptors. Not used by
|
/* Pointers to Interrupt Endpoint Descriptors. Not used by
|
||||||
|
@ -452,10 +454,12 @@ grub_ohci_pci_iter (grub_pci_device_t dev,
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (o)
|
if (o)
|
||||||
|
{
|
||||||
grub_dma_free (o->td_chunk);
|
grub_dma_free (o->td_chunk);
|
||||||
grub_dma_free (o->ed_bulk_chunk);
|
grub_dma_free (o->ed_bulk_chunk);
|
||||||
grub_dma_free (o->ed_ctrl_chunk);
|
grub_dma_free (o->ed_ctrl_chunk);
|
||||||
grub_dma_free (o->hcca_chunk);
|
grub_dma_free (o->hcca_chunk);
|
||||||
|
}
|
||||||
grub_free (o);
|
grub_free (o);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1422,18 +1426,22 @@ static struct grub_usb_controller_dev usb_controller =
|
||||||
.detect_dev = grub_ohci_detect_dev
|
.detect_dev = grub_ohci_detect_dev
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void *fini_hnd;
|
||||||
|
|
||||||
GRUB_MOD_INIT(ohci)
|
GRUB_MOD_INIT(ohci)
|
||||||
{
|
{
|
||||||
COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_td) == 32);
|
COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_td) == 32);
|
||||||
COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_ed) == 16);
|
COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_ed) == 16);
|
||||||
grub_ohci_inithw ();
|
grub_ohci_inithw ();
|
||||||
grub_usb_controller_dev_register (&usb_controller);
|
grub_usb_controller_dev_register (&usb_controller);
|
||||||
grub_loader_register_preboot_hook (grub_ohci_fini_hw, grub_ohci_restore_hw,
|
fini_hnd = grub_loader_register_preboot_hook (grub_ohci_fini_hw,
|
||||||
|
grub_ohci_restore_hw,
|
||||||
GRUB_LOADER_PREBOOT_HOOK_PRIO_DISK);
|
GRUB_LOADER_PREBOOT_HOOK_PRIO_DISK);
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(ohci)
|
GRUB_MOD_FINI(ohci)
|
||||||
{
|
{
|
||||||
grub_ohci_fini_hw (0);
|
grub_ohci_fini_hw (0);
|
||||||
|
grub_loader_unregister_preboot_hook (fini_hnd);
|
||||||
grub_usb_controller_dev_unregister (&usb_controller);
|
grub_usb_controller_dev_unregister (&usb_controller);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
|
|
||||||
#include <grub/serial.h>
|
#include <grub/serial.h>
|
||||||
#include <grub/usbserial.h>
|
#include <grub/usbserial.h>
|
||||||
|
#include <grub/dl.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
void
|
void
|
||||||
grub_usbserial_fini (struct grub_serial_port *port)
|
grub_usbserial_fini (struct grub_serial_port *port)
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/usb.h>
|
#include <grub/usb.h>
|
||||||
#include <grub/usbserial.h>
|
#include <grub/usbserial.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GRUB_FTDI_MODEM_CTRL = 0x01,
|
GRUB_FTDI_MODEM_CTRL = 0x01,
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/usb.h>
|
#include <grub/usb.h>
|
||||||
#include <grub/usbserial.h>
|
#include <grub/usbserial.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
/* Convert speed to divisor. */
|
/* Convert speed to divisor. */
|
||||||
static grub_uint32_t
|
static grub_uint32_t
|
||||||
is_speed_supported (unsigned int speed)
|
is_speed_supported (unsigned int speed)
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include <grub/i386/io.h>
|
#include <grub/i386/io.h>
|
||||||
#include <grub/time.h>
|
#include <grub/time.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
#define GRUB_UHCI_IOMASK (0x7FF << 5)
|
#define GRUB_UHCI_IOMASK (0x7FF << 5)
|
||||||
|
|
||||||
#define N_QH 256
|
#define N_QH 256
|
||||||
|
@ -34,11 +36,33 @@
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GRUB_UHCI_REG_USBCMD = 0x00,
|
GRUB_UHCI_REG_USBCMD = 0x00,
|
||||||
|
GRUB_UHCI_REG_USBINTR = 0x04,
|
||||||
GRUB_UHCI_REG_FLBASEADD = 0x08,
|
GRUB_UHCI_REG_FLBASEADD = 0x08,
|
||||||
GRUB_UHCI_REG_PORTSC1 = 0x10,
|
GRUB_UHCI_REG_PORTSC1 = 0x10,
|
||||||
GRUB_UHCI_REG_PORTSC2 = 0x12
|
GRUB_UHCI_REG_PORTSC2 = 0x12,
|
||||||
|
GRUB_UHCI_REG_USBLEGSUP = 0xc0
|
||||||
} grub_uhci_reg_t;
|
} grub_uhci_reg_t;
|
||||||
|
|
||||||
|
/* R/WC legacy support bits */
|
||||||
|
#define GRUB_UHCI_LEGSUP_END_A20GATE (1 << 15)
|
||||||
|
#define GRUB_UHCI_TRAP_BY_64H_WSTAT (1 << 11)
|
||||||
|
#define GRUB_UHCI_TRAP_BY_64H_RSTAT (1 << 10)
|
||||||
|
#define GRUB_UHCI_TRAP_BY_60H_WSTAT (1 << 9)
|
||||||
|
#define GRUB_UHCI_TRAP_BY_60H_RSTAT (1 << 8)
|
||||||
|
|
||||||
|
/* Reset all legacy support - clear all R/WC bits and all R/W bits */
|
||||||
|
#define GRUB_UHCI_RESET_LEGSUP_SMI ( GRUB_UHCI_LEGSUP_END_A20GATE \
|
||||||
|
| GRUB_UHCI_TRAP_BY_64H_WSTAT \
|
||||||
|
| GRUB_UHCI_TRAP_BY_64H_RSTAT \
|
||||||
|
| GRUB_UHCI_TRAP_BY_60H_WSTAT \
|
||||||
|
| GRUB_UHCI_TRAP_BY_60H_RSTAT )
|
||||||
|
|
||||||
|
/* Some UHCI commands */
|
||||||
|
#define GRUB_UHCI_CMD_RUN_STOP (1 << 0)
|
||||||
|
#define GRUB_UHCI_CMD_HCRESET (1 << 1)
|
||||||
|
#define GRUB_UHCI_CMD_MAXP (1 << 7)
|
||||||
|
|
||||||
|
/* Important bits in structures */
|
||||||
#define GRUB_UHCI_LINK_TERMINATE 1
|
#define GRUB_UHCI_LINK_TERMINATE 1
|
||||||
#define GRUB_UHCI_LINK_QUEUE_HEAD 2
|
#define GRUB_UHCI_LINK_QUEUE_HEAD 2
|
||||||
|
|
||||||
|
@ -179,6 +203,11 @@ grub_uhci_pci_iter (grub_pci_device_t dev,
|
||||||
if (class != 0x0c || subclass != 0x03 || interf != 0x00)
|
if (class != 0x0c || subclass != 0x03 || interf != 0x00)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* Set bus master - needed for coreboot or broken BIOSes */
|
||||||
|
addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
|
||||||
|
grub_pci_write_word(addr,
|
||||||
|
GRUB_PCI_COMMAND_BUS_MASTER | grub_pci_read_word(addr));
|
||||||
|
|
||||||
/* Determine IO base address. */
|
/* Determine IO base address. */
|
||||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG4);
|
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG4);
|
||||||
base = grub_pci_read (addr);
|
base = grub_pci_read (addr);
|
||||||
|
@ -193,6 +222,19 @@ grub_uhci_pci_iter (grub_pci_device_t dev,
|
||||||
|
|
||||||
u->iobase = base & GRUB_UHCI_IOMASK;
|
u->iobase = base & GRUB_UHCI_IOMASK;
|
||||||
|
|
||||||
|
/* Reset PIRQ and SMI */
|
||||||
|
addr = grub_pci_make_address (dev, GRUB_UHCI_REG_USBLEGSUP);
|
||||||
|
grub_pci_write_word(addr, GRUB_UHCI_RESET_LEGSUP_SMI);
|
||||||
|
/* Reset the HC */
|
||||||
|
grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, GRUB_UHCI_CMD_HCRESET);
|
||||||
|
grub_millisleep(5);
|
||||||
|
/* Disable interrupts and commands (just to be safe) */
|
||||||
|
grub_uhci_writereg16(u, GRUB_UHCI_REG_USBINTR, 0);
|
||||||
|
/* Finish HC reset, HC remains disabled */
|
||||||
|
grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, 0);
|
||||||
|
/* Read back to be sure PCI write is done */
|
||||||
|
grub_uhci_readreg16(u, GRUB_UHCI_REG_USBCMD);
|
||||||
|
|
||||||
/* Reserve a page for the frame list. */
|
/* Reserve a page for the frame list. */
|
||||||
u->framelist = grub_memalign (4096, 4096);
|
u->framelist = grub_memalign (4096, 4096);
|
||||||
if (! u->framelist)
|
if (! u->framelist)
|
||||||
|
@ -250,9 +292,6 @@ grub_uhci_pci_iter (grub_pci_device_t dev,
|
||||||
u->td[N_TD - 2].linkptr = 0;
|
u->td[N_TD - 2].linkptr = 0;
|
||||||
u->tdfree = u->td;
|
u->tdfree = u->td;
|
||||||
|
|
||||||
/* Make sure UHCI is disabled! */
|
|
||||||
grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0);
|
|
||||||
|
|
||||||
/* Setup the frame list pointers. Since no isochronous transfers
|
/* Setup the frame list pointers. Since no isochronous transfers
|
||||||
are and will be supported, they all point to the (same!) queue
|
are and will be supported, they all point to the (same!) queue
|
||||||
head. */
|
head. */
|
||||||
|
@ -283,7 +322,8 @@ grub_uhci_pci_iter (grub_pci_device_t dev,
|
||||||
u->qh[N_QH - 1].linkptr = 1;
|
u->qh[N_QH - 1].linkptr = 1;
|
||||||
|
|
||||||
/* Enable UHCI again. */
|
/* Enable UHCI again. */
|
||||||
grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 1 | (1 << 7));
|
grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD,
|
||||||
|
GRUB_UHCI_CMD_RUN_STOP | GRUB_UHCI_CMD_MAXP);
|
||||||
|
|
||||||
/* UHCI is initialized and ready for transfers. */
|
/* UHCI is initialized and ready for transfers. */
|
||||||
grub_dprintf ("uhci", "UHCI initialized\n");
|
grub_dprintf ("uhci", "UHCI initialized\n");
|
||||||
|
@ -504,8 +544,11 @@ grub_uhci_setup_transfer (grub_usb_controller_t dev,
|
||||||
{
|
{
|
||||||
grub_size_t actual = 0;
|
grub_size_t actual = 0;
|
||||||
/* Terminate and free. */
|
/* Terminate and free. */
|
||||||
|
if (td_prev)
|
||||||
|
{
|
||||||
td_prev->linkptr2 = 0;
|
td_prev->linkptr2 = 0;
|
||||||
td_prev->linkptr = 1;
|
td_prev->linkptr = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (cdata->td_first)
|
if (cdata->td_first)
|
||||||
grub_free_queue (u, cdata->qh, cdata->td_first, NULL, &actual);
|
grub_free_queue (u, cdata->qh, cdata->td_first, NULL, &actual);
|
||||||
|
@ -749,8 +792,7 @@ grub_uhci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
|
||||||
else if (port == 1)
|
else if (port == 1)
|
||||||
reg = GRUB_UHCI_REG_PORTSC2;
|
reg = GRUB_UHCI_REG_PORTSC2;
|
||||||
else
|
else
|
||||||
return grub_error (GRUB_ERR_OUT_OF_RANGE,
|
return GRUB_USB_SPEED_NONE;
|
||||||
"UHCI Root Hub port does not exist");
|
|
||||||
|
|
||||||
status = grub_uhci_readreg16 (u, reg);
|
status = grub_uhci_readreg16 (u, reg);
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
#include <grub/list.h>
|
#include <grub/list.h>
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_usb_controller_dev_t grub_usb_list;
|
static grub_usb_controller_dev_t grub_usb_list;
|
||||||
struct grub_usb_attach_desc *attach_hooks;
|
static struct grub_usb_attach_desc *attach_hooks;
|
||||||
|
|
||||||
void
|
void
|
||||||
grub_usb_controller_dev_register (grub_usb_controller_dev_t usb)
|
grub_usb_controller_dev_register (grub_usb_controller_dev_t usb)
|
||||||
|
@ -183,6 +185,12 @@ grub_usb_device_initialize (grub_usb_device_t dev)
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
dev->config[i].descconf = NULL;
|
dev->config[i].descconf = NULL;
|
||||||
|
|
||||||
|
if (descdev->configcnt == 0)
|
||||||
|
{
|
||||||
|
err = GRUB_USB_ERR_BADDEVICE;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < descdev->configcnt; i++)
|
for (i = 0; i < descdev->configcnt; i++)
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct grub_usb_hub
|
||||||
grub_usb_device_t dev;
|
grub_usb_device_t dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct grub_usb_hub *hubs;
|
static struct grub_usb_hub *hubs;
|
||||||
|
|
||||||
/* Add a device that currently has device number 0 and resides on
|
/* Add a device that currently has device number 0 and resides on
|
||||||
CONTROLLER, the Hub reported that the device speed is SPEED. */
|
CONTROLLER, the Hub reported that the device speed is SPEED. */
|
||||||
|
@ -110,7 +110,7 @@ static grub_usb_err_t
|
||||||
grub_usb_add_hub (grub_usb_device_t dev)
|
grub_usb_add_hub (grub_usb_device_t dev)
|
||||||
{
|
{
|
||||||
struct grub_usb_usb_hubdesc hubdesc;
|
struct grub_usb_usb_hubdesc hubdesc;
|
||||||
grub_err_t err;
|
grub_usb_err_t err;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN
|
err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN
|
||||||
|
@ -215,6 +215,8 @@ attach_root_port (struct grub_usb_hub *hub, int portno,
|
||||||
return;
|
return;
|
||||||
hub->controller->dev->pending_reset = grub_get_time_ms () + 5000;
|
hub->controller->dev->pending_reset = grub_get_time_ms () + 5000;
|
||||||
|
|
||||||
|
grub_millisleep (10);
|
||||||
|
|
||||||
/* Enable the port and create a device. */
|
/* Enable the port and create a device. */
|
||||||
dev = grub_usb_hub_add_dev (hub->controller, speed);
|
dev = grub_usb_hub_add_dev (hub->controller, speed);
|
||||||
hub->controller->dev->pending_reset = 0;
|
hub->controller->dev->pending_reset = 0;
|
||||||
|
@ -350,7 +352,7 @@ poll_nonroot_hub (grub_usb_device_t dev)
|
||||||
GRUB_USB_REQ_GET_STATUS,
|
GRUB_USB_REQ_GET_STATUS,
|
||||||
0, i, sizeof (status), (char *) &status);
|
0, i, sizeof (status), (char *) &status);
|
||||||
|
|
||||||
grub_printf ("dev = %p, i = %d, status = %08x\n",
|
grub_dprintf ("usb", "dev = %p, i = %d, status = %08x\n",
|
||||||
dev, i, status);
|
dev, i, status);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
|
|
|
@ -97,7 +97,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
|
||||||
if (! transfer)
|
if (! transfer)
|
||||||
{
|
{
|
||||||
grub_dma_free (data_chunk);
|
grub_dma_free (data_chunk);
|
||||||
return grub_errno;
|
return GRUB_USB_ERR_INTERNAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
setupdata_chunk = grub_memalign_dma32 (32, sizeof (*setupdata));
|
setupdata_chunk = grub_memalign_dma32 (32, sizeof (*setupdata));
|
||||||
|
@ -105,7 +105,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
|
||||||
{
|
{
|
||||||
grub_free (transfer);
|
grub_free (transfer);
|
||||||
grub_dma_free (data_chunk);
|
grub_dma_free (data_chunk);
|
||||||
return grub_errno;
|
return GRUB_USB_ERR_INTERNAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
setupdata = grub_dma_get_virt (setupdata_chunk);
|
setupdata = grub_dma_get_virt (setupdata_chunk);
|
||||||
|
@ -139,7 +139,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
|
||||||
grub_free (transfer);
|
grub_free (transfer);
|
||||||
grub_dma_free (setupdata_chunk);
|
grub_dma_free (setupdata_chunk);
|
||||||
grub_dma_free (data_chunk);
|
grub_dma_free (data_chunk);
|
||||||
return grub_errno;
|
return GRUB_USB_ERR_INTERNAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build a Setup packet. XXX: Endianness. */
|
/* Build a Setup packet. XXX: Endianness. */
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include <grub/efi/api.h>
|
#include <grub/efi/api.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] = {
|
static const struct grub_arg_option options[] = {
|
||||||
{"exclude", 'x', 0,
|
{"exclude", 'x', 0,
|
||||||
N_("Don't load host tables specified by comma-separated list."),
|
N_("Don't load host tables specified by comma-separated list."),
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* pxe.c - command to control the pxe driver */
|
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,35 +17,37 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/err.h>
|
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/machine/pxe.h>
|
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
#include <grub/arc/arc.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)),
|
grub_cmd_lsdev (grub_command_t cmd __attribute__ ((unused)),
|
||||||
int argc __attribute__ ((unused)),
|
int argc __attribute__ ((unused)),
|
||||||
char **args __attribute__ ((unused)))
|
char **args __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
if (! grub_pxe_pxenv)
|
auto int hook (const char *name, const struct grub_arc_component *comp);
|
||||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "no pxe environment");
|
int hook (const char *name, const struct grub_arc_component *comp __attribute__ ((unused)))
|
||||||
|
{
|
||||||
grub_pxe_unload ();
|
grub_printf ("%s\n", name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
grub_arc_iterate_devs (hook, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static grub_command_t cmd;
|
static grub_command_t cmd;
|
||||||
|
|
||||||
GRUB_MOD_INIT(pxecmd)
|
GRUB_MOD_INIT(lsdev)
|
||||||
{
|
{
|
||||||
cmd = grub_register_command ("pxe_unload", grub_cmd_pxe_unload,
|
cmd = grub_register_command ("lsdev", grub_cmd_lsdev, "",
|
||||||
0,
|
N_("List devices."));
|
||||||
N_("Unload PXE environment."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(pxecmd)
|
GRUB_MOD_FINI(lsdev)
|
||||||
{
|
{
|
||||||
grub_unregister_command (cmd);
|
grub_unregister_command (cmd);
|
||||||
}
|
}
|
|
@ -26,6 +26,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
|
grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
|
||||||
int argc, char **args)
|
int argc, char **args)
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t (*grub_loader_boot_func) (void);
|
static grub_err_t (*grub_loader_boot_func) (void);
|
||||||
static grub_err_t (*grub_loader_unload_func) (void);
|
static grub_err_t (*grub_loader_unload_func) (void);
|
||||||
static int grub_loader_noreturn;
|
static int grub_loader_noreturn;
|
||||||
|
|
58
grub-core/commands/cacheinfo.c
Normal file
58
grub-core/commands/cacheinfo.c
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
/* cacheinfo.c - disk cache statistics */
|
||||||
|
/*
|
||||||
|
* GRUB -- GRand Unified Bootloader
|
||||||
|
* Copyright (C) 2008,2010 Free Software Foundation, Inc.
|
||||||
|
*
|
||||||
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* GRUB is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <grub/dl.h>
|
||||||
|
#include <grub/misc.h>
|
||||||
|
#include <grub/command.h>
|
||||||
|
#include <grub/i18n.h>
|
||||||
|
#include <grub/disk.h>
|
||||||
|
|
||||||
|
static grub_err_t
|
||||||
|
grub_rescue_cmd_info (struct grub_command *cmd __attribute__ ((unused)),
|
||||||
|
int argc __attribute__ ((unused)),
|
||||||
|
char *argv[] __attribute__ ((unused)))
|
||||||
|
{
|
||||||
|
unsigned long hits, misses;
|
||||||
|
|
||||||
|
grub_disk_cache_get_performance (&hits, &misses);
|
||||||
|
grub_printf ("Disk cache: hits = %lu, misses = %lu ", hits, misses);
|
||||||
|
if (hits + misses)
|
||||||
|
{
|
||||||
|
unsigned long ratio = hits * 10000 / (hits + misses);
|
||||||
|
grub_printf ("(%lu.%lu%%)\n", ratio / 100, ratio % 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
grub_printf ("(N/A)\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static grub_command_t cmd_cacheinfo;
|
||||||
|
|
||||||
|
GRUB_MOD_INIT(cacheinfo)
|
||||||
|
{
|
||||||
|
cmd_cacheinfo =
|
||||||
|
grub_register_command ("cacheinfo", grub_rescue_cmd_info,
|
||||||
|
0, N_("Get disk cache info."));
|
||||||
|
}
|
||||||
|
|
||||||
|
GRUB_MOD_FINI(cacheinfo)
|
||||||
|
{
|
||||||
|
grub_unregister_command (cmd_cacheinfo);
|
||||||
|
}
|
|
@ -25,6 +25,8 @@
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] =
|
static const struct grub_arg_option options[] =
|
||||||
{
|
{
|
||||||
{"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0},
|
{"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0},
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
#define BUFFER_SIZE 512
|
#define BUFFER_SIZE 512
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
|
@ -92,9 +94,7 @@ grub_cmd_cmp (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
||||||
if (buf1)
|
|
||||||
grub_free (buf1);
|
grub_free (buf1);
|
||||||
if (buf2)
|
|
||||||
grub_free (buf2);
|
grub_free (buf2);
|
||||||
if (file1)
|
if (file1)
|
||||||
grub_file_close (file1);
|
grub_file_close (file1);
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_cmd_source (grub_command_t cmd, int argc, char **args)
|
grub_cmd_source (grub_command_t cmd, int argc, char **args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
#define GRUB_DATETIME_SET_YEAR 1
|
#define GRUB_DATETIME_SET_YEAR 1
|
||||||
#define GRUB_DATETIME_SET_MONTH 2
|
#define GRUB_DATETIME_SET_MONTH 2
|
||||||
#define GRUB_DATETIME_SET_DAY 4
|
#define GRUB_DATETIME_SET_DAY 4
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] =
|
static const struct grub_arg_option options[] =
|
||||||
{
|
{
|
||||||
{0, 'n', 0, N_("Do not output the trailing newline."), 0, 0},
|
{0, 'n', 0, N_("Do not output the trailing newline."), 0, 0},
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static struct grub_video_patch
|
static struct grub_video_patch
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
|
static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
|
||||||
static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
|
static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||||
static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
|
static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
#include <grub/efi/efi.h>
|
#include <grub/efi/efi.h>
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
#define ADD_MEMORY_DESCRIPTOR(desc, size) \
|
#define ADD_MEMORY_DESCRIPTOR(desc, size) \
|
||||||
((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
|
((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,15 @@
|
||||||
*/
|
*/
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
|
#include <grub/dl.h>
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/normal.h>
|
#include <grub/normal.h>
|
||||||
#include <grub/charset.h>
|
#include <grub/charset.h>
|
||||||
#include <grub/efi/api.h>
|
#include <grub/efi/api.h>
|
||||||
#include <grub/efi/efi.h>
|
#include <grub/efi/efi.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
struct guid_mapping
|
struct guid_mapping
|
||||||
{
|
{
|
||||||
grub_efi_guid_t guid;
|
grub_efi_guid_t guid;
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#include <grub/charset.h>
|
#include <grub/charset.h>
|
||||||
#include <grub/efi/api.h>
|
#include <grub/efi/api.h>
|
||||||
#include <grub/efi/efi.h>
|
#include <grub/efi/efi.h>
|
||||||
|
#include <grub/dl.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static void
|
static void
|
||||||
disp_sal (void *table)
|
disp_sal (void *table)
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
#include <grub/script_sh.h>
|
#include <grub/script_sh.h>
|
||||||
|
#include <grub/dl.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
grub_err_t
|
grub_err_t
|
||||||
grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
|
grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include <grub/fs.h>
|
#include <grub/fs.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
/* Convert a LBA address to a CHS address in the INT 13 format. */
|
/* Convert a LBA address to a CHS address in the INT 13 format. */
|
||||||
/* Taken from grub1. */
|
/* Taken from grub1. */
|
||||||
/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.
|
/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
|
grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
|
||||||
int argc __attribute__ ((unused)),
|
int argc __attribute__ ((unused)),
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include <grub/normal.h>
|
#include <grub/normal.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] = {
|
static const struct grub_arg_option options[] = {
|
||||||
{"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
|
{"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
|
||||||
{"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},
|
{"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},
|
||||||
|
@ -36,7 +38,7 @@ static const struct grub_arg_option options[] = {
|
||||||
{0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct { const char *name; const char *hashname; } aliases[] =
|
static struct { const char *name; const char *hashname; } aliases[] =
|
||||||
{
|
{
|
||||||
{"sha256sum", "sha256"},
|
{"sha256sum", "sha256"},
|
||||||
{"sha512sum", "sha512"},
|
{"sha512sum", "sha512"},
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/ata.h>
|
#include <grub/ata.h>
|
||||||
|
#include <grub/scsi.h>
|
||||||
#include <grub/disk.h>
|
#include <grub/disk.h>
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
|
@ -26,6 +27,8 @@
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] = {
|
static const struct grub_arg_option options[] = {
|
||||||
{"apm", 'B', 0, N_("Set Advanced Power Management\n"
|
{"apm", 'B', 0, N_("Set Advanced Power Management\n"
|
||||||
"(1=low, ..., 254=high, 255=off)."),
|
"(1=low, ..., 254=high, 255=off)."),
|
||||||
|
@ -61,60 +64,64 @@ enum grub_ata_smart_commands
|
||||||
static int quiet = 0;
|
static int quiet = 0;
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_hdparm_do_ata_cmd (grub_disk_t disk, grub_uint8_t cmd,
|
grub_hdparm_do_ata_cmd (grub_ata_t ata, grub_uint8_t cmd,
|
||||||
grub_uint8_t features, grub_uint8_t sectors,
|
grub_uint8_t features, grub_uint8_t sectors,
|
||||||
void * buffer, int size)
|
void * buffer, int size)
|
||||||
{
|
{
|
||||||
struct grub_disk_ata_pass_through_parms apt;
|
struct grub_disk_ata_pass_through_parms apt;
|
||||||
grub_memset (&apt, 0, sizeof (apt));
|
grub_memset (&apt, 0, sizeof (apt));
|
||||||
|
|
||||||
apt.taskfile[GRUB_ATA_REG_CMD] = cmd;
|
apt.taskfile.cmd = cmd;
|
||||||
apt.taskfile[GRUB_ATA_REG_FEATURES] = features;
|
apt.taskfile.features = features;
|
||||||
apt.taskfile[GRUB_ATA_REG_SECTORS] = sectors;
|
apt.taskfile.sectors = sectors;
|
||||||
|
apt.taskfile.disk = 0xE0;
|
||||||
|
|
||||||
apt.buffer = buffer;
|
apt.buffer = buffer;
|
||||||
apt.size = size;
|
apt.size = size;
|
||||||
|
|
||||||
if (grub_disk_ata_pass_through (disk, &apt))
|
if (ata->dev->readwrite (ata, &apt, 0))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
return GRUB_ERR_NONE;
|
return GRUB_ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
grub_hdparm_do_check_powermode_cmd (grub_disk_t disk)
|
grub_hdparm_do_check_powermode_cmd (grub_ata_t ata)
|
||||||
{
|
{
|
||||||
struct grub_disk_ata_pass_through_parms apt;
|
struct grub_disk_ata_pass_through_parms apt;
|
||||||
grub_memset (&apt, 0, sizeof (apt));
|
grub_memset (&apt, 0, sizeof (apt));
|
||||||
|
|
||||||
apt.taskfile[GRUB_ATA_REG_CMD] = GRUB_ATA_CMD_CHECK_POWER_MODE;
|
apt.taskfile.cmd = GRUB_ATA_CMD_CHECK_POWER_MODE;
|
||||||
|
apt.taskfile.disk = 0xE0;
|
||||||
|
|
||||||
if (grub_disk_ata_pass_through (disk, &apt))
|
if (ata->dev->readwrite (ata, &apt, 0))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return apt.taskfile[GRUB_ATA_REG_SECTORS];
|
return apt.taskfile.sectors;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
grub_hdparm_do_smart_cmd (grub_disk_t disk, grub_uint8_t features)
|
grub_hdparm_do_smart_cmd (grub_ata_t ata, grub_uint8_t features)
|
||||||
{
|
{
|
||||||
struct grub_disk_ata_pass_through_parms apt;
|
struct grub_disk_ata_pass_through_parms apt;
|
||||||
grub_memset (&apt, 0, sizeof (apt));
|
grub_memset (&apt, 0, sizeof (apt));
|
||||||
|
|
||||||
apt.taskfile[GRUB_ATA_REG_CMD] = GRUB_ATA_CMD_SMART;
|
apt.taskfile.cmd = GRUB_ATA_CMD_SMART;
|
||||||
apt.taskfile[GRUB_ATA_REG_FEATURES] = features;
|
apt.taskfile.features = features;
|
||||||
apt.taskfile[GRUB_ATA_REG_LBAMID] = 0x4f;
|
apt.taskfile.lba_mid = 0x4f;
|
||||||
apt.taskfile[GRUB_ATA_REG_LBAHIGH] = 0xc2;
|
apt.taskfile.lba_high = 0xc2;
|
||||||
|
apt.taskfile.disk = 0xE0;
|
||||||
|
|
||||||
if (grub_disk_ata_pass_through (disk, &apt))
|
if (ata->dev->readwrite (ata, &apt, 0))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (features == GRUB_ATA_FEAT_SMART_STATUS)
|
if (features == GRUB_ATA_FEAT_SMART_STATUS)
|
||||||
{
|
{
|
||||||
if ( apt.taskfile[GRUB_ATA_REG_LBAMID] == 0x4f
|
if ( apt.taskfile.lba_mid == 0x4f
|
||||||
&& apt.taskfile[GRUB_ATA_REG_LBAHIGH] == 0xc2)
|
&& apt.taskfile.lba_high == 0xc2)
|
||||||
return 0; /* Good SMART status. */
|
return 0; /* Good SMART status. */
|
||||||
else if ( apt.taskfile[GRUB_ATA_REG_LBAMID] == 0xf4
|
else if ( apt.taskfile.lba_mid == 0xf4
|
||||||
&& apt.taskfile[GRUB_ATA_REG_LBAHIGH] == 0x2c)
|
&& apt.taskfile.lba_high == 0x2c)
|
||||||
return 1; /* Bad SMART status. */
|
return 1; /* Bad SMART status. */
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -124,12 +131,12 @@ grub_hdparm_do_smart_cmd (grub_disk_t disk, grub_uint8_t features)
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_hdparm_simple_cmd (const char * msg,
|
grub_hdparm_simple_cmd (const char * msg,
|
||||||
grub_disk_t disk, grub_uint8_t cmd)
|
grub_ata_t ata, grub_uint8_t cmd)
|
||||||
{
|
{
|
||||||
if (! quiet && msg)
|
if (! quiet && msg)
|
||||||
grub_printf ("%s", msg);
|
grub_printf ("%s", msg);
|
||||||
|
|
||||||
grub_err_t err = grub_hdparm_do_ata_cmd (disk, cmd, 0, 0, NULL, 0);
|
grub_err_t err = grub_hdparm_do_ata_cmd (ata, cmd, 0, 0, NULL, 0);
|
||||||
|
|
||||||
if (! quiet && msg)
|
if (! quiet && msg)
|
||||||
grub_printf ("%s\n", ! err ? "" : ": not supported");
|
grub_printf ("%s\n", ! err ? "" : ": not supported");
|
||||||
|
@ -138,7 +145,7 @@ grub_hdparm_simple_cmd (const char * msg,
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_hdparm_set_val_cmd (const char * msg, int val,
|
grub_hdparm_set_val_cmd (const char * msg, int val,
|
||||||
grub_disk_t disk, grub_uint8_t cmd,
|
grub_ata_t ata, grub_uint8_t cmd,
|
||||||
grub_uint8_t features, grub_uint8_t sectors)
|
grub_uint8_t features, grub_uint8_t sectors)
|
||||||
{
|
{
|
||||||
if (! quiet && msg && *msg)
|
if (! quiet && msg && *msg)
|
||||||
|
@ -149,7 +156,7 @@ grub_hdparm_set_val_cmd (const char * msg, int val,
|
||||||
grub_printf ("Disable %s", msg);
|
grub_printf ("Disable %s", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_err_t err = grub_hdparm_do_ata_cmd (disk, cmd, features, sectors,
|
grub_err_t err = grub_hdparm_do_ata_cmd (ata, cmd, features, sectors,
|
||||||
NULL, 0);
|
NULL, 0);
|
||||||
|
|
||||||
if (! quiet && msg)
|
if (! quiet && msg)
|
||||||
|
@ -273,6 +280,7 @@ static grub_err_t
|
||||||
grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
||||||
{
|
{
|
||||||
struct grub_arg_list *state = ctxt->state;
|
struct grub_arg_list *state = ctxt->state;
|
||||||
|
struct grub_ata *ata;
|
||||||
|
|
||||||
/* Check command line. */
|
/* Check command line. */
|
||||||
if (argc != 1)
|
if (argc != 1)
|
||||||
|
@ -283,9 +291,6 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "argument is not a device name");
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "argument is not a device name");
|
||||||
args[0][len - 1] = 0;
|
args[0][len - 1] = 0;
|
||||||
|
|
||||||
if (! grub_disk_ata_pass_through)
|
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "ATA pass through not available");
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int apm = get_int_arg (&state[i++]);
|
int apm = get_int_arg (&state[i++]);
|
||||||
int power = state[i++].set;
|
int power = state[i++].set;
|
||||||
|
@ -311,15 +316,37 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "partition not allowed");
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "partition not allowed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (disk->dev->id)
|
||||||
|
{
|
||||||
|
case GRUB_DISK_DEVICE_ATA_ID:
|
||||||
|
ata = disk->data;
|
||||||
|
break;
|
||||||
|
case GRUB_DISK_DEVICE_SCSI_ID:
|
||||||
|
if (((disk->id >> GRUB_SCSI_ID_SUBSYSTEM_SHIFT) & 0xFF)
|
||||||
|
== GRUB_SCSI_SUBSYSTEM_PATA
|
||||||
|
|| (((disk->id >> GRUB_SCSI_ID_SUBSYSTEM_SHIFT) & 0xFF)
|
||||||
|
== GRUB_SCSI_SUBSYSTEM_AHCI))
|
||||||
|
{
|
||||||
|
ata = ((struct grub_scsi *) disk->data)->data;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return grub_error (GRUB_ERR_IO, "not an ATA device");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Change settings. */
|
/* Change settings. */
|
||||||
if (aam >= 0)
|
if (aam >= 0)
|
||||||
grub_hdparm_set_val_cmd ("Automatic Acoustic Management", (aam ? aam : -1),
|
grub_hdparm_set_val_cmd ("Automatic Acoustic Management", (aam ? aam : -1),
|
||||||
disk, GRUB_ATA_CMD_SET_FEATURES, (aam ? 0x42 : 0xc2), aam);
|
ata, GRUB_ATA_CMD_SET_FEATURES,
|
||||||
|
(aam ? 0x42 : 0xc2), aam);
|
||||||
|
|
||||||
if (apm >= 0)
|
if (apm >= 0)
|
||||||
grub_hdparm_set_val_cmd ("Advanced Power Management",
|
grub_hdparm_set_val_cmd ("Advanced Power Management",
|
||||||
(apm != 255 ? apm : -1), disk, GRUB_ATA_CMD_SET_FEATURES,
|
(apm != 255 ? apm : -1), ata,
|
||||||
(apm != 255 ? 0x05 : 0x85), (apm != 255 ? apm : 0));
|
GRUB_ATA_CMD_SET_FEATURES,
|
||||||
|
(apm != 255 ? 0x05 : 0x85),
|
||||||
|
(apm != 255 ? apm : 0));
|
||||||
|
|
||||||
if (standby_tout >= 0)
|
if (standby_tout >= 0)
|
||||||
{
|
{
|
||||||
|
@ -330,28 +357,28 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
||||||
grub_printf (")");
|
grub_printf (")");
|
||||||
}
|
}
|
||||||
/* The IDLE cmd sets disk to idle mode and configures standby timer. */
|
/* The IDLE cmd sets disk to idle mode and configures standby timer. */
|
||||||
grub_hdparm_set_val_cmd ("", -1, disk, GRUB_ATA_CMD_IDLE, 0, standby_tout);
|
grub_hdparm_set_val_cmd ("", -1, ata, GRUB_ATA_CMD_IDLE, 0, standby_tout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enable_smart >= 0)
|
if (enable_smart >= 0)
|
||||||
{
|
{
|
||||||
if (! quiet)
|
if (! quiet)
|
||||||
grub_printf ("%sable SMART operations", (enable_smart ? "En" : "Dis"));
|
grub_printf ("%sable SMART operations", (enable_smart ? "En" : "Dis"));
|
||||||
int err = grub_hdparm_do_smart_cmd (disk, (enable_smart ?
|
int err = grub_hdparm_do_smart_cmd (ata, (enable_smart ?
|
||||||
GRUB_ATA_FEAT_SMART_ENABLE : GRUB_ATA_FEAT_SMART_DISABLE));
|
GRUB_ATA_FEAT_SMART_ENABLE : GRUB_ATA_FEAT_SMART_DISABLE));
|
||||||
if (! quiet)
|
if (! quiet)
|
||||||
grub_printf ("%s\n", err ? ": not supported" : "");
|
grub_printf ("%s\n", err ? ": not supported" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec_freeze)
|
if (sec_freeze)
|
||||||
grub_hdparm_simple_cmd ("Freeze security settings", disk,
|
grub_hdparm_simple_cmd ("Freeze security settings", ata,
|
||||||
GRUB_ATA_CMD_SECURITY_FREEZE_LOCK);
|
GRUB_ATA_CMD_SECURITY_FREEZE_LOCK);
|
||||||
|
|
||||||
/* Print/dump IDENTIFY. */
|
/* Print/dump IDENTIFY. */
|
||||||
if (ident || dumpid)
|
if (ident || dumpid)
|
||||||
{
|
{
|
||||||
char buf[GRUB_DISK_SECTOR_SIZE];
|
char buf[GRUB_DISK_SECTOR_SIZE];
|
||||||
if (grub_hdparm_do_ata_cmd (disk, GRUB_ATA_CMD_IDENTIFY_DEVICE,
|
if (grub_hdparm_do_ata_cmd (ata, GRUB_ATA_CMD_IDENTIFY_DEVICE,
|
||||||
0, 0, buf, sizeof (buf)))
|
0, 0, buf, sizeof (buf)))
|
||||||
grub_printf ("Cannot read ATA IDENTIFY data\n");
|
grub_printf ("Cannot read ATA IDENTIFY data\n");
|
||||||
else
|
else
|
||||||
|
@ -367,7 +394,7 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
||||||
if (power)
|
if (power)
|
||||||
{
|
{
|
||||||
grub_printf ("Disk power mode is: ");
|
grub_printf ("Disk power mode is: ");
|
||||||
int mode = grub_hdparm_do_check_powermode_cmd (disk);
|
int mode = grub_hdparm_do_check_powermode_cmd (ata);
|
||||||
if (mode < 0)
|
if (mode < 0)
|
||||||
grub_printf ("unknown\n");
|
grub_printf ("unknown\n");
|
||||||
else
|
else
|
||||||
|
@ -383,7 +410,7 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
||||||
{
|
{
|
||||||
if (! quiet)
|
if (! quiet)
|
||||||
grub_printf ("SMART status is: ");
|
grub_printf ("SMART status is: ");
|
||||||
int err = grub_hdparm_do_smart_cmd (disk, GRUB_ATA_FEAT_SMART_STATUS);
|
int err = grub_hdparm_do_smart_cmd (ata, GRUB_ATA_FEAT_SMART_STATUS);
|
||||||
if (! quiet)
|
if (! quiet)
|
||||||
grub_printf ("%s\n", (err < 0 ? "unknown" :
|
grub_printf ("%s\n", (err < 0 ? "unknown" :
|
||||||
err == 0 ? "OK" : "*BAD*"));
|
err == 0 ? "OK" : "*BAD*"));
|
||||||
|
@ -392,11 +419,11 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
|
||||||
|
|
||||||
/* Change power mode. */
|
/* Change power mode. */
|
||||||
if (standby_now)
|
if (standby_now)
|
||||||
grub_hdparm_simple_cmd ("Set disk to standby mode", disk,
|
grub_hdparm_simple_cmd ("Set disk to standby mode", ata,
|
||||||
GRUB_ATA_CMD_STANDBY_IMMEDIATE);
|
GRUB_ATA_CMD_STANDBY_IMMEDIATE);
|
||||||
|
|
||||||
if (sleep_now)
|
if (sleep_now)
|
||||||
grub_hdparm_simple_cmd ("Set disk to sleep mode", disk,
|
grub_hdparm_simple_cmd ("Set disk to sleep mode", ata,
|
||||||
GRUB_ATA_CMD_SLEEP);
|
GRUB_ATA_CMD_SLEEP);
|
||||||
|
|
||||||
grub_disk_close (disk);
|
grub_disk_close (disk);
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include <grub/normal.h>
|
#include <grub/normal.h>
|
||||||
#include <grub/charset.h>
|
#include <grub/charset.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
|
grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
|
||||||
char **args)
|
char **args)
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] = {
|
static const struct grub_arg_option options[] = {
|
||||||
{"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0,
|
{"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0,
|
||||||
ARG_TYPE_INT},
|
ARG_TYPE_INT},
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/cmos.h>
|
#include <grub/cmos.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
parse_args (int argc, char *argv[], int *byte, int *bit)
|
parse_args (int argc, char *argv[], int *byte, int *bit)
|
||||||
{
|
{
|
||||||
|
@ -44,12 +46,17 @@ grub_cmd_cmostest (struct grub_command *cmd __attribute__ ((unused)),
|
||||||
{
|
{
|
||||||
int byte, bit;
|
int byte, bit;
|
||||||
grub_err_t err;
|
grub_err_t err;
|
||||||
|
grub_uint8_t value;
|
||||||
|
|
||||||
err = parse_args (argc, argv, &byte, &bit);
|
err = parse_args (argc, argv, &byte, &bit);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (grub_cmos_read (byte) & (1 << bit))
|
err = grub_cmos_read (byte, &value);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
if (value & (1 << bit))
|
||||||
return GRUB_ERR_NONE;
|
return GRUB_ERR_NONE;
|
||||||
|
|
||||||
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||||
|
@ -61,13 +68,16 @@ grub_cmd_cmosclean (struct grub_command *cmd __attribute__ ((unused)),
|
||||||
{
|
{
|
||||||
int byte, bit;
|
int byte, bit;
|
||||||
grub_err_t err;
|
grub_err_t err;
|
||||||
|
grub_uint8_t value;
|
||||||
|
|
||||||
err = parse_args (argc, argv, &byte, &bit);
|
err = parse_args (argc, argv, &byte, &bit);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
err = grub_cmos_read (byte, &value);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
grub_cmos_write (byte, grub_cmos_read (byte) & (~(1 << bit)));
|
return grub_cmos_write (byte, value & (~(1 << bit)));
|
||||||
return GRUB_ERR_NONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static grub_command_t cmd, cmd_clean;
|
static grub_command_t cmd, cmd_clean;
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <grub/i386/cpuid.h>
|
#include <grub/i386/cpuid.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
#define cpuid(num,a,b,c,d) \
|
#define cpuid(num,a,b,c,d) \
|
||||||
asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
|
asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
|
||||||
: "=a" (a), "=r" (b), "=c" (c), "=d" (d) \
|
: "=a" (a), "=r" (b), "=c" (c), "=d" (d) \
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <grub/memory.h>
|
#include <grub/memory.h>
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
/* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */
|
/* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */
|
||||||
static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13);
|
static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13);
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/machine/int.h>
|
#include <grub/machine/int.h>
|
||||||
#include <grub/acpi.h>
|
#include <grub/acpi.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] =
|
static const struct grub_arg_option options[] =
|
||||||
{
|
{
|
||||||
{"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0},
|
{"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0},
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
int
|
int
|
||||||
grub_apm_get_info (struct grub_apm_info *info)
|
grub_apm_get_info (struct grub_apm_info *info)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
|
#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
|
||||||
|
|
||||||
/* The speaker port. */
|
/* The speaker port. */
|
||||||
|
@ -190,7 +192,7 @@ grub_cmd_play (grub_command_t cmd __attribute__ ((unused)),
|
||||||
file = grub_file_open (args[0]);
|
file = grub_file_open (args[0]);
|
||||||
|
|
||||||
if (! file)
|
if (! file)
|
||||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file `%s' not found", args[0]);
|
||||||
|
|
||||||
if (grub_file_read (file, &tempo, sizeof (tempo)) != sizeof (tempo))
|
if (grub_file_read (file, &tempo, sizeof (tempo)) != sizeof (tempo))
|
||||||
{
|
{
|
||||||
|
@ -225,7 +227,7 @@ grub_cmd_play (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
if (*end)
|
if (*end)
|
||||||
/* Was not a number either, assume it was supposed to be a file name. */
|
/* Was not a number either, assume it was supposed to be a file name. */
|
||||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file `%s' not found", args[0]);
|
||||||
|
|
||||||
grub_dprintf ("play","tempo = %d\n", tempo);
|
grub_dprintf ("play","tempo = %d\n", tempo);
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <grub/cpu/io.h>
|
#include <grub/cpu/io.h>
|
||||||
#include <grub/loader.h>
|
#include <grub/loader.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv2+");
|
||||||
|
|
||||||
static char sendkey[0x20];
|
static char sendkey[0x20];
|
||||||
/* Length of sendkey. */
|
/* Length of sendkey. */
|
||||||
static int keylen = 0;
|
static int keylen = 0;
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
|
grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
|
||||||
int argc __attribute__ ((unused)),
|
int argc __attribute__ ((unused)),
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <grub/cpu/io.h>
|
#include <grub/cpu/io.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
|
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
|
||||||
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
|
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static struct grub_keyboard_layout layout_us = {
|
static struct grub_keyboard_layout layout_us = {
|
||||||
.keyboard_map = {
|
.keyboard_map = {
|
||||||
/* Keyboard errors. Handled by driver. */
|
/* Keyboard errors. Handled by driver. */
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] =
|
static const struct grub_arg_option options[] =
|
||||||
{
|
{
|
||||||
{"shift", 's', 0, N_("Check Shift key."), 0, 0},
|
{"shift", 's', 0, N_("Check Shift key."), 0, 0},
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include <grub/disk.h>
|
#include <grub/disk.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
legacy_file (const char *filename)
|
legacy_file (const char *filename)
|
||||||
{
|
{
|
||||||
|
@ -83,9 +85,13 @@ legacy_file (const char *filename)
|
||||||
{
|
{
|
||||||
char *oldname = NULL;
|
char *oldname = NULL;
|
||||||
char *newsuffix;
|
char *newsuffix;
|
||||||
|
char *ptr;
|
||||||
|
|
||||||
|
for (ptr = buf; *ptr && grub_isspace (*ptr); ptr++);
|
||||||
|
|
||||||
oldname = entryname;
|
oldname = entryname;
|
||||||
parsed = grub_legacy_parse (buf, &entryname, &newsuffix);
|
parsed = grub_legacy_parse (ptr, &entryname, &newsuffix);
|
||||||
|
grub_free (buf);
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
if (newsuffix)
|
if (newsuffix)
|
||||||
{
|
{
|
||||||
|
@ -209,7 +215,7 @@ grub_cmd_legacy_source (struct grub_command *cmd,
|
||||||
grub_menu_t menu;
|
grub_menu_t menu;
|
||||||
menu = grub_env_get_menu ();
|
menu = grub_env_get_menu ();
|
||||||
if (menu && menu->size)
|
if (menu && menu->size)
|
||||||
grub_show_menu (menu, 1);
|
grub_show_menu (menu, 1, 0);
|
||||||
if (!extractor)
|
if (!extractor)
|
||||||
grub_env_context_close ();
|
grub_env_context_close ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
static const struct grub_arg_option options[] =
|
static const struct grub_arg_option options[] =
|
||||||
{
|
{
|
||||||
{"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME},
|
{"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME},
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue