Make qemu-mips compile again. Still no grub-mkimage support

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-01-14 17:37:11 +01:00
parent 4fbf185232
commit f440c33fd2
15 changed files with 110 additions and 23 deletions

View file

@ -0,0 +1,28 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008 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/>.
*/
#ifndef GRUB_CPU_CMOS_H
#define GRUB_CPU_CMOS_H 1
#include <grub/types.h>
#include <grub/cpu/io.h>
#define GRUB_CMOS_ADDR_REG 0xb4000070
#define GRUB_CMOS_DATA_REG 0xb4000071
#endif /* GRUB_CPU_CMOS_H */

View file

@ -20,7 +20,6 @@
#define GRUB_KERNEL_MACHINE_HEADER 1
#include <grub/symbol.h>
#include <grub/cpu/kernel.h>
#ifndef ASM_FILE

View file

@ -28,11 +28,37 @@
#define GRUB_MACHINE_MEMORY_STACK_HIGH 0x80f00000
#define GRUB_MACHINE_MEMORY_USABLE 0x81000000
#define GRUB_MACHINE_MEMORY_AVAILABLE 1
#define GRUB_MACHINE_MEMORY_MAX_TYPE 1
/* This one is special: it's used internally but is never reported
by firmware. */
#define GRUB_MACHINE_MEMORY_HOLE 2
#define GRUB_MACHINE_MEMORY_RESERVED GRUB_MACHINE_MEMORY_HOLE
#ifndef ASM_FILE
typedef grub_addr_t grub_phys_addr_t;
static inline grub_phys_addr_t
grub_vtop (void *a)
{
return ((grub_phys_addr_t) a) & 0x1fffffff;
}
static inline void *
grub_map_memory (grub_phys_addr_t a, grub_size_t size __attribute__ ((unused)))
{
return (void *) (a | 0x80000000);
}
static inline void
grub_unmap_memory (void *a __attribute__ ((unused)),
grub_size_t size __attribute__ ((unused)))
{
}
grub_err_t EXPORT_FUNC (grub_machine_mmap_iterate)
(int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t));
grub_err_t EXPORT_FUNC(grub_machine_mmap_iterate)
(int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t));
static inline grub_err_t
grub_machine_mmap_register (grub_uint64_t start __attribute__ ((unused)),
@ -47,6 +73,7 @@ grub_machine_mmap_unregister (int handle __attribute__ ((unused)))
{
return GRUB_ERR_NONE;
}
#endif
#endif

View file

@ -104,12 +104,26 @@
#define GRUB_KERNEL_MIPS_YEELOONG_LINK_ALIGN 32
#define GRUB_KERNEL_MIPS_YEELOONG_COMPRESSED_SIZE 0x8
#define GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE 0xc
#define GRUB_KERNEL_MIPS_COMPRESSED_SIZE 0x8
#define GRUB_KERNEL_MIPS_UNCOMPRESSED_SIZE 0xc
#define GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE 0x08
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX 0x0c
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END 0x54
#define GRUB_KERNEL_MIPS_YEELOONG_COMPRESSED_SIZE GRUB_KERNEL_MIPS_COMPRESSED_SIZE
#define GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE GRUB_KERNEL_MIPS_UNCOMPRESSED_SIZE
#define GRUB_KERNEL_MIPS_QEMU_MIPS_COMPRESSED_SIZE GRUB_KERNEL_MIPS_COMPRESSED_SIZE
#define GRUB_KERNEL_MIPS_QEMU_MIPS_UNCOMPRESSED_SIZE GRUB_KERNEL_MIPS_UNCOMPRESSED_SIZE
#define GRUB_KERNEL_MIPS_TOTAL_MODULE_SIZE 0x08
#define GRUB_KERNEL_MIPS_PREFIX 0x0c
#define GRUB_KERNEL_MIPS_PREFIX_END 0x54
#define GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE GRUB_KERNEL_MIPS_TOTAL_MODULE_SIZE
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX GRUB_KERNEL_MIPS_PREFIX
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END GRUB_KERNEL_MIPS_PREFIX_END
#define GRUB_KERNEL_MIPS_QEMU_MIPS_TOTAL_MODULE_SIZE GRUB_KERNEL_MIPS_TOTAL_MODULE_SIZE
#define GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX GRUB_KERNEL_MIPS_PREFIX
#define GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX_END GRUB_KERNEL_MIPS_PREFIX_END
/* The offset of GRUB_PREFIX. */
#define GRUB_KERNEL_I386_EFI_PREFIX 0x8
@ -144,7 +158,9 @@
#define GRUB_KERNEL_POWERPC_IEEE1275_MOD_ALIGN 0x1000
#define GRUB_KERNEL_MIPS_YEELOONG_MOD_ALIGN 0x1
#define GRUB_KERNEL_MIPS_MOD_ALIGN 0x1
#define GRUB_KERNEL_MIPS_YEELOONG_MOD_ALIGN GRUB_KERNEL_MIPS_MOD_ALIGN
#define GRUB_KERNEL_MIPS_QEMU_MIPS_MOD_ALIGN GRUB_KERNEL_MIPS_MOD_ALIGN
/* Minimal gap between _end and the start of the modules. It's a hack
for PowerMac to prevent "CLAIM failed" error. The real fix is to