Hi :
I have started ubuntu14.04.1 on the board through i.MX6q SABRE Board for Smart Devices - Linux on ARM - eewiki ,all the things needed are in the SD card.Now i want to start the linux kernel through TFTP and access the rootfs on the host via NFS.Through the first way I got the image file named zImage and the rootfs supposed it named ubuntu14.04.1. I have put them in the TFTP shared directory and NFS shared directory in the host.Then I should set the parameters on the UBOOT command line which has done as follow:
setenv ipaddr <myipaddr>
setenv serverip <my serverip>
setenv gatewayip <my gatewayip>
setenv ehtaddr <my ethaddr>
setenv ip_dyn no
setenv nfsroot /home/nfs
setenv image zImage
setenv loadaddr 0x12000000
ok,the problem is that,I don't know how to set the remaining parameters such as bootargs,bootcmd or more else……
And I want to know if the image and the rootfs I used are correct, if not ,can someone provide me a correct one?
Thanks a lot .
Mary
Hello,
Please use "i.MX Linux® User's Guide" of NXP Linux BSP docs,
in particular sections 4.7 (Running Linux OS on the target),
4.7.5 (Running the Linux image from NFS), 4.4.1.1 (Downloading
an image to MMC/SD).
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yuri,
Thanks for replying.
I have followed the "i.MX Linux® User's Guide",in particular sections you said,but it still doesn't work .Here are my settings and the start information
Hit any key to stop autoboot: 0
baudrate=115200
boot_fdt=try
bootcmd=setenv mmcdev 1;setenv mmckernel 0;run mmcboot;setenv mmcdev 0;setenv mmckernel 0;run mmcboot;
bootdelay=1
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0,115200
emmcdev=2
ethact=FEC
ethaddr=00:04:9f:03:ef:78
ethprime=FEC
fdt_addr=0x18000000
fdt_file=imx6q-sabresd.dtb
fdt_high=0xffffffff
image=zImage
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x12000000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=echo loading ${fdtdir}/${fdt_file} ...; load mmc ${bootpart} ${fdt_addr} ${fdtdir}/${fdt_file}
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadrd=load mmc ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}
mmcargs=setenv bootargs console=${console}${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} ${cmdline}
mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};setenv bootpart ${mmcdev}:1; echo Checking for: /uEnv.txt ...;if test -e mmc ${bootpart} /;
mmcboot_old=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if tes;
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait fixrtc
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${image}; if test ${boot_fdt} = yes;
rdaddr=0x12A00000
script=boot.scr
uname_boot=setenv bootdir /boot; setenv bootfile vmlinuz-${uname_r}; if test -e mmc ${bootpart} ${bootdir}/${bootfile}; then echo loading ${bootdir}/${bootfile} ...; run loadi;
update_emmc_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if ${get_cmd} ${update_sd_firmware_filename}; then if mmc dev ${emmcdev} i
update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${get_cmd} ${update_sd_firmware_filename}; thi
Environment size: 5040/8188 bytes
=> setenv serverip 192.168.1.18
=> setenv bootfile zImage
=> setenv fdt_file imx6q-sabresd
=> setenv ethaddr 00:04:9F:03:EF:78
=> saveenv
Saving Environment to MMC...
Writing to MMC(1)... done
=> dhcp
BOOTP broadcast 1
BOOTP broadcast 2
*** Unhandled DHCP Option in OFFER/ACK: 52
*** Unhandled DHCP Option in OFFER/ACK: 52
DHCP client bound to address 192.168.1.16 (1002 ms)
Using FEC device
TFTP from server 192.168.1.18; our IP address is 192.168.1.16
Filename '�'.
Load address: 0x12000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
=> setenv ipaddr 192.168.1.17
=> save
Saving Environment to MMC...
Writing to MMC(1)... done
=> mmc dev
MMC: no card present
=> tftpboot ${fdt_addr} ${fdt_file}
Using FEC device
TFTP from server 192.168.1.18; our IP address is 192.168.1.17
Filename 'imx6q-sabresd'.
Load address: 0x18000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
=> mmc write ${fdt_addr} 0x5000 0x800
MMC: no card present
=> setenv consoleinfo 'console=ttymxc0,115200'
=> setenv loadaddr 0x12000000
=> setenv fdt_addr 0x18000000
Unknown command 'setenv' - try 'help'
=> setenv fdt_addr 0x18000000
=> setenv fdt_file 'imx6q-sabresd.dtb'
=> setenv rootfsinfo 'root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp'
=> setenv rootfsinfo 'root=/dev/nfs ip=dhcp weim-nor nfsroot=${serverip}:${nfsroot},v3,tcp'
=> setenv rootfsinfo 'ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rootwait rw mtdparts=gpmi-nand:16m(boot),16m(kernel),16m(dtb),-(rootfs)'
=> setenv rootfsinfo 'root=/dev/mmcblk0p2 rootwait rw'
=> setenv bootargsset 'setenv bootargs ${consoleinfo} ${rootfsinfo} ${displayinfo} ${special}'
=> setenv bootcmd 'run bootargsset; {settings for device}; bootz ${loadaddr} - ${fdt_addr}'
=> setenv rootfsinfo 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:/home/nfs,v3,tcp'
=> setenv bootcmd_net 'run rootfsinfo; dhcp ${image}; dhcp ${fdt_addr} ${fdt_file}; bootz ${loadaddr} - ${fdt_addr}'
=> setenv bootcmd 'run bootcmd_net'
=> saveenv
Saving Environment to MMC...
Writing to MMC(1)... done
=>
restart
start information
U-Boot 2014.10-dirty (Mar 15 2017 - 20:03:15)
CPU: Freescale i.MX6D rev1.2 at 792 MHz
Reset cause: POR
Board: MX6-SabreSD
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
MMC: no card present
MMC init failed
Using default environment
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
PMIC: PFUZE100 ID=0x10
Net: FEC [PRIME]
Hit any key to stop autoboot: 0
MMC: no card present
MMC: no card present
MMC: no card present
MMC: no card present
=>
so,when save the environment variable,it shows
=> saveenv
Saving Environment to MMC...
Writing to MMC(1)... done
but it shows
MMC: no card present
What should I do with it?
Regards,
Mary
Hello,
> TFTP error: 'File not found' (1)
Looks like FTP server is not set properly or it does not contain the needed files.
What are FTP server settings ?
Regards,
Yuri.
hi,
My TFTP server is built on my PC's virtual machine.
zmy@zmy-virtual-machine:~$ sudo /etc/init.d/xinetd restart
[sudo] password for zmy:
* Stopping internet superserver xinetd [ OK ]
* Starting internet superserver xinetd [ OK ]
zmy@zmy-virtual-machine:~$ sudo netstat -a|grep tftp
udp 0 0 *:tftp *:*
then I test it again ,the result is as follows,it also success
root@zmy-virtual-machine:~# cd /var
root@zmy-virtual-machine:/var# tftp localhost
tftp> get test
tftp> q
root@zmy-virtual-machine:/var# cat test
success le hahahahaha
root@zmy-virtual-machine:/var#
My TFTP share directory has the file as follows:
Regards,
Mary