導航:首頁 > 源碼編譯 > ubuntu安裝qnx編譯環境

ubuntu安裝qnx編譯環境

發布時間:2023-01-07 18:24:52

linux mkimages 文件在哪

下載:
兩種途徑得到mkImage工具uImage,
解決方法:
方法一:

安裝mkimage工具,載ubuntu11.10下執行以下命令進行安裝:
#sudo apt-get install uboot-mkimage
方法二:
編譯uboot源碼,編譯成功後載uboot/tools目錄下會生成mkimgage工具,將mkimage工具拷貝到/usr/bin/目錄下即可。

使用:

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 A RM
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 指定製作映象的源文件

U-BOOT下使用bootm引導內核方法

一、在開始之前先說明一下bootm相關的東西。
1、 首先說明一下,S3C2410架構下的bootm只對sdram中的內核鏡像文件進行操作(好像AT91架構提供了一段從flash復制內核鏡像的代碼, 不過針對s3c2410架構就沒有這段代碼,雖然可以在u-boot下添加這段代碼,不過好像這個用處不大),所以請確保你的內核鏡像下載到sdram 中,或者在bootcmd下把flash中的內核鏡像復制到sdram中。
2、-a參數後是內核的運行地址,-e參數後是入口地址。

3、
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的頭部。

二、好,接著介紹使用mkimage生成鏡像文件並下載運行的方法。

方法一、
1、首先,用u-boot/tools/mkimage這個工具為你的內核加上u-boot引導所需要的文件頭,具體做法如下:
[root@localhost tftpboot]#mkimage -n 'linux-2.6.14' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage zImage.img
Image Name: linux-2.6.14
Created: Fri Jan 12 17:14:50 2007
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1262504 Bytes = 1232.91 kB = 1.20 MB
Load Address: 0x30008000
Entry Point: 0x30008000
這里解釋一下參數的意義:
-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)
2 、下載內核
U-Boot 1.1.3 (Jan 12 2007 - 16:16:36)
U-Boot code: 33F80000 -> 33F9BAC0 BSS: -> 33F9FBAC
RAM Configuration:
Bank #0: 30000000 64 MB
Nor Flash: 512 kB
Nand Flash: 64 MB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
sbc2410=>tftp 0x31000000 zImage.img
TFTP from server 192.168.1.115; our IP address is 192.168.1.128
Filename 'zImage.img'.
Load address: 0x31000000
Loading: #################################################################
#################################################################
#################################################################
####################################################
done
Bytes transferred = 1263324 (1346dc hex)

3.運行
sbc2410=>bootm 0x31000000
## Booting image at 31000000 ...
Image Name: linun-2.6.14
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1263260 Bytes = 1.2 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux.............................................................Linux version 2.6.14 (root@luofuchong) (gcc version 3.4.1) #21 Fri Oct 20 17:206CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
S3C2410 Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
USB Control, (c) 2006 sbc2410
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists
Kernel command line: console="ttySAC0" root="/dev/nfs" nfsroot="192".168.1.115:/frien"irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon="00500000", tcnt a509, tcfg 00000200,00000000, usec 00001e4c
Console: colour mmy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62208KB available (1924K code, 529K data, 108K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
NET: Registered protocol family 16
S3C2410: Initialising architecture
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
NetWinder Floating Point Emulator V0.97 (double precision)
devfs: 2004-01-31 Richard Gooch ([email protected])
devfs: devfs_debug: 0x0
devfs: boot_options: 0x1
yaffs Oct 18 2006 12:39:51 Installing.
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
fb1: Virtual frame buffer device, using 1024K of video memory
led driver initialized
s3c2410 buttons successfully loaded
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheler noop registered
io scheler anticipatory registered
io scheler deadline registered
io scheler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
usbcore: registered new driver ub
Cirrus Logic CS8900A driver for Linux (Modified for SMDK2410)
eth0: CS8900A rev E at 0xe0000300 irq="53", no eeprom , addr: 08: 0:3E:26:0A:5B
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4980000
s3c2410-nand: timing: Tacls 10ns, Twrph0 30ns, Twrph1 10ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bi)Scanning device for bad blocks
Bad eraseblock 1884 at 0x01d70000
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00020000 : "vivi"
0x00020000-0x00030000 : "param"
0x00030000-0x00200000 : "kernel"
0x00200000-0x04000000 : "root"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbmouse
drivers/usb/input/usbmouse.c: v1.6:USB HID Boot Protocol mouse driver
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loaded
UDA1341 audio driver initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
IP-Config: Complete:
device=eth0, addr="192".168.1.128, mask="255".255.255.0, gw="192".168.1.1,
host="luofuchong", domain=, nis-domain=(none),
bootserver="192".168.1.1, rootserver="192".168.1.115, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.115
Looking up port of RPC 100005/1 on 192.168.1.115
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing init memory: 108K
init started: BusyBox v1.1.3 (2006.09.20-14:52+0000) multi-call binary
Starting pid 696, console /dev/tts/0: '/etc/init.d/rcS'
Please press Enter to activate this console.

