[kitten] push by kevin.pe...@gmail.com - Changes needed to compile Kitten with Intel Phi "Knights Corner" cross... on 2013-11-19 01:23 GMT

13 views
Skip to first unread message

kit...@googlecode.com

unread,
Nov 18, 2013, 8:23:35 PM11/18/13
to kitten-...@googlegroups.com
Revision: 60ad7cfeb4f7
Branch: default
Author: Kevin Pedretti <ktp...@sandia.gov>
Date: Tue Nov 19 01:22:35 2013 UTC
Log: Changes needed to compile Kitten with Intel Phi "Knights Corner"
cross toolchain.

To configure for Knights Corner:
make ARCH=k1om menuconfig
# Select Processor Arch = "Intel Knights Corner"
make ARCH=k1om bzImage

The Intel supplied cross toolchain must be in your path for this to work...
on my system gcc is at /usr/linux-k1om-4.7/bin/x86_64-k1om-linux-gcc and all
tools have a x86_64-k1om-linux- prefix.
http://code.google.com/p/kitten/source/detail?r=60ad7cfeb4f7

Added:
/arch/x86_64/boot/compressed/vmlwk.lds.S
/include/arch-generic/bitops/find.h
/lib/find_last_bit.c
/lib/find_next_bit.c
Deleted:
/arch/x86_64/boot/compressed/vmlwk.lds
/arch/x86_64/lib/bitops.c
Modified:
/Kbuild
/Makefile
/arch/x86_64/Kconfig
/arch/x86_64/Makefile
/arch/x86_64/boot/compressed/Makefile
/arch/x86_64/kernel/entry.S
/arch/x86_64/kernel/vmlwk.lds.S
/arch/x86_64/lib/Makefile
/include/arch-x86_64/bitops.h
/include/arch-x86_64/i387.h
/include/arch-x86_64/processor.h
/include/arch-x86_64/system.h
/lib/Makefile
/scripts/Kbuild.include
/scripts/kconfig/Makefile
/user/Makefile.footer

