搜尋此網誌

不同 KERNEL 版本的 DEVICE MTD PATH.

#if definned(KERNEL_2.4.X.X)
#define PATH_CONFIG_MTD "/dev/mtd/5"

#elif defined(KERNEL_2.6.X.X)  
#define PATH_CONFIG_MTD "/dev/mtd5"
#else
#error "Un Know Kernel Version"
#endif

UBOOT fw_printenv and fw_setenv build - how to.

    U-boot 內建了 user application (tools) 可以在 user mode 下查看u-boot的環境變數.
但是須要點 patch :

   1. CPPFLAGS 確定有加入 (1) cross compile 的 include path (2)  kernel include path.
   example:
CPPFLAGS += -I/opt/crosstool/gcc-3.4.5-glibc-2.3.6/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/sys-include
CPPFLAGS += -I/root/mindspeed/2010-7-7/trunk/kernel-linux_2.6.22.19-4.05.0/include  
 
  2.在uboot -> tools -> env 內的 makefile :
加入
 
$(obj)fw_setenv: $(SRCS) $(HEADERS)
$(CROSS_COMPILE)gcc $(CPPFLAGS) $(SRCS) -o $(obj)fw_setenv
並把
env make all 的 all  make target 從
all: $(obj)fw_printenv
改成
all: $(obj)fw_printenv $(obj)fw_setenv
 
  3. 如果make  fw_env 有錯,試著把 include file 改成
#include

#include
#include
#include
#include
#include
#include //ioctl prototype
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include

//#include

#include
#include
#include

#include

#include
#include "fw_env.h"
 
     4.設定 fw_env.config (之後要複製到 rootfs/etc)
# Configuration file for fw_(printenv/saveenv) utility.

# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.

# MTD device name Device offset Env. size Flash sector size
#/dev/mtd5 0x0 0x10000 0x20000
/dev/mtd2 0x0000 0x4000 0x20000

 
  此例是 我使用了 一個 32M - nor flash , uboot 佔 前面的0~0x40000
  u-boot env 的 sector size = nor flash 的erase block size =0x20000 (128k)
  而u-boot 的 env block size= 0x4000 =uboot 的預設值!.
 
 

本機電腦的VmWare Samba 連線問題.


左圖顯示須要密碼,並且自動使用Guest 導致連入失敗.(但是samba server 是用 share mode,即不需要登入者名字 和密碼).

解決方式:使用 (\\\\localhost) 取代(\\\\:192.168.1.30/) 來建立samba 網路
磁碟機. 見左下圖...

 問題發生原因我不清楚 但是估計是xp 的samba client 出問題 或是 tcp/udp port block 的問題 ..不過這樣是可以解決的.