Install Linux in smartarm3250

Source: Internet
Author: User

Currently, the smartarm3250 Linux driver is being studied. Therefore, you must first install (or download) the Linux system on the Development Board. Follow the steps in the book to encounter some minor problems, after many experiments and conclusions, you can install the Linux system skillfully. The summary includes personal opinions and information you have found.

First, we will introduce the general steps for installing Linux. The Development Board is like a bare metal with nothing (of course there is hardware). First, install something similar to the BIOS in a computer, and there is something to guide the operating system, then mount the kernel image, no. the ISO file is a compilation task generated by the kernel, and finally a file system. It is similar to the various partitions in the computer. It can also be understood that light is a variety of items on the C drive, the difference from installing a system on a computer is that the file system is manually installed on its own and is divided into two types: Security File System and root file system. For general computers, they are installed on mobile devices such as CDs or USB flash drives. However, for development boards, they cannot directly read the installation programs in these media, therefore, it is necessary to transmit through the serial port or network cable, and it is to transmit the system files that have been formed.

Note the following points: 1. During Linux installation, the ISP jumper on the Development Board can be in the transient connection status; 2. During serial port debugging, the super-level terminal used in Windows corresponds to minicom in Linux, which has the same functions and different operations. You can also use the short term tool provided by zlg; 3. When downloading bootloader, make sure that the J2 jumper (that is, on the right of the jp13 jumper) is disconnected. 4. When loading bootloader, the pop-up dialog box prompts reset, you need to click OK first. The dialog box disappears and then press the reset key.

Okay, the general steps are similar to the principle. Next we will officially start to build a Linux development platform on smartarm3250:

1. install bootloader. These include KickStart, s1l, and U-boot. kickstart needs to be stored in the 0 sector of NAND Flash (by the way, in the smartarm3250 NAND Flash, the size of one sector is kb, starting from 0, the corresponding address is 0x00000000); s1l is Stage 1 loader, which is stored in Sector 1 and serves basically to initialize and guide smartarm3250, these two files (Kickstart. both bin and stage1.bin.pdf are transmitted to the Development Board through a serial port. The tool is the updatebootloader.exe program in the zlgoptical disk. before downloading these two files, you need to download the bootloader from the Development Board through updatebootloader.exe. bin. If the download is complete, click the code check button in the updatebootloader.exe tool. The circle icon in front of the corresponding NAND Flash item turns green and the message "valid" appears later. This indicates the download. Successful. Again, when loading bootloader, the pop-up dialog box prompts reset, You need to click OK first, the dialog box disappears and then press the reset key.

Ii. Install U-boot. At this time, you need to debug through the serial port, through the Super Terminal or minicom (personal recommendations in the limit term for this step, because I use minicom to transmit the u-boot.bin, always cannot complete the transmission, as a result, it is unavailable. So far it has not been resolved ...) Connect to the Development Board. When you first need to connect the serial line and press the reset key, you will see the Startup Process of KickStart and s1l. The cursor stays after "smartarm3250>, that is, run the s1l command prompt, then enter erase 2 10 1, erase the sectors stored by U-boot, then input load term raw 0x83fc0000, and store the data to the storage unit at the first address 0x83fc0000, then click File-> send file, select the u-boot.bin, after the transfer is complete, click Control-> send break, return to s1l command prompt, enter nsave, write the u-boot.bin to NAND flash, finally, enter the portable t flash raw 0x83fc0000, save the auto-start configuration, and press the reset key to go to the U-boot control interface next time.

3. Install the kernel and secure file system. Subsequent serial port debugging can be performed on Linux mincom, because no errors have been found. After pressing the reset key on the Development Board, quickly press any key to enter the s1l Command Control and enter erase 12 2036 1 ,. Erase the NAND Flash sectors except KickStart, s1l, and U-boot, and then press the reset key on the Development Board to go to the U-boot command console and use the TFTP transmission protocol, download the kernel image and Security File System to the Development Board. Because the default IP address of the Development Board is 192.168.7.xx, you must set the IP address of the computer to 192.168.7.xx during TFTP transmission ...). The process of downloading the kernel image is as follows. First, enter TFTP 80008000 uimage to transfer the uimage file from the TFTP server to the bucket 0x80008000 at the first address of the Development Board, then, enter the NAND erase clean 0x00200000 $ (filesize) to start with the address 0x00200000 and erase the space with the length of filesize bytes, this statement serves the same purpose as the erase command in s1l. In the next step, enter NAND write. jffs2 0x80008000 0x00200000 $ (filesize) is used to set the first address to 0x80008000 and the length to filesize, write it to the space with the first address 0x00200000, and then enter setenv kernelsize $ (filesize) to set the kernel size to fliesize, so that you can download the kernel image. The process of downloading the security file system is as follows. First, enter TFTP 80008000 safefs. cramfs, enter NAND erase clean 0x00600000 $ (filesize), and then enter NAND write. jffs2 0x80008000 0x00600000 $ (filesize). The command serves the same purpose as when downloading the kernel image. After downloading the kernel image and security file system, enter saveenv to save the environment configuration. If you don't understand what the above addresses and parameters are, you just need to check them out. These are pure operations on addresses and blocks. There is no skill to say, it's a dead thing, just remember it.

4. Install the root file system. At this time, I will insert an SD card with rootfs.tar.bz2 and burn files (because the book only describes how to install it with the SD card, and I tried other methods but failed) into the card slot of the Development Board, the burn file contains the following content:

 

  1. #! /Bin/sh
  2. Echo "Start burn rootfs"
  3. CD/tmp
  4. If [! -D/mnt/bin]
  5. Then
  6. Tar xjvf rootfs.tar.bz2-C/mnt/
  7. Fi
  8. CD/
  9. Umount/mnt/
  10. Umount/tmp/
  11. Reboot

#! /Bin/shecho "Start burn rootfs" CD/tmp if [! -D/mnt/bin] thentar xjvf rootfs.tar.bz2-C/mnt/ficd/umount/mnt/umount/tmp/reboot

This is a simple shellprogram, aiming to extract rootfs.tar.bz2, which is a root file system. After kernel image and secure file system are installed, input saveenv and run safemode to enter a Linux System in the so-called secure mode. When the system is started, the system will automatically scan the SD card, run the burn file, automatically decompress the root file system, and restart reboot (after installing the system many times, it is found that this command is basically not executed ), after the prompt that the system is restarting is displayed under minicom, it will die and remain unchanged. In this case, you need to manually press the reset key on the Development Board. After the restart, the system will automatically enter the Linux system.

5. installation is complete. In this case, you can see the QT desktop on the display screen of the Development Board, and the terminal-like operation interface under the computer minicom. Because the Development Board is a cropped Linux system, therefore, only some simple operation commands are supported.

Okay, so far, we have built a Linux system on smartarm3250, because I did it based on the instruction book presented with the Development Board, and there are some not detailed descriptions on it, I tried and summarized it by myself, but there are many methods in some of these steps. The book only introduces several methods, so I have not tried all of them, some more convenient methods may be missing. You can give me some suggestions and discuss them with me.

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.