導航:首頁 > 源碼編譯 > vxworks的uboot編譯

vxworks的uboot編譯

發布時間:2025-06-25 06:38:29

❶ openwrt sdk下編譯uboot(添加usb埠功能)

在ehci-ra.c的ehci_hcd_init中加入MT7620_ASIC_BOARD定義:

MT7620#usbreset
(Re)startUSB...
USB:inusb_lowlevel_init
Mediatek/_length16
Register1111NbrPorts1
USBEHCI1.00
scanningbusfordevices...2USBDevice(s)found
scanningbusforstoragedevices...1StorageDevice(s)found
MT7620#usbinfo
1:Hub,USBRevision0.2
-u-bootEHCIHostController
-Class:Hub
-PacketSize:64Configurations:1
-Vendor:0x0000Proct0x0000Version0.1
Configuration:1
-Interfaces:1SelfPowered0mA
Interface:0
-AlternateSettings0,Endpoints:1
-ClassHub
-

2:MassStorage,USBRevision2.0
-HPUSB2.0Flash00CCCBB99999
-Class:(fromInterface)MassStorage
-PacketSize:64Configurations:1
-Vendor:0x0204Proct0x6025Version1.0
Configuration:1
-Interfaces:1BusPowered100mA
Interface:0
-AlternateSettings0,Endpoints:2
-ClassMassStorage,Transp.SCSI,Bulkonly
-Endpoint1OutBulkMaxPacket512
-Endpoint1InBulkMaxPacket512

❷ 有沒有嵌入式開發的學習路線,越詳細越好

看方向
如果選擇嵌入式硬體開發,就不懂了
軟體開發的話,分底層和應用層
我是從事wince驅動開發的(快滿一年),
以wince為例,底層就是boot、bsp修改、驅動開發這幾部分
學習路線:
1、買個開發板
2、按照開發板上的例子玩玩,ARM匯編稍微能看懂,寫點簡單的程序跑跑,對匯編有個大概的了解,bootloader等等會多少涉及點匯編的東西
然後就是開發板上的一些驅動玩玩。如果可以拿相似的BSP移植到開發板上就更好了,對BSP就有更多的認識了,學完以上可能可以找到工作,在工作中進一步加深理解
如果是應用的話,wince,我們寫應用用的是VS2005,VC++,和PC的開發基本差不多
學完一個操作系統,切換到另一個平台相對而言還是蠻快的,基本都是相通的
我之前的經驗是,我買了開發板玩了ADS程序寫了小型的程序,就是把LED啊、液晶屏啊、等等驅起來,然後,在linux下玩驅動,寫了幾個簡單的流驅動,去應聘,鬼使神差被招進去玩wince驅動了,感覺差得不是很多,玩了2周就開始上手,2個月之後,底層這塊就都扔給我了

以上,僅供參考(至於開發板,如果是消費電子類的,好像三星的S3C系列用的人比較多,開發板也很多,工業類的就不懂了。至於選哪家開發板廠家,網路google一下)

❸ mkimage 命令可以製作根文件系統鏡像么

bootm命令是用來引導經過u-boot的工具mkimage打包後的kernel image的,什麼叫做經過u-boot的工具mkimage打包後的kernel image,這個就要看mkimage的代碼,看看它做了些什麼,雖然我很希望大家不要偷懶,認真地去看看,但是我知道還是有很多人懶得去做這件,那麼我就j將分析mkimage代碼後得到的總結告訴大家,mkimage做了些什麼,怎麼用這個工具。

mkimage的用法
uboot源代碼的tools/目錄下有mkimage工具,這個工具可以用來製作不壓縮或者壓縮的多種可啟動映象文件。

mkimage在製作映象文件的時候,是在原來的可執行映象文件的前面加上一個0x40位元組的頭,記錄參數所指定的信息,這樣uboot才能識別這個映象是針對哪個CPU體系結構的,哪個OS的,哪種類型,載入內存中的哪個位置, 入口點在內存的那個位置以及映象名是什麼

root@Glym:/tftpboot# ./mkimage
Usage: ./mkimage -l image
-l ==> list image header information
./mkimage -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
參數說明:

-A 指定CPU的體系結構:

取值 表示的體系結構
alpha Alpha
arm ARM
x86 Intel x86
ia64 IA64
mips MIPS
mips64 MIPS 64 Bit
ppc PowerPC
s390 IBM S390
sh SuperH
sparc SPARC
sparc64 SPARC 64 Bit
m68k MC68000

-O 指定操作系統類型,可以取以下值:
openbsd、netbsd、freebsd、4_4bsd、linux、svr4、esix、solaris、irix、sco、dell、ncr、lynxos、vxworks、psos、qnx、u-boot、rtems、artos

-T 指定映象類型,可以取以下值:
standalone、kernel、ramdisk、multi、firmware、script、filesystem

-C 指定映象壓縮方式,可以取以下值:
none 不壓縮
gzip 用gzip的壓縮方式
bzip2 用bzip2的壓縮方式

-a 指定映象在內存中的載入地址,映象下載到內存中時,要按照用mkimage製作映象時,這個參數所指定的地址值來下載

-e 指定映象運行的入口點地址,這個地址就是-a參數指定的值加上0x40(因為前面有個mkimage添加的0x40個位元組的頭)

-n 指定映象名