=======================================
--- /dev/null
+++ /arch/x86_64/boot/compressed/vmlwk.lds.S Tue Nov 19 01:22:35 2013 UTC
@@ -0,0 +1,57 @@
+#include <arch-generic/vmlwk.lds.h>
+#include <arch/page.h>
+
+OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT,
CONFIG_OUTPUT_FORMAT)
+
+#undef i386
+
+#if defined(CONFIG_MK1OM)
+OUTPUT_ARCH(k1om)
+#else
+OUTPUT_ARCH(i386:x86-64)
+#endif
+
+ENTRY(startup_64)
+
+SECTIONS
+{
+ /* Be careful parts of head.S assume startup_32 is at
+ * address 0.
+ */
+ . = 0;
+ .text : {
+ _head = . ;
+ *(.text.head)
+ _ehead = . ;
+ *(.text.compressed)
+ _text = .; /* Text */
+ *(.text)
+ *(.text.*)
+ _etext = . ;
+ }
+ .rodata : {
+ _rodata = . ;
+ *(.rodata) /* read-only data */
+ *(.rodata.*)
+ _erodata = . ;
+ }
+ .data : {
+ _data = . ;
+ *(.data)
+ *(.data.*)
+ _edata = . ;
+ }
+ . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
+ .bss : {
+ _bss = . ;
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ . = ALIGN(8); /* For convenience during zeroing */
+ _end = . ;
+ . = ALIGN(4096);
+ pgtable = . ;
+ . = . + 4096 * 6;
+ _heap = . ;
+ }
+}
=======================================
--- /dev/null
+++ /include/arch-generic/bitops/find.h Tue Nov 19 01:22:35 2013 UTC
@@ -0,0 +1,42 @@
+#ifndef _ASM_GENERIC_BITOPS_FIND_H_
+#define _ASM_GENERIC_BITOPS_FIND_H_
+
+/**
+ * find_next_bit - find the next set bit in a memory region
+ * @addr: The address to base the search on
+ * @offset: The bitnumber to start searching at
+ * @size: The bitmap size in bits
+ */
+extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
+ size, unsigned long offset);
+
+/**
+ * find_next_zero_bit - find the next cleared bit in a memory region
+ * @addr: The address to base the search on
+ * @offset: The bitnumber to start searching at
+ * @size: The bitmap size in bits
+ */
+extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
+ long size, unsigned long offset);
+
+/**
+ * find_first_bit - find the first set bit in a memory region
+ * @addr: The address to start the search at
+ * @size: The maximum size to search
+ *
+ * Returns the bit number of the first set bit.
+ */
+extern unsigned long find_first_bit(const unsigned long *addr,
+ unsigned long size);
+
+/**
+ * find_first_zero_bit - find the first cleared bit in a memory region
+ * @addr: The address to start the search at
+ * @size: The maximum size to search
+ *
+ * Returns the bit number of the first cleared bit.
+ */
+extern unsigned long find_first_zero_bit(const unsigned long *addr,
+ unsigned long size);
+
+#endif /*_ASM_GENERIC_BITOPS_FIND_H_ */
=======================================
--- /dev/null
+++ /lib/find_last_bit.c Tue Nov 19 01:22:35 2013 UTC
@@ -0,0 +1,43 @@
+/* find_last_bit.c: fallback find next bit implementation
+ *
+ * Copyright (C) 2008 IBM Corporation
+ * Written by Rusty Russell <ru...@rustcorp.com.au>
+ * (Inspired by David Howell's find_next_bit implementation)
+ *
+ * This program 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
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <lwk/bitops.h>
+#include <arch/types.h>
+#include <arch/byteorder.h>
+
+unsigned long find_last_bit(const unsigned long *addr, unsigned long size)
+{
+ unsigned long words;
+ unsigned long tmp;
+
+ /* Start at final word. */
+ words = size / BITS_PER_LONG;
+
+ /* Partial final word? */
+ if (size & (BITS_PER_LONG-1)) {
+ tmp = (addr[words] & (~0UL >> (BITS_PER_LONG
+ - (size & (BITS_PER_LONG-1)))));
+ if (tmp)
+ goto found;
+ }
+
+ while (words) {
+ tmp = addr[--words];
+ if (tmp) {
+found:
+ return words * BITS_PER_LONG + __fls(tmp);
+ }
+ }
+
+ /* Not found */
+ return size;
+}
=======================================
--- /dev/null
+++ /lib/find_next_bit.c Tue Nov 19 01:22:35 2013 UTC
@@ -0,0 +1,263 @@
+/* find_next_bit.c: fallback find next bit implementation
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhow...@redhat.com)
+ *
+ * This program 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
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <lwk/bitops.h>
+#include <arch/types.h>
+#include <arch/byteorder.h>
+
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+
+/*
+ * Find the next set bit in a memory region.
+ */
+unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
+ unsigned long offset)
+{
+ const unsigned long *p = addr + BITOP_WORD(offset);
+ unsigned long result = offset & ~(BITS_PER_LONG-1);
+ unsigned long tmp;
+
+ if (offset >= size)
+ return size;
+ size -= result;
+ offset %= BITS_PER_LONG;
+ if (offset) {
+ tmp = *(p++);
+ tmp &= (~0UL << offset);
+ if (size < BITS_PER_LONG)
+ goto found_first;
+ if (tmp)
+ goto found_middle;
+ size -= BITS_PER_LONG;
+ result += BITS_PER_LONG;
+ }
+ while (size & ~(BITS_PER_LONG-1)) {
+ if ((tmp = *(p++)))
+ goto found_middle;
+ result += BITS_PER_LONG;
+ size -= BITS_PER_LONG;
+ }
+ if (!size)
+ return result;
+ tmp = *p;
+
+found_first:
+ tmp &= (~0UL >> (BITS_PER_LONG - size));
+ if (tmp == 0UL) /* Are any bits set? */
+ return result + size; /* Nope. */
+found_middle:
+ return result + __ffs(tmp);
+}
+
+/*
+ * This implementation of find_{first,next}_zero_bit was stolen from
+ * Linus' asm-alpha/bitops.h.
+ */
+unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long
size,
+ unsigned long offset)
+{
+ const unsigned long *p = addr + BITOP_WORD(offset);
+ unsigned long result = offset & ~(BITS_PER_LONG-1);
+ unsigned long tmp;
+
+ if (offset >= size)
+ return size;
+ size -= result;
+ offset %= BITS_PER_LONG;
+ if (offset) {
+ tmp = *(p++);
+ tmp |= ~0UL >> (BITS_PER_LONG - offset);
+ if (size < BITS_PER_LONG)
+ goto found_first;
+ if (~tmp)
+ goto found_middle;
+ size -= BITS_PER_LONG;
+ result += BITS_PER_LONG;
+ }
+ while (size & ~(BITS_PER_LONG-1)) {
+ if (~(tmp = *(p++)))
+ goto found_middle;
+ result += BITS_PER_LONG;
+ size -= BITS_PER_LONG;
+ }
+ if (!size)
+ return result;
+ tmp = *p;
+
+found_first:
+ tmp |= ~0UL << size;
+ if (tmp == ~0UL) /* Are any bits zero? */
+ return result + size; /* Nope. */
+found_middle:
+ return result + ffz(tmp);
+}
+
+/*
+ * Find the first set bit in a memory region.
+ */
+unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
+{
+ const unsigned long *p = addr;
+ unsigned long result = 0;
+ unsigned long tmp;
+
+ while (size & ~(BITS_PER_LONG-1)) {
+ if ((tmp = *(p++)))
+ goto found;
+ result += BITS_PER_LONG;
+ size -= BITS_PER_LONG;
+ }
+ if (!size)
+ return result;
+
+ tmp = (*p) & (~0UL >> (BITS_PER_LONG - size));
+ if (tmp == 0UL) /* Are any bits set? */
+ return result + size; /* Nope. */
+found:
+ return result + __ffs(tmp);
+}
+
+/*
+ * Find the first cleared bit in a memory region.
+ */
+unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long
size)
+{
+ const unsigned long *p = addr;
+ unsigned long result = 0;
+ unsigned long tmp;
+
+ while (size & ~(BITS_PER_LONG-1)) {
+ if (~(tmp = *(p++)))
+ goto found;
+ result += BITS_PER_LONG;
+ size -= BITS_PER_LONG;
+ }
+ if (!size)
+ return result;
+
+ tmp = (*p) | (~0UL << size);
+ if (tmp == ~0UL) /* Are any bits zero? */
+ return result + size; /* Nope. */
+found:
+ return result + ffz(tmp);
+}
+
+#ifdef __BIG_ENDIAN
+
+/* include/linux/byteorder does not support "unsigned long" type */
+static inline unsigned long ext2_swabp(const unsigned long * x)
+{
+#if BITS_PER_LONG == 64
+ return (unsigned long) __swab64p((u64 *) x);
+#elif BITS_PER_LONG == 32
+ return (unsigned long) __swab32p((u32 *) x);
+#else
+#error BITS_PER_LONG not defined
+#endif
+}
+
+/* include/linux/byteorder doesn't support "unsigned long" type */
+static inline unsigned long ext2_swab(const unsigned long y)
+{
+#if BITS_PER_LONG == 64
+ return (unsigned long) __swab64((u64) y);
+#elif BITS_PER_LONG == 32
+ return (unsigned long) __swab32((u32) y);
+#else
+#error BITS_PER_LONG not defined
+#endif
+}
+
+unsigned long generic_find_next_zero_le_bit(const unsigned long *addr,
unsigned
+ long size, unsigned long offset)
+{
+ const unsigned long *p = addr + BITOP_WORD(offset);
+ unsigned long result = offset & ~(BITS_PER_LONG - 1);
+ unsigned long tmp;
+
+ if (offset >= size)
+ return size;
+ size -= result;
+ offset &= (BITS_PER_LONG - 1UL);
+ if (offset) {
+ tmp = ext2_swabp(p++);
+ tmp |= (~0UL >> (BITS_PER_LONG - offset));
+ if (size < BITS_PER_LONG)
+ goto found_first;
+ if (~tmp)
+ goto found_middle;
+ size -= BITS_PER_LONG;
+ result += BITS_PER_LONG;
+ }
+
+ while (size & ~(BITS_PER_LONG - 1)) {
+ if (~(tmp = *(p++)))
+ goto found_middle_swap;
+ result += BITS_PER_LONG;
+ size -= BITS_PER_LONG;
+ }
+ if (!size)
+ return result;
+ tmp = ext2_swabp(p);
+found_first:
+ tmp |= ~0UL << size;
+ if (tmp == ~0UL) /* Are any bits zero? */
+ return result + size; /* Nope. Skip ffz */
+found_middle:
+ return result + ffz(tmp);
+
+found_middle_swap:
+ return result + ffz(ext2_swab(tmp));
+}
+
+unsigned long generic_find_next_le_bit(const unsigned long *addr, unsigned
+ long size, unsigned long offset)
+{
+ const unsigned long *p = addr + BITOP_WORD(offset);
+ unsigned long result = offset & ~(BITS_PER_LONG - 1);
+ unsigned long tmp;
+
+ if (offset >= size)
+ return size;
+ size -= result;
+ offset &= (BITS_PER_LONG - 1UL);
+ if (offset) {
+ tmp = ext2_swabp(p++);
+ tmp &= (~0UL << offset);
+ if (size < BITS_PER_LONG)
+ goto found_first;
+ if (tmp)
+ goto found_middle;
+ size -= BITS_PER_LONG;
+ result += BITS_PER_LONG;
+ }
+
+ while (size & ~(BITS_PER_LONG - 1)) {
+ tmp = *(p++);
+ if (tmp)
+ goto found_middle_swap;
+ result += BITS_PER_LONG;
+ size -= BITS_PER_LONG;
+ }
+ if (!size)
+ return result;
+ tmp = ext2_swabp(p);
+found_first:
+ tmp &= (~0UL >> (BITS_PER_LONG - size));
+ if (tmp == 0UL) /* Are any bits set? */
+ return result + size; /* Nope. */
+found_middle:
+ return result + __ffs(tmp);
+
+found_middle_swap:
+ return result + __ffs(ext2_swab(tmp));
+}
+#endif /* __BIG_ENDIAN */
=======================================
--- /arch/x86_64/boot/compressed/vmlwk.lds Fri Oct 12 17:56:49 2007 UTC
+++ /dev/null
@@ -1,44 +0,0 @@
-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
-OUTPUT_ARCH(i386:x86-64)
-ENTRY(startup_64)
-SECTIONS
-{
- /* Be careful parts of head.S assume startup_32 is at
- * address 0.
- */
- . = 0;
- .text : {
- _head = . ;
- *(.text.head)
- _ehead = . ;
- *(.text.compressed)
- _text = .; /* Text */
- *(.text)
- *(.text.*)
- _etext = . ;
- }
- .rodata : {
- _rodata = . ;
- *(.rodata) /* read-only data */
- *(.rodata.*)
- _erodata = . ;
- }
- .data : {
- _data = . ;
- *(.data)
- *(.data.*)
- _edata = . ;
- }
- .bss : {
- _bss = . ;
- *(.bss)
- *(.bss.*)
- *(COMMON)
- . = ALIGN(8);
- _end = . ;
- . = ALIGN(4096);
- pgtable = . ;
- . = . + 4096 * 6;
- _heap = .;
- }
-}
=======================================
--- /arch/x86_64/lib/bitops.c Thu Sep 20 22:47:45 2007 UTC
+++ /dev/null
@@ -1,175 +0,0 @@
-#include <lwk/bitops.h>
-
-#undef find_first_zero_bit
-#undef find_next_zero_bit
-#undef find_first_bit
-#undef find_next_bit
-
-static inline long
-__find_first_zero_bit(const unsigned long * addr, unsigned long size)
-{
- long d0, d1, d2;
- long res;
-
- /*
- * We must test the size in words, not in bits, because
- * otherwise incoming sizes in the range -63..-1 will not run
- * any scasq instructions, and then the flags used by the je
- * instruction will have whatever random value was in place
- * before. Nobody should call us like that, but
- * find_next_zero_bit() does when offset and size are at the
- * same word and it fails to find a zero itself.
- */
- size += 63;
- size >>= 6;
- if (!size)
- return 0;
- asm volatile(
- " repe; scasq\n"
- " je 1f\n"
- " xorq -8(%%rdi),%%rax\n"
- " subq $8,%%rdi\n"
- " bsfq %%rax,%%rdx\n"
- "1: subq %[addr],%%rdi\n"
- " shlq $3,%%rdi\n"
- " addq %%rdi,%%rdx"
- :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
- :"0" (0ULL), "1" (size), "2" (addr), "3" (-1ULL),
- [addr] "S" (addr) : "memory");
- /*
- * Any register would do for [addr] above, but GCC tends to
- * prefer rbx over rsi, even though rsi is readily available
- * and doesn't have to be saved.
- */
- return res;
-}
-
-/**
- * find_first_zero_bit - find the first zero bit in a memory region
- * @addr: The address to start the search at
- * @size: The maximum size to search
- *
- * Returns the bit-number of the first zero bit, not the number of the byte
- * containing a bit.
- */
-long find_first_zero_bit(const unsigned long * addr, unsigned long size)
-{
- return __find_first_zero_bit (addr, size);
-}
-
-/**
- * find_next_zero_bit - find the first zero bit in a memory region
- * @addr: The address to base the search on
- * @offset: The bitnumber to start searching at
- * @size: The maximum size to search
- */
-long find_next_zero_bit (const unsigned long * addr, long size, long
offset)
-{
- const unsigned long * p = addr + (offset >> 6);
- unsigned long set = 0;
- unsigned long res, bit = offset&63;
-
- if (bit) {
- /*
- * Look for zero in first word
- */
- asm("bsfq %1,%0\n\t"
- "cmoveq %2,%0"
- : "=r" (set)
- : "r" (~(*p >> bit)), "r"(64L));
- if (set < (64 - bit))
- return set + offset;
- set = 64 - bit;
- p++;
- }
- /*
- * No zero yet, search remaining full words for a zero
- */
- res = __find_first_zero_bit (p, size - 64 * (p - addr));
-
- return (offset + set + res);
-}
-
-static inline long
-__find_first_bit(const unsigned long * addr, unsigned long size)
-{
- long d0, d1;
- long res;
-
- /*
- * We must test the size in words, not in bits, because
- * otherwise incoming sizes in the range -63..-1 will not run
- * any scasq instructions, and then the flags used by the jz
- * instruction will have whatever random value was in place
- * before. Nobody should call us like that, but
- * find_next_bit() does when offset and size are at the same
- * word and it fails to find a one itself.
- */
- size += 63;
- size >>= 6;
- if (!size)
- return 0;
- asm volatile(
- " repe; scasq\n"
- " jz 1f\n"
- " subq $8,%%rdi\n"
- " bsfq (%%rdi),%%rax\n"
- "1: subq %[addr],%%rdi\n"
- " shlq $3,%%rdi\n"
- " addq %%rdi,%%rax"
- :"=a" (res), "=&c" (d0), "=&D" (d1)
- :"0" (0ULL), "1" (size), "2" (addr),
- [addr] "r" (addr) : "memory");
- return res;
-}
-
-/**
- * find_first_bit - find the first set bit in a memory region
- * @addr: The address to start the search at
- * @size: The maximum size to search
- *
- * Returns the bit-number of the first set bit, not the number of the byte
- * containing a bit.
- */
-long find_first_bit(const unsigned long * addr, unsigned long size)
-{
- return __find_first_bit(addr,size);
-}
-
-/**
- * find_next_bit - find the first set bit in a memory region
- * @addr: The address to base the search on
- * @offset: The bitnumber to start searching at
- * @size: The maximum size to search
- */
-long find_next_bit(const unsigned long * addr, long size, long offset)
-{
- const unsigned long * p = addr + (offset >> 6);
- unsigned long set = 0, bit = offset & 63, res;
-
- if (bit) {
- /*
- * Look for nonzero in the first 64 bits:
- */
- asm("bsfq %1,%0\n\t"
- "cmoveq %2,%0\n\t"
- : "=r" (set)
- : "r" (*p >> bit), "r" (64L));
- if (set < (64 - bit))
- return set + offset;
- set = 64 - bit;
- p++;
- }
- /*
- * No set bit yet, search remaining full words for a bit
- */
- res = __find_first_bit (p, size - 64 * (p - addr));
- return (offset + set + res);
-}
-
-#include <lwk/linux_compat.h>
-
-EXPORT_SYMBOL(find_next_bit);
-EXPORT_SYMBOL(find_first_bit);
-EXPORT_SYMBOL(find_first_zero_bit);
-EXPORT_SYMBOL(find_next_zero_bit);
=======================================
--- /Kbuild Fri Aug 17 16:48:22 2007 UTC
+++ /Kbuild Tue Nov 19 01:22:35 2013 UTC
@@ -7,11 +7,11 @@
# 1) Generate asm-offsets.h
#

