diff -pruNX dontdiff admboot.orig/makefile admboot/makefile
--- admboot.orig/makefile	2004-06-15 13:26:12.000000000 +0200
+++ admboot/makefile	2006-01-22 16:29:09.000000000 +0100
@@ -12,7 +12,7 @@ BYTE_ORDER = LITTLE_ENDIAN
 FLASH_TYPE = NOR_FLASH
 
 # 0x400000 OR 0x200000
-BOARD_NOR_FLASH_SIZE = 0x400000
+BOARD_NOR_FLASH_SIZE = 0x200000
 
 
 
@@ -47,7 +47,8 @@ endif 
 
 
 #=======================  Compiler Flags  ============================
-CC_FLAG 		= $(ENDIAN_FG) -Wcomment -O2
+#CC_FLAG 		= $(ENDIAN_FG) -Wcomment -O2
+CC_FLAG 		= $(ENDIAN_FG) -Wcomment -Os
 CPU_FLAG		= -mips32 
 
 ifeq ("$(FLASH_TYPE)", "NAND_FLASH")
@@ -63,8 +64,10 @@ OBJ_DIR = ./build/$(EDIR)/$(FLASH_TYPE)
 BIN_DIR = ./bin/$(EDIR)/$(FLASH_TYPE)
 SRC_DIR = ./src
 else
-OBJ_DIR = ./build/$(EDIR)/$(FLASH_TYPE)
-BIN_DIR = ./bin/$(EDIR)/$(FLASH_TYPE)
+#OBJ_DIR = ./build/$(EDIR)/$(FLASH_TYPE)
+#BIN_DIR = ./bin/$(EDIR)/$(FLASH_TYPE)
+OBJ_DIR = ./build
+BIN_DIR = .
 SRC_DIR = ./src
 endif
 
@@ -100,7 +103,7 @@ BOOT_NAME = nor_bootinit
 BOOT_OBJS = $(OBJ_DIR)/nor_bootinit.o
 
 EXEC_NAME = nor_bootmain
-EXEC_OBJS = $(OBJ_DIR)/nor_ldrinit.o $(OBJ_DIR)/bloader.o $(OBJ_DIR)/linuxld.o \
+EXEC_OBJS1 = $(OBJ_DIR)/nor_ldrinit.o $(OBJ_DIR)/bloader.o $(OBJ_DIR)/linuxld.o \
 			$(OBJ_DIR)/xmodem.o $(OBJ_DIR)/timer.o $(OBJ_DIR)/uartdrv.o	\
 			$(OBJ_DIR)/flash.o $(OBJ_DIR)/memlib.o $(OBJ_DIR)/irqlib.o \
 			$(OBJ_DIR)/cachelib.o $(OBJ_DIR)/vector.o $(OBJ_DIR)/except.o \
