2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Disable lnxboot.img when compiled with Apple's CC * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error [! APPLE_CC] (CODE_LENG): skip [! APPLE_CC] (setup_sects): likewise [! APPLE_CC]: skip filling
This commit is contained in:
parent
e93cdc3db1
commit
9dbf765337
3 changed files with 30 additions and 2 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Disable lnxboot.img when compiled
|
||||||
|
with Apple's CC
|
||||||
|
|
||||||
|
* conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
|
||||||
|
pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
|
||||||
|
* boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
|
||||||
|
[! APPLE_CC] (CODE_LENG): skip
|
||||||
|
[! APPLE_CC] (setup_sects): likewise
|
||||||
|
[! APPLE_CC]: skip filling
|
||||||
|
|
||||||
2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
|
2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Address in trampolines based on 32-bit registers when compiled
|
Address in trampolines based on 32-bit registers when compiled
|
||||||
|
|
|
@ -25,8 +25,14 @@
|
||||||
|
|
||||||
.file "lnxboot.S"
|
.file "lnxboot.S"
|
||||||
|
|
||||||
|
#ifdef APPLE_CC
|
||||||
|
#error Building lnxboot.img with Apple's as results in an unusable image
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CODE_ADDR 0x6000
|
#define CODE_ADDR 0x6000
|
||||||
|
#ifndef APPLE_CC
|
||||||
#define CODE_LENG (code_end - start)
|
#define CODE_LENG (code_end - start)
|
||||||
|
#endif
|
||||||
#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
|
#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
|
||||||
|
|
||||||
#define BLCK_LENG 0x4000
|
#define BLCK_LENG 0x4000
|
||||||
|
@ -44,7 +50,12 @@ data_start:
|
||||||
. = data_start + 0x1F1
|
. = data_start + 0x1F1
|
||||||
|
|
||||||
setup_sects:
|
setup_sects:
|
||||||
|
/* Apple's cc can't fill this value. */
|
||||||
|
#ifdef APPLE_CC
|
||||||
|
.byte 0
|
||||||
|
#else
|
||||||
.byte (CODE_LENG >> 9)
|
.byte (CODE_LENG >> 9)
|
||||||
|
#endif
|
||||||
root_flags:
|
root_flags:
|
||||||
.word 0
|
.word 0
|
||||||
syssize:
|
syssize:
|
||||||
|
@ -351,7 +362,10 @@ fail:
|
||||||
err_int15_msg:
|
err_int15_msg:
|
||||||
.ascii "move memory fails\0"
|
.ascii "move memory fails\0"
|
||||||
|
|
||||||
|
/* Unsupported feature in Apple's cc. */
|
||||||
|
#ifndef APPLE_CC
|
||||||
. = (. & (~0x1FF)) + 0x1FF
|
. = (. & (~0x1FF)) + 0x1FF
|
||||||
|
#endif
|
||||||
|
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@ COMMON_LDFLAGS = -m32 -nostdlib
|
||||||
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
|
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
|
||||||
|
|
||||||
# Images.
|
# Images.
|
||||||
pkglib_IMAGES = boot.img diskboot.img kernel.img pxeboot.img lnxboot.img \
|
pkglib_IMAGES = boot.img diskboot.img kernel.img pxeboot.img cdboot.img
|
||||||
cdboot.img
|
|
||||||
|
|
||||||
# For boot.img.
|
# For boot.img.
|
||||||
boot_img_SOURCES = boot/i386/pc/boot.S
|
boot_img_SOURCES = boot/i386/pc/boot.S
|
||||||
|
@ -32,6 +31,9 @@ diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)8000
|
||||||
diskboot_img_FORMAT = binary
|
diskboot_img_FORMAT = binary
|
||||||
|
|
||||||
# For lnxboot.img.
|
# For lnxboot.img.
|
||||||
|
ifeq ($(TARGET_APPLE_CC), 0)
|
||||||
|
pkglib_IMAGES += lnxboot.img
|
||||||
|
endif
|
||||||
lnxboot_img_SOURCES = boot/i386/pc/lnxboot.S
|
lnxboot_img_SOURCES = boot/i386/pc/lnxboot.S
|
||||||
lnxboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
lnxboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
lnxboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)6000
|
lnxboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)6000
|
||||||
|
|
Loading…
Reference in a new issue