-offsets-file := include/arch-$(ARCH)/asm-offsets.h
+offsets-file := include/arch-$(SRCARCH)/asm-offsets.h

always := $(offsets-file)
targets := $(offsets-file)
-targets += arch/$(ARCH)/kernel/asm-offsets.s
+targets += arch/$(SRCARCH)/kernel/asm-offsets.s

# Default sed regexp - multiline due to syntax constraints
define sed-y
@@ -38,11 +38,11 @@
endef

# We use internal kbuild rules to avoid the "is up to date" message from
make
-arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
+arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c
FORCE
$(Q)mkdir -p $(dir $@)
$(call if_changed_dep,cc_s_c)

-$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
+$(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s Kbuild
$(Q)mkdir -p $(dir $@)
$(call cmd,offsets)

=======================================
--- /Makefile Wed Mar 20 17:55:01 2013 UTC
+++ /Makefile Tue Nov 19 01:22:35 2013 UTC
@@ -177,7 +177,13 @@
CROSS_COMPILE ?=

# Architecture as present in compile.h
-UTS_MACHINE := $(ARCH)
+UTS_MACHINE := $(ARCH)
+SRCARCH := $(ARCH)
+
+# Additional ARCH settings for x86
+ifeq ($(ARCH),k1om)
+ SRCARCH := x86_64
+endif

# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -328,7 +334,7 @@
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
- ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
+ ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS

@@ -414,7 +420,7 @@
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
-include $(srctree)/arch/$(ARCH)/Makefile
+include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG

config: scripts_basic outputmakefile FORCE
@@ -505,7 +511,7 @@
endif


-include $(srctree)/arch/$(ARCH)/Makefile
+include $(srctree)/arch/$(SRCARCH)/Makefile

# arch Makefile may override CC so keep this after arch Makefile is
included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC)
-print-file-name=include)
@@ -517,7 +523,7 @@
# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the commandline or
# set in the environment
-# Also any assignments in arch/$(ARCH)/Makefile take precedence over
+# Also any assignments in arch/$(SRCARCH)/Makefile take precedence over
# this default value
export KBUILD_IMAGE ?= vmlwk

