mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
ubicom32: add a 2.6.30 patch contributed by ubicom, with my cleanups and fixes split out into separate patches
SVN-Revision: 18806
This commit is contained in:
parent
79cdfd5456
commit
6fd0f35028
174
target/linux/ubicom32/config-2.6.30
Executable file
174
target/linux/ubicom32/config-2.6.30
Executable file
@ -0,0 +1,174 @@
|
||||
# CONFIG_ACCESS_OK_CHECKS_ENABLED is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_ARCH_SUPPORTS_AOUT=y
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
# CONFIG_ARPD is not set
|
||||
# CONFIG_BINARY_PRINTF is not set
|
||||
CONFIG_BINFMT_ELF_FDPIC=y
|
||||
CONFIG_BINFMT_FLAT=y
|
||||
# CONFIG_BINFMT_SHARED_FLAT is not set
|
||||
CONFIG_BINFMT_ZFLAT=y
|
||||
CONFIG_BITREVERSE=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_CMDLINE="console=ttyUM0 console=ttyUS0 serdes=0x02004000,61,250000000"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CRC_CCITT=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
CONFIG_CRYPTO_ARC4=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_BLKCIPHER2=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
# CONFIG_CRYPTO_UBICOM32 is not set
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_DEBUG_IRQMEASURE is not set
|
||||
# CONFIG_DEBUG_PCIMEASURE is not set
|
||||
CONFIG_DEBUG_VERBOSE=y
|
||||
CONFIG_DECOMPRESS_LZMA=y
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
CONFIG_DEFAULT_IOSCHED="noop"
|
||||
CONFIG_DEFAULT_NOOP=y
|
||||
CONFIG_DEVKMEM=y
|
||||
CONFIG_DEVPORT=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
# CONFIG_EPOLL is not set
|
||||
# CONFIG_EVENTFD is not set
|
||||
CONFIG_FORCE_MAX_ZONEORDER=14
|
||||
# CONFIG_FPU is not set
|
||||
# CONFIG_FUTEX is not set
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_GENERIC_FIND_LAST_BIT=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
# CONFIG_GEN_RTC is not set
|
||||
CONFIG_GPIOLIB=y
|
||||
# CONFIG_HAMRADIO is not set
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_UBICOM32=y
|
||||
CONFIG_INET_DIAG=y
|
||||
CONFIG_INET_TCP_DIAG=y
|
||||
CONFIG_INITRAMFS_ROOT_GID=0
|
||||
CONFIG_INITRAMFS_ROOT_UID=0
|
||||
CONFIG_INITRAMFS_SOURCE="../romfs ../vendors/Ubicom/RouterGateway/initramfs_list"
|
||||
CONFIG_INPUT=y
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
CONFIG_INPUT_POLLDEV=y
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IP5160DEV is not set
|
||||
# CONFIG_IP5160EVAL is not set
|
||||
# CONFIG_IP5170DPF is not set
|
||||
# CONFIG_IP7145DPF is not set
|
||||
# CONFIG_IP7160BRINGUP is not set
|
||||
# CONFIG_IP7160DPF is not set
|
||||
CONFIG_IP7160RGW=y
|
||||
# CONFIG_IP7160RGWLCD is not set
|
||||
# CONFIG_IP7500AV is not set
|
||||
# CONFIG_IP7500IAP is not set
|
||||
# CONFIG_IP7500MEDIA is not set
|
||||
# CONFIG_IP7500MODULE is not set
|
||||
# CONFIG_IP7500WSPKR is not set
|
||||
# CONFIG_IRQSTACKS is not set
|
||||
CONFIG_IRQ_PER_CPU=y
|
||||
# CONFIG_ISDN is not set
|
||||
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
|
||||
# CONFIG_JFFS2_SUMMARY is not set
|
||||
CONFIG_LDM_DEBUG=y
|
||||
CONFIG_LDM_PARTITION=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_TRIGGERS is not set
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
CONFIG_LIBCRC32C=y
|
||||
# CONFIG_LINKER_RELAXATION is not set
|
||||
CONFIG_MIN_RAMSIZE=0x02000000
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
# CONFIG_MODULE_UNLOAD is not set
|
||||
# CONFIG_MTD_CFI is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
# CONFIG_MTD_NAND_SPI_ER is not set
|
||||
CONFIG_MTD_UBI32_M25P80=y
|
||||
# CONFIG_MTD_UBI32_NAND_SPI_ER is not set
|
||||
# CONFIG_NET_ETHERNET is not set
|
||||
# CONFIG_NOBOARD is not set
|
||||
CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_IOPORT=y
|
||||
# CONFIG_NO_KERNEL_MSG is not set
|
||||
CONFIG_OCM_MODULES_FALLBACK_TO_DDR=y
|
||||
CONFIG_OCM_MODULES_MAY_CONSUME_REMAINING_CODESPACE=y
|
||||
CONFIG_OCM_MODULES_RESERVATION=41
|
||||
CONFIG_OLD_40400010_SYSTEM_CALL=y
|
||||
# CONFIG_PACKET_MMAP is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_PCI_DEV0_IDSEL=0x001000000
|
||||
CONFIG_PCI_DEV1_IDSEL=0x002000000
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROTECT_KERNEL=y
|
||||
CONFIG_RAMKERNEL=y
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_UBI32_MAILBOX=y
|
||||
CONFIG_SERIAL_UBI32_MAILBOX_CONSOLE=y
|
||||
# CONFIG_SERIAL_UBI32_SERDES is not set
|
||||
# CONFIG_SERIAL_UBI32_UARTTIO is not set
|
||||
# CONFIG_SIGNALFD is not set
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
# CONFIG_SPI_GPIO is not set
|
||||
CONFIG_SPI_MASTER=y
|
||||
# CONFIG_SPI_SPIDEV is not set
|
||||
CONFIG_SPI_UBICOM32_GPIO=y
|
||||
# CONFIG_STOP_ON_BUG is not set
|
||||
# CONFIG_STOP_ON_TRAP is not set
|
||||
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_TIMERFD is not set
|
||||
CONFIG_TIMER_EXTRA_ALLOC=0
|
||||
CONFIG_TIME_LOW_RES=y
|
||||
CONFIG_TRACING_SUPPORT=y
|
||||
CONFIG_UBI32_WDT=y
|
||||
CONFIG_UBICOM32=y
|
||||
CONFIG_UBICOM32_GMAC=y
|
||||
CONFIG_UBICOM32_OCM_FOR_SKB=y
|
||||
# CONFIG_UBICOM32_PLIO is not set
|
||||
CONFIG_UBICOM32_V4=y
|
||||
# CONFIG_UBICOM_HID is not set
|
||||
CONFIG_UBICOM_INPUT=y
|
||||
# CONFIG_UBICOM_INPUT_I2C is not set
|
||||
CONFIG_UBICOM_SWITCH=y
|
||||
CONFIG_UBICOM_SWITCH_BCM539X=y
|
||||
# CONFIG_UNALIGNED_ACCESS_DISABLED is not set
|
||||
CONFIG_UNALIGNED_ACCESS_ENABLED=y
|
||||
# CONFIG_UNALIGNED_ACCESS_USERSPACE_ONLY is not set
|
||||
# CONFIG_WIRELESS_OLD_REGULATORY is not set
|
59346
target/linux/ubicom32/patches-2.6.30/100-ubicom32_support.patch
Normal file
59346
target/linux/ubicom32/patches-2.6.30/100-ubicom32_support.patch
Normal file
File diff suppressed because it is too large
Load Diff
150
target/linux/ubicom32/patches-2.6.30/110-vmlinux_lds_fix.patch
Normal file
150
target/linux/ubicom32/patches-2.6.30/110-vmlinux_lds_fix.patch
Normal file
@ -0,0 +1,150 @@
|
||||
--- a/arch/ubicom32/kernel/vmlinux.lds.S
|
||||
+++ b/arch/ubicom32/kernel/vmlinux.lds.S
|
||||
@@ -25,7 +25,6 @@
|
||||
* arch/blackfin
|
||||
* arch/parisc
|
||||
*/
|
||||
-#include <asm-generic/vmlinux.lds.h>
|
||||
#include <asm/ocm_size.h>
|
||||
#include <asm/memory_map.h>
|
||||
#include <asm/thread_info.h>
|
||||
@@ -201,94 +200,28 @@ SECTIONS {
|
||||
*(__ex_table)
|
||||
__stop___ex_table = .;
|
||||
|
||||
- *(.rodata) *(.rodata.*)
|
||||
- *(__vermagic) /* Kernel version magic */
|
||||
- *(__markers_strings)
|
||||
- *(.rodata1)
|
||||
- *(.rodata.str1.1)
|
||||
- *(__tracepoints_strings)
|
||||
-
|
||||
- /* PCI quirks */
|
||||
- __start_pci_fixups_early = . ;
|
||||
- *(.pci_fixup_early)
|
||||
- __end_pci_fixups_early = . ;
|
||||
- __start_pci_fixups_header = . ;
|
||||
- *(.pci_fixup_header)
|
||||
- __end_pci_fixups_header = . ;
|
||||
- __start_pci_fixups_final = . ;
|
||||
- *(.pci_fixup_final)
|
||||
- __end_pci_fixups_final = . ;
|
||||
- __start_pci_fixups_enable = . ;
|
||||
- *(.pci_fixup_enable)
|
||||
- __end_pci_fixups_enable = . ;
|
||||
- __start_pci_fixups_resume = . ;
|
||||
- *(.pci_fixup_resume)
|
||||
- __end_pci_fixups_resume = . ;
|
||||
- __start_pci_fixups_resume_early = . ;
|
||||
- *(.pci_fixup_resume_early)
|
||||
- __end_pci_fixups_resume_early = . ;
|
||||
- __start_pci_fixups_suspend = . ;
|
||||
- *(.pci_fixup_suspend)
|
||||
- __end_pci_fixups_suspend = . ;
|
||||
-
|
||||
- __start_builtin_fw = . ;
|
||||
- *(.builtin_fw)
|
||||
- __end_builtin_fw = . ;
|
||||
-
|
||||
-
|
||||
- /* Kernel symbol table: Normal symbols */
|
||||
- . = ALIGN(4);
|
||||
- __start___ksymtab = .;
|
||||
- *(__ksymtab)
|
||||
- __stop___ksymtab = .;
|
||||
-
|
||||
- /* Kernel symbol table: GPL-only symbols */
|
||||
- __start___ksymtab_gpl = .;
|
||||
- *(__ksymtab_gpl)
|
||||
- __stop___ksymtab_gpl = .;
|
||||
-
|
||||
- /* Kernel symbol table: Normal unused symbols */
|
||||
- __start___ksymtab_unused = .;
|
||||
- *(__ksymtab_unused)
|
||||
- __stop___ksymtab_unused = .;
|
||||
-
|
||||
- /* Kernel symbol table: GPL-only unused symbols */
|
||||
- __start___ksymtab_unused_gpl = .;
|
||||
- *(__ksymtab_unused_gpl)
|
||||
- __stop___ksymtab_unused_gpl = .;
|
||||
-
|
||||
- /* Kernel symbol table: GPL-future symbols */
|
||||
- __start___ksymtab_gpl_future = .;
|
||||
- *(__ksymtab_gpl_future)
|
||||
- __stop___ksymtab_gpl_future = .;
|
||||
-
|
||||
- /* Kernel symbol table: Normal symbols */
|
||||
- __start___kcrctab = .;
|
||||
- *(__kcrctab)
|
||||
- __stop___kcrctab = .;
|
||||
-
|
||||
- /* Kernel symbol table: GPL-only symbols */
|
||||
- __start___kcrctab_gpl = .;
|
||||
- *(__kcrctab_gpl)
|
||||
- __stop___kcrctab_gpl = .;
|
||||
-
|
||||
- /* Kernel symbol table: GPL-future symbols */
|
||||
- __start___kcrctab_gpl_future = .;
|
||||
- *(__kcrctab_gpl_future)
|
||||
- __stop___kcrctab_gpl_future = .;
|
||||
+ } > TEXT
|
||||
|
||||
- /* Kernel symbol table: strings */
|
||||
- *(__ksymtab_strings)
|
||||
+ RO_DATA(16)
|
||||
|
||||
- /* Built-in module parameters */
|
||||
- . = ALIGN(4) ;
|
||||
- __start___param = .;
|
||||
- *(__param)
|
||||
- __stop___param = .;
|
||||
+ .rodata : {} > TEXT
|
||||
+ .rodata1 : {} > TEXT
|
||||
+ .pci_fixup : {} > TEXT
|
||||
+ .builtin_fw : {} > TEXT
|
||||
+ .rio_route : {} > TEXT
|
||||
+ .tracedata : {} > TEXT
|
||||
+ __ksymtab : {} > TEXT
|
||||
+ __ksymtab_gpl : {} > TEXT
|
||||
+ __ksymtab_gpl_future : {} > TEXT
|
||||
+ __kcrctab_gpl : {} > TEXT
|
||||
+ __kcrctab_unused : {} > TEXT
|
||||
+ __kcrctab_unused_gpl : {} > TEXT
|
||||
+ __kcrctab_gpl_future : {} > TEXT
|
||||
+ __ksymtab_strings : {} > TEXT
|
||||
+ __init_rodata : {} > TEXT
|
||||
+ __param : {} > TEXT
|
||||
|
||||
- . = ALIGN(4) ;
|
||||
- _etext = . ;
|
||||
- } > TEXT
|
||||
+ _etext = .;
|
||||
|
||||
.data DATA_ADDR : {
|
||||
. = ALIGN(4);
|
||||
@@ -349,12 +282,6 @@ SECTIONS {
|
||||
PROVIDE (___eh_frame_end = .);
|
||||
} > INIT
|
||||
|
||||
- /DISCARD/ : {
|
||||
- EXIT_TEXT
|
||||
- EXIT_DATA
|
||||
- *(.exitcall.exit)
|
||||
- }
|
||||
-
|
||||
.bss : {
|
||||
. = ALIGN(4);
|
||||
_sbss = . ;
|
||||
@@ -365,6 +292,12 @@ SECTIONS {
|
||||
_end = . ;
|
||||
} > BSS
|
||||
|
||||
+ /DISCARD/ : {
|
||||
+ EXIT_TEXT
|
||||
+ EXIT_DATA
|
||||
+ *(.exitcall.exit)
|
||||
+ }
|
||||
+
|
||||
NOTES > BSS
|
||||
|
||||
}
|
419
target/linux/ubicom32/patches-2.6.30/120-libgcc_func.patch
Normal file
419
target/linux/ubicom32/patches-2.6.30/120-libgcc_func.patch
Normal file
@ -0,0 +1,419 @@
|
||||
--- a/arch/ubicom32/Makefile
|
||||
+++ b/arch/ubicom32/Makefile
|
||||
@@ -60,9 +60,6 @@ cflags-$(CONFIG_UBICOM32_V4) := -march=
|
||||
ldflags-$(CONFIG_LINKER_RELAXATION) := --relax
|
||||
LDFLAGS_vmlinux := $(ldflags-y)
|
||||
|
||||
-GCCLIBDIR := $(dir $(shell $(CC) $(cflags-y) -print-libgcc-file-name))
|
||||
-GCC_LIBS := $(GCCLIBDIR)/libgcc.a
|
||||
-
|
||||
KBUILD_CFLAGS += $(cflags-y) -ffunction-sections
|
||||
KBUILD_AFLAGS += $(cflags-y)
|
||||
|
||||
@@ -84,7 +81,6 @@ core-y += arch/$(ARCH)/kernel/ \
|
||||
drivers-$(CONFIG_OPROFILE) += arch/ubicom32/oprofile/
|
||||
|
||||
libs-y += arch/$(ARCH)/lib/
|
||||
-libs-y += $(GCC_LIBS)
|
||||
|
||||
archclean:
|
||||
|
||||
--- a/arch/ubicom32/lib/Makefile
|
||||
+++ b/arch/ubicom32/lib/Makefile
|
||||
@@ -30,3 +30,4 @@
|
||||
#
|
||||
|
||||
lib-y := checksum.o delay.o mem_ubicom32.o
|
||||
+lib-y += ashldi3.o ashrdi3.o divmod.o lshrdi3.o muldi3.o
|
||||
--- /dev/null
|
||||
+++ b/arch/ubicom32/lib/ashldi3.c
|
||||
@@ -0,0 +1,62 @@
|
||||
+/* ashrdi3.c extracted from gcc-2.95.2/libgcc2.c which is: */
|
||||
+/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC 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, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#define BITS_PER_UNIT 8
|
||||
+
|
||||
+typedef int SItype __attribute__ ((mode (SI)));
|
||||
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
||||
+typedef int DItype __attribute__ ((mode (DI)));
|
||||
+typedef int word_type __attribute__ ((mode (__word__)));
|
||||
+
|
||||
+struct DIstruct {SItype high, low;};
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct DIstruct s;
|
||||
+ DItype ll;
|
||||
+} DIunion;
|
||||
+
|
||||
+DItype
|
||||
+__ashldi3 (DItype u, word_type b)
|
||||
+{
|
||||
+ DIunion w;
|
||||
+ word_type bm;
|
||||
+ DIunion uu;
|
||||
+
|
||||
+ if (b == 0)
|
||||
+ return u;
|
||||
+
|
||||
+ uu.ll = u;
|
||||
+
|
||||
+ bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
|
||||
+ if (bm <= 0)
|
||||
+ {
|
||||
+ w.s.low = 0;
|
||||
+ w.s.high = (USItype)uu.s.low << -bm;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ USItype carries = (USItype)uu.s.low >> bm;
|
||||
+ w.s.low = (USItype)uu.s.low << b;
|
||||
+ w.s.high = ((USItype)uu.s.high << b) | carries;
|
||||
+ }
|
||||
+
|
||||
+ return w.ll;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/arch/ubicom32/lib/ashrdi3.c
|
||||
@@ -0,0 +1,63 @@
|
||||
+/* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
|
||||
+/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC 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, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#define BITS_PER_UNIT 8
|
||||
+
|
||||
+typedef int SItype __attribute__ ((mode (SI)));
|
||||
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
||||
+typedef int DItype __attribute__ ((mode (DI)));
|
||||
+typedef int word_type __attribute__ ((mode (__word__)));
|
||||
+
|
||||
+struct DIstruct {SItype high, low;};
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct DIstruct s;
|
||||
+ DItype ll;
|
||||
+} DIunion;
|
||||
+
|
||||
+DItype
|
||||
+__ashrdi3 (DItype u, word_type b)
|
||||
+{
|
||||
+ DIunion w;
|
||||
+ word_type bm;
|
||||
+ DIunion uu;
|
||||
+
|
||||
+ if (b == 0)
|
||||
+ return u;
|
||||
+
|
||||
+ uu.ll = u;
|
||||
+
|
||||
+ bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
|
||||
+ if (bm <= 0)
|
||||
+ {
|
||||
+ /* w.s.high = 1..1 or 0..0 */
|
||||
+ w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1);
|
||||
+ w.s.low = uu.s.high >> -bm;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ USItype carries = (USItype)uu.s.high << bm;
|
||||
+ w.s.high = uu.s.high >> b;
|
||||
+ w.s.low = ((USItype)uu.s.low >> b) | carries;
|
||||
+ }
|
||||
+
|
||||
+ return w.ll;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/arch/ubicom32/lib/divmod.c
|
||||
@@ -0,0 +1,85 @@
|
||||
+unsigned long
|
||||
+udivmodsi4(unsigned long num, unsigned long den, int modwanted)
|
||||
+{
|
||||
+ unsigned long bit = 1;
|
||||
+ unsigned long res = 0;
|
||||
+
|
||||
+ while (den < num && bit && !(den & (1L<<31)))
|
||||
+ {
|
||||
+ den <<=1;
|
||||
+ bit <<=1;
|
||||
+ }
|
||||
+ while (bit)
|
||||
+ {
|
||||
+ if (num >= den)
|
||||
+ {
|
||||
+ num -= den;
|
||||
+ res |= bit;
|
||||
+ }
|
||||
+ bit >>=1;
|
||||
+ den >>=1;
|
||||
+ }
|
||||
+ if (modwanted) return num;
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+long
|
||||
+__udivsi3 (long a, long b)
|
||||
+{
|
||||
+ return udivmodsi4 (a, b, 0);
|
||||
+}
|
||||
+
|
||||
+long
|
||||
+__umodsi3 (long a, long b)
|
||||
+{
|
||||
+ return udivmodsi4 (a, b, 1);
|
||||
+}
|
||||
+
|
||||
+long
|
||||
+__divsi3 (long a, long b)
|
||||
+{
|
||||
+ int neg = 0;
|
||||
+ long res;
|
||||
+
|
||||
+ if (a < 0)
|
||||
+ {
|
||||
+ a = -a;
|
||||
+ neg = !neg;
|
||||
+ }
|
||||
+
|
||||
+ if (b < 0)
|
||||
+ {
|
||||
+ b = -b;
|
||||
+ neg = !neg;
|
||||
+ }
|
||||
+
|
||||
+ res = udivmodsi4 (a, b, 0);
|
||||
+
|
||||
+ if (neg)
|
||||
+ res = -res;
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+long
|
||||
+__modsi3 (long a, long b)
|
||||
+{
|
||||
+ int neg = 0;
|
||||
+ long res;
|
||||
+
|
||||
+ if (a < 0)
|
||||
+ {
|
||||
+ a = -a;
|
||||
+ neg = 1;
|
||||
+ }
|
||||
+
|
||||
+ if (b < 0)
|
||||
+ b = -b;
|
||||
+
|
||||
+ res = udivmodsi4 (a, b, 1);
|
||||
+
|
||||
+ if (neg)
|
||||
+ res = -res;
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/arch/ubicom32/lib/lshrdi3.c
|
||||
@@ -0,0 +1,62 @@
|
||||
+/* lshrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
|
||||
+/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC 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, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#define BITS_PER_UNIT 8
|
||||
+
|
||||
+typedef int SItype __attribute__ ((mode (SI)));
|
||||
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
||||
+typedef int DItype __attribute__ ((mode (DI)));
|
||||
+typedef int word_type __attribute__ ((mode (__word__)));
|
||||
+
|
||||
+struct DIstruct {SItype high, low;};
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct DIstruct s;
|
||||
+ DItype ll;
|
||||
+} DIunion;
|
||||
+
|
||||
+DItype
|
||||
+__lshrdi3 (DItype u, word_type b)
|
||||
+{
|
||||
+ DIunion w;
|
||||
+ word_type bm;
|
||||
+ DIunion uu;
|
||||
+
|
||||
+ if (b == 0)
|
||||
+ return u;
|
||||
+
|
||||
+ uu.ll = u;
|
||||
+
|
||||
+ bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
|
||||
+ if (bm <= 0)
|
||||
+ {
|
||||
+ w.s.high = 0;
|
||||
+ w.s.low = (USItype)uu.s.high >> -bm;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ USItype carries = (USItype)uu.s.high << bm;
|
||||
+ w.s.high = (USItype)uu.s.high >> b;
|
||||
+ w.s.low = ((USItype)uu.s.low >> b) | carries;
|
||||
+ }
|
||||
+
|
||||
+ return w.ll;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/arch/ubicom32/lib/muldi3.c
|
||||
@@ -0,0 +1,87 @@
|
||||
+/* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and
|
||||
+ gcc-2.7.2.3/longlong.h which is: */
|
||||
+/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC 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, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#define UWtype USItype
|
||||
+#define UHWtype USItype
|
||||
+#define W_TYPE_SIZE 32
|
||||
+#define __BITS4 (W_TYPE_SIZE / 4)
|
||||
+#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
|
||||
+#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
|
||||
+#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2))
|
||||
+
|
||||
+#define umul_ppmm(w1, w0, u, v) \
|
||||
+ do { \
|
||||
+ UWtype __x0, __x1, __x2, __x3; \
|
||||
+ UHWtype __ul, __vl, __uh, __vh; \
|
||||
+ \
|
||||
+ __ul = __ll_lowpart (u); \
|
||||
+ __uh = __ll_highpart (u); \
|
||||
+ __vl = __ll_lowpart (v); \
|
||||
+ __vh = __ll_highpart (v); \
|
||||
+ \
|
||||
+ __x0 = (UWtype) __ul * __vl; \
|
||||
+ __x1 = (UWtype) __ul * __vh; \
|
||||
+ __x2 = (UWtype) __uh * __vl; \
|
||||
+ __x3 = (UWtype) __uh * __vh; \
|
||||
+ \
|
||||
+ __x1 += __ll_highpart (__x0);/* this can't give carry */ \
|
||||
+ __x1 += __x2; /* but this indeed can */ \
|
||||
+ if (__x1 < __x2) /* did we get it? */ \
|
||||
+ __x3 += __ll_B; /* yes, add it in the proper pos. */ \
|
||||
+ \
|
||||
+ (w1) = __x3 + __ll_highpart (__x1); \
|
||||
+ (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \
|
||||
+ } while (0)
|
||||
+
|
||||
+
|
||||
+#define __umulsidi3(u, v) \
|
||||
+ ({DIunion __w; \
|
||||
+ umul_ppmm (__w.s.high, __w.s.low, u, v); \
|
||||
+ __w.ll; })
|
||||
+
|
||||
+typedef int SItype __attribute__ ((mode (SI)));
|
||||
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
||||
+typedef int DItype __attribute__ ((mode (DI)));
|
||||
+typedef int word_type __attribute__ ((mode (__word__)));
|
||||
+
|
||||
+struct DIstruct {SItype high, low;};
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct DIstruct s;
|
||||
+ DItype ll;
|
||||
+} DIunion;
|
||||
+
|
||||
+DItype
|
||||
+__muldi3 (DItype u, DItype v)
|
||||
+{
|
||||
+ DIunion w;
|
||||
+ DIunion uu, vv;
|
||||
+
|
||||
+ uu.ll = u,
|
||||
+ vv.ll = v;
|
||||
+
|
||||
+ w.ll = __umulsidi3 (uu.s.low, vv.s.low);
|
||||
+ w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high
|
||||
+ + (USItype) uu.s.high * (USItype) vv.s.low);
|
||||
+
|
||||
+ return w.ll;
|
||||
+}
|
||||
--- a/arch/ubicom32/kernel/ubicom32_ksyms.c
|
||||
+++ b/arch/ubicom32/kernel/ubicom32_ksyms.c
|
||||
@@ -72,7 +72,6 @@ EXPORT_SYMBOL(memmove);
|
||||
extern void __ashldi3(void);
|
||||
extern void __ashrdi3(void);
|
||||
extern void __divsi3(void);
|
||||
-extern void __divdi3(void);
|
||||
extern void __lshrdi3(void);
|
||||
extern void __modsi3(void);
|
||||
extern void __muldi3(void);
|
||||
@@ -83,7 +82,6 @@ extern void __umodsi3(void);
|
||||
EXPORT_SYMBOL(__ashldi3);
|
||||
EXPORT_SYMBOL(__ashrdi3);
|
||||
EXPORT_SYMBOL(__divsi3);
|
||||
-EXPORT_SYMBOL(__divdi3);
|
||||
EXPORT_SYMBOL(__lshrdi3);
|
||||
EXPORT_SYMBOL(__modsi3);
|
||||
EXPORT_SYMBOL(__muldi3);
|
@ -0,0 +1,13 @@
|
||||
--- a/drivers/mtd/devices/ubi32-m25p80.c
|
||||
+++ b/drivers/mtd/devices/ubi32-m25p80.c
|
||||
@@ -630,8 +630,8 @@ static int ubicom32_flash_driver_erase(s
|
||||
/* sanity checks */
|
||||
if (instr->addr + instr->len > flash->mtd.size)
|
||||
return -EINVAL;
|
||||
- if ((instr->addr % mtd->erasesize) != 0
|
||||
- || (instr->len % mtd->erasesize) != 0) {
|
||||
+ if (((u32) instr->addr % mtd->erasesize) != 0
|
||||
+ || ((u32) instr->len % mtd->erasesize) != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
13
target/linux/ubicom32/patches-2.6.30/140-arch_cflags.patch
Normal file
13
target/linux/ubicom32/patches-2.6.30/140-arch_cflags.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/arch/ubicom32/Makefile
|
||||
+++ b/arch/ubicom32/Makefile
|
||||
@@ -54,8 +54,8 @@ CFLAGS_MODULE += -mno-fastcall
|
||||
#
|
||||
# Some CFLAG additions based on specific CPU type.
|
||||
#
|
||||
-cflags-$(CONFIG_UBICOM32_V3) := -march=ubicom32v3 -DIP5000
|
||||
-cflags-$(CONFIG_UBICOM32_V4) := -march=ubicom32v4 -DIP7000
|
||||
+cflags-$(CONFIG_UBICOM32_V3) := -march=ubicom32v3 -mno-fdpic -DIP5000
|
||||
+cflags-$(CONFIG_UBICOM32_V4) := -march=ubicom32v4 -mno-fdpic -DIP7000
|
||||
|
||||
ldflags-$(CONFIG_LINKER_RELAXATION) := --relax
|
||||
LDFLAGS_vmlinux := $(ldflags-y)
|
Loading…
Reference in New Issue
Block a user