-d 指定製作映象的源文件
mkimage
解壓內核源碼包,編輯Makefile
設置 cross_compile:=[編譯器的絕對路徑] ;這個絕對路徑既上面2.95.3放到的路徑
進入內核文件夾,執行下面命令
[root@hostname]# make clean
[root@hostname]# make dep
[root@hostname]# make
[root@hostname]# [編譯器的絕對路徑]/bin/arm-linux-obj -O binary -S vmlinux linux.bin ;編譯器的絕對路徑也是上面說到的路徑
[root@hostname]# gzip linux.bin
下面的比較重要了,主要是u-boot的安裝,這個在H9200的手冊上說的很不清楚
[root@hostname]# tar xzvf u-boot-1.0.0.tar.gz ;解壓u-boot
[root@hostname]# cd u-boot-1.0.0
[root@hostname]# make distclean
[root@hostname]# make at91rm9200dk_config
[root@hostname]# make all
然後在/usr/local下建立uboot文件夾將u-boot-1.0.0下的所有文件都復制到uboot下
[root@hostname]# [uboot的絕對路徑]/tools/mkimage -A arm -O linux -C gzip -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage ;這里的絕對路徑是/usr/local/uboot
vmlinux linux.bin linux.bin.gz uImage(uboot製作的image)

mkimage -a -e
-a參數後是內核的運行地址,-e參數後是入口地址。

1)如果我們沒用mkimage對內核進行處理的話,那直接把內核下載到0x30008000再運行就行,內核會自解壓運行(不過內核運行需要一個tag來傳遞參數,而這個tag建議是由bootloader提供的,在u-boot下默認是由bootm命令建立的)。

2)如果使用mkimage生成內核鏡像文件的話,會在內核的前頭加上了64byte的信息,供建立tag之用。bootm命令會首先判斷bootm xxxx 這個指定的地址xxxx是否與-a指定的載入地址相同。
(1)如果不同的話會從這個地址開始提取出這個64byte的頭部,對其進行分析,然後把去掉頭部的內核復制到-a指定的load地址中去運行之
(2)如果相同的話那就讓其原封不同的放在那,但-e指定的入口地址會推後64byte,以跳過這64byte的頭部。

QUESTIONS
1. I have built a vmlinux image but I can boot it.
2: The mkimage tool, ARMboot's tftp command, and the bootm command require
certain load and entry addresses. I'm confused which ones to chose.

ANSWERS

1. I have built a vmlinux image but I can boot it.
--------------------------------------------------
ARMboot is designed to boot Images as created by the mkimage tool, that
comes with ARMboot and is automatically built, too. You cannot directly load
the vmlinux image, as it expects a number of prerequisits such as special
register contents etc.

2. The mkimage tool, ARMboot's tftp command, and the bootm command require
certain load and entry addresses. I'm confused which ones to chose.
--------------------------------------------------------------------------
Well, there are 3 different addresses:
1. Kernel Load Address. This is the address, where the kernel was linked
to when you built the vmlinux and can be found in arch/arm/Makefile.
The default for it is:

ifeq ($(CONFIG_CPU_32),y)
PROCESSOR = armv
TEXTADDR = 0xC0008000
LDSCRIPT = arch/arm/vmlinux-armv.lds.in
endif

Provide this as "-a" parameter to mkimage.
2. Kernel Entry Point. This is the address, where ARMboot jumps to to
enter the Kernel. It usually is the same as the kernel load address.
Provide this as "-e" parameter to mkimage.
3. The Network Download Address. This is where you download the mkimage
File. This address MUST BE different to the Kernel Load Address, and
should be sufficiently far away to allow ARMboot to relocate the
image to the final Kernel Load Address. Loading to the 5th MB
within the RAM is usually a good idea, eg. if the RAM begins at
0xc0000000, you can do this:

LART # tftp c0400000 linux.img
ARP broadcast 1
eth addr: 00:02:03:04:05:06
TFTP from server 192.168.1.1; our IP address is 192.168.1.2
Filename 'image.img'.
Load address: 0xc0400000
Loading:
##################################################################done
Bytes transferred = 567252 (8a7d4 hex)
LART # bootm c0400000
Image Name: Linux 2.4.18
Created: Mon Jun 24 12:00:01 2002
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 567188 Bytes = 553 kB = 0 MB
Load Address: 0xc0008000
Entry Point: 0xc0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
Linux version 2.4.18 (mag@mag) (gcc version 2.95.3 20010315 (release)) #4 Mon Jun 17 20:35:32 CST 2002

閱讀全文

與vxworks的uboot編譯相關的資料

熱點內容
壓縮機功率型號 瀏覽:559
PLC程序演算法 瀏覽:971
物流程序員好不好 瀏覽:546
插值演算法vb 瀏覽:926
androidwebview報錯 瀏覽:241
中國什麼時候才能有自己的伺服器 瀏覽:764
ps3聯機伺服器怎麼用 瀏覽:670
伺服器nfs服務是什麼 瀏覽:95
java虛擬機直接編譯 瀏覽:608
javaaop實現 瀏覽:61
java雙向通信 瀏覽:513
mps430超低功耗單片機答案 瀏覽:901
夫妻數學演算法中大獎 瀏覽:399
nmake不是內部命令 瀏覽:779
如何創建社區ppoe虛擬伺服器 瀏覽:518
java模擬線程並發 瀏覽:762
一個雲伺服器能有幾個實例 瀏覽:191
如何在伺服器壓縮zip格式 瀏覽:87
去除數組中重復元素的演算法 瀏覽:1000
巴士之星安卓如何玩 瀏覽:654