Make arm-emu work.
This commit is contained in:
parent
c8fd2ddf6d
commit
c311ced5d7
8 changed files with 22 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-12-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Make arm-emu work.
|
||||||
|
|
||||||
2013-12-07 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-12-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/grub-mkfont.c: Replace stpcpy with grub_stpcpy.
|
* util/grub-mkfont.c: Replace stpcpy with grub_stpcpy.
|
||||||
|
|
|
@ -13,8 +13,10 @@ endif
|
||||||
if COND_arm
|
if COND_arm
|
||||||
CFLAGS_PLATFORM += -mthumb-interwork
|
CFLAGS_PLATFORM += -mthumb-interwork
|
||||||
CCASFLAGS_PLATFORM = -mthumb-interwork
|
CCASFLAGS_PLATFORM = -mthumb-interwork
|
||||||
|
if !COND_emu
|
||||||
LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
|
LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
if COND_arm64
|
if COND_arm64
|
||||||
CFLAGS_PLATFORM += -mcmodel=large
|
CFLAGS_PLATFORM += -mcmodel=large
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
#if defined(__ia64__)
|
#if defined(__ia64__) || defined (__arm__) || defined (__aarch64__)
|
||||||
#include <grub/cache.h>
|
#include <grub/cache.h>
|
||||||
|
|
||||||
void __clear_cache (char *beg, char *end);
|
void __clear_cache (char *beg, char *end);
|
||||||
|
|
|
@ -23,7 +23,7 @@ FUNCTION (grub_arch_sync_caches)
|
||||||
.set macro
|
.set macro
|
||||||
#elif defined(__powerpc__)
|
#elif defined(__powerpc__)
|
||||||
#include "../powerpc/cache.S"
|
#include "../powerpc/cache.S"
|
||||||
#elif defined(__ia64__)
|
#elif defined(__ia64__) || defined(__arm__) || defined(__aarch64__)
|
||||||
#else
|
#else
|
||||||
#error "No target cpu type is defined"
|
#error "No target cpu type is defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -49,12 +49,14 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||||
return GRUB_ERR_BAD_MODULE;
|
return GRUB_ERR_BAD_MODULE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (__ia64__) || defined (__powerpc__) || defined (__mips__)
|
#if !defined (__i386__) && !defined (__x86_64__) && !defined (__sparc__)
|
||||||
void grub_arch_dl_get_tramp_got_size (const void *ehdr __attribute__ ((unused)),
|
grub_err_t
|
||||||
grub_size_t *tramp, grub_size_t *got)
|
grub_arch_dl_get_tramp_got_size (const void *ehdr __attribute__ ((unused)),
|
||||||
|
grub_size_t *tramp, grub_size_t *got)
|
||||||
{
|
{
|
||||||
*tramp = 0;
|
*tramp = 0;
|
||||||
*got = 0;
|
*got = 0;
|
||||||
|
return GRUB_ERR_BAD_MODULE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,12 @@
|
||||||
#include "../powerpc/dl.c"
|
#include "../powerpc/dl.c"
|
||||||
#elif defined(__ia64__)
|
#elif defined(__ia64__)
|
||||||
#include "../ia64/dl.c"
|
#include "../ia64/dl.c"
|
||||||
|
#elif defined(__arm__)
|
||||||
|
#include "../arm/dl_helper.c"
|
||||||
|
#include "../arm/dl.c"
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
#include "../arm64/dl_helper.c"
|
||||||
|
#include "../arm64/dl.c"
|
||||||
#else
|
#else
|
||||||
#error "No target cpu type is defined"
|
#error "No target cpu type is defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -628,7 +628,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GRUB_UTIL
|
#if !defined (GRUB_UTIL) && !defined (GRUB_MACHINE_EMU)
|
||||||
|
|
||||||
#if defined (__arm__)
|
#if defined (__arm__)
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,7 @@ grub_video_capture_write_bmp (const char *fname,
|
||||||
|
|
||||||
for (y = mode_info->height - 1; y >= 0; y--)
|
for (y = mode_info->height - 1; y >= 0; y--)
|
||||||
{
|
{
|
||||||
grub_uint32_t *iptr = (grub_uint32_t *) ((grub_uint8_t *) ptr + mode_info->pitch * y);
|
grub_uint32_t *iptr = (grub_uint32_t *) ptr + (mode_info->pitch / 4) * y;
|
||||||
int x;
|
int x;
|
||||||
grub_uint8_t *optr = buffer;
|
grub_uint8_t *optr = buffer;
|
||||||
for (x = 0; x < (int) mode_info->width; x++)
|
for (x = 0; x < (int) mode_info->width; x++)
|
||||||
|
@ -421,7 +421,7 @@ grub_video_capture_write_bmp (const char *fname,
|
||||||
|
|
||||||
for (y = mode_info->height - 1; y >= 0; y--)
|
for (y = mode_info->height - 1; y >= 0; y--)
|
||||||
{
|
{
|
||||||
grub_uint16_t *iptr = (grub_uint16_t *) ((grub_uint8_t *) ptr + mode_info->pitch * y);
|
grub_uint16_t *iptr = (grub_uint16_t *) ptr + (mode_info->pitch / 2) * y;
|
||||||
int x;
|
int x;
|
||||||
grub_uint8_t *optr = buffer;
|
grub_uint8_t *optr = buffer;
|
||||||
for (x = 0; x < (int) mode_info->width; x++)
|
for (x = 0; x < (int) mode_info->width; x++)
|
||||||
|
|
Loading…
Reference in a new issue