@@ -567,7 +573,7 @@
#
---------------------------------------------------------------------------
# vmlwk is build from the objects selected by $(vmlwk-init) and
# $(vmlwk-main). Most are built-in.o files from top-level directories
-# in the kernel tree, others are specified in arch/$(ARCH)Makefile.
+# in the kernel tree, others are specified in arch/$(SRCARCH)Makefile.
# Ordering when linking is important, and $(vmlwk-init) must be first.
#
# vmlwk
@@ -593,10 +599,10 @@
vmlwk-init := $(head-y) $(init-y)
vmlwk-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(linux-y)
vmlwk-all := $(vmlwk-init) $(vmlwk-main)
-vmlwk-lds := arch/$(ARCH)/kernel/vmlwk.lds
+vmlwk-lds := arch/$(SRCARCH)/kernel/vmlwk.lds

# Rule to link vmlwk - also used during CONFIG_KALLSYMS
-# May be overridden by arch/$(ARCH)/Makefile
+# May be overridden by arch/$(SRCARCH)/Makefile
quiet_cmd_vmlwk__ ?= LD $@
cmd_vmlwk__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlwk) -o $@ \
-T $(vmlwk-lds) $(vmlwk-init) \
@@ -827,9 +833,9 @@
/bin/false; \
fi;
$(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
- $(Q)ln -fsn $(srctree)/include/arch-$(ARCH) include2/arch
+ $(Q)ln -fsn $(srctree)/include/arch-$(SRCARCH) include2/arch
$(Q)if [ ! -d linux/include2 ]; then mkdir -p linux/include2; fi;
- $(Q)ln -fsn $(srctree)/linux/include/asm-$(ARCH) linux/include2/asm
+ $(Q)ln -fsn $(srctree)/linux/include/asm-$(SRCARCH) linux/include2/asm
endif

# prepare2 creates a makefile if using a separate output directory
@@ -851,44 +857,44 @@
prepare prepare-all: prepare0

# Leave this as default for preprocessing vmlwk.lds.S, which is now
-# done in arch/$(ARCH)/kernel/Makefile
+# done in arch/$(SRCARCH)/kernel/Makefile

-export CPPFLAGS_vmlwk.lds += -P -C -U$(ARCH)
+export CPPFLAGS_vmlwk.lds += -P -C -U$(SRCARCH)


-# The asm symlink changes when $(ARCH) changes.
+# The asm symlink changes when $(SRCARCH) changes.
# Detect this and ask user to run make mrproper

include/arch: FORCE
$(Q)set -e; asmlink=`readlink include/arch | cut -d '-' -f 2`; \
if [ -L include/arch ]; then \
- if [ "$$asmlink" != "$(ARCH)" ]; then \
- echo "ERROR: the symlink $@ points to arch-$$asmlink but arch-$(ARCH)
was expected"; \
+ if [ "$$asmlink" != "$(SRCARCH)" ]; then \
+ echo "ERROR: the symlink $@ points to arch-$$asmlink but
arch-$(SRCARCH) was expected"; \
echo " set ARCH or save .config and run 'make mrproper' to fix
it"; \
exit 1; \
fi; \
else \
- echo ' SYMLINK $@ -> include/arch-$(ARCH)'; \
+ echo ' SYMLINK $@ -> include/arch-$(SRCARCH)'; \
if [ ! -d include ]; then \
mkdir -p include; \
fi; \
- ln -fsn arch-$(ARCH) $@; \
+ ln -fsn arch-$(SRCARCH) $@; \
fi

linux/include/asm: FORCE
$(Q)set -e; asmlink=`readlink linux/include/asm | cut -d '-' -f 2`; \
if [ -L linux/include/asm ]; then \
- if [ "$$asmlink" != "$(ARCH)" ]; then \
- echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(ARCH) was
expected"; \
+ if [ "$$asmlink" != "$(SRCARCH)" ]; then \
+ echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH)
was expected"; \
echo " set ARCH or save .config and run 'make mrproper' to fix
it"; \
exit 1; \
fi; \
else \
- echo ' SYMLINK $@ -> linux/include/asm-$(ARCH)'; \
+ echo ' SYMLINK $@ -> linux/include/asm-$(SRCARCH)'; \
if [ ! -d linux/include ]; then \
mkdir -p linux/include; \
fi; \
- ln -fsn asm-$(ARCH) $@; \
+ ln -fsn asm-$(SRCARCH) $@; \
fi

# Split autoconf.h into include/lwk/config/*
@@ -1021,7 +1027,7 @@
# Brief documentation of the typical targets used
#
---------------------------------------------------------------------------

-boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
+boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
boards := $(notdir $(boards))

help:
@@ -1056,9 +1062,9 @@
@echo 'Documentation targets:'
@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
@echo ''
- @echo 'Architecture specific targets ($(ARCH)):'
+ @echo 'Architecture specific targets ($(SRCARCH)):'
@$(if $(archhelp),$(archhelp),\
- echo ' No architecture specific help defined for $(ARCH)')
+ echo ' No architecture specific help defined for $(SRCARCH)')
@echo ''
@$(if $(boards), \
$(foreach b, $(boards), \
@@ -1276,7 +1282,7 @@
PHONY += checkstack
checkstack:
$(OBJDUMP) -d vmlwk $$(find . -name '*.ko') | \
- $(PERL) $(src)/scripts/checkstack.pl $(ARCH)
+ $(PERL) $(src)/scripts/checkstack.pl $(SRCARCH)

kernelrelease:
$(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \
=======================================
--- /arch/x86_64/Kconfig Wed Nov 6 19:48:40 2013 UTC
+++ /arch/x86_64/Kconfig Tue Nov 19 01:22:35 2013 UTC
@@ -18,6 +18,16 @@
bool
default y

+config OUTPUT_FORMAT
+ string
+ default "elf64-k1om" if ARCH = "k1om"
+ default "elf64-x86-64" if X86_64
+
+config BFDARCH
+ string
+ default "k1om" if ARCH = "k1om"
+ default "i386" if X86_64
+
source "kernel/Kconfig"

menu "Target Configuration"
@@ -41,7 +51,7 @@

choice
prompt "Processor Family"
- default MK8
+ default GENERIC_CPU

config MK8
bool "AMD-Opteron/Athlon64"
@@ -53,6 +63,19 @@
help
Optimize for Intel 64 architecture.

+config MK1OM
+ bool "Intel Knights Corner"
+ help
+ Select this for the CPU used in the Intel Many Integrated Core
+ (Intel MIC) products code-named Knights Corner. The CPU is an
+ in-order, 4-way SMT design that is mostly x86-64 compatible
+ but has a different vector unit. The differences from x86-64
+ force incompatible calling conventions, so GCC and binutils
+ assign it a unique ELF machine type: EM_K1OM.
+
+ Future Intel products will be part of the x86 ecosystem, *not*
+ derivatives of this incompatible offshoot.
+
config GENERIC_CPU
bool "Generic-x86-64"
help
@@ -61,19 +84,30 @@
endchoice


+
#
# Define implied options from the CPU selection
#

+# this should be set for all -march=.. options where the compiler
generates cmov.
+config X86_CMOV
+ def_bool y
+ depends on GENERIC_CPU || MK8 || MPSC
+
+# non-X86_64 wierdness on Intel KNC (ARCH=MK1OM)
+config X86_EARLYMIC
+ def_bool y
+ depends on MK1OM
+
config X86_L1_CACHE_BYTES
int
- default "128" if GENERIC_CPU || MPSC
- default "64" if MK8
+ default "128" if MPSC
+ default "64" if GENERIC_CPU || MK8 || MK1OM

config X86_L1_CACHE_SHIFT
int
- default "7" if GENERIC_CPU || MPSC
- default "6" if MK8
+ default "7" if MPSC
+ default "6" if GENERIC_CPU || MK8 || MK1OM

config X86_INTERNODE_CACHE_BYTES
int
=======================================
--- /arch/x86_64/Makefile Tue Nov 24 21:11:42 2009 UTC
+++ /arch/x86_64/Makefile Tue Nov 19 01:22:35 2013 UTC
@@ -21,7 +21,19 @@
# Modifications for Kitten. Remove unneeded stuff.
#

-LDFLAGS := -m elf_x86_64 --whole-archive
+# If we are building for Intel Phi KNC (ARCH=k1om), find the cross compile
tool
+# chain. This architecture is *mostly* x86_64, but has some minor
differences
+# as described in the "Intel Xeon Phi Coprocessor System Software
Developers
+# Guide" SKU# 328207-002EN, June, 2013. We assume that Kitten is always
built
+# on the host using the Intel-provided KNC cross-compilers.
+ifeq ($(ARCH),k1om)
+ CROSS_COMPILE := $(call cc-cross-prefix, \
+ x86_64-k1om-linux-gnu- \
+ x86_64-k1om-linux- \
+ x86_64-k1om-unknown-linux-gnu-)
+endif
+
+LDFLAGS := -m elf_$(ARCH) --whole-archive
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux :=
CHECKFLAGS += -D__x86_64__ -m64
=======================================
--- /arch/x86_64/boot/compressed/Makefile Fri Oct 12 17:56:49 2007 UTC
+++ /arch/x86_64/boot/compressed/Makefile Tue Nov 19 01:22:35 2013 UTC
@@ -12,7 +12,7 @@
# cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which
conflicts with
# -m32
CFLAGS := -m64 -D__KERNEL__ -Iinclude -O2 -fno-strict-aliasing -fPIC
-mcmodel=small -fno-builtin
-LDFLAGS := -m elf_x86_64
+LDFLAGS := -m elf_$(UTS_MACHINE)

LDFLAGS_vmlwk := -T
$(obj)/vmlwk: $(src)/vmlwk.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o
FORCE
@@ -25,7 +25,7 @@
$(obj)/vmlwk.bin.gz: $(obj)/vmlwk.bin FORCE
$(call if_changed,gzip)

-LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
+LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T

$(obj)/piggy.o: $(obj)/vmlwk.scr $(obj)/vmlwk.bin.gz FORCE
$(call if_changed,ld)
=======================================
--- /arch/x86_64/kernel/entry.S Tue Jun 22 22:19:44 2010 UTC
+++ /arch/x86_64/kernel/entry.S Tue Nov 19 01:22:35 2013 UTC
@@ -608,7 +608,9 @@
swapgs
gs_change:
movl %edi,%gs
+#ifndef CONFIG_X86_EARLYMIC
2: mfence /* workaround */
+#endif
swapgs
popf
CFI_ADJUST_CFA_OFFSET -8
=======================================
--- /arch/x86_64/kernel/vmlwk.lds.S Fri Sep 26 23:31:17 2008 UTC
+++ /arch/x86_64/kernel/vmlwk.lds.S Tue Nov 19 01:22:35 2013 UTC
@@ -9,9 +9,16 @@

#undef i386 /* in case the preprocessor is a 32bit one */

-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
+OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT,
CONFIG_OUTPUT_FORMAT)
+
+#if defined(CONFIG_MK1OM)
+OUTPUT_ARCH(k1om)
+#else
OUTPUT_ARCH(i386:x86-64)
+#endif
+
ENTRY(phys_startup_64)
+
_proxy_pda = 1;
PHDRS {
text PT_LOAD FLAGS(5); /* R_E */
=======================================
--- /arch/x86_64/lib/Makefile Tue Oct 9 17:15:40 2007 UTC
+++ /arch/x86_64/lib/Makefile Tue Nov 19 01:22:35 2013 UTC
@@ -1,4 +1,4 @@
#
# Makefile for x86_64-specific library files.
#
-lib-y += memmove.o memset.o memcpy.o thunk.o delay.o bitops.o extable.o
copy_user.o usercopy.o getuser.o putuser.o
+lib-y += memmove.o memset.o memcpy.o thunk.o delay.o extable.o copy_user.o
usercopy.o getuser.o putuser.o
=======================================
--- /include/arch-x86_64/bitops.h Wed Aug 22 23:40:34 2007 UTC
+++ /include/arch-x86_64/bitops.h Tue Nov 19 01:22:35 2013 UTC
@@ -246,38 +246,6 @@

#undef ADDR

-extern long find_first_zero_bit(const unsigned long * addr, unsigned long
size);
-extern long find_next_zero_bit (const unsigned long * addr, long size,
long offset);
-extern long find_first_bit(const unsigned long * addr, unsigned long size);
-extern long find_next_bit(const unsigned long * addr, long size, long
offset);
-
-/* return index of first bet set in val or max when no bit is set */
-static inline unsigned long __scanbit(unsigned long val, unsigned long max)
-{
- asm("bsfq %1,%0 ; cmovz %2,%0" : "=&r" (val) : "r" (val), "r" (max));
- return val;
-}
-
-#define find_first_bit(addr,size) \
-((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \
- (__scanbit(*(unsigned long *)addr,(size))) : \
- find_first_bit(addr,size)))
-
-#define find_next_bit(addr,size,off) \
-((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \
- ((off) + (__scanbit((*(unsigned long *)addr) >> (off),(size)-(off)))) : \
- find_next_bit(addr,size,off)))
-
-#define find_first_zero_bit(addr,size) \
-((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \
- (__scanbit(~*(unsigned long *)addr,(size))) : \
- find_first_zero_bit(addr,size)))
-
-#define find_next_zero_bit(addr,size,off) \
-((__builtin_constant_p(size) && (size) <= BITS_PER_LONG ? \
- ((off)+(__scanbit(~(((*(unsigned long *)addr)) >>
(off)),(size)-(off)))) : \
- find_next_zero_bit(addr,size,off)))
-
/*
* Find string of zero bits in a bitmap. -1 when not found.
*/
@@ -360,9 +328,17 @@
{
int r;

- __asm__("bsfl %1,%0\n\t"
- "cmovzl %2,%0"
- : "=r" (r) : "rm" (x), "r" (-1));
+#ifdef CONFIG_X86_CMOV
+ asm("bsfl %1,%0\n\t"
+ "cmovzl %2,%0"
+ : "=r" (r) : "rm" (x), "r" (-1));
+#else
+ asm("bsfl %1,%0\n\t"
+ "jnz 1f\n\t"
+ "movl $-1,%0\n"
+ "1:" : "=r" (r) : "rm" (x));
+#endif
+
return r+1;
}

@@ -389,13 +365,22 @@
{
int r;

- __asm__("bsrl %1,%0\n\t"
- "cmovzl %2,%0"
- : "=&r" (r) : "rm" (x), "rm" (-1));
+#ifdef CONFIG_X86_CMOV
+ asm("bsrl %1,%0\n\t"
+ "cmovzl %2,%0"
+ : "=&r" (r) : "rm" (x), "rm" (-1));
+#else
+ asm("bsrl %1,%0\n\t"
+ "jnz 1f\n\t"
+ "movl $-1,%0\n"
+ "1:" : "=r" (r) : "rm" (x));
+#endif
+
return r+1;
}

#include <arch-generic/bitops/hweight.h>
+#include <arch-generic/bitops/find.h>

#endif /* __KERNEL__ */

=======================================
--- /include/arch-x86_64/i387.h Tue Jun 22 22:19:44 2010 UTC
+++ /include/arch-x86_64/i387.h Tue Nov 19 01:22:35 2013 UTC
@@ -77,7 +77,9 @@
* TODO: some CPUs may not need this, possibly use Linux
* alternative_input() mechanism.
*/
+#ifndef CONFIG_X86_EARLYMIC
asm volatile ("emms"); /* clear stack tags */
+#endif
asm volatile ("fildl %gs:0"); /* load to clear state */
}

=======================================
--- /include/arch-x86_64/processor.h Thu May 10 20:59:08 2012 UTC
+++ /include/arch-x86_64/processor.h Tue Nov 19 01:22:35 2013 UTC
@@ -322,7 +322,12 @@
/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
static inline void rep_nop(void)
{
- __asm__ __volatile__("rep;nop": : :"memory");
+#ifdef CONFIG_X86_EARLYMIC
+ /* On KNC, PAUSE instruction is not supported; approximate using 'delay'
*/
+ asm volatile("delay %0" :: "r" (1000) : "memory");
+#else
+ asm volatile("rep; nop" ::: "memory");
+#endif
}

/* Stop speculative execution */
@@ -337,13 +342,17 @@
#define ARCH_HAS_PREFETCH
static inline void prefetch(void *x)
{
+#ifndef CONFIG_X86_EARLYMIC
asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x));
+#endif
}

