merge mainline into crypto
This commit is contained in:
commit
a2e77ce455
50 changed files with 931 additions and 788 deletions
89
ChangeLog
89
ChangeLog
|
@ -1,3 +1,92 @@
|
|||
2009-12-23 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* commands/i386/pc/drivemap.c: Remove all trailing whitespace.
|
||||
* commands/lspci.c: Likewise.
|
||||
* commands/probe.c: Likewise.
|
||||
* commands/xnu_uuid.c: Likewise.
|
||||
* conf/i386-coreboot.rmk: Likewise.
|
||||
* conf/i386-efi.rmk: Likewise.
|
||||
* conf/i386-ieee1275.rmk: Likewise.
|
||||
* conf/i386-pc.rmk: Likewise.
|
||||
* conf/powerpc-ieee1275.rmk: Likewise.
|
||||
* conf/sparc64-ieee1275.rmk: Likewise.
|
||||
* conf/x86_64-efi.rmk: Likewise.
|
||||
* fs/i386/pc/pxe.c: Likewise.
|
||||
* gettext/gettext.c: Likewise.
|
||||
* include/grub/efi/graphics_output.h: Likewise.
|
||||
* include/grub/i386/pc/memory.h: Likewise.
|
||||
* kern/env.c: Likewise.
|
||||
* kern/i386/qemu/startup.S: Likewise.
|
||||
* lib/i386/pc/biosnum.c: Likewise.
|
||||
* lib/i386/relocator.c: Likewise.
|
||||
* lib/i386/relocator_asm.S: Likewise.
|
||||
* lib/relocator.c: Likewise.
|
||||
* loader/i386/bsd.c: Likewise.
|
||||
* loader/i386/multiboot.c: Likewise.
|
||||
* loader/i386/pc/chainloader.c: Likewise.
|
||||
* loader/i386/xnu.c: Likewise.
|
||||
* loader/xnu.c: Likewise.
|
||||
* normal/main.c: Likewise.
|
||||
* normal/menu_text.c: Likewise.
|
||||
* util/getroot.c: Likewise.
|
||||
* util/grub-mkconfig_lib.in: Likewise.
|
||||
* util/grub.d/00_header.in: Likewise.
|
||||
* util/i386/pc/grub-mkimage.c: Likewise.
|
||||
* util/mkisofs/eltorito.c: Likewise.
|
||||
* util/mkisofs/exclude.h: Likewise.
|
||||
* util/mkisofs/hash.c: Likewise.
|
||||
* util/mkisofs/iso9660.h: Likewise.
|
||||
* util/mkisofs/joliet.c: Likewise.
|
||||
* util/mkisofs/mkisofs.c: Likewise.
|
||||
* util/mkisofs/mkisofs.h: Likewise.
|
||||
* util/mkisofs/multi.c: Likewise.
|
||||
* util/mkisofs/name.c: Likewise.
|
||||
* util/mkisofs/rock.c: Likewise.
|
||||
* util/mkisofs/tree.c: Likewise.
|
||||
* util/mkisofs/write.c: Likewise.
|
||||
* video/efi_gop.c: Likewise.
|
||||
|
||||
2009-12-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* video/efi_gop.c (grub_video_gop_get_bitmask): Fix off-by-one in mask
|
||||
size counting.
|
||||
|
||||
2009-12-22 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* util/grub-mkrescue.in (pkglib_DATA): Set to @pkglib_DATA@.
|
||||
* genmk.rb (class SCRIPT): Modify the target file instead of source.
|
||||
|
||||
2009-12-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* commands/memrw.c (grub_cmd_write): Support for mask parameter.
|
||||
(GRUB_MOD_INIT(memrw)): Update help line.
|
||||
|
||||
2009-12-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* commands/memrw.c (cmd_read_byte, cmd_read_word, cmd_read_dword):
|
||||
Use grub_extcmd_t. All users updated.
|
||||
(options): New variable.
|
||||
(grub_cmd_read): Restructure for readability. Support "-v" option.
|
||||
(grub_cmd_write): Restructure for readability.
|
||||
|
||||
2009-12-22 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* genmk.rb (class SCRIPT): Prepend #{src} path with $(srcdir).
|
||||
|
||||
2009-12-22 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* genmk.rb (class SCRIPT): Use sed to substitute @pkglib_DATA@
|
||||
with the actual contents of the correspondending make variable.
|
||||
* util/grub-mkrescue.in (pkglib_DATA): New variable.
|
||||
(process_input_dir): Copy all $pkglib_DATA files instead of explicitly
|
||||
specifying `*.lst' and `efiemu??.o'
|
||||
|
||||
2009-12-22 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* util/grub.d/30_os-prober.in (osx_entry): Add round brackets
|
||||
after function name.
|
||||
Noticed by Rene Engelhard <rene@debian.org>.
|
||||
|
||||
2009-12-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* commands/lspci.c (grub_pci_classes): Add "USB Controller".
|
||||
|
|
104
commands/memrw.c
104
commands/memrw.c
|
@ -19,28 +19,52 @@
|
|||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/extcmd.h>
|
||||
#include <grub/env.h>
|
||||
|
||||
static grub_command_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 const struct grub_arg_option options[] =
|
||||
{
|
||||
{0, 'v', 0, "Save read value into variable VARNAME.",
|
||||
"VARNAME", ARG_TYPE_STRING},
|
||||
{0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
||||
static grub_err_t
|
||||
grub_cmd_read (grub_command_t cmd, int argc, char **argv)
|
||||
grub_cmd_read (grub_extcmd_t cmd, int argc, char **argv)
|
||||
{
|
||||
grub_target_addr_t addr;
|
||||
grub_uint32_t value;
|
||||
grub_uint32_t value = 0;
|
||||
char buf[sizeof ("XXXXXXXX")];
|
||||
|
||||
if (argc != 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid number of arguments");
|
||||
|
||||
addr = grub_strtoul (argv[0], 0, 0);
|
||||
if (cmd->name[5] == 'd')
|
||||
value = *((grub_uint32_t *) addr);
|
||||
else if (cmd->name[5] == 'w')
|
||||
value = *((grub_uint16_t *) addr);
|
||||
else
|
||||
value = *((grub_uint8_t *) addr);
|
||||
switch (cmd->cmd->name[sizeof ("read_") - 1])
|
||||
{
|
||||
case 'd':
|
||||
value = *((volatile grub_uint32_t *) addr);
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
value = *((volatile grub_uint16_t *) addr);
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
value = *((volatile grub_uint8_t *) addr);
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd->state[0].set)
|
||||
{
|
||||
grub_sprintf (buf, "%x", value);
|
||||
grub_env_set (cmd->state[0].arg, buf);
|
||||
}
|
||||
else
|
||||
grub_printf ("0x%x\n", value);
|
||||
|
||||
return 0;
|
||||
|
@ -51,18 +75,42 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
|
|||
{
|
||||
grub_target_addr_t addr;
|
||||
grub_uint32_t value;
|
||||
grub_uint32_t mask = 0xffffffff;
|
||||
|
||||
if (argc != 2)
|
||||
if (argc != 2 && argc != 3)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid number of arguments");
|
||||
|
||||
addr = grub_strtoul (argv[0], 0, 0);
|
||||
value = grub_strtoul (argv[1], 0, 0);
|
||||
if (cmd->name[6] == 'd')
|
||||
*((grub_uint32_t *) addr) = value;
|
||||
else if (cmd->name[6] == 'w')
|
||||
*((grub_uint16_t *) addr) = (grub_uint16_t) value;
|
||||
if (argc == 3)
|
||||
mask = grub_strtoul (argv[2], 0, 0);
|
||||
value &= mask;
|
||||
switch (cmd->name[sizeof ("write_") - 1])
|
||||
{
|
||||
case 'd':
|
||||
if (mask != 0xffffffff)
|
||||
*((volatile grub_uint32_t *) addr)
|
||||
= (*((volatile grub_uint32_t *) addr) & ~mask) | value;
|
||||
else
|
||||
*((grub_uint8_t *) addr) = (grub_uint8_t) value;
|
||||
*((volatile grub_uint32_t *) addr) = value;
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
if ((mask & 0xffff) != 0xffff)
|
||||
*((volatile grub_uint16_t *) addr)
|
||||
= (*((volatile grub_uint16_t *) addr) & ~mask) | value;
|
||||
else
|
||||
*((volatile grub_uint16_t *) addr) = value;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
if ((mask & 0xff) != 0xff)
|
||||
*((volatile grub_uint8_t *) addr)
|
||||
= (*((volatile grub_uint8_t *) addr) & ~mask) | value;
|
||||
else
|
||||
*((volatile grub_uint8_t *) addr) = value;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -70,30 +118,30 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
|
|||
GRUB_MOD_INIT(memrw)
|
||||
{
|
||||
cmd_read_byte =
|
||||
grub_register_command ("read_byte", grub_cmd_read,
|
||||
"read_byte ADDR", "Read byte from ADDR.");
|
||||
grub_register_extcmd ("read_byte", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
|
||||
"read_byte ADDR", "Read byte from ADDR.", options);
|
||||
cmd_read_word =
|
||||
grub_register_command ("read_word", grub_cmd_read,
|
||||
"read_word ADDR", "Read word from ADDR.");
|
||||
grub_register_extcmd ("read_word", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
|
||||
"read_word ADDR", "Read word from ADDR.", options);
|
||||
cmd_read_dword =
|
||||
grub_register_command ("read_dword", grub_cmd_read,
|
||||
"read_dword ADDR", "Read dword from ADDR.");
|
||||
grub_register_extcmd ("read_dword", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
|
||||
"read_dword ADDR", "Read dword from ADDR.", options);
|
||||
cmd_write_byte =
|
||||
grub_register_command ("write_byte", grub_cmd_write,
|
||||
"write_byte ADDR VALUE", "Write byte VALUE to ADDR.");
|
||||
"write_byte ADDR VALUE [MASK]", "Write byte VALUE to ADDR.");
|
||||
cmd_write_word =
|
||||
grub_register_command ("write_word", grub_cmd_write,
|
||||
"write_word ADDR VALUE", "Write word VALUE to ADDR.");
|
||||
"write_word ADDR VALUE [MASK]", "Write word VALUE to ADDR.");
|
||||
cmd_write_dword =
|
||||
grub_register_command ("write_dword", grub_cmd_write,
|
||||
"write_dword ADDR VALUE", "Write dword VALUE to ADDR.");
|
||||
"write_dword ADDR VALUE [MASK]", "Write dword VALUE to ADDR.");
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(memrw)
|
||||
{
|
||||
grub_unregister_command (cmd_read_byte);
|
||||
grub_unregister_command (cmd_read_word);
|
||||
grub_unregister_command (cmd_read_dword);
|
||||
grub_unregister_extcmd (cmd_read_byte);
|
||||
grub_unregister_extcmd (cmd_read_word);
|
||||
grub_unregister_extcmd (cmd_read_dword);
|
||||
grub_unregister_command (cmd_write_byte);
|
||||
grub_unregister_command (cmd_write_word);
|
||||
grub_unregister_command (cmd_write_dword);
|
||||
|
|
1
genmk.rb
1
genmk.rb
|
@ -364,6 +364,7 @@ class Script
|
|||
|
||||
#{@name}: #{src} $(#{src}_DEPENDENCIES) config.status
|
||||
./config.status --file=#{name}:#{src}
|
||||
sed -i -e 's,@pkglib_DATA@,$(pkglib_DATA),g' $@
|
||||
chmod +x $@
|
||||
|
||||
"
|
||||
|
|
|
@ -28,6 +28,7 @@ PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
|||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||
target_cpu=@target_cpu@
|
||||
native_platform=@platform@
|
||||
pkglib_DATA="@pkglib_DATA@"
|
||||
|
||||
coreboot_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-coreboot
|
||||
pc_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-pc
|
||||
|
@ -93,12 +94,16 @@ process_input_dir ()
|
|||
input_dir="$1"
|
||||
platform="$2"
|
||||
mkdir -p ${iso9660_dir}/boot/grub/${target_cpu}-${platform}
|
||||
for file in ${input_dir}/*.mod ${input_dir}/efiemu??.o \
|
||||
${input_dir}/*.lst; do
|
||||
for file in ${input_dir}/*.mod; do
|
||||
if test -f "$file"; then
|
||||
cp -f "$file" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/
|
||||
fi
|
||||
done
|
||||
for file in ${pkglib_DATA}; do
|
||||
if test -f "${input_dir}/${file}"; then
|
||||
cp -f "${input_dir}/${file}" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p ${iso9660_dir}/boot/grub/locale
|
||||
for file in ${input_dir}/po/*.mo; do
|
||||
|
|
|
@ -37,7 +37,7 @@ if [ -z "${OSPROBED}" ] ; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
osx_entry {
|
||||
osx_entry() {
|
||||
cat << EOF
|
||||
menuentry "${LONGNAME} (${2}-bit) (on ${DEVICE})" {
|
||||
EOF
|
||||
|
|
|
@ -123,7 +123,7 @@ grub_video_gop_get_bitmask (grub_uint32_t mask, unsigned int *mask_size,
|
|||
if (!(mask & (1 << i)))
|
||||
break;
|
||||
*field_pos = i + 1;
|
||||
*mask_size = last_p - *field_pos;
|
||||
*mask_size = last_p - *field_pos + 1;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
Loading…
Reference in a new issue