summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclaudio <claudio@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-02-08 14:32:21 +0000
committerclaudio <claudio@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-02-08 14:32:21 +0000
commitda4a7137abb7447e2aeeeb8955c566ae7b24cea6 (patch)
treea697d6d7e12db61805d8f2fbe85a144fe963f797
parent7efebe60e89ec6d0c9630affe04d8892c574553b (diff)
[etrax] Initial kernel support for 2.6.28.4
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14446 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/etrax/config-2.6.28271
-rw-r--r--target/linux/etrax/patches-2.6.28/100-compile-fixes.patch97
-rw-r--r--target/linux/etrax/patches-2.6.28/200-samsung_flash.patch13
-rw-r--r--target/linux/etrax/patches-2.6.28/201-flashsize.patch92
4 files changed, 473 insertions, 0 deletions
diff --git a/target/linux/etrax/config-2.6.28 b/target/linux/etrax/config-2.6.28
new file mode 100644
index 0000000000..49aa9268b3
--- /dev/null
+++ b/target/linux/etrax/config-2.6.28
@@ -0,0 +1,271 @@
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_BASE_SMALL=0
+CONFIG_BITREVERSE=y
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BONDING is not set
+CONFIG_BOUNCE=y
+CONFIG_BRIDGE=m
+# CONFIG_BT is not set
+# CONFIG_CIFS is not set
+CONFIG_CLASSIC_RCU=y
+CONFIG_CRIS=y
+# CONFIG_CRIS_MACH_ARTPEC3 is not set
+CONFIG_CRYPTO_AEAD2=m
+CONFIG_CRYPTO_ALGAPI2=m
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_BLKCIPHER2=m
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_CRC32C is not set
+CONFIG_CRYPTO_HASH2=m
+# CONFIG_CRYPTO_KHAZAD is not set
+CONFIG_CRYPTO_MANAGER2=m
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_RNG2=m
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_ETRAX100LX is not set
+CONFIG_ETRAX100LX_V2=y
+# CONFIG_ETRAXFS is not set
+CONFIG_ETRAX_ARCH_V10=y
+# CONFIG_ETRAX_ARCH_V32 is not set
+CONFIG_ETRAX_AXISFLASHMAP=y
+CONFIG_ETRAX_CMDLINE="root=/dev/mtdblock1 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200"
+# CONFIG_ETRAX_CSP0_LEDS is not set
+# CONFIG_ETRAX_DEBUG_PORT0 is not set
+# CONFIG_ETRAX_DEBUG_PORT1 is not set
+# CONFIG_ETRAX_DEBUG_PORT2 is not set
+# CONFIG_ETRAX_DEBUG_PORT3 is not set
+CONFIG_ETRAX_DEBUG_PORT_NULL=y
+CONFIG_ETRAX_DEF_R_BUS_CONFIG=0x4
+CONFIG_ETRAX_DEF_R_PORT_PA_DATA=0xf0
+CONFIG_ETRAX_DEF_R_PORT_PA_DIR=0x1c
+CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG=0x00
+CONFIG_ETRAX_DEF_R_PORT_PB_DATA=0x03
+CONFIG_ETRAX_DEF_R_PORT_PB_DIR=0xce
+CONFIG_ETRAX_DEF_R_SDRAM_CONFIG=0x09603737
+CONFIG_ETRAX_DEF_R_SDRAM_TIMING=0x80008002
+CONFIG_ETRAX_DEF_R_WAITSTATES=0x95f8
+CONFIG_ETRAX_DRAM_SIZE=32
+CONFIG_ETRAX_DRAM_VIRTUAL_BASE=c0000000
+CONFIG_ETRAX_ETHERNET=y
+CONFIG_ETRAX_FAST_TIMER=y
+CONFIG_ETRAX_FLASH1_SIZE=0
+CONFIG_ETRAX_FLASH_BUSWIDTH=2
+CONFIG_ETRAX_GPIO=y
+# CONFIG_ETRAX_I2C is not set
+# CONFIG_ETRAX_KMALLOCED_MODULES is not set
+CONFIG_ETRAX_LED1G=2
+CONFIG_ETRAX_LED1R=2
+CONFIG_ETRAX_LED2G=3
+CONFIG_ETRAX_LED2R=3
+CONFIG_ETRAX_LED3G=2
+CONFIG_ETRAX_LED3R=2
+CONFIG_ETRAX_NANDFLASH_BUSWIDTH=1
+CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY=y
+# CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK is not set
+# CONFIG_ETRAX_NO_LEDS is not set
+CONFIG_ETRAX_PA_BUTTON_BITMASK=02
+CONFIG_ETRAX_PA_CHANGEABLE_BITS=0xFF
+CONFIG_ETRAX_PA_CHANGEABLE_DIR=0xFF
+CONFIG_ETRAX_PA_LEDS=y
+CONFIG_ETRAX_PB_CHANGEABLE_BITS=0xFF
+CONFIG_ETRAX_PB_CHANGEABLE_DIR=0xFF
+# CONFIG_ETRAX_PB_LEDS is not set
+CONFIG_ETRAX_PTABLE_SECTOR=0
+CONFIG_ETRAX_RESCUE_SER0=y
+# CONFIG_ETRAX_RESCUE_SER1 is not set
+# CONFIG_ETRAX_RESCUE_SER2 is not set
+# CONFIG_ETRAX_RESCUE_SER3 is not set
+# CONFIG_ETRAX_RS485 is not set
+CONFIG_ETRAX_SDRAM=y
+CONFIG_ETRAX_SER0_CD_ON_PA_BIT=-1
+CONFIG_ETRAX_SER0_CD_ON_PB_BIT=-1
+CONFIG_ETRAX_SER0_DSR_ON_PA_BIT=-1
+CONFIG_ETRAX_SER0_DSR_ON_PB_BIT=-1
+CONFIG_ETRAX_SER0_DTR_ON_PA_BIT=-1
+CONFIG_ETRAX_SER0_DTR_ON_PB_BIT=-1
+# CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_MIXED is not set
+CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_NONE=y
+# CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PA is not set
+# CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB is not set
+CONFIG_ETRAX_SER0_RI_ON_PA_BIT=-1
+CONFIG_ETRAX_SER0_RI_ON_PB_BIT=-1
+CONFIG_ETRAX_SER2_CD_ON_PA_BIT=-1
+CONFIG_ETRAX_SER2_CD_ON_PB_BIT=-1
+CONFIG_ETRAX_SER2_DSR_ON_PA_BIT=-1
+CONFIG_ETRAX_SER2_DSR_ON_PB_BIT=-1
+CONFIG_ETRAX_SER2_DTR_ON_PA_BIT=-1
+CONFIG_ETRAX_SER2_DTR_ON_PB_BIT=-1
+# CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_MIXED is not set
+CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_NONE=y
+# CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_PA is not set
+# CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_PB is not set
+CONFIG_ETRAX_SER2_RI_ON_PA_BIT=-1
+CONFIG_ETRAX_SER2_RI_ON_PB_BIT=-1
+CONFIG_ETRAX_SER3_CD_ON_PA_BIT=-1
+CONFIG_ETRAX_SER3_CD_ON_PB_BIT=-1
+CONFIG_ETRAX_SER3_DSR_ON_PA_BIT=-1
+CONFIG_ETRAX_SER3_DSR_ON_PB_BIT=-1
+CONFIG_ETRAX_SER3_DTR_ON_PA_BIT=-1
+CONFIG_ETRAX_SER3_DTR_ON_PB_BIT=-1
+# CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_MIXED is not set
+CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_ON_NONE=y
+# CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_ON_PA is not set
+# CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_ON_PB is not set
+CONFIG_ETRAX_SER3_RI_ON_PA_BIT=-1
+CONFIG_ETRAX_SER3_RI_ON_PB_BIT=-1
+CONFIG_ETRAX_SERIAL=y
+# CONFIG_ETRAX_SERIAL_FAST_TIMER is not set
+# CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST is not set
+CONFIG_ETRAX_SERIAL_PORT0=y
+# CONFIG_ETRAX_SERIAL_PORT0_DMA0_OUT is not set
+# CONFIG_ETRAX_SERIAL_PORT0_DMA1_IN is not set
+# CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT is not set
+# CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN is not set
+CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_IN=y
+CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_OUT=y
+# CONFIG_ETRAX_SERIAL_PORT1 is not set
+CONFIG_ETRAX_SERIAL_PORT2=y
+CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT=y
+CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN=y
+# CONFIG_ETRAX_SERIAL_PORT2_DMA6_OUT is not set
+# CONFIG_ETRAX_SERIAL_PORT2_DMA7_IN is not set
+# CONFIG_ETRAX_SERIAL_PORT2_NO_DMA_IN is not set
+# CONFIG_ETRAX_SERIAL_PORT2_NO_DMA_OUT is not set
+CONFIG_ETRAX_SERIAL_PORT3=y
+# CONFIG_ETRAX_SERIAL_PORT3_DMA2_OUT is not set
+# CONFIG_ETRAX_SERIAL_PORT3_DMA3_IN is not set
+CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT=y
+CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN=y
+# CONFIG_ETRAX_SERIAL_PORT3_DMA8_OUT is not set
+# CONFIG_ETRAX_SERIAL_PORT3_DMA9_IN is not set
+# CONFIG_ETRAX_SERIAL_PORT3_NO_DMA_IN is not set
+# CONFIG_ETRAX_SERIAL_PORT3_NO_DMA_OUT is not set
+CONFIG_ETRAX_SERIAL_RX_TIMEOUT_TICKS=1
+# CONFIG_ETRAX_SOFT_SHUTDOWN is not set
+# CONFIG_ETRAX_SYNCHRONOUS_SERIAL is not set
+CONFIG_ETRAX_USB_HOST=y
+CONFIG_ETRAX_USB_HOST_PORT1=y
+CONFIG_ETRAX_USB_HOST_PORT2=y
+# CONFIG_ETRAX_VCS_SIM is not set
+# CONFIG_ETRAX_WATCHDOG is not set
+CONFIG_EXT2_FS=y
+# CONFIG_EXT3_FS is not set
+CONFIG_FORCE_MAX_ZONEORDER=6
+# CONFIG_FREEZER is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_IOMAP=y
+# CONFIG_GEN_RTC is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_I2C is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IDE is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_IFB is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_ISO9660_FS is not set
+CONFIG_KMOD=y
+CONFIG_LLC=m
+# CONFIG_MINIX_FS is not set
+# CONFIG_MSDOS_FS is not set
+CONFIG_MTD=y
+CONFIG_MTDRAM_ABS_POS=0x0
+CONFIG_MTDRAM_ERASE_SIZE=128
+CONFIG_MTDRAM_TOTAL_SIZE=0
+# CONFIG_MTD_ABSENT is not set
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_MTD_BLOCK2MTD is not set
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_CMDLINE_PARTS is not set
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+CONFIG_MTD_MTDRAM=y
+# CONFIG_MTD_ONENAND is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PLATRAM is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NFSD is not set
+# CONFIG_NFS_FS is not set
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_DEFRAG_IPV4=m
+CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NO_IOPORT=y
+# CONFIG_OOM_REBOOT is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+# CONFIG_PPP is not set
+CONFIG_ROMFS_FS=y
+# CONFIG_RTC is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_SERIAL_8250 is not set
+CONFIG_STP=m
+# CONFIG_SVINTO_SIM is not set
+# CONFIG_SYSTEM_PROFILER is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_TUN is not set
+# CONFIG_UDF_FS is not set
+CONFIG_UID16=y
+CONFIG_USB=y
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_SERIAL is not set
+CONFIG_USB_SUPPORT=y
+# CONFIG_VFAT_FS is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_WLAN_80211 is not set
diff --git a/target/linux/etrax/patches-2.6.28/100-compile-fixes.patch b/target/linux/etrax/patches-2.6.28/100-compile-fixes.patch
new file mode 100644
index 0000000000..ac448be600
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/100-compile-fixes.patch
@@ -0,0 +1,97 @@
+Index: linux-2.6.28/arch/cris/Makefile
+===================================================================
+--- linux-2.6.28.orig/arch/cris/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28/arch/cris/Makefile 2009-01-09 22:52:39.000000000 +0100
+@@ -40,7 +40,7 @@
+
+ LD = $(CROSS_COMPILE)ld -mcrislinux
+
+-OBJCOPYFLAGS := -O binary -R .note -R .comment -S
++OBJCOPYFLAGS := -O binary -R .bss -R .note -R .note.gnu.build-id -R .comment -S
+
+ CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
+
+Index: linux-2.6.28/arch/cris/arch-v10/boot/Makefile
+===================================================================
+--- linux-2.6.28.orig/arch/cris/arch-v10/boot/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28/arch/cris/arch-v10/boot/Makefile 2009-01-09 22:52:39.000000000 +0100
+@@ -13,7 +13,6 @@
+
+ $(obj)/compressed/vmlinux: $(obj)/Image FORCE
+ $(Q)$(MAKE) $(build)=$(obj)/compressed $@
+- $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
+
+ $(obj)/zImage: $(obj)/compressed/vmlinux
+ @cp $< $@
+Index: linux-2.6.28/arch/cris/arch-v10/boot/compressed/misc.c
+===================================================================
+--- linux-2.6.28.orig/arch/cris/arch-v10/boot/compressed/misc.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28/arch/cris/arch-v10/boot/compressed/misc.c 2009-01-10 18:00:45.000000000 +0100
+@@ -5,7 +5,7 @@
+ * adapted for Linux.
+ *
+ * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
+- * puts by Nick Holloway 1993, better puts by Martin Mares 1995
++ * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
+ * adaptation for Linux/CRIS Axis Communications AB, 1999
+ *
+ */
+@@ -102,7 +102,6 @@
+ static long bytes_out = 0;
+ static uch *output_data;
+ static unsigned long output_ptr = 0;
+-static void puts(const char *);
+
+ /* the "heap" is put directly after the BSS ends, at end */
+
+@@ -115,7 +114,7 @@
+ /* decompressor info and error messages to serial console */
+
+ static void
+-puts(const char *s)
++putstr(const char *s)
+ {
+ #ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
+ while (*s) {
+@@ -188,9 +187,9 @@
+
+ static void error(char *x)
+ {
+- puts("\n\n");
+- puts(x);
+- puts("\n\n -- System halted\n");
++ putstr("\n\n");
++ putstr(x);
++ putstr("\n\n -- System halted\n");
+
+ while (1); /* Halt */
+ }
+@@ -236,11 +235,11 @@
+
+ __asm__ volatile ("move $vr,%0" : "=rm" (revision));
+ if (revision < 10) {
+- puts("You need an ETRAX 100LX to run linux 2.6\n");
++ putstr("You need an ETRAX 100LX to run linux 2.6\n");
+ while (1);
+ }
+
+- puts("Uncompressing Linux...\n");
++ putstr("Uncompressing Linux...\n");
+ gunzip();
+- puts("Done. Now booting the kernel.\n");
++ putstr("Done. Now booting the kernel.\n");
+ }
+Index: linux-2.6.28/arch/cris/arch-v10/mm/init.c
+===================================================================
+--- linux-2.6.28.orig/arch/cris/arch-v10/mm/init.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28/arch/cris/arch-v10/mm/init.c 2009-01-09 22:52:39.000000000 +0100
+@@ -184,6 +184,9 @@
+
+ free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
+ }
++void free_initrd_mem(unsigned long start, unsigned long end)
++{
++}
+
+ /* Initialize remaps of some I/O-ports. It is important that this
+ * is called before any driver is initialized.
diff --git a/target/linux/etrax/patches-2.6.28/200-samsung_flash.patch b/target/linux/etrax/patches-2.6.28/200-samsung_flash.patch
new file mode 100644
index 0000000000..5df6590fa7
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/200-samsung_flash.patch
@@ -0,0 +1,13 @@
+Index: linux-2.6.28.2/drivers/mtd/chips/cfi_cmdset_0002.c
+===================================================================
+--- linux-2.6.28.2.orig/drivers/mtd/chips/cfi_cmdset_0002.c 2009-02-04 13:42:19.000000000 +0100
++++ linux-2.6.28.2/drivers/mtd/chips/cfi_cmdset_0002.c 2009-02-04 13:44:11.000000000 +0100
+@@ -364,7 +364,7 @@
+ return NULL;
+ }
+
+- if (extp->MajorVersion != '1' ||
++ if (extp->MajorVersion < '1' || extp->MajorVersion > '3' ||
+ (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
+ if (cfi->mfr == MANUFACTURER_SAMSUNG &&
+ (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
diff --git a/target/linux/etrax/patches-2.6.28/201-flashsize.patch b/target/linux/etrax/patches-2.6.28/201-flashsize.patch
new file mode 100644
index 0000000000..e825acf1f7
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/201-flashsize.patch
@@ -0,0 +1,92 @@
+Index: linux-2.6.28.2/arch/cris/arch-v10/drivers/axisflashmap.c
+===================================================================
+--- linux-2.6.28.2.orig/arch/cris/arch-v10/drivers/axisflashmap.c 2009-02-04 13:49:34.000000000 +0100
++++ linux-2.6.28.2/arch/cris/arch-v10/drivers/axisflashmap.c 2009-02-04 13:55:30.000000000 +0100
+@@ -113,7 +113,7 @@
+
+ /* If no partition-table was found, we use this default-set. */
+ #define MAX_PARTITIONS 7
+-#define NUM_DEFAULT_PARTITIONS 3
++#define NUM_DEFAULT_PARTITIONS 2
+
+ /*
+ * Default flash size is 2MB. CONFIG_ETRAX_PTABLE_SECTOR is most likely the
+@@ -122,19 +122,14 @@
+ */
+ static struct mtd_partition axis_default_partitions[NUM_DEFAULT_PARTITIONS] = {
+ {
+- .name = "boot firmware",
+- .size = CONFIG_ETRAX_PTABLE_SECTOR,
+- .offset = 0
+- },
+- {
+ .name = "kernel",
+- .size = 0x200000 - (6 * CONFIG_ETRAX_PTABLE_SECTOR),
+- .offset = CONFIG_ETRAX_PTABLE_SECTOR
++ .size = 0x00,
++ .offset = 0
+ },
+ {
+- .name = "filesystem",
+- .size = 5 * CONFIG_ETRAX_PTABLE_SECTOR,
+- .offset = 0x200000 - (5 * CONFIG_ETRAX_PTABLE_SECTOR)
++ .name = "rootfs",
++ .size = 0x200000,
++ .offset = 0x200000
+ }
+ };
+
+@@ -281,6 +276,11 @@
+ struct partitiontable_entry *ptable;
+ int use_default_ptable = 1; /* Until proven otherwise. */
+ const char pmsg[] = " /dev/flash%d at 0x%08x, size 0x%08x\n";
++ unsigned int kernel_part_size = 0;
++ unsigned char *flash_mem = (unsigned char*)(FLASH_CACHED_ADDR);
++ unsigned int flash_scan_count = 0;
++ const char *part_magic = "ACME_PART_MAGIC";
++ unsigned int magic_len = strlen(part_magic);
+
+ if (!(mymtd = flash_probe())) {
+ /* There's no reason to use this module if no flash chip can
+@@ -293,6 +293,31 @@
+ axisflash_mtd = mymtd;
+ }
+
++ /* scan flash to findout where out partition starts */
++
++ printk(KERN_INFO "Scanning flash for end of kernel magic\n");
++ for(flash_scan_count = 0; flash_scan_count < 100000; flash_scan_count++) {
++ if(strncmp(&flash_mem[flash_scan_count], part_magic, magic_len - 1) == 0) {
++ kernel_part_size = flash_mem[flash_scan_count + magic_len ];
++ kernel_part_size <<= 8;
++ kernel_part_size += flash_mem[flash_scan_count + magic_len + 2];
++ kernel_part_size <<= 8;
++ kernel_part_size += flash_mem[flash_scan_count + magic_len + 1];
++ kernel_part_size <<= 8;
++ kernel_part_size += flash_mem[flash_scan_count + magic_len + 3];
++ printk(KERN_INFO "Kernel ends at 0x%.08X\n", kernel_part_size);
++ flash_scan_count = 1100000;
++ }
++ }
++
++
++ if(kernel_part_size){
++ kernel_part_size = (kernel_part_size & 0xffff0000);
++ axis_default_partitions[0].size = kernel_part_size;
++ axis_default_partitions[1].size = mymtd->size - axis_default_partitions[0].size;
++ axis_default_partitions[1].offset = axis_default_partitions[0].size;
++ }
++
+ if (mymtd) {
+ mymtd->owner = THIS_MODULE;
+ ptable_head = (struct partitiontable_head *)(FLASH_CACHED_ADDR +
+Index: linux-2.6.28.2/arch/cris/arch-v10/lib/hw_settings.S
+===================================================================
+--- linux-2.6.28.2.orig/arch/cris/arch-v10/lib/hw_settings.S 2009-02-04 13:48:25.000000000 +0100
++++ linux-2.6.28.2/arch/cris/arch-v10/lib/hw_settings.S 2009-02-04 13:49:04.000000000 +0100
+@@ -60,3 +60,5 @@
+ .dword R_PORT_PB_SET
+ .dword PB_SET_VALUE
+ .dword 0 ; No more register values
++ .ascii "ACME_PART_MAGIC"
++ .dword 0xdeadc0de