#define ARCH_HAS_PREFETCHW 1
static inline void prefetchw(void *x)
{
+#ifndef CONFIG_X86_EARLYMIC
asm volatile("prefetchtw %0" :: "m" (*(unsigned long *)x));
+#endif
}

#define ARCH_HAS_SPINLOCK_PREFETCH 1
=======================================
--- /include/arch-x86_64/system.h Thu Nov 20 17:16:01 2008 UTC
+++ /include/arch-x86_64/system.h Tue Nov 19 01:22:35 2013 UTC
@@ -244,9 +244,16 @@
* And yes, this is required on UP too when we're talking
* to devices.
*/
-#define mb() asm volatile("mfence":::"memory")
-#define rmb() asm volatile("lfence":::"memory")
-#define wmb() asm volatile("sfence" ::: "memory")
+#if defined(CONFIG_X86_EARLYMIC)
+ #define mb() asm volatile ("lock; addl $0,0(%%rsp)" ::: "memory")
+ #define rmb() asm volatile ("lock; addl $0,0(%%rsp)" ::: "memory")
+ #define wmb() asm volatile ("lock; addl $0,0(%%rsp)" ::: "memory")
+#else
+ #define mb() asm volatile("mfence":::"memory")
+ #define rmb() asm volatile("lfence":::"memory")
+ #define wmb() asm volatile("sfence" ::: "memory")
+#endif
+
#define read_barrier_depends() do {} while(0)
#define set_mb(var, value) do { (void) xchg(&var, value); } while (0)
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
=======================================
--- /lib/Makefile Tue Jun 22 22:19:44 2010 UTC
+++ /lib/Makefile Tue Nov 19 01:22:35 2013 UTC
@@ -19,3 +19,5 @@
sha1.o \
sigset.o \
siginfo.o \
+ find_last_bit.o \
+ find_next_bit.o \
=======================================
--- /scripts/Kbuild.include Tue Aug 21 23:17:33 2007 UTC
+++ /scripts/Kbuild.include Tue Nov 19 01:22:35 2013 UTC
@@ -48,6 +48,17 @@
# gcc support functions
# See documentation in Documentation/kbuild/makefiles.txt

