2440 上核心3 4 2移植

2021-07-11 01:32:41 字數 4110 閱讀 9269

win7下不能使用dnw燒寫的替代方法

兩種替代方法:

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:

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

這個是原來的交叉編譯版本。

並複製到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

修改環境變數:

[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/

fiwq  退出

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版使用手冊

linux3 4 2核心移植詳解(二) 移植核心

解壓進入核心頂層目錄 tar xjf linux 3.4.2.tar.bz2 修改頂層makeflie arch arm cross compile arm linux 執行make s3c2410 defconfig會出現 configuration written to config 此時將預設...

移植3 4 2的Kernel到JZ2440

本文將介紹如何移植linux 3.4.2核心到jz2440開發板上的全過程,使用的交叉編譯工具版本為 arm linux gcc 4.3.2.tar.bz2 下面來一步一步介紹如何移植。由於kernel的啟動引數是由uboot傳遞的,關鍵的引數有 r0 0 r1 mach type r2 tag引數...

Linux 3 4 2核心移植除錯筆記

問題1 linux 在nand 上成功進行分割槽後,掛在 yaffs2 檔案系統失敗,出現問題 問題原因 沒有在uboot中設定好對應的啟動引數 解決方法 在uboot 設定相應的啟動引數,支援 yaffs2 的使用,具體做法如下 問題2 掛在成功後,出現問題 attempted to kill i...