當前位置:首頁 » 幣種行情 » imx6uleth0

imx6uleth0

發布時間: 2022-08-06 10:13:38

㈠ imx6q 關於X server 怎麼設置

由於項目需要,把玩了半年的DSP(c6748),扔到了一邊,玩起了IMX6Q。本人使用的開發板是imx6q_sarbe_sd(MCIMX6Q-SDB),以下記錄如何通過u-boot設置SD,NFS啟動。由於IMX6Q的linux包建議在ubuntu9.04下,非root用戶下使用,首先ubuntu9.04有bug,其次非root用戶,操作起來很不方便。
一:SD卡啟動
SD卡啟動,需要先把uboot,kernel,filesystem燒寫到SD卡上。SD卡燒寫前,可以先在windows下把它格式化。板子啟動時SW6設置為8『b0100_0010
以下幾步為SD卡燒寫步驟:
1,SD卡燒寫
1.1,燒寫uboot
sudo dd if=u-boot.bin of=/dev/sdb bs=512 seek=2 skip=2 conv=fsync
1.2,燒寫uImage
sudo dd if=uImage of=/dev/sdb bs=512 seek=2048 conv=fsync
1.3,燒寫filesystem
首先需要把SD卡分一個區來保存文件系統。操作步驟如下:
(1)分區
$ fdisk /dev/sdb
u [switch the unit to sectors instead of cylinders]
d [repeat this until no partition is reported by the 'p' command ]
n [create a new partition]
p [create a primary partition]
1 [the first partition]
16384 [starting at offset sector #16384, i.e. 8MB, which leaves enough space for the kernel, the boot loader and its configuration data]
<enter> [using the default value will create a partition that spans to the last sector of the medium]
w [ this writes the partition table to the medium and fdisk exits]

(2)卸載分區
$ sudo umount /dev/sdb1
(3)格式化分區,可以是ext3格式,或ext4
$ sudo mkfs.ext3 /dev/sdb1 Or $ sudo mkfs.ext4 /dev/sdb1
(4)掛載sdb1
$ mkdir /home/user/Freescale/mountpoint

$ sudo mount /dev/sdb1 /home/user/Freescale/mountpoint
(5)復制文件系統
$ cd /home/user/Freescale/rootfs

$ sudo cp -a * /home/user/Freescale/mountpoint
2,uboot變數設置
setenv loadaddr 0x10800000

setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'

setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=${ipaddr} root=/dev/mmcblk1p1 rootwait rw

setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc dev 2;mmc read ${loadaddr} 0x800 0x2000;bootm'
//注意這里的mmc dev 2,dev 2 對應板子上是slot3
setenv bootcmd 'run bootcmd_mmc'

saveenv
二:NFS啟動
網路啟動是在uboot起來後才能完成,因此必須先有SD卡進行uboot引導。uboot起來後,通過串口設置uboot變數,達到自己想要的啟動方式。由於開發的過程kernel文件會不端更新,因此需要通過網路載入鏡像文件,以下介紹使用tftpboot方式載入。
1,tftp下載uImage
1.1,設置ubuntu
(1) Setup tftp server files

# apt-get install tftpd tftp openbsd-inetd

(2) make a tftp directory Here we make /opt/tftpboot be a tftp directory.

# mkdir /opt/tftpboot

# chmod 777 /opt/tftpboot

(3) Open /etc/inetd.conf and edit it

# gedit /etc/inetd.conf

Add this line:

tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /opt/tftpboot

(4)Restarting tftp service

#sudo /etc/init.d/openbsd-inetd restart
可以根據你的uImage文件放在路徑,修改上述路徑;也可以在/opt/tftpboot目錄下生成一個目標連接文件。
1.2,tftp下載uImage
MX6Q SABRESD U-Boot >tftpboot uImage
2,文件系統以NFS方式載入
2.1 ,設置ubuntu
(1), Install NFS server package
# apt-get install nfs-kernel-server
(2), Configure portmap
# dpkg-reconfigure portmap
Select 「NO」
(3) ,Configure mounted directory and authority
# gedit /etc/exports

Add the following line at the end of the file:
/home/usr/ltib/rootfs *(rw,sync,no_root_squash)
(4) ,Restart the NFS service
#sudo /etc/init.d/portmap restart
#sudo /etc/init.d/nfs-kernel-server restart
2.2,通過串口設置uboot變數設置
setenv ipaddr 192.168.2.xxx
setenv serverip 192.168.2.xxx
setenv bootfile uImage
setenv nfsroot /home/carmili/ltib/rootfs
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs rw ip=${ipaddr }:${serverip }:192.168.2.1:255.255.255.0::eth0:off nfsroot=${serverip}:${nfsroot},v3,tcp
setenv bootcmd_net 'run bootargs_base bootargs_nfs;bootm'
setenv bootcmd 'tftpboot uImage; run bootcmd_net'

熱點內容
收到假eth幣 發布:2025-10-20 08:58:16 瀏覽:973
暗黑破壞神2eth打孔 發布:2025-10-20 08:42:58 瀏覽:105
BTC和CBT是一樣的嗎 發布:2025-10-20 08:42:57 瀏覽:233
華碩trx40Pro供電 發布:2025-10-20 08:33:26 瀏覽:432
曬人民幣編號的朋友圈 發布:2025-10-20 08:25:32 瀏覽:687
doge格式 發布:2025-10-20 08:02:00 瀏覽:382
以太坊會爆發嗎 發布:2025-10-20 08:01:59 瀏覽:772
一台比特幣礦機的功率 發布:2025-10-20 07:39:24 瀏覽:925
trx輔助帶 發布:2025-10-20 07:35:29 瀏覽:48
比特幣哈希值有多少位 發布:2025-10-20 07:31:20 瀏覽:633