方法二、
1、首先,用u-boot/tools/mkimage這個工具為你的內核加上u-boot引導所需要的文件頭,具體做法如下:
[root@localhost tftpboot]#mkimage -n 'linux-2.6.14' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008040 -d zImage zImage.img
Image Name: linux-2.6.14
Created: Fri Jan 12 17:14:50 2007
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1262504 Bytes = 1232.91 kB = 1.20 MB
Load Address: 0x30008000
Entry Point: 0x30008040

2 、下載內核
U-Boot 1.1.3 (Jan 12 2007 - 16:16:36)
U-Boot code: 33F80000 -> 33F9BAC0 BSS: -> 33F9FBAC
RAM Configuration:
Bank #0: 30000000 64 MB
Nor Flash: 512 kB
Nand Flash: 64 MB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
sbc2410=>tftp 0x30008000 zImage.img
TFTP from server 192.168.1.115; our IP address is 192.168.1.128
Filename 'zImage.img'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
####################################################
done
Bytes transferred = 1263324 (1346dc hex)

3.運行
sbc2410=>bootm 0x30008000
## Booting image at 30008000 ...
Image Name: linux-2.6.14
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1261056 Bytes = 1.2 MB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK

㈡ 如何將編譯好的QNX文件上傳到虛擬機上

2. 進入QNX,將上述文件拷到/usr/photon/font_repository目錄下。 3. 在pterm上運行font_install安裝字型檔。 4. 在pterm上運行fontadmin,新建一種字體,在選項里只要能看到Simsun就成功了。 QNX641: 參考文檔:phfont 和 mkfontdir 以宋體為例: 1.拷貝字體文件SURSONG.TTF到目錄/usr/photon/font_repository/下。 2.最好備份/usr/photon/font_repository/fontdir文件。 3.運行命令生成新的fontdir文件#mkfontdir -i /usr/photon/font_repository/fontdir -d /usr/photon/font_repository

㈢ QNX 命令行編譯BSP和鏡像

1 解壓BSP包,並進入根目錄

2 在該目錄下打開終端,sourec sdp安裝目錄下的qnxsdp-env.sh,從而建立環境變數

3 輸入make即可編譯得到鏡像,在image目錄下

4 所編譯的build文件一般在

㈣ QNX虛擬機無法安裝安裝

用VM吧,挺好用,基本上沒問題

㈤ 如何給車載QNX系統安裝程序

下載的是qt-everywhere-src-5.12.3.tar.xzxz -d xxx.tar.xz 將 xxx.tar.xz解壓成 xxx.tar 然後,再用 tar xvf xxx.tar來解包。配置QNX的變數,export QNX_TARGET等環境變數配置QNX的變數,export QNX_TARGET等環境變數

㈥ QT Creator 創建QNX7.0工程

QNX開發辦需要開啟SSH功能
包括QNX端 sshd的啟動
<1>掛載可讀寫文件系統到/,並且在該文件系統中同樣需要創建/etc/ssh等目錄,鏡像文件系統時只讀的。
<2>配置啟動鏡像中的ssh_config文件,以及必須路徑等。
<3>利用ssh_keygen在QNX中生成所需的key。主要如果/etc不可寫,會出現錯誤。

由於僅僅使用qt creator作為調試環境,因此只編譯qtbase模塊即可。可

獲得qtbase源碼,並利用以下,編譯得到qnx arm版本的qmake。
編譯前需要source sdp7.0下的qnxsdp-env.sh,並將QCC 添加到系統path。編譯器配置文件在qtbase/mkspecs/common/qcc-base-qnx-armle-v7.conf文件中

需要配置QNX kid,包括編譯器qcc 調試器ntoarmv7_gdb,qnx arm版本的qmake等路徑的配置
配置QNX device,主要是ssh埠,用戶名,密碼等設置,並且test連接通過
如果test失敗,是由於檢測的對應的程序如kill uname等不在target的默認路徑中,而是放在了/proc/boot中,此處需要修改鏡像build文件中路徑設定。