@@ -108,6 +111,12 @@ EXEC_OBJS = $(OBJ_DIR)/nor_ldrinit.o $(O
 			$(OBJ_DIR)/if_5120.o $(OBJ_DIR)/ip.o $(OBJ_DIR)/skbuff.o \
 			$(OBJ_DIR)/udp.o $(OBJ_DIR)/utils.o $(OBJ_DIR)/param.o $(OBJ_DIR)/nf.o
 			
+EXEC_OBJS = $(OBJ_DIR)/nor_ldrinit.o $(OBJ_DIR)/bloader.o $(OBJ_DIR)/linuxld.o \
+			$(OBJ_DIR)/xmodem.o $(OBJ_DIR)/timer.o $(OBJ_DIR)/uartdrv.o	\
+			$(OBJ_DIR)/flash.o $(OBJ_DIR)/memlib.o \
+			$(OBJ_DIR)/cachelib.o $(OBJ_DIR)/vector.o $(OBJ_DIR)/except.o \
+			$(OBJ_DIR)/param.o $(OBJ_DIR)/nf.o
+			
 ifeq ($(BOARD_NOR_FLASH_SIZE), 0x400000)
 EXEC_OBJS += $(OBJ_DIR)/mx29lv320.o
 CC_FLAG += -DFLASH_4M
@@ -132,7 +141,7 @@ ifeq ("$(FLASH_TYPE)", "NAND_FLASH")
 all : rom_img
 
 rom_img: boot_img main_img
-	cat -B $(OBJ_DIR)/$(BOOT_NAME).img $(OBJ_DIR)/$(EXEC_NAME).img > $(BIN_DIR)/$(ROM_NAME).img
+	cat $(OBJ_DIR)/$(BOOT_NAME).img $(OBJ_DIR)/$(EXEC_NAME).img > $(BIN_DIR)/$(ROM_NAME).img
 	$(BIN_DIR)/$(CMM_CREATE) $(BIN_DIR)/$(ROM_NAME).img  $(BIN_DIR)/$(ROM_NAME).cmm
 
 boot_img: $(BOOT_OBJS)
@@ -166,7 +175,7 @@ else
 all : rom_img
 
 rom_img: boot_img main_img
-	cat -B $(OBJ_DIR)/$(BOOT_NAME).img $(OBJ_DIR)/$(EXEC_NAME).img > $(BIN_DIR)/$(ROM_NAME).img
+	cat $(OBJ_DIR)/$(BOOT_NAME).img $(OBJ_DIR)/$(EXEC_NAME).img > $(BIN_DIR)/$(ROM_NAME).img
 
 boot_img: $(BOOT_OBJS)
 	$(LD) $(ENDIAN_FG) $(LD_FLAG) $(LIB_PATH) -e romreset_except -Ttext 0x9fc00000 \
diff -pruNX dontdiff admboot.orig/src/bloader.c admboot/src/bloader.c
--- admboot.orig/src/bloader.c	2004-06-15 13:26:20.000000000 +0200
+++ admboot/src/bloader.c	2006-01-22 16:50:17.000000000 +0100
@@ -63,10 +63,10 @@ static void print_menu()
 {
     buart_print("\n\r"
                 "\n\rLoader Menu"
-                "\n\r=================================="
+//                "\n\r=================================="
                 "\n\r [1] Xmodem Download"
-                "\n\r [2] TFTP Client Download"
-                "\n\r [3] Print Boot Params"
+//                "\n\r [2] TFTP Client Download"
+//                "\n\r [3] Print Boot Params"
                 "\n\r [4] Set Boot Params"
                 "\n\r [5] Update bootloader"
                 "\n\r [6] Exit\n"
@@ -166,6 +166,7 @@ main_menu:
 	}
 
 	// Init Switch.
+#if NETWORK
 	if (if5120_init() != 0)
 	{
 		buart_print("\n\rSwitch init false.");
@@ -174,6 +175,7 @@ main_menu:
 
     // Init networks for TFTP.
 	tftp_init();
+#endif
 
 	//Bootloader Function Start.
     while (1)
@@ -191,11 +193,15 @@ main_menu:
             break;
 
         case '2':
+#if NETWORK
         	tftp_client_menu();
+#endif
         	break;
 
         case '3':
+#if NETWORK
         	PrintBspParam();
+#endif
         	break;
         	
         case '4':
diff -pruNX dontdiff admboot.orig/src/linuxld.c admboot/src/linuxld.c
--- admboot.orig/src/linuxld.c	2004-06-15 13:27:12.000000000 +0200
+++ admboot/src/linuxld.c	2006-01-22 16:01:34.000000000 +0100
@@ -115,6 +115,7 @@ ok:
     return (rc);
 }
 
+#if NETWORK
 int tftpc_download(void)
 {
 	void *flash = (void *)LINUXLD_FLASH_KERNEL_START;
@@ -200,6 +201,7 @@ fail:
 ok:
     return 0;
 }
+#endif
 
 /*
  * download linux image to flash using xmodem
diff -pruNX dontdiff admboot.orig/src/memlib.c admboot/src/memlib.c
--- admboot.orig/src/memlib.c	2004-06-15 13:26:22.000000000 +0200
+++ admboot/src/memlib.c	2006-01-22 16:29:00.000000000 +0100
@@ -93,6 +93,7 @@ void *MemAlloc(UINT32 NumOfByte, UINT32 
 /**********************************************************************************/
 /* SharedMemAlloc:																  */
 /**********************************************************************************/
+#if NETWORK
 void *SharedMemAlloc(UINT32 NumOfByte, UINT32 clear)
 {
 	int s;
@@ -135,7 +136,7 @@ void *SharedMemAlloc(UINT32 NumOfByte, U
 
 	return (void *) MemStart;
 }
-
+#endif
 
 
 
diff -pruNX dontdiff admboot.orig/src/param.c admboot/src/param.c
--- admboot.orig/src/param.c	2004-06-15 13:26:23.000000000 +0200
+++ admboot/src/param.c	2006-01-22 16:48:47.000000000 +0100
@@ -67,6 +67,7 @@ int set_boot_param(void)
 	/* Print Item */
 	buart_print(SET_PARAM);	
 
+#if NETWORK
 	/* Set serial number */
 	Set_Board_SerialNo();
 
@@ -78,6 +79,7 @@ int set_boot_param(void)
 
 	/* Set bootloader ip */
 	Set_TFTP_IP();
+#endif
 
     /* Before Write back, backup original content */
     if (nf_read(image, (char *)LINUXLD_FLASH_BOOTPARAM_START, LINUXLD_FLASH_BOOTPARAM_SIZE) != 0)
@@ -93,7 +95,9 @@ int set_boot_param(void)
 	else if (nf_write((char *)LINUXLD_FLASH_BOOTPARAM_START, image, LINUXLD_FLASH_BOOTPARAM_SIZE) != 0)
 		buart_print("\n\rWrite flash error.");
 	if (cfg->tftploipmagic == TFTPLOIPMAGIC && cfg->macmagic == MAC_MAGIC)
+#if NETWORK
 		arp_add_entry(cfg->mac, cfg->tftp_param.local_ip);
+#endif
 
 	return 0;
 	/* Wait any key */
@@ -105,6 +109,7 @@ int set_boot_param(void)
 /*			Board Serial NO				  */
 /******************************************/
 
+#if NETWORK
 int bsp_SetBoardSerialNo(UINT8 *s)
 {
 	int len;
@@ -605,3 +610,4 @@ int check_ip(UINT32 ipcheck,int flag)
 }
 
 
+#endif