+# cc-cross-prefix
+# Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu-
m68k-linux-)
+# Return first prefix where a prefix$(CC) is found in PATH.
+# If no $(CC) found in PATH with listed prefixes return nothing
+cc-cross-prefix = \
+ $(word 1, $(foreach c,$(1), \
+ $(shell set -e; \
+ if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \
+ echo $(c); \
+ fi)))
+
# as-option
# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)

=======================================
--- /scripts/kconfig/Makefile Tue Aug 21 23:17:33 2007 UTC
+++ /scripts/kconfig/Makefile Tue Nov 19 01:22:35 2013 UTC
@@ -5,23 +5,23 @@
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig
update-po-config

xconfig: $(obj)/qconf
- $< arch/$(ARCH)/Kconfig
+ $< arch/$(SRCARCH)/Kconfig

gconfig: $(obj)/gconf
- $< arch/$(ARCH)/Kconfig
+ $< arch/$(SRCARCH)/Kconfig

menuconfig: $(obj)/mconf
$(Q)$(MAKE) $(build)=scripts/kconfig/lxdialog
- $< arch/$(ARCH)/Kconfig
+ $< arch/$(SRCARCH)/Kconfig

config: $(obj)/conf
- $< arch/$(ARCH)/Kconfig
+ $< arch/$(SRCARCH)/Kconfig

