2440 上內核3.4.2移植

win7下不能使用dnw燒寫的替代方法
兩種替代方法:
1.用網絡下載
u-boot:
tftp 30000000 u-boot.bin;
protect off all; 
erase 0 3ffff;
cp.b 30000000 0 40000
kernel:
tftp 30000000 uImage
nand erase kernel
nand write.jffs2 30000000 kernel


fs:
tftp 30000000 fs_qtopia.yaffs2
nand erase root
mtdpart 查看分區地址
nand write.yaffs 30000000 260000         2f76b40
                          root分區的地址  大小


1.2 NFS
kernel:
nfs 30000000 10.108.141.214:/work/nfs_root/uImage
nand erase kernel
nand write.jffs2 30000000 kernel


fs:
nfs 30000000 10.108.141.214:/work/nfs_root/fs_qtopia.yaffs2
nand erase root
nand write.yaffs 30000000 260000 2f76b40


2.用linux下的dnw
2.1 把linux下的dnw應用程序放到/bin目錄
sudo chmod +x /bin/dnw
sudo chmod +x /bin/dnw
2.2若是試用VMWAER,讓VMWARE位於前臺,而後再用USB線鏈接PC和開發板USB DEVICE接口
linux上用lsusb命令確認VMWARE LINUX 已經識別出 UBOOT的USB設備


2.3 在UBOOT界面輸入k 
  而後在Linux下執行 dnw uImage
2.4 在UBOOT界面輸入y
  而後在Linux下執行 dnw fs_qtopia.yaffs2


uboot、內核打補丁
u-boot
tar xjf u-boot-1.1.6.tar.bz2
cd u-boot-1.1.6/
patch -p1 < ../u-boot-1.1.6_jz2440.patch
內核同理


編譯內核
cp config_ok .config 編譯內核時先讀取本服務器的內核配置,防止編譯內核的時候本地內核配載衝突
make uImage


出現
   error1:
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
cc1: error: invalid option `abi=aapcs-linux'
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
緣由爲make menuconfig內核配置EABI和OABI衝突

   error2:linux

make uImage arch/arm/mm/tlb-v4wbi.S: Assembler messages: arch/arm/mm/tlb-v4wbi.S:64: Error: too many positional arguments 但出現了錯誤,編譯沒有經過。上網沒有查到解決問題。 那試試換一下交叉編譯連,是否是交叉編譯連太老了? [root@localhost linux-3.4.2]# arm-linux-gcc -v Reading specs from /home/hyx/gcc-3.4.5-glibc-2.3.6/bin/../lib/gcc/arm-linux/3.4.5/specs Configured with: /work/tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/work/tools/gcc-3.4.5-glibc-2.3.6 --with-float=soft --with-headers=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include --with-local-prefix=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long Thread model: posix gcc version 3.4.5 這個是原來的交叉編譯版本。 在韋東山的資料D:\韋東山Linux視頻驅動第2期\韋東Linux視頻第1第2期全部源碼文檔圖片芯片手冊(1)\韋東Linux視頻第1第2期全部源碼文檔圖片芯片手冊\畢業班_文檔_圖片_源碼_bin\中找到了arm-linux-gcc-4.3.2.tar.bz2交叉編譯工具 並複製到E:\ARM6410實驗資料hyx\6410實驗源碼包hyx後上傳到虛擬機。 解壓、編譯、安裝交叉編譯連arm-linux-gcc-4.3.2.tar.bz2 tar -vxf arm-linux-gcc-4.3.2.tar.bz2 但這個是解壓到了/home/hyx/usr/local/arm/4.3.2下 如今將其解壓到根目錄下 tar -xjf arm-linux-gcc-4.3.2.tar.bz2 -C / ps:查看如今命令的環境變量路徑 [root@localhost hyx]# echo $PATH  /usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/home/hyx/gcc-3.4.5-glibc-2.3.6/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 修改環境變量: 方法1:(強烈推薦) [root@localhost bin]# export PATH=/usr/local/arm/4.3.2/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin [root@localhost bin]# arm-linux-gcc -v 方法2: vi /etc/profile # Path manipulation if [ "$EUID" = "0" ]; then           pathmunge /sbin            pathmunge /usr/sbin            pathmunge /usr/local/sbin            pathmunge /home/hyx/usr/local/arm/4.3.2/bin/         fi         wq  退出         source /etc/profile         arm-linux-gcc -v 顯示: Thread model: posix gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)  編譯成功後,在內核的arch/arm/boot目錄下即生成uImage文件 修復error後,從新 make distclean cp config_ok .config make menuconfig //去掉EABI make uImage  編譯成功後,在內核的/work/system/linux-3.4.2/arch/arm/boot目錄下生成uImage文件 燒寫內核參考上面 詳情見百問網精智JZ2440開發板4.3寸LCD版使用手冊
相關文章
相關標籤/搜索