Vladimir 'phcoder' Serbinenko
19e1c41bbf
Flush caches on DMA memory.
...
* grub-core/kern/mips/cache.S (grub_arch_sync_dma_caches): New function.
* grub-core/bus/pci.c (grub_memalign_dma32): Flush caches.
(grub_dma_free): Likewise.
* include/grub/cache.h (grub_arch_sync_dma_caches): New declaration.
2011-05-13 20:56:50 +02:00
Vladimir 'phcoder' Serbinenko
96a29d188b
Arc type cleanup
2011-05-13 18:03:20 +02:00
Vladimir 'phcoder' Serbinenko
cdcfe2a95f
missing part of previous commits
2011-05-13 18:02:58 +02:00
Vladimir 'phcoder' Serbinenko
214af04cf5
avoid executing cache opcode on non-4 byte aligned boundaries
2011-05-13 16:41:26 +02:00
Vladimir 'phcoder' Serbinenko
8906c3dd40
sgi support
2011-05-13 16:36:05 +02:00
Vladimir 'phcoder' Serbinenko
11d86592b7
Adjust mips/dl.c for bigendian
2011-05-13 15:38:42 +02:00
Vladimir 'phcoder' Serbinenko
9b44fecaa6
* grub-core/kern/mips/dl.c (grub_arch_dl_relocate_symbols): Handle
...
R_MIPS_JALR since it's used by newer compiler.
2011-05-13 15:17:02 +02:00
Manoel R. Abranches
d8123bfb54
Correct some compile erros.
2011-05-12 13:20:43 -03:00
Manoel Rebelo Abranches
4d6374ba78
Implement file close in network tranference.
...
Stop receiving packets from card on error.
2011-05-10 09:32:38 -03:00
Vladimir 'phcoder' Serbinenko
dd94a3df9d
* grub-core/kern/emu/hostdisk.c (linux_find_partition): Don't abort
...
on first non-existant partition.
2011-05-09 18:59:35 +02:00
Vladimir 'phcoder' Serbinenko
fa68d99c45
* grub-core/kern/emu/hostdisk.c (open_device): Set data->fd to -1 if
...
openning fails.
Reported by: Mark Korenberg.
2011-05-09 18:48:50 +02:00
Vladimir 'phcoder' Serbinenko
157effb745
* grub-core/kern/emu/hostdisk.c (linux_find_partition): Prevent possible
...
overflow.
2011-05-09 18:46:51 +02:00
Vladimir 'phcoder' Serbinenko
7b58e65f24
track function symbols
2011-05-08 18:29:37 +02:00
Vladimir 'phcoder' Serbinenko
5a0baa09f2
Remove now useless LD script
2011-05-08 18:28:25 +02:00
Vladimir 'phcoder' Serbinenko
2679b7249b
Fix LTOFF relocation to functions (needed for trampolines)
2011-05-08 17:07:40 +02:00
Vladimir 'phcoder' Serbinenko
44748f71c0
Add explicit byt 0 to workaround a problem with assembler
2011-05-08 17:06:56 +02:00
Vladimir 'phcoder' Serbinenko
fa610088ba
Add missing time installation
2011-05-08 17:06:28 +02:00
Vladimir 'phcoder' Serbinenko
7216a1bff3
Set EFI ticks to 1000Hz simplifying much of the code and avoiding cotsly division
2011-05-08 17:05:47 +02:00
Vladimir 'phcoder' Serbinenko
ad6e5cf25f
add missing file
2011-05-08 12:42:08 +02:00
Vladimir 'phcoder' Serbinenko
5452733f35
more or less functional ia64 grub-mkimage
2011-05-08 12:39:08 +02:00
Manoel Rebelo Abranches
90eb90e24c
Merge mainline.
2011-05-05 12:12:22 -03:00
Vladimir 'phcoder' Serbinenko
8c767fd198
merge mainline into luks
2011-04-25 17:04:27 +02:00
Vladimir 'phcoder' Serbinenko
20a409405b
Integrate geli into autoconfiguration system
2011-04-25 14:52:07 +02:00
Vladimir 'phcoder' Serbinenko
ae13460ee1
merge 4096 into luks
2011-04-24 14:53:13 +02:00
Vladimir 'phcoder' Serbinenko
0c512b092c
Fix a cache retrieving bug
2011-04-24 14:52:00 +02:00
Vladimir 'phcoder' Serbinenko
572e3ea650
merge 4096 into luks
2011-04-24 03:12:06 +02:00
Vladimir 'phcoder' Serbinenko
8585e54bec
factor cryptodisk part out
2011-04-23 18:00:42 +02:00
Vladimir 'phcoder' Serbinenko
24089d19e2
Add cheatmounting
2011-04-22 19:20:46 +02:00
Vladimir 'phcoder' Serbinenko
0aaa85f1a0
merge lazy into luks
2011-04-22 15:13:12 +02:00
Vladimir 'phcoder' Serbinenko
4defebbec8
automatic raid members addition
2011-04-22 13:55:30 +02:00
Vladimir 'phcoder' Serbinenko
65b4742cd7
Add lost lvm/ prefix. Autoadd lvm subdevices.
2011-04-22 02:46:36 +02:00
Vladimir 'phcoder' Serbinenko
c0c837c10b
merge devmapper into lazy
2011-04-22 01:21:26 +02:00
Vladimir 'phcoder' Serbinenko
5dad99b730
more linux-like name for LVM volumes
2011-04-22 01:10:24 +02:00
Vladimir 'phcoder' Serbinenko
24b905a11c
Lazy LVM and RAID assembly
2011-04-22 00:09:07 +02:00
Vladimir 'phcoder' Serbinenko
a10e7a5a89
Support grub-probe -t drive
2011-04-21 12:39:31 +02:00
Vladimir 'phcoder' Serbinenko
0c910e9626
merge devmapper into luks
2011-04-21 11:59:51 +02:00
Colin Watson
92051871b7
* grub-core/kern/emu/getroot.c
...
(grub_find_root_device_from_mountinfo): Remove non-virtual-device
test that was incorrectly reintroduced in r3214.
Reported by: Ian Dall. Fixes Savannah bug #33133 .
2011-04-21 10:26:29 +01:00
Vladimir 'phcoder' Serbinenko
e8f28d4c0e
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_flush):
...
New function.
(grub_util_biosdisk_close): Use grub_util_biosdisk_flush.
* include/grub/emu/hostdisk.h (grub_util_biosdisk_flush): New proto.
* util/grub-setup.c (setup): Use grub_util_biosdisk_flush.
2011-04-19 22:39:14 +02:00
Vladimir 'phcoder' Serbinenko
93a777e388
Complete 64-bit division support.
...
* grub-core/kern/misc.c (grub_divmod64): Rename to ...
(grub_divmod64_full): ... this. Support 64-bit divisor and reminder.
* include/grub/misc.h (grub_divmod64): Rename to ...
(grub_divmod64_full): ... this.
(grub_divmod64): New inline function.
2011-04-18 23:03:52 +02:00
Vladimir 'phcoder' Serbinenko
50d2cc5ae5
Identify RAID by its UUID rather than (guessed) name.
...
* grub-core/disk/raid.c (ascii2hex): New function.
(grub_raid_open): Accept mduuid/%s specification.
* grub-core/kern/emu/getroot.c (get_mdadm_name): Revamped into ...
(get_mdadm_uuid): ... this.
(grub_util_get_grub_dev): Use mduuid/%s if UUID is available.
2011-04-16 15:27:35 +02:00
Vladimir 'phcoder' Serbinenko
d8a2bcf564
contiguous read
2011-04-15 21:42:29 +02:00
Colin Watson
78fa584f67
Rewrite /proc/self/mountinfo handling to cope with bind-mounts and
...
move-mounts appearing out of order. Fixes Ubuntu bug #738345 .
* grub-core/kern/emu/getroot.c (find_root_device_from_mountinfo):
Build a list of relevant visible mounts using the mnt_id and
parent_mnt_id fields, and then scan that list at the end.
2011-04-13 12:36:04 +01:00
Vladimir 'phcoder' Serbinenko
fe6b2cbaa6
BtrFS support. Written by me (Vladimir) with important bugfixes and
...
even more important testing by Colin.
* Makefile.util.def (libgrubmods.a): Add crc.c and gzio.c
* grub-core/Makefile.core.def (btrfs): Add crc.c.
* grub-core/fs/btrfs.c: Stub replaced with real implementation.
* grub-core/io/gzio.c (grub_gzio): New fields mem_input_size,
mem_input_off and mem_input. All users updated to accept in-RAM input.
(gzio_seek): New function.
(test_zlib_header): Likewise.
(grub_gzio_read): Likewise.
(grub_zlib_decompress): Likewise.
* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo):
Accept partial and non-virtual mounts.
(grub_guess_root_device): Do rescanning after device_from_mountinfo to
avoid receiving /dev/dm-X as device.
* grub-core/kern/emu/misc.c (grub_make_system_path_relative_to_its_root):
Handle bind and partial mounts.
* grub-core/lib/crc.c: New file.
* include/grub/deflate.h: Likewise.
* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): New
proto.
* include/grub/lib/crc.h: New file.
2011-04-11 23:26:41 +02:00
Vladimir 'phcoder' Serbinenko
e745cf0ca6
Implement automatic module license checking according to new GNU
...
guidelines.
* grub-core/kern/dl.c (grub_dl_check_license): New function.
(grub_dl_load_core): Use grub_dl_check_license.
* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
(GRUB_MOD_LICENSE): Likewise.
(GRUB_MOD_DUAL_LICENSE): Likewise.
All modules updated.
2011-04-11 23:01:51 +02:00
Vladimir 'phcoder' Serbinenko
c7ba1ba62e
merge mainline into butter
2011-04-11 07:56:31 +02:00
Vladimir 'phcoder' Serbinenko
9ee8d94faa
* grub-core/kern/file.c (grub_file_open): Don't take into account the
...
parenthesis in the middle of the filename.
2011-04-11 07:38:42 +02:00
Vladimir 'phcoder' Serbinenko
5ca1a64de6
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_data): New member
...
is_disk.
(grub_util_biosdisk_open): Don't apply ioctl on non-disk devices.
(open_device) Likewise.
(grub_util_biosdisk_close): Likewise.
Reported by: Mark Korenberger.
2011-04-10 16:08:58 +02:00
Vladimir 'phcoder' Serbinenko
478182a838
* grub-core/kern/emu/hostdisk.c (open_device): Sync on close and not
...
on open.
(grub_util_biosdisk_close): Likewise.
2011-04-08 11:49:38 +02:00
Vladimir 'phcoder' Serbinenko
72a89a54e1
* grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Add missing
...
const attribute and use grub_isdigit.
2011-04-08 11:44:44 +02:00
Vladimir 'phcoder' Serbinenko
829ea451a4
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_read): Don't close
...
on failed seek as it breaks open fd reusage.
2011-04-03 15:45:20 +02:00
Manoel Rebelo Abranches
25f1579b43
Adapt protocols to new network struct.
2011-04-01 05:42:34 -03:00
Manoel Rebelo Abranches
59b361a2df
Use bootp packet to set prefix and card address.
2011-04-01 05:39:06 -03:00
Manoel Rebelo Abranches
50ee5d686d
Merge mainline.
2011-04-01 04:45:37 -03:00
Vladimir 'phcoder' Serbinenko
91dc607330
* grub-core/kern/x86_64/efi/callwrap.S (efi_wrap_0): Preserve 16-byte
...
stack alignment.
(efi_wrap_1): Likewise.
(efi_wrap_2): Likewise.
(efi_wrap_3): Likewise.
(efi_wrap_4): Likewise.
(efi_wrap_5): Likewise.
(efi_wrap_6): Likewise.
(efi_wrap_10): Likewise.
Based on information by: Red Hat/Peter Jones.
2011-03-31 16:48:36 +02:00
Vladimir 'phcoder' Serbinenko
56445fb2b4
* grub-core/kern/emu/getroot.c (grub_util_get_grub_dev) [__linux__]:
...
Preserve partition number in mdadm code path.
2011-03-30 16:37:10 +02:00
Vladimir 'phcoder' Serbinenko
c871b1c6d0
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev): Add
...
few potentially useful grub_util_info.
2011-03-30 13:13:25 +02:00
Vladimir 'phcoder' Serbinenko
9e4d19e0d3
* grub-core/kern/emu/hostdisk.c (find_partition_start)
...
[HAVE_DIOCGDINFO]: Add safety checks.
2011-03-29 15:00:23 +02:00
Vladimir 'phcoder' Serbinenko
09573499ff
Initial variable sector size support
2011-03-29 02:02:55 +02:00
Seth Goldberg
c482ad98b3
* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): Don't return freed string.
2011-03-26 23:22:59 +01:00
Vladimir 'phcoder' Serbinenko
f4727da93f
Use libgeom on FreeBSD to detect partitions.
...
* Makefile.util.def (grub-mkimage): Add LIBGEOM to ldadd.
(grub-mkrelpath): Likewise.
(grub-script-check): Likewise.
(grub-editenv): Likewise.
(grub-mkpasswd-pbkdf2): Likewise.
(grub-fstest): Likewise.
(grub-mkfont): Likewise.
(grub-mkdevicemap): Likewise.
(grub-probe): Likewise.
(grub-setup): Likewise.
(grub-ofpathname): Likewise.
(grub-mklayout): Likewise.
(example_unit_test): Likewise.
(grub-menulst2cfg): Likewise.
* grub-core/Makefile.core.def (grub-emu): Likewise.
(grub-emu-lite): Likewise.
* configure.ac: Check for -lgeom on FreeBSD and set LIBGEOM.
* grub-core/kern/emu/hostdisk.c [FreeBSD]: Include libgeom.h. Don't
define HAVE_DIOCGDINFO.
(follow_geom_up) [FreeBSD]: New function.
(find_partition_start) [FreeBSD]: Rewritten using follow_geom_up.
(convert_system_partition_to_system_disk) [FreeBSD]: Likewise.
(grub_util_biosdisk_get_grub_dev) [FreeBSD]: Use FreeBSD path
unconditionally of HAVE_DIOCGDINFO.
2011-03-26 12:59:02 +01:00
Vladimir 'phcoder' Serbinenko
82fe6c751b
Fix FreeBSD compilation problem.
...
* grub-core/kern/emu/hostdisk.c (MAJOR) [FreeBSD]: New definition.
(FLOPPY_MAJOR) [FreeBSD]: Likewise.
2011-03-26 12:49:34 +01:00
Colin Watson
ebad0b81be
remove unused variable
2011-03-23 14:45:04 +00:00
Vladimir 'phcoder' Serbinenko
54da1febce
Rename mipsel-yeeloong to mipsel-loongson
2011-02-19 13:18:05 +01:00
Colin Watson
28f9509eb7
merge trunk
2011-02-17 14:51:11 +00:00
Vladimir 'phcoder' Serbinenko
028501a0e0
Workaround yet another IEEE1275 bug.
...
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value
GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS.
* grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate): Ignore
adress_cells and size:cells if GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS
is set.
* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS on powermacs.
2011-02-12 10:22:55 +03:00
Colin Watson
8c2c4ff2f5
Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes grub-mkrelpath on btrfs subvolumes.
2011-02-04 13:33:16 +00:00
Colin Watson
118fb264ee
Support probing multipath disks.
2011-01-25 16:51:23 +00:00
Colin Watson
307ed0b484
remove unused variables
2011-01-25 12:28:11 +00:00
Vladimir 'phcoder' Serbinenko
3533413cd5
* grub-core/kern/emu/getroot.c: Include config-util.h explicitly.
2011-01-22 15:37:05 +01:00
Vladimir 'phcoder' Serbinenko
99388e0cf8
Fuloong shutdown support
2011-01-18 19:39:12 +01:00
Vladimir 'phcoder' Serbinenko
cfe6539cfe
initialise keylayout on fuloong too
2011-01-18 19:05:12 +01:00
Vladimir 'phcoder' Serbinenko
8f49d04c98
machtype autodetection
2011-01-18 19:04:27 +01:00
Vladimir 'phcoder' Serbinenko
74eea126f4
fuloong support
2011-01-18 15:28:44 +01:00
Vladimir 'phcoder' Serbinenko
01b08a0f15
initial SIS315PRO support
2011-01-18 13:44:16 +01:00
Vladimir 'phcoder' Serbinenko
46c9db88cd
* grub-core/kern/mips/yeeloong/init.c (grub_machine_init): Init boot
...
module.
2011-01-14 19:23:34 +01:00
Vladimir 'phcoder' Serbinenko
f440c33fd2
Make qemu-mips compile again. Still no grub-mkimage support
2011-01-14 17:37:11 +01:00
Colin Watson
bd1a414714
Resolve the device returned by grub_find_root_device_from_mountinfo or
...
find_root_device_from_libzfs using grub_find_device.
Reported by: Roderich Schupp.
2011-01-12 17:27:52 -06:00
Colin Watson
6b978c4f04
merge trunk
2011-01-11 10:00:45 -06:00
Vladimir 'phcoder' Serbinenko
4531a206a1
* grub-core/fs/i386/pc/pxe.c (set_mac_env): Export variable.
...
(set_env_limn_ro): Likewise.
(GRUB_MOD_INIT): Likewise.
* grub-core/hook/datehook.c (GRUB_MOD_INIT): Likewise. Change to
ARRAY_SIZE while on it.
(GRUB_MOD_FINI): Change to ARRAY_SIZE.
* grub-core/normal/context.c (grub_env_export): Move from here ...
* grub-core/kern/env.c (grub_env_export): ... here.
* grub-core/normal/context.c (grub_cmd_export): Skip exporting root and
prefix.
* grub-core/kern/main.c (grub_main): Export root and prefix.
* include/grub/env.h (grub_env_export): Export.
Reported by: Seth Goldberg.
2011-01-11 11:51:05 +01:00
Vladimir 'phcoder' Serbinenko
ae67942e78
Don't use post-4G memory on EFI even if 64-bit since some non-compliant
...
implementations bug on them.
* grub-core/kern/efi/mm.c (grub_efi_allocate_pages): Skip post-4G
memory.
(filter_memory_map): Likewise.
2011-01-10 23:51:10 +01:00
Vladimir 'phcoder' Serbinenko
db87be2aea
* grub-core/kern/i386/pc/init.c (grub_get_conv_memsize): Removed.
...
(grub_machine_init): Don't check amount of low memory as reportedly
INT 12h can be broken and if low memory is too low we wouldn't have
gotten into grub_machine_init anyway.
2011-01-10 17:54:21 +01:00
Vladimir 'phcoder' Serbinenko
c49849cc63
* grub-core/kern/i386/pc/mmap.c (grub_get_conv_memsize): New function.
...
(grub_machine_mmap_iterate): Take low memory into account
2011-01-10 17:51:06 +01:00
Vladimir 'phcoder' Serbinenko
4b07826647
partitioned mdraid support (untested)
2011-01-08 16:33:49 +01:00
Colin Watson
b7d86d53c4
merge trunk
2011-01-07 17:26:15 +00:00
Colin Watson
11b970d7c9
Always initialise *relroot in grub_find_root_device_from_mountinfo,
...
otherwise we free an uninitialised pointer if /proc is unmounted.
Reported by: Scott Moser.
2011-01-07 17:24:25 +00:00
Colin Watson
6383772c92
remove unused variable
2011-01-06 18:08:01 +00:00
Colin Watson
71b6a2b7a2
* grub-core/kern/emu/getroot.c (find_root_device_from_mountinfo):
...
Fix prefix check to handle the case where dir ends with a slash
(most significantly, "/" itself).
Reported by: Michael Vogt.
2011-01-06 11:09:17 +00:00
Colin Watson
304e349b7f
include <grub/emu/getroot.h> for grub_find_device
2011-01-05 11:41:12 +00:00
Vladimir 'phcoder' Serbinenko
ebc71d284c
* grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Check md/%s
...
names.
Reported by: David Pravec.
2011-01-04 18:15:27 +01:00
Colin Watson
92882f28b6
merge trunk
2011-01-04 15:51:41 +00:00
Colin Watson
944404efb8
merge trunk
2011-01-04 15:41:07 +00:00
Vladimir 'phcoder' Serbinenko
092fd3a072
merge mainline into ahci
2011-01-03 16:03:13 +01:00
phcoder
c18271ed00
Fix compilation errors
2011-01-03 02:28:14 +01:00
Vladimir 'phcoder' Serbinenko
0718f66d12
Discard a bunch of junk code
2011-01-03 00:56:28 +01:00
phcoder
5faa440cb0
Discard several spurious differences from mainline
2011-01-03 00:47:21 +01:00
phcoder
0a2b2cdc95
Fix autogen
2011-01-03 00:30:26 +01:00
Vladimir 'phcoder' Serbinenko
0f35c665e6
merge mainline to ia64
2011-01-03 00:04:39 +01:00
Vladimir 'phcoder' Serbinenko
7edf63fce6
merge ia64-emu into ia64
2011-01-02 23:55:50 +01:00
phcoder
f49157dfe5
Restructure module loading and many fixes. Now normal.mod loads successfully
2011-01-02 23:30:25 +01:00
phcoder
bbbf84350e
Working hello.mod with extcmd.mod
2011-01-02 19:20:28 +01:00
phcoder
73911575dd
support for registering functions from modules (not tested yet)
2011-01-02 14:58:57 +01:00
phcoder
daca6c5f45
ltoff relocation support
2011-01-02 14:39:23 +01:00
phcoder
f9c30af6d0
Succesfully loaded return-only module on ia64-emu
2011-01-02 14:09:58 +01:00
Vladimir 'phcoder' Serbinenko
6f49d0aacb
Add missing cache.c
2011-01-01 15:53:31 +01:00
Vladimir 'phcoder' Serbinenko
c76386454e
Avoid using Reed-Solomon with 0 redundancy.
...
* grub-core/kern/i386/pc/startup.S: Remove 0-data check.
* grub-core/lib/reed_solomon.c (decode_block): Do not proceed on 0 data
or 0 redundancy.
(grub_reed_solomon_add_redundancy): Do not proceed with 0 redundancy.
(grub_reed_solomon_recover): Likewise.
2010-12-27 07:09:43 +01:00
Vladimir 'phcoder' Serbinenko
3d5f359d3b
merge mainline into ahci
2010-12-26 11:20:12 +01:00
Vladimir 'phcoder' Serbinenko
0354b8672c
* grub-core/commands/acpihalt.c (grub_acpi_halt): Sleep for 1.5 before
...
writing an error message because of async power management.
* grub-core/kern/mips/yeeloong/init.c (grub_halt): Likewise.
(grub_reboot): Likewise.
2010-12-25 14:09:36 +01:00
Vladimir 'phcoder' Serbinenko
de2690be7c
merge mainline into ahci
2010-12-24 16:16:01 +01:00
Colin Watson
24b7938b32
* grub-core/kern/i386/pc/startup.S (grub_console_getkey): Use `>> 1'
...
rather than `/ 2', as the latter requires -Wa,--divide which would
require bumping our minimum binutils version.
2010-12-04 16:19:26 +00:00
Vladimir 'phcoder' Serbinenko
228cfb40bf
support bind and subvolume mount
2010-12-02 14:26:46 +01:00
Modestas Vainius
d20a3b371c
* grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Recognise ddf1_
...
fakeraid.
2010-11-14 17:09:13 +01:00
Vladimir 'phcoder' Serbinenko
10001ac54b
* grub-core/kern/i386/pc/startup.S (multiboot_trampoline): Add missing
...
jump.
2010-11-12 08:45:16 +01:00
Vladimir 'phcoder' Serbinenko
c0e103e4da
Support for partitioned loop devices. Improved devmapper support
2010-11-08 16:51:50 +01:00
Manoel Rebelo Abranches
9c4cf53bfe
2010-11-08 Manoel Rebelo Abranches <mrabran@br.ibm.com>
...
* include/grub/elfload.h (grub_elf32_size): New parameter. All users updated.
Return maximum segments alignment.
(grub_elf64_size): Likewise.
* kern/elf.c (grub_elf32_size): New parameter. All users updated.
Return maximum segments alignment.
(grub_elf64_size): Likewise.
* grub-core/loader/powerpc/ieee1275/linux.c:
(grub_linux_claimmap_iterate): New function. Uses the "available"property
in the "memory" node for memory allocation for kernel in the PowerPC loader.
(grub_linux_load32): Correctly find linux entry point offset.
(grub_linux_load64): Likewise.
2010-11-08 11:14:54 -02:00
Vladimir 'phcoder' Serbinenko
80c6d25eef
* grub-core/kern/emu/hostdisk.c
...
(convert_system_partition_to_system_disk): Handle devices like "sdaa1".
2010-11-07 00:10:49 +01:00
Vladimir 'phcoder' Serbinenko
dc5aeea5b9
merge mainline into net
2010-10-25 13:19:10 +02:00
Vladimir 'phcoder' Serbinenko
4f6a2e2175
* grub-core/kern/emu/misc.c
...
(grub_make_system_path_relative_to_its_root)
[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Fix mountpoint return on ZFS.
2010-10-23 20:39:08 +02:00
Vladimir 'phcoder' Serbinenko
5c81f8b349
* grub-core/kern/emu/misc.c
...
(grub_make_system_path_relative_to_its_root): Revert r2882.
2010-10-23 20:34:50 +02:00
Vladimir 'phcoder' Serbinenko
7bced4583e
* grub-core/kern/i386/pc/startup.S (grub_console_setcursor): Check
...
cursor shape for sanity.
2010-10-17 01:49:06 +02:00
Vladimir 'phcoder' Serbinenko
fbfbeb394f
Remove dead grub_efi_mm_fini.
...
* grub-core/kern/efi/mm.c (allocated_page): Removed.
(ALLOCATED_PAGES_SIZE): Likewise.
(MAX_ALLOCATED_PAGES): Likewise.
(allocated_pages): Likewise.
(grub_efi_allocate_pages): Don't record allocated pages.
(grub_efi_free_pages): Likewise.
(grub_efi_mm_init): Likewise.
(grub_efi_mm_fini): Removed.
2010-10-16 17:50:48 +02:00
Vladimir 'phcoder' Serbinenko
65f7ed7c9a
* grub-core/kern/efi/mm.c (BYTES_TO_PAGES): Round up instead of down.
...
(grub_efi_mm_init): Take into account the memory map size increase.
2010-10-16 17:44:35 +02:00
Robert Millan
1eb01cd276
2010-10-16 Robert Millan <rmh@gnu.org>
...
* grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Fix premature return
when processing non-root ZFS filesystems.
2010-10-16 02:30:14 +02:00
Vladimir 'phcoder' Serbinenko
d87c681fd4
* grub-core/kern/i386/pc/startup.S (bypass_table): Use 0x1b explicitly
...
rather than 0x1b.
(grub_console_getkey): Use correct jae opcode rather than ja.
2010-10-14 15:35:55 +02:00
Szymon Janc
c5dc16905a
Make enable of disk cache statistics code configurable.
...
* configure.ac: --enable-cache-stats added.
* config.h.in (DISK_CACHE_STATS): New define.
* grub-core/Makefile.core.def (cacheinfo): New command.
* include/grub/disk.h(grub_disk_cache_get_performance): New function.
* grub-core/commands/cacheinfo.c: New file.
* grub-core/commands/minicmd.c (grub_rescue_cmd_info): Updated and
moved to cacheinfo.c.
* grub-core/kern/disk.c: Use DISK_CACHE_STATS to disable disk cache
debug code.
* include/grub/disk.h: Likewise.
2010-10-06 19:57:01 +02:00
Vladimir 'phcoder' Serbinenko
74baff844e
* grub-core/kern/i386/pc/startup.S (grub_console_getkey): Fix incorrect
...
handling of special keys.
2010-10-06 19:46:20 +02:00
Vladimir 'phcoder' Serbinenko
b65830fae1
Write embedding zone using Reed-Solomon.
...
* Makefile.util.def (grub-setup): Add grub-core/lib/reed_solomon.c.
* grub-core/Makefile.am (rs_decoder.S): New target.
(kern/i386/pc/startup.S): Depend on rs_decoder.S.
* grub-core/kern/i386/pc/startup.S (reed_solomon_redundancy): New field.
(multiboot): Move to RS part.
(post_reed_solomon): New label.
(grub_boot_drive): Move to non-RS part since it's modified in memory
on boot.
Include rs_decoder.S.
* grub-core/lib/reed_solomon.c: New file.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY):
New definition.
(GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE): Removed.
(GRUB_KERNEL_I386_PC_RAW_SIZE): Updated.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): New definition.
* include/grub/partition.h (grub_partition_map): Change prototype of
embed to allow returning additional sectors.
* include/grub/reed_solomon.h: New file.
* util/grub-setup.c (setup): Handle Reed-Solomon.
2010-09-29 21:33:38 +02:00
Robert Millan
8e57a6ca44
2010-09-26 Robert Millan <rmh@gnu.org>
...
Support degraded ZFS arrays in "grub-probe -t device" resolution.
* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): When
the pool is an array of devices, iterate through it and return the
first device that passes a stat() test (instead of blindly returning
the first one).
2010-09-26 16:11:33 +02:00
Robert Millan
f913083640
2010-09-26 Robert Millan <rmh@gnu.org>
...
Build fixes for GNU/kFreeBSD.
* Makefile.util.def: Add `$(LIBZFS) $(LIBNVPAIR)' library dependencies
to programs that require ZFS conversion.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Support
kernels that don't have FLOPPY_MAJOR.
2010-09-26 15:53:05 +02:00
Vladimir 'phcoder' Serbinenko
25e09515ad
Make mb header to protected part
2010-09-25 21:42:13 +02:00
Vladimir 'phcoder' Serbinenko
3ac9e79207
Multiple bugs correction for Reed-Solomon
2010-09-25 20:40:26 +02:00
Vladimir 'phcoder' Serbinenko
419cbeb06d
hook Reed-Solomon into startup.S
2010-09-25 19:33:05 +02:00
BVK Chaitanya
96510fafd2
fix typo
2010-09-25 10:48:48 +05:30
BVK Chaitanya
449333eb7d
Fix grub-emu build.
...
* grub-core/kern/emu/main.c: Remove #include <getopt.h>.
* grub-core/kern/emu/full.c: Split grub_mdraid_{init,fini} into
mdraid09 and mdraid1x.
2010-09-25 10:43:09 +05:30
Vladimir 'phcoder' Serbinenko
4f0de6881c
C part of Reed-Solomon
2010-09-24 14:05:47 +02:00
Vladimir 'phcoder' Serbinenko
6d0fa83c79
Support xz compression on yeeloong.
...
* Makefile.util.def (grub-mkimage): Add $(LIBLZMA).
* configure.ac: Check for LZMA.
* grub-core/Makefile.core.def (xz_decompress): New target.
(none_decompress): Likewise.
* grub-core/boot/decompressor/minilib.c: New file.
* grub-core/boot/decompressor/none.c: Likewise.
* grub-core/boot/decompressor/xz.c: Likewise.
* grub-core/kern/mips/cache.S: Change to noreorder nomacro.
* grub-core/kern/mips/cache_flush.S: Likewise.
* grub-core/kern/i386/pc/lzma_decode.S: Remove dead code.
* grub-core/kern/mips/startup.S: Move first stage to ...
* grub-core/boot/mips/startup_raw.S: ...here. Change to noreorder
nomacro.
* grub-core/kern/mips/startup.S: Change to noreorder nomacro.
* grub-core/lib/mips/relocator_asm.S: Change to noreorder nomacro.
* grub-core/lib/xzembed/xz_dec_bcj.c [GRUB_EMBED_DECOMPRESSOR]:
Allocate statically.
* grub-core/lib/xzembed/xz_dec_lzma2.c [GRUB_EMBED_DECOMPRESSOR]:
Allocate statically or use scratch. Don't check CRC32.
* grub-core/lib/xzembed/xz_dec_stream.c [GRUB_EMBED_DECOMPRESSOR]:
Allocate statically. Don't check CRC32.
* include/grub/decompressor.h: New file.
* include/grub/offsets.h (GRUB_KERNEL_MIPS_YEELOONG_RAW_SIZE):
Removed.
(GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE): New field.
(GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE): Adjusted.
(GRUB_KERNEL_MIPS_YEELOONG_PREFIX): Likewise.
(GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END): Likewise.
(GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE): New define.
* util/grub-mkimage.c (grub_compression_t): New type.
(PLATFORM_FLAGS_DECOMPRESSORS): New flag.
(image_target_desc): New field default_compression.
(image_targets): Adjust yeeloong targets.
(compress_kernel_xz) [HAVE_LIBLZMA]: New function.
(compress_kernel): New parameter comp.
(generate_image): Likewise. Handle new compression case.
(options): New option --compression
(help): Likewise.
(main): Handle new option.
2010-09-23 02:10:44 +02:00
Grégoire Sutre
1b655af685
Define FLOPPY_MAJOR on NetBSD.
2010-09-22 23:32:58 +02:00
Vladimir 'phcoder' Serbinenko
760a7e5aed
Merge mainline into net
2010-09-22 20:13:00 +02:00
Vladimir 'phcoder' Serbinenko
9a0e5c815e
Fix bugs in asm code
2010-09-22 00:53:34 +02:00
Vladimir 'phcoder' Serbinenko
e0a8ef26e4
MAke a separate scratch for decompressor
2010-09-21 19:39:51 +02:00
Colin Watson
4eff79d2f9
* grub-core/kern/emu/hostdisk.c (find_system_device): Only try to
...
convert partition names to disk names if the new `convert' parameter
is set.
(grub_util_biosdisk_get_grub_dev): If opening the disk device
returns GRUB_ERR_UNKNOWN_DEVICE, treat the partition device as a
disk in its own right. This can happen with Xen disk images.
2010-09-21 10:36:44 +01:00
Vladimir 'phcoder' Serbinenko
f8926c32b4
C part of decompressor
2010-09-21 11:22:52 +02:00
Vladimir 'phcoder' Serbinenko
c5b4cd370e
asm part for mips decompressor
2010-09-21 10:14:08 +02:00
Vladimir 'phcoder' Serbinenko
3197c86ba8
Remove dead code in decompressor
2010-09-21 10:07:12 +02:00
Vladimir 'phcoder' Serbinenko
a38b701cbf
Rename jail to extractor
2010-09-20 23:01:34 +02:00
Vladimir 'phcoder' Serbinenko
1b71d7500b
merge mainline into jail
2010-09-20 22:41:59 +02:00
Vladimir 'phcoder' Serbinenko
74342e312f
Support some annoying BSD and Minix subpartitions.
...
* Makefile.util.def (libgrub.a): Add grub-core/partmap/bsdlabel.c.
* grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name):
Properly handle concatenation.
* grub-core/kern/device.c (grub_device_iterate): Likewise.
* grub-core/normal/completion.c (iterate_partition): Likewise.
* grub-core/kern/disk.c (grub_disk_open): Make disk->name not
contain partition. All users updated.
* grub-core/partmap/bsdlabel.c (grub_netbsdlabel_partition_map): New
struct.
(grub_openbsdlabel_partition_map): Likewise.
(bsdlabel_partition_map_iterate): Rename to ..
(iterate_real): ... this. New arguments sector, freebsd and pmap.
(bsdlabel_partition_map_iterate): New function.
(netopenbsdlabel_partition_map_iterate): Likewise.
(netbsdlabel_partition_map_iterate): Likewise.
(openbsdlabel_partition_map_iterate): Likewise.
(GRUB_MOD_INIT): Register new partmaps.
(GRUB_MOD_FINI): Unregister new partmaps.
* grub-core/partmap/msdos.c (pc_partition_map_iterate): Rename to ...
(grub_partition_msdos_iterate): ... this. All users updated.
Don't support embedding other than in a minix partition.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate): New
proto.
* include/grub/partition.h (grub_partition): New field msdostype.
* util/grub-install.in: Handle openbsd and netbsd types being in
part_bsd module.
2010-09-20 21:45:06 +02:00
Vladimir 'phcoder' Serbinenko
899d8af498
* grub-core/kern/emu/misc.c (asprintf): Use vsnprintf instead of
...
vsprintf.
2010-09-20 19:14:29 +02:00
Vladimir 'phcoder' Serbinenko
38c259a76a
Pause the execution (10s max) if any errors are displayed so the user
...
has a chance to see them.
* grub-core/kern/err.c (grub_err_printed_errors): New variable.
(grub_print_error): Increment grub_err_printed_errors.
* grub-core/normal/menu.c (grub_menu_execute_entry): Pause the
execution if any errors were displayed.
(show_menu): Remove old code for pause.
* grub-core/normal/menu_entry.c (run): Likewise.
* grub-core/normal/term.c (grub_normal_char_counter): Removed. All
users updated.
(grub_normal_get_char_counter): Likewise.
* include/grub/err.h (grub_err_printed_errors): New external variable.
* include/grub/normal.h (grub_normal_get_char_counter): Removed.
2010-09-20 17:46:35 +02:00
Colin Watson
a63c31b62d
* kern/emu/hostdisk.c: Include <sys/ioctl.h> and <sys/disklabel.h>
...
on FreeBSD. Define HAVE_DIOCGDINFO on NetBSD and FreeBSD to reduce
the verbosity of later #ifs.
(find_partition_start): Define this function on FreeBSD too.
(device_is_wholedisk) [__FreeBSD__ || __FreeBSD_kernel__]: New
function.
(grub_util_biosdisk_get_grub_dev): Use partition-start-sector logic
on FreeBSD.
2010-09-20 12:12:33 +01:00
Vladimir 'phcoder' Serbinenko
742f9232e3
Split config.h for util and core.
...
* acinclude.m4 (HAVE_ASM_USCORE): Transformed into a variable.
(ADDR32): Likewise.
(DATA32): Likewise.
(BSS_START_SYMBOL): Likewise.
(END_SYMBOL): Likewise.
(NEED_ENABLE_EXECUTE_STACK): Likewise. All users updated.
(grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK): Removed.
* config.h.in: New file.
* configure.ac: Use config-util.h as config define file.
Rename MACHINE into GRUB_MACHINE. All users updated.
(NEED_REGISTER_FRAME_INFO): Transformed into a variable. All users
updated.
(NESTED_FUNC_ATTR): Likewise.
Substitue new variables.
(COND_HAVE_ASM_USCORE): New conditional.
* grub-core/Makefile.am (ASM_PREFIX): New variable.
(kernel_syms.lst): Use ASM_PREFIX.
* grub-core/kern/emu/console.c: Include config-util.h.
* grub-core/kern/emu/misc.c: Likewise.
* grub-core/kern/emu/mm.c: Likewise.
* include/grub/emu/misc.h: Likewise.
* include/grub/libgcc.h: Likewise.
2010-09-19 22:22:43 +02:00