merge mainline and various cleanups

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-17 14:02:18 +02:00
commit 3666d5f636
380 changed files with 14873 additions and 1961 deletions

View file

@ -18,8 +18,14 @@ kernel = {
nostrip = emu;
emu_ldflags = '-Wl,-r,-d';
x86_efi_ldflags = '-Wl,-r,-d';
x86_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
i386_efi_ldflags = '-Wl,-r,-d';
i386_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
x86_64_efi_ldflags = '-Wl,-r,-d';
x86_64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
ia64_efi_cflags = '-fno-builtin -fpic -minline-int-divide-max-throughput';
ia64_efi_ldflags = '-Wl,-r,-d';
ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
@ -32,11 +38,13 @@ kernel = {
i386_coreboot_ldflags = '-Wl,-Ttext=0x8200';
i386_multiboot_ldflags = '-Wl,-Ttext=0x8200';
i386_ieee1275_ldflags = '-Wl,-Ttext=0x10000';
mips_yeeloong_ldflags = '-Wl,-Ttext,0x80200000';
mips_loongson_ldflags = '-Wl,-Ttext,0x80200000';
powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
mips_arc_ldflags = '-Wl,-Ttext,0x8a000000';
mips_qemu_mips_ldflags = '-Wl,-Ttext,0x80200000';
mips_yeeloong_cppflags = '-DUSE_ASCII_FAILBACK';
mips_loongson_cppflags = '-DUSE_ASCII_FAILBACK';
i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
emu_cflags = '$(CFLAGS_GNULIB)';
emu_cppflags = '$(CPPFLAGS_GNULIB)';
@ -77,12 +85,10 @@ kernel = {
noemu_nodist = symlist.c;
i386_pc = kern/generic/rtc_get_time_ms.c;
x86_efi = kern/generic/rtc_get_time_ms.c;
i386_qemu = kern/generic/rtc_get_time_ms.c;
i386_coreboot = kern/generic/rtc_get_time_ms.c;
i386_multiboot = kern/generic/rtc_get_time_ms.c;
mips_yeeloong = kern/generic/rtc_get_time_ms.c;
mips_qemu_mips = kern/generic/rtc_get_time_ms.c;
mips = kern/generic/rtc_get_time_ms.c;
ieee1275 = disk/ieee1275/ofdisk.c;
ieee1275 = kern/ieee1275/cmain.c;
@ -106,18 +112,24 @@ kernel = {
x86 = kern/i386/pit.c;
x86_efi = disk/efi/efidisk.c;
x86_efi = kern/efi/efi.c;
x86_efi = kern/efi/init.c;
x86_efi = kern/efi/mm.c;
x86_efi = kern/i386/efi/init.c;
x86_efi = term/efi/console.c;
efi = disk/efi/efidisk.c;
efi = kern/efi/efi.c;
efi = kern/efi/init.c;
efi = kern/efi/mm.c;
efi = term/efi/console.c;
i386_efi = kern/i386/tsc.c;
i386_efi = kern/i386/efi/init.c;
x86_64_efi = kern/i386/tsc.c;
x86_64_efi = kern/x86_64/dl.c;
x86_64_efi = kern/x86_64/efi/callwrap.S;
x86_64_efi = kern/i386/efi/init.c;
ia64_efi = kern/ia64/efi/startup.S;
ia64_efi = kern/ia64/efi/init.c;
ia64_efi = kern/ia64/dl.c;
ia64_efi = kern/ia64/dl_helper.c;
i386_pc = kern/i386/pc/init.c;
i386_pc = kern/i386/pc/mmap.c;
@ -137,20 +149,29 @@ kernel = {
i386_ieee1275 = kern/ieee1275/init.c;
mips_yeeloong = term/ns8250.c;
mips_yeeloong = bus/bonito.c;
mips_yeeloong = bus/cs5536.c;
mips_yeeloong = bus/pci.c;
mips = kern/mips/cache.S;
mips = kern/mips/dl.c;
mips = kern/mips/init.c;
mips_yeeloong = kern/mips/yeeloong/init.c;
mips_qemu_mips = kern/mips/qemu-mips/init.c;
mips_yeeloong = term/at_keyboard.c;
mips_yeeloong = term/serial.c;
mips_yeeloong = video/sm712.c;
mips_qemu_mips = kern/mips/qemu_mips/init.c;
mips_qemu_mips = term/ns8250.c;
mips_qemu_mips = term/serial.c;
mips_arc = kern/mips/arc/init.c;
mips_arc = term/arc/console.c;
mips_arc = disk/arc/arcdisk.c;
mips_loongson = term/ns8250.c;
mips_loongson = bus/bonito.c;
mips_loongson = bus/cs5536.c;
mips_loongson = bus/pci.c;
mips_loongson = kern/mips/loongson/init.c;
mips_loongson = term/at_keyboard.c;
mips_loongson = term/serial.c;
mips_loongson = video/sm712.c;
mips_loongson = video/sis315pro.c;
extra_dist = video/sm712_init.c;
mips_yeeloong = commands/keylayouts.c;
mips_loongson = commands/keylayouts.c;
powerpc_ieee1275 = kern/ieee1275/init.c;
powerpc_ieee1275 = kern/powerpc/cache.S;
@ -164,7 +185,7 @@ kernel = {
emu = disk/host.c;
emu = gnulib/progname.c;
emu = gnulib/error.c;
emu = kern/emu/cache.S;
emu = kern/emu/cache_s.S;
emu = kern/emu/console.c;
emu = kern/emu/getroot.c;
emu = kern/emu/hostdisk.c;
@ -173,6 +194,7 @@ kernel = {
emu = kern/emu/misc.c;
emu = kern/emu/mm.c;
emu = kern/emu/time.c;
emu = kern/emu/cache.c;
videoinkernel = term/gfxterm.c;
videoinkernel = font/font.c;
@ -202,7 +224,7 @@ program = {
ldadd = 'kernel.img$(EXEEXT)';
ldadd = '$(MODULE_FILES)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu;
};
@ -214,7 +236,7 @@ program = {
emu_nodist = symlist.c;
ldadd = 'kernel.img$(EXEEXT)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu;
};
@ -297,12 +319,12 @@ image = {
common = lib/xzembed/xz_dec_lzma2.c;
common = lib/xzembed/xz_dec_stream.c;
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
mips_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1';
objcopyflags = '-O binary';
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
mips_loongson_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
mips_qemu_mips_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
mips_arc_ldflags = '-static-libgcc -Wl,-Ttext,0x89f00000';
ldadd = '-lgcc';
cflags = '-static-libgcc';
enable = mips;
@ -313,10 +335,12 @@ image = {
mips = boot/mips/startup_raw.S;
common = boot/decompressor/none.c;
mips_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1';
objcopyflags = '-O binary';
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
mips_loongson_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
mips_qemu_mips_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
mips_arc_ldflags = '-static-libgcc -Wl,-Ttext,0x89f00000';
ldadd = '-lgcc';
cflags = '-static-libgcc';
enable = mips;
@ -324,9 +348,18 @@ image = {
image = {
name = fwstart;
mips_yeeloong = boot/mips/yeeloong/fwstart.S;
mips_loongson = boot/mips/loongson/fwstart.S;
objcopyflags = '-O binary';
enable = mips_yeeloong;
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
enable = mips_loongson;
};
image = {
name = fwstart_fuloong;
mips_loongson = boot/mips/loongson/fuloong.S;
objcopyflags = '-O binary';
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
enable = mips_loongson;
};
module = {
@ -350,8 +383,8 @@ module = {
module = {
name = lsspd;
mips_yeeloong = commands/mips/yeeloong/lsspd.c;
enable = mips_yeeloong;
mips_loongson = commands/mips/loongson/lsspd.c;
enable = mips_loongson;
};
module = {
@ -402,13 +435,21 @@ module = {
enable = emu;
enable = i386_pc;
enable = x86_efi;
enable = i386_efi;
enable = x86_64_efi;
enable = i386_ieee1275;
enable = i386_coreboot;
enable = i386_multiboot;
emu_condition = COND_GRUB_EMU_PCI;
};
module = {
name = lsdev;
common = commands/arc/lsdev.c;
enable = mips_arc;
};
library = {
name = libgnulib.a;
common = gnulib/regex.c;
@ -441,12 +482,12 @@ module = {
name = acpi;
common = commands/acpi.c;
x86_efi = commands/efi/acpi.c;
efi = commands/efi/acpi.c;
i386_pc = commands/i386/pc/acpi.c;
i386_coreboot = commands/i386/pc/acpi.c;
i386_multiboot = commands/i386/pc/acpi.c;
enable = x86_efi;
enable = efi;
enable = i386_pc;
enable = i386_coreboot;
enable = i386_multiboot;
@ -547,8 +588,9 @@ module = {
module = {
name = fixvideo;
x86_efi = commands/efi/fixvideo.c;
enable = x86_efi;
common = commands/efi/fixvideo.c;
enable = i386_efi;
enable = x86_64_efi;
};
module = {
@ -563,11 +605,12 @@ module = {
i386_pc = commands/acpihalt.c;
i386_coreboot = commands/acpihalt.c;
i386_multiboot = commands/acpihalt.c;
x86_efi = commands/acpihalt.c;
i386_efi = commands/acpihalt.c;
x86_64_efi = commands/acpihalt.c;
i386_multiboot = lib/i386/halt.c;
i386_coreboot = lib/i386/halt.c;
i386_qemu = lib/i386/halt.c;
x86_efi = lib/efi/halt.c;
efi = lib/efi/halt.c;
ieee1275 = lib/ieee1275/halt.c;
emu = lib/emu/halt.c;
};
@ -602,8 +645,9 @@ module = {
module = {
name = loadbios;
x86_efi = commands/efi/loadbios.c;
enable = x86_efi;
common = commands/efi/loadbios.c;
enable = i386_efi;
enable = x86_64_efi;
};
module = {
@ -907,6 +951,7 @@ module = {
module = {
name = btrfs;
common = fs/btrfs.c;
common = lib/crc.c;
};
module = {
@ -959,6 +1004,11 @@ module = {
common = fs/minix2.c;
};
module = {
name = minix3;
common = fs/minix3.c;
};
module = {
name = nilfs2;
common = fs/nilfs2.c;
@ -979,11 +1029,21 @@ module = {
common = fs/reiserfs.c;
};
module = {
name = romfs;
common = fs/romfs.c;
};
module = {
name = sfs;
common = fs/sfs.c;
};
module = {
name = squash4;
common = fs/squash4.c;
};
module = {
name = tar;
common = fs/tar.c;
@ -1097,7 +1157,7 @@ module = {
x86_64 = lib/x86_64/relocator_asm.S;
x86 = lib/i386/relocator.c;
ieee1275 = lib/ieee1275/relocator.c;
x86_efi = lib/efi/relocator.c;
efi = lib/efi/relocator.c;
mips = lib/mips/relocator_asm.S;
mips = lib/mips/relocator.c;
powerpc = lib/powerpc/relocator_asm.S;
@ -1114,9 +1174,10 @@ module = {
module = {
name = datetime;
cmos = lib/cmos_datetime.c;
x86_efi = lib/efi/datetime.c;
efi = lib/efi/datetime.c;
sparc64_ieee1275 = lib/ieee1275/datetime.c;
powerpc_ieee1275 = lib/ieee1275/datetime.c;
mips_arc = lib/arc/datetime.c;
enable = noemu;
};
@ -1186,6 +1247,7 @@ module = {
mips = loader/mips/linux.c;
powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
ia64_efi = loader/ia64/efi/linux.c;
common = lib/cmdline.c;
enable = noemu;
};
@ -1205,16 +1267,17 @@ module = {
module = {
name = appleldr;
x86_efi = loader/efi/appleloader.c;
enable = x86_efi;
common = loader/efi/appleloader.c;
enable = i386_efi;
enable = x86_64_efi;
};
module = {
name = chain;
x86_efi = loader/efi/chainloader.c;
efi = loader/efi/chainloader.c;
i386_pc = loader/i386/pc/chainloader.c;
enable = i386_pc;
enable = x86_efi;
enable = efi;
};
module = {
@ -1226,11 +1289,12 @@ module = {
i386_pc = mmap/i386/pc/mmap.c;
i386_pc = mmap/i386/pc/mmap_helper.S;
x86_efi = mmap/efi/mmap.c;
efi = mmap/efi/mmap.c;
mips_yeeloong = mmap/mips/yeeloong/uppermem.c;
mips = mmap/mips/uppermem.c;
enable = x86;
enable = ia64_efi;
enable = mips;
};
@ -1305,6 +1369,11 @@ module = {
common = partmap/sun.c;
};
module = {
name = part_dvh;
common = partmap/dvh.c;
};
module = {
name = part_bsd;
common = partmap/bsdlabel.c;
@ -1415,14 +1484,15 @@ module = {
module = {
name = efi_gop;
x86_efi = video/efi_gop.c;
enable = x86_efi;
efi = video/efi_gop.c;
enable = efi;
};
module = {
name = efi_uga;
x86_efi = video/efi_uga.c;
enable = x86_efi;
efi = video/efi_uga.c;
enable = i386_efi;
enable = x86_64_efi;
};
module = {