diff --git a/arch/arm/cpu/pxa/u-boot.lds b/arch/arm/cpu/pxa/u-boot.lds
index d6643f9..8e977dd 100644
--- a/arch/arm/cpu/pxa/u-boot.lds
+++ b/arch/arm/cpu/pxa/u-boot.lds
@@ -44,15 +44,7 @@ SECTIONS
 	}
 
 	. = ALIGN(4);
-	__rel_dyn_start = .;
-	.rel.dyn : { *(.rel.dyn) }
-	__rel_dyn_end = .;
-
-	__dynsym_start = .;
-	.dynsym : { *(.dynsym) }
-
-	. = ALIGN(4);
-
+	
 	. = .;
 	__u_boot_cmd_start = .;
 	.u_boot_cmd : { *(.u_boot_cmd) }
@@ -62,4 +54,16 @@ SECTIONS
 	__bss_start = .;
 	.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
 	_end = .;
+
+	__rel_dyn_start = .;
+        .rel.dyn : { *(.rel.dyn) }
+        __rel_dyn_end = .;
+
+        __dynsym_start = .;
+        .dynsym : { *(.dynsym) }
+
+        . = ALIGN(4);
+
+
+
 }
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 1fd5f83..4d0dfc8 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -529,6 +529,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	/* initialize environment */
 	env_relocate ();
 
+	//debug("Environment relocate\n");
 #ifdef CONFIG_VFD
 	/* must do this after the framebuffer is allocated */
 	drv_vfd_init();
@@ -538,16 +539,13 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
 
 	stdio_init ();	/* get the devices list going. */
-
 	jumptable_init ();
-
 #if defined(CONFIG_API)
 	/* Initialize API */
 	api_init ();
 #endif
 
 	console_init_r ();	/* fully init console as a device */
-
 #if defined(CONFIG_ARCH_MISC_INIT)
 	/* miscellaneous arch dependent initialisations */
 	arch_misc_init ();
@@ -561,7 +559,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	interrupt_init ();
 	/* enable exceptions */
 	enable_interrupts ();
-
 	/* Perform network card initialisation if necessary */
 #if defined(CONFIG_DRIVER_SMC91111) || defined (CONFIG_DRIVER_LAN91C96)
 	/* XXX: this needs to be moved to board init */
@@ -571,7 +568,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 		smc_set_mac_addr(enetaddr);
 	}
 #endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