由於不使用qt庫,因此去掉對gui 以及core的調用。

並且添加部署命令:

㈦ 如何在Ubuntu上編譯qnx的glib

main()
{
int a,b;
a=077;
b=a|3;
printf("\40: the a & b(decimal) is %d \n",b);
b|=7;
printf("\40: the a & b(decimal) is %d \n",b);
}

㈧ 如何在windows環境下搭建qnx編譯環境

1.<BUILD_ROOT>是指正確的目錄,如E:\community.qnx.com\svn\repos\coreos_pub,裡面有trunk,源碼在裡面。

2.如果不是在Neutrino self-hosted下運行( then you will need to tell the build process to ignore the content of the GNU configure style source moles.) 運行此命令,大概運行幾分鍾。(hide-gnu.sh可下載)
% ksh hide-gnu.sh <BUILD_ROOT>

3.創建目錄(Create a staging directory for installed binaries and headers to go )
% cd <BUILD_ROOT>
% mkdir stage

4.按文檔中方法建立qconf-override.mk文件,也是在<BUILD_ROOT>目錄下。內容如下:
USE_INSTALL_ROOT=1
INSTALL_ROOT_nto=<BUILD_ROOT>/stage
VERSION_REL=6.3.0
注意一定要使用「/」換掉Windows的「\」

5.% export QCONF_OVERRIDE=<BUILD_ROOT>/qconf-override.mk
Windows下用set替代export.也可直接在我的電腦->環境變數里增加。還是要注意"/"問題。

6.基本沒問題了,
內核:
% cd <BUILD_ROOT>/trunk
% make OSLIST=nto CPULIST=x86 hinstall
% make OSLIST=nto CPULIST=x86 install
網路:
% cd <BUILD_ROOT>/tags/6.4.0/GA
% make CPULIST=x86 install

or:
% cd <BUILD_ROOT>/trunk
% make CPULIST=ppc install
等等

---------------------------------------------------------------------
問題:E:\Delores\QNX_SRC\coreos_pub\trunk\utils\r\rtc編譯出錯
無法找到頭文件:
#include <hw/i2c.h>
看了一下common.mk,發現有下面的路徑,聯想fondry27上說的,hardware裡面都是硬體相關的頭文件,公開的源碼里沒有這個目錄。看來是沒辦法編譯rtc了,不過也沒啥用。把rtc目錄剪切掉繼續編譯。
EXTRA_INCVPATH = $(PROJECT_ROOT)/../../../lib/util/public
EXTRA_INCVPATH += $(PROJECT_ROOT)/../../../hardware/startup/lib/public
(可惜我不懂這是什麼意思,於是我從BSP里隨便找了個i2c.h放到D:\QNX640\target\qnx6\usr\include\hw目錄下)
-----------------------------------------------------------------------------------
(這個我沒遇到,因為我照著先做了,哈)
問題:編譯textmode出錯
找不到頭文件。發現qnx640下根本沒有這些東東。只有從632里復制了。
#include <graphics/display.h>
#include <graphics/disputil.h>
#include <graphics/vbios.h>
從E:\QNX632\target\qnx6\usr\include復制graphics目錄到E:\QNX640\target\qnx6\usr\include下。
編譯textmode通過。

閱讀全文

與ubuntu安裝qnx編譯環境相關的資料

熱點內容
phpsae源碼 瀏覽:853
為什麼安卓手機一直要許可權 瀏覽:227
匯編程序的偽指令 瀏覽:803
蘋果7怎麼更新app 瀏覽:318
c語言常用演算法pdf 瀏覽:960
編程如何讓畫面動起來 瀏覽:865
大齡女程序員未來發展 瀏覽:976
數學書籍pdf 瀏覽:506
加密門禁卡寫入成功無法開門 瀏覽:464
齒輪傳動pdf 瀏覽:52
alpinelinux 瀏覽:150
手機端app的掃碼功能在哪裡 瀏覽:227
少兒編程中小班英語教案 瀏覽:452
鎖屏密碼加密手機怎麼解除 瀏覽:205
linuxlostfound 瀏覽:135
征途伺服器ip地址 瀏覽:330
git提交代碼命令行 瀏覽:165
什麼叫瀏覽器伺服器結構 瀏覽:157
於謙聊天哪個app 瀏覽:449
小鵬汽車nlp演算法工程師薪資 瀏覽:881