Booting from network

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Booting from network

3,048 Views
milo
Contributor II

Hello,

I'd like to boot my i.mx6 sabresd from network, using a tftp server. I've followed the Linux User's Guide.pdf, with some minor modifications.

    setenv serverip IPADDR

    setenv bootfile uImage

    setenv fdt_file imx6q-sabresd.dtb

    setenv ethaddr 00:04:9f:02:e2:33

    saveenv

    dhcp

    mmc dev 1

    mmc write ${loadaddr} 0x800 0x4000

    tftpboot ${fdt_addr} ${fdt_file}

    fdt addr ${fdt_addr}

    setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk2p2 rootwait rw'

    setenv bootcmd_mmc 'run bootargs_mmc;mmc dev 1;mmc read ${loadaddr} 0x800 0x4000;mmc read ${fdt_addr} 0x5000 0x800;bootm ${loadaddr} - ${fdt_addr}'

    setenv bootcmd 'run bootcmd_mmc'

    saveenv

But, when using boot (or bootd), I have the following :

    switch to partitions #0, OK

    mmc1 is current device

    MMC read: dev # 1, block # 2048, count 16384 ... 16384 blocks read: OK

    MMC read: dev # 1, block # 20480, count 2048 ... 2048 blocks read: OK

    ## Booting kernel from Legacy Image at 12000000 ...

    Image Name:   Linux kernel

    Image Type:   ARM Linux Kernel Image (uncompressed)

    Data Size:    5578744 Bytes = 5.3 MiB

    Load Address: 80008000

    Entry Point:  80008000

    Verifying Checksum ... Bad Data CRC

    ERROR: can't get kernel image!

There is an error with the checksum, but the zImage works fine for a classic booting.

To create the uImage, I've made : mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux kernel" -d zImage uImage.

I've tried with zImage (without converting to uImage), but it doesn't work event with bootz.

Labels (4)
Tags (3)
0 Kudos
Reply
3 Replies

2,021 Views
jimmychan
NXP TechSupport
NXP TechSupport

You are booting from MMC.

Are you want to boot from NFS?

According to the User Guide,

4.7.5 Running the Linux Image From NFS

To boot from NFS, set the following environment variables at the U-Boot prompt:

U-Boot > setenv serverip 10.192.225.216

U-Boot > setenv image <your kernel zImage name on the TFTP server>

U-Boot > setenv fdt_file <your dtb image name on the TFTP server>

U-Boot > setenv rootfsinfo 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:/data/rootfs_home/rootfs_mx6,v3,tcp'

U-Boot > setenv bootcmd_net 'run rootfsinfo; dhcp ${image}; dhcp ${fdt_addr} ${fdt_file}; bootz ${loadaddr} - ${fdt_addr}'

U-Boot > setenv bootcmd 'run bootcmd_net'

NOTE

If the MAC address has not been burned into the fuses, you must set the MAC address to

use the network in U-Boot.

setenv ethaddr xx:xx:xx:xx:xx:xx

0 Kudos
Reply

2,021 Views
milo
Contributor II

Booting with nfs isn't exactly what I'd like to do. My idea is to do as if I was using PXE : downloading kernel, booting on it, donwloading rootfs, and end of the boot (of course, I could download the rootfs in the same time than the kernel). I just want to download all the necessary, to use the card without network. Is it possible ?

By curiosity, I've tried to boot on nfs (I had already read the user's guide, but never tested). Here is what I do :

U-Boot >setenv serverip 192.168.1

U-Boot >setenv rootfsinfo 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:/images/core-image-x11-imx6qsabresd.ext3,v3,tcp'

U-Boot >setenv bootcmd_net 'run rootfsinfo; dhcp ${image}; tftpboot ${fdt_addr} ${fdt_file} ;fdt addr ${fdt_addr} ; bootz ${loadaddr} - ${fdt_addr}'

U-Boot >setenv bootcmd 'run bootcmd_net'

U-Boot >saveenv

But the booting stops at "starting kernel". If I do the same without NFS, it works (but I have a kernel panic later because it doesn't find the rootfs) :

U-Boot >setenv bootcmd_net 'run rootfsinfo; dhcp ${image}; tftpboot ${fdt_addr} ${fdt_file} ;fdt addr ${fdt_addr} ; bootz ${loadaddr} - ${fdt_addr}'

U-Boot >setenv bootcmd_net 'dhcp ${image}; tftpboot ${fdt_addr} ${fdt_file} ;fdt addr ${fdt_addr} ; bootz ${loadaddr} - ${fdt_addr}'

Any idea why ?

0 Kudos
Reply

2,021 Views
milo
Contributor II

Nobody can help ?

0 Kudos
Reply