-
+	puts("loadaddr");
 	/* Initialize from environment */
 	if ((s = getenv ("loadaddr")) != NULL) {
 		load_addr = simple_strtoul (s, NULL, 16);
diff --git a/board/ik7/Makefile b/board/ik7/Makefile
new file mode 100644
index 0000000..7fd2258
--- /dev/null
+++ b/board/ik7/Makefile
@@ -0,0 +1,47 @@
+#
+# Balloon3 Support
+#
+# Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).a
+
+COBJS	:= ik7.o
+
+SRCS	:= $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+
+$(LIB):	$(obj).depend $(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+	rm -f $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/ik7/ik7.c b/board/ik7/ik7.c
new file mode 100644
index 0000000..04adad6
--- /dev/null
+++ b/board/ik7/ik7.c
@@ -0,0 +1,151 @@
+/*
+ * Balloon3 Support
+ *
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/hardware.h>
+#include <serial.h>
+#include <asm/io.h>
+#include <command.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void flash_led(char n) {
+	
+	switch(n) {
+		case 1:
+			writel(readl(GPSR0) | (1<<20), GPSR0);
+			udelay(10000);
+			writel(readl(GPSR0) & ~(1<<20), GPSR0);
+			break;
+		case 2:
+			writel(readl(GPSR0) | (1<<21), GPSR0);
+                        udelay(10000);
+                        writel(readl(GPSR0) & ~(1<<21), GPSR0);
+			break;
+		case 3:
+                        writel(readl(GPSR2) | (1<<14), GPSR2);
+                        udelay(10000);
+                        writel(readl(GPSR2) & ~(1<<14), GPSR2);
+			break;
+		case 4:
+                        writel(readl(GPSR2) | (1<<15), GPSR2);
+                        udelay(10000);
+                        writel(readl(GPSR2) & ~(1<<15), GPSR2);
+			break;
+		default:
+			break;
+	}
+}
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+int board_init(void)
+{
+	/* We have RAM, disable cache */
+	dcache_disable();
+	icache_disable();
+
+	/* arch number of vpac270 */
+	//gd->bd->bi_arch_number = MACH_TYPE_BALLOON3;
+	gd->bd->bi_arch_number = MACH_TYPE_ZIPIT2;
+
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = 0xa0000100;
+	flash_led(1);
+	return 0;
+}
+
+struct serial_device *default_serial_console(void)
+{
+	return &serial_ffuart_device;
+}
+
+extern void pxa_dram_init(void);
+int dram_init(void)
+{
+	flash_led(3);
+	//writel(readl(PCFR) | (1<<7), PCFR);
+	pxa_dram_init();
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
+	return 0;
+}
+
+void dram_init_banksize(void)
+{
+	flash_led(4);
+	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
+
+#ifdef	CONFIG_CMD_USB
+int usb_board_init(void)
+{
+	flash_led(2);
+	writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
+		~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
+		UHCHR);
+
+	writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
+
+	while (readl(UHCHR) & UHCHR_FSBIR)
+		;
+
+	writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
+	writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
+
+	/* Clear any OTG Pin Hold */
+	if (readl(PSSR) & PSSR_OTGPH)
+		writel(readl(PSSR) | PSSR_OTGPH, PSSR);
+
+	writel(readl(UHCRHDA) & ~(0x200), UHCRHDA);
+	writel(readl(UHCRHDA) | 0x100, UHCRHDA);
+
+	/* Set port power control mask bits, only 3 ports. */
+	writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
+
+	/* enable port 2 */
+	writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
+		UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
+
+	return 0;
+}
+
+void usb_board_init_fail(void)
+{
+	return;
+}
+
+void usb_board_stop(void)
+{
+	writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
+	udelay(11);
+	writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
+
+	writel(readl(UHCCOMS) | 1, UHCCOMS);
+	udelay(10);
+
+	writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
+
+	return;
+}
+#endif
diff --git a/boards.cfg b/boards.cfg
index 6c2a667..f2d379d 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -62,6 +62,7 @@ actux3		arm	ixp
 actux4		arm	ixp
 ixdp425		arm	ixp
 balloon3	arm	pxa
+ik7		arm	pxa
 cerf250		arm	pxa
 cradle		arm	pxa
 csb226		arm	pxa
diff --git a/common/env_common.c b/common/env_common.c
index a276efc..ee725da 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -170,6 +170,7 @@ uchar *env_get_addr (int index)
 
 void set_default_env(const char *s)
 {
+	int i = 0;
 	if (sizeof(default_environment) > ENV_SIZE) {
 		puts("*** Error - default environment is too large\n\n");
 		return;
@@ -187,10 +188,13 @@ void set_default_env(const char *s)
 		puts("Using default environment\n\n");
 	}
 
-	if (himport((char *)default_environment,
-		    sizeof(default_environment), '\0', 0) == 0) {
-		error("Environment import failed: errno = %d\n", errno);
+	i = himport((char *)default_environment, sizeof(default_environment), '\0', 0);
+//	if (himport((char *)default_environment,
+//		    sizeof(default_environment), '\0', 0) == 0) {
+	if (i <= 0) {
+		error("Me sad :( Environment import failed: errno = %d ret: %d\n", errno, i);
 	}
+
 	gd->flags |= GD_FLG_ENV_READY;
 }
 
diff --git a/config.mk b/config.mk
index ce8e5f2..3115fa9 100644
--- a/config.mk
+++ b/config.mk
@@ -41,8 +41,9 @@ endif
 
 # clean the slate ...
 PLATFORM_RELFLAGS =
-PLATFORM_CPPFLAGS =
+#PLATFORM_CPPFLAGS =
 PLATFORM_LDFLAGS =
+PLATFORM_CPPFLAGS += -DDEBUG
 
 #########################################################################
 
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index c92c7a7..857ff7e 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -32,7 +32,7 @@
  */
 
 /* The DEBUG define must be before common to enable debugging */
-/* #define DEBUG	*/
+//#define DEBUG
 
 #include <common.h>
 #include <asm/processor.h>
diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h
index 63e6d6e..71eb179 100644
--- a/include/configs/balloon3.h
+++ b/include/configs/balloon3.h
@@ -135,7 +135,7 @@
 	(PHYS_SDRAM_1 + GENERATED_GBL_DATA_SIZE + 2048)
 
 /*
- * NOR FLASH
+ * NOR FLASH - PC28F128P30T85
  */
 #ifdef	CONFIG_CMD_FLASH
 #define	PHYS_FLASH_1			0x00000000	/* Flash Bank #1 */
@@ -147,7 +147,7 @@
 #define	CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 
 #define	CONFIG_SYS_MAX_FLASH_BANKS	1
-#define	CONFIG_SYS_MAX_FLASH_SECT	256
+#define	CONFIG_SYS_MAX_FLASH_SECT	128
 
 #define	CONFIG_SYS_FLASH_USE_BUFFER_WRITE	1
 
diff --git a/include/configs/ik7.h b/include/configs/ik7.h
new file mode 100644
index 0000000..167cfe7
--- /dev/null
+++ b/include/configs/ik7.h
@@ -0,0 +1,273 @@
+/*
+ * Balloon3 configuration file
+ *
+ * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef	__CONFIG_H
+#define	__CONFIG_H
+
+/*
+ * High Level Board Configuration Options
+ */
+#define	CONFIG_PXA27X		1	/* Marvell PXA270 CPU */
+/*
+ * Environment settings
+ */
+#define	CONFIG_ENV_OVERWRITE
+#define	CONFIG_ARCH_CPU_INIT
+#define	CONFIG_BOOTARGS			"console=ttyS0,115200"
+#define	CONFIG_TIMESTAMP
+#define	CONFIG_BOOTDELAY		3	/* Autoboot delay */
+#define	CONFIG_CMDLINE_TAG
+#define	CONFIG_SETUP_MEMORY_TAGS
+#define	CONFIG_SYS_TEXT_BASE		0x0
+#define	CONFIG_LZMA			/* LZMA compression support */
+
+
+#define CONFIG_SYS_NO_FLASH
+
+/*
+ * Serial Console Configuration
+ */
+#define	CONFIG_PXA_SERIAL
+#define	CONFIG_FFUART			1
+#define	CONFIG_BAUDRATE			115200
+#define	CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
+
+/*
+ * Bootloader Components Configuration
+ */
+#include <config_cmd_default.h>
+
+#undef	CONFIG_CMD_NET
+#undef	CONFIG_CMD_ENV
+#undef	CONFIG_CMD_IMLS
+#define	CONFIG_CMD_USB
+#undef	CONFIG_CMD_FLASH
+
+#define CONFIG_ENV_IS_NOWHERE
+
+/*
+ * KGDB
+ */
+#ifdef	CONFIG_CMD_KGDB
+#define	CONFIG_KGDB_BAUDRATE		230400	/* kgdb serial port speed */
+#define	CONFIG_KGDB_SER_INDEX		2	/* which serial port to use */
+#endif
+
+/*
+ * HUSH Shell Configuration
+ */
+#define	CONFIG_SYS_HUSH_PARSER		1
+#define	CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+
+#define	CONFIG_SYS_LONGHELP
+#ifdef	CONFIG_SYS_HUSH_PARSER
+#define	CONFIG_SYS_PROMPT		"$ "
+#else
+#define	CONFIG_SYS_PROMPT		"=> "
+#endif
+#define	CONFIG_SYS_CBSIZE		256
+#define	CONFIG_SYS_PBSIZE		\
+	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define	CONFIG_SYS_MAXARGS		16
+#define	CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
+#define	CONFIG_SYS_DEVICE_NULLDEV	1
+
+/*
+ * Clock Configuration
+ */
+//#undef	CONFIG_SYS_CLKS_IN_HZ
+#define CONFIG_SYS_HZ			1000
+#define	CONFIG_SYS_CPUSPEED	0x190
+
+#define CONFIG_SYS_MALLOC_LEN		(256 * 1024)	/* Reserve 256 kB for malloc()	*/
+
+/*
+ * Stack sizes
+ */
+#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack */
+#ifdef	CONFIG_USE_IRQ
+#define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */
+#define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */
+#endif
+
+/*
+ * DRAM Map
+ */
+#define	CONFIG_NR_DRAM_BANKS		1		/* 2 banks of DRAM */
+#define	PHYS_SDRAM_1			0xa0000000	/* SDRAM Bank #1 */
+#define	PHYS_SDRAM_1_SIZE		0x01000000	/* 16 MB */
+
+#define	CONFIG_SYS_DRAM_BASE		0xa0000000	/* CS0 */
+#define	CONFIG_SYS_DRAM_SIZE		0x01000000	/* 16 MB DRAM */
+
+#define	CONFIG_SYS_MEMTEST_START	0xa0100000	/* memtest works on */
+#define	CONFIG_SYS_MEMTEST_END		0xa0200000	/* 4 ... 8 MB in DRAM */
+
+
+#define CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_DRAM_BASE
+
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(PHYS_SDRAM_1 + GENERATED_GBL_DATA_SIZE + 2048)
+//#define	CONFIG_SYS_INIT_SP_ADDR		(PHYS_SDRAM_1 + GENERATED_GBL_DATA_SIZE + 4096)
+
+/*
+ * NOR FLASH
+ */
+#ifdef	CONFIG_CMD_FLASH
+#define	PHYS_FLASH_1			0x00000000	/* Flash Bank #1 */
+#define	PHYS_FLASH_SIZE			0x01000000	/* 16 MB */
+#define	CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
+
+#define	CONFIG_SYS_FLASH_CFI
+#define	CONFIG_FLASH_CFI_DRIVER		1
+#define	CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_32BIT
+
+#define	CONFIG_SYS_MAX_FLASH_BANKS	1
+#define	CONFIG_SYS_MAX_FLASH_SECT	256
+
+#define	CONFIG_SYS_FLASH_USE_BUFFER_WRITE	1
+
+#define	CONFIG_SYS_FLASH_ERASE_TOUT	(2*CONFIG_SYS_HZ)
+#define	CONFIG_SYS_FLASH_WRITE_TOUT	(2*CONFIG_SYS_HZ)
+#define	CONFIG_SYS_FLASH_LOCK_TOUT	(2*CONFIG_SYS_HZ)
+#define	CONFIG_SYS_FLASH_UNLOCK_TOUT	(2*CONFIG_SYS_HZ)
+#define	CONFIG_SYS_FLASH_PROTECTION
+#define	CONFIG_ENV_IS_IN_FLASH
+#else
+#define	CONFIG_SYS_NO_FLASH
+#define	CONFIG_ENV_IS_IN_NOWHERE
+#endif
+
+#define	CONFIG_SYS_MONITOR_BASE		0x000000
+#define	CONFIG_SYS_MONITOR_LEN		0x40000
+
+#define	CONFIG_ENV_SIZE			0x2000
+#define	CONFIG_ENV_ADDR			0x40000
+#define	CONFIG_ENV_SECT_SIZE		0x10000
+
+/*
+ *  * GPIO settings
+ *   */
+#define CONFIG_SYS_GPSR0_VAL            0x80208000
+#define CONFIG_SYS_GPSR1_VAL            0x00000008
+#define CONFIG_SYS_GPSR2_VAL            0x0000c000
+#define CONFIG_SYS_GPSR3_VAL            0x00000000
+
+#define CONFIG_SYS_GPCR0_VAL            0x0f0f0fff
+#define CONFIG_SYS_GPCR1_VAL            0xffffff14
+#define CONFIG_SYS_GPCR2_VAL            0xffffffff
+#define CONFIG_SYS_GPCR3_VAL            0xffffffff
+
+#define CONFIG_SYS_GPDR0_VAL            0x8bfbf008
+#define CONFIG_SYS_GPDR1_VAL            0x0000281c
+#define CONFIG_SYS_GPDR2_VAL            0x000cc000
+#define CONFIG_SYS_GPDR3_VAL            0x00000000
+
+#define CONFIG_SYS_GAFR0_L_VAL          0x00100000
+#define CONFIG_SYS_GAFR0_U_VAL          0x00000003
+
+#define CONFIG_SYS_GAFR1_L_VAL          0x09901400
+#define CONFIG_SYS_GAFR1_U_VAL          0x00000000
+
+#define CONFIG_SYS_GAFR2_L_VAL          0x00000000
+#define CONFIG_SYS_GAFR2_U_VAL          0x000004f0
+
+#define CONFIG_SYS_GAFR3_L_VAL          0x00000300
+#define CONFIG_SYS_GAFR3_U_VAL          0x00000000
+
+#define CONFIG_SYS_GRER0_VAL            0x00000000
+#define CONFIG_SYS_GRER1_VAL            0x00000000
+#define CONFIG_SYS_GRER2_VAL            0x00000000
+#define CONFIG_SYS_GRER3_VAL            0x00000000
+#define CONFIG_SYS_GFER1_VAL            0x00000000
+#define CONFIG_SYS_GFER3_VAL            0x00000020
+#define CONFIG_SYS_GFER0_VAL            0x00000000
+#define CONFIG_SYS_GFER2_VAL            0x00000000
+
+#define CONFIG_SYS_PSSR_VAL     0x30
+//#define CONFIG_SYS_PSSR_VAL             0x20
+//
+
+/*
+ * Clock settings
+ */
+#define	CONFIG_SYS_CKEN		0xffffffff
+#define	CONFIG_SYS_CCCR		0x00000290
+//#define	CONFIG_SYS_CCCR	0x02000190
+//#define		CONFIG_SYS_CCCR 0x00000190
+
+/*
+ * Memory settings
+ */
+//#define	CONFIG_SYS_MSC0_VAL	0x7ff17ff9
+//#define	CONFIG_SYS_MSC1_VAL	0x7ff07ff0
+//#define	CONFIG_SYS_MSC2_VAL	0x74a42491
+//#define	CONFIG_SYS_MDCNFG_VAL	0x19003801
+//#define	CONFIG_SYS_MDREFR_VAL	0x00108018
+//#define	CONFIG_SYS_MDMRS_VAL	0x00220022
+//#define	CONFIG_SYS_FLYCNFG_VAL	0x00000000
+//#define	CONFIG_SYS_SXCNFG_VAL	0x00000000
+//#define	CONFIG_SYS_MEM_BUF_IMP	0x0f
+
+// Memory controller settings
+#define CONFIG_SYS_MSC0_VAL	0x9aa936d2
+#define CONFIG_SYS_MSC1_VAL	0x0000ccd1
+#define CONFIG_SYS_MSC2_VAL	0x0000b884
+#define CONFIG_SYS_FLYCNFG_VAL	0x00010001
+
+// SDRAM settings
+#define CONFIG_SYS_MDCNFG_VAL	0x08001aa1
+#define CONFIG_SYS_MDMRS_VAL	0x00000000
+
+#define CONFIG_SYS_SXCNFG_VAL	0x00000000
+//#define CONFIG_SYS_MDREFR_VAL	0x0011c032
+//#define CONFIG_SYS_MDREFR_VAL	0x2013c065
+#define CONFIG_SYS_MDREFR_VAL	0x2013d065
+
+
+/*
+ * PCMCIA and CF Interfaces
+ */
+#define	CONFIG_SYS_MECR_VAL	0x00000000
+#define	CONFIG_SYS_MCMEM0_VAL	0x00014307
+#define	CONFIG_SYS_MCMEM1_VAL	0x00014307
+#define	CONFIG_SYS_MCATT0_VAL	0x0001c787
+#define	CONFIG_SYS_MCATT1_VAL	0x0001c787
+#define	CONFIG_SYS_MCIO0_VAL	0x0001430f
+#define	CONFIG_SYS_MCIO1_VAL	0x0001430f
+
+/*
+ * USB
+ */
+#ifdef	CONFIG_CMD_USB
+#define	CONFIG_USB_OHCI_NEW
+#define	CONFIG_SYS_USB_OHCI_CPU_INIT
+#define	CONFIG_SYS_USB_OHCI_BOARD_INIT
+#define	CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2
+#define	CONFIG_SYS_USB_OHCI_REGS_BASE	0x4C000000
+#define	CONFIG_SYS_USB_OHCI_SLOT_NAME	"balloon3"
+#define	CONFIG_USB_STORAGE
+#define	CONFIG_DOS_PARTITION
+#define	CONFIG_CMD_FAT
+#define	CONFIG_CMD_EXT2
+#endif
+
+#endif	/* __CONFIG_H */
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 7ac3ddd..2b24ff2 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -618,15 +618,16 @@ int himport_r(struct hsearch_data *htab,
 	/* Test for correct arguments.  */
 	if (htab == NULL) {
 		__set_errno(EINVAL);
-		return 0;
+		return -1;
 	}
 
 	/* we allocate new space to make sure we can write to the array */
 	if ((data = malloc(size)) == NULL) {
-		debug("himport_r: can't malloc %d bytes\n", size);
+		debug("himport_r: can't malloc %d bytes, ret = %p\n", size, data);
 		__set_errno(ENOMEM);
-		return 0;
+		return -2;
 	}
+	debug("malloc: %p\n", data);
 	memcpy(data, env, size);
 	dp = data;
 
@@ -666,7 +667,7 @@ int himport_r(struct hsearch_data *htab,
 
 		if (hcreate_r(nent, htab) == 0) {
 			free(data);
-			return 0;
+			return -3;
 		}
 	}
 
@@ -723,7 +724,7 @@ int himport_r(struct hsearch_data *htab,
 		if (rv == NULL) {
 			printf("himport_r: can't insert \"%s=%s\" into hash table\n",
 				name, value);
-			return 0;
+			return -4;
 		}
 
 		debug("INSERT: table %p, filled %d/%d rv %p ==> name=\"%s\" value=\"%s\"\n",
