"Linux" kernel + file system download to the Development Board

Source: Internet
Author: User
Tags linux mint

K Development

Original, please specify when reproduced, thank you. E-mail:[email protected], address:HTTP://WWW.CNBLOGS.COM/EMBEDDED-TZP

Development environment: Http://www.cnblogs.com/embedded-tzp/p/4443876.html

Reference to a lot of information on the Web, no notes, the source has not been tested, in this thanks.

The article includes the download environment construction, how to download, with a certain reference

Pre-environment configuration

TFTPD Server Setup

    • Windows:

Directly with Tftpd32.exe or Tftpd64.exe, graphical interface, easy to use, suitable for Ubuntu in the case of virtual machines.

    • Linux under Configuration tftpd:

      For applications that are developed directly in the Ubuntu system without the use of virtual machines.

    1. Installing Tftp-server

sudo apt-get install TFTPD-HPA

sudo apt-get install TFTP-HPA (if the client does not need to be installed)

TFTP-HPA is the client

TFTPD-HPA is a server-side

2. Configuring the TFTP server

sudo vim/etc/default/tftpd-hpa

Change the original content to:

Tftp_username= "TFTP"

Tftp_address= "0.0.0.0:69″

tftp_directory= "TFTP root" #服务器目录, such as/home/tang/wkdir/tftp, need to set permissions to 777,CHOMD 777

Tftp_options= "-l–c–s"

3. Restart the TFTP service

sudo service tftpd-hpa restart

Then you need to download u-boot (bootloader), which can only be downloaded via Jtag Jlink.

    • Virtual machines and Windows network configuration

It is recommended to use fewer virtual machines, because there are always problems like this, and now I have developed directly under the native Linux operating system, with a lot less problem.

(optional) PC-side: Disables the wireless card.

Configuration: windows:192.168.1.2 (need to shut down the firewall or not ping)

Virtual machine: ubuntu:192.168.1.6 (when the virtual machine system is a separate computer), the virtual machine system needs to set up IP, subnet, etc., and the host machine in the same network segment, so that is a local area network, the virtual machine operating system and windows to ping, Specific configuration See below)

Development Board: 192.168.1.8

Virtual machine IP configuration: when the virtual machine is set to Bridge , the virtual machine system needs to set the IP manually, there are two ways to set it up:

1:sudo ifconfig eth0 192.168.1.6

2: Remember to back up the original file in this way, try to restore the file when the virtual machine is not on the net.

sudo pluma/etc/networkmanager/system-connections/wired\ connection\ 1

What to modify:

[IPv4]

Method=manual

#dns =8.8.8.8;

address1=192.168.1.6/24,192.168.1.2

Then sudo service network-manager restart

Actual download

Because the virtual machine is not used, the computer IP is 192.168.1.2, the Development Board IP is 192.168.1.3.

    • RAMDisk Way

Root file system in memory, for RAMDisk:

PC-side: Open TFTPD Server program

Development Board End:

  1. TFTP 0x30008000 Uimage
  2. TFTP 0x32000000 ramdisk.gz
  3. setenv Bootargs root=/dev/ram0 initrd=0x32000000,0x200000 rootfstype=ext2 console=ttysac0,57600 init=/ LINUXRC ip=192.168.1.3
  4. Bootm0x30008000

    need to note the above console using ttysac0/ttysac1 in the form of a new version of the kernel using TTYs is not possible.

    Bootargs Use the parameters to view the following documents :

    Src\documentation\kernel-parameters.txt

    U_boot of the Bootcmd and the Bootargs Detailed parameters: http://www.cnblogs.com/cornflower/archive/2010/03/27/1698279.html

    Initrd:src\documentation\initrd.txt

    • NFS Mode

Computer-side:

Try not to use virtual machines.

The root file system is in NFS (the virtual machine IP Acquisition method must be configured manually ):

Linux Mint first menu, System Management, network settings static IP, or sudo ifconfig eth0 192.168.1.2

Modify/etc/exports: Content is:

/home/tang/wk-tzp/prj/nfs * (Insecure,rw,sync,no_subtree_check,all_squash)

And then:

sudo exportfs-ra

Sudo/etc/init.d/portmap Restart # It's possible to fail, don't bother

Sudo/etc/init.d/nfs-kernel-server restart

SHOWMOUNT-E: The command to see if the mapping was successful.

Development Board End:

    1. TFTP 0x30008000 Uimage
    2. setenv Bootargs root=/dev/nfs noinitrd rootfstype=nfs nfsroot=192.168.1.2:/home/tang/wk-tzp/prj/nfs/fs/ramdisk_fs console=ttysac0,57600 Ip=192.168.1.3:192.168.1.2:192.168.1.2:255.255.255.0::eth0:off

    3. Bootm 0x30008000

      need to note the above console using ttysac0/ttysac1 in the form of a new version of the kernel using TTYs is not possible.

      After the successful download, using LS, pwd and other commands, the Development Board on the feedback to the answer, tossing very frustrating, but finally a little accomplishment.

"Linux" kernel + file system download to the Development Board

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.