oldconfig: $(obj)/conf
- $< -o arch/$(ARCH)/Kconfig
+ $< -o arch/$(SRCARCH)/Kconfig

silentoldconfig: $(obj)/conf
- $< -s arch/$(ARCH)/Kconfig
+ $< -s arch/$(SRCARCH)/Kconfig

update-po-config: $(obj)/kxgettext
xgettext --default-domain=linux \
@@ -45,27 +45,27 @@
PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig

randconfig: $(obj)/conf
- $< -r arch/$(ARCH)/Kconfig
+ $< -r arch/$(SRCARCH)/Kconfig

allyesconfig: $(obj)/conf
- $< -y arch/$(ARCH)/Kconfig
+ $< -y arch/$(SRCARCH)/Kconfig

allnoconfig: $(obj)/conf
- $< -n arch/$(ARCH)/Kconfig
+ $< -n arch/$(SRCARCH)/Kconfig

allmodconfig: $(obj)/conf
- $< -m arch/$(ARCH)/Kconfig
+ $< -m arch/$(SRCARCH)/Kconfig

defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),)
- $< -d arch/$(ARCH)/Kconfig
+ $< -d arch/$(SRCARCH)/Kconfig
else
@echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)'
- $(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig
+ $(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)
arch/$(SRCARCH)/Kconfig
endif

%_defconfig: $(obj)/conf
- $(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig
+ $(Q)$< -D arch/$(SRCARCH)/configs/$@ arch/$(SRCARCH)/Kconfig

# Help text used by make help
help:
=======================================
--- /user/Makefile.footer Wed Aug 7 19:54:32 2013 UTC
+++ /user/Makefile.footer Tue Nov 19 01:22:35 2013 UTC
@@ -187,13 +187,14 @@
$(call build,RAWOBJ $1, \
cd $4; \
ln -s $2 $3; \
- objcopy -I binary -O elf64-x86-64 \
- --binary-architecture i386 \
+ $(OBJCOPY) -I binary -O $(CONFIG_OUTPUT_FORMAT) \
+ --binary-architecture $(CONFIG_BFDARCH) \
$3 $1; \
- objcopy --rename-section .data=$5 $1; \
+ $(OBJCOPY) --rename-section .data=$5 $1; \
$(RM) $3; \
)

+
#
# Implicit rule for building .c files
#
Reply all
Reply to author
Forward
0 new messages