mini2440_NFS starts with uboot

Publisher:灵感狂舞Latest update time:2022-06-23 Source: eefocusKeywords:mini2440  NFS Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This article records how the mini2440 development board uses uboot to start the kernel through the nfs service.


background:


I have to use this board again today after putting it aside for a long time. I changed the machine before. Although kernel and rootfs are mounted via nfs, I can't get into u-boot... I got u-boot working, but nfs doesn't work again.


environment:


1.OS:ubuntu11.10;


2. Serial port tool: C-kermit


Involving:


1.Configuration of exports in nfs;


2. Setting of env in u-boot;


3. Problems encountered...


1. Configuration file in nfs: /etc/exports


$sudo vim /etc/exports


1. Add the nfs directory to be mounted on the development board:


/your/nfsroot/path 192.168.2.0/24(rw, sync, no_root_squash)


Mine is: /home/wang2/codePrj/ldd/rootfs/qtopia4 192.168.2.0/24 (rw, sync, no_root_squash)


2. Add the kernel file directory required by the development board:


/your/kernel/uImage/path 192.168.2.0/24(rw, sync,no_root_squash)


Mine is: /home/wang2/codePrj/ldd/imgs 192.168.2.0/24 (rw, sync, no_root_squash)


3.$sudo nfs-kernel-server  restart


2. About uImage in the first step:


Because u-boot needs to read the first 64 bytes of img information when booting kernel img, you must also create uImage (uboot Image) if you want to use u-boot to boot the kernel


1. Use make menuconfig to get zImage;


2. Use mkimage in u-boot tools to process zImage:


mkimage -A arm -O linux  -T kernel -C none -a 0x30008000 -e 0x30008000 -n kernel-2.6.32.2 -d zImage uImage


3. Parameter description:

     -A arm -------- Architecture architecture is arm

     -O linux -------- OS The operating system is Linux

     -T kernel -------- Type The image type is kernel

     -C none -------- Compressed The compression type is no compression

     -a 30008000 ---- image loading address (hex)

     -e 30008000 ---- entry kernel entry address (hex)

     -n kernel-2.6.32.2 --- name image name

     -d zImage ---- the original image file name uImage ---- the image file used by u-boot


3. Mount via nfs:


1. Tips:


Loading: *_*** ERROR: Cannot mount

reason:

a. After modifying /etc/exports, the nfs service was not restarted;

b. The firewall is not closed:

                           $sudo ufw status If it is active, you can pass

                           $sudo ufw disable Disable Ubuntu Fire Wall firewall

2. Tips:    

NAND read: device 0 offset 524288, size 2097152 ...

 2097152 bytes read: OK

## Booting image at 30008000 ...

   Image Name:   kernel-2.6.32.2

   Created:      2010-04-25   9:59:17 UTC

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    1966552 Bytes =  1.9 MB

   Load Address: 30008000

   Entry Point:  30008000

   Verifying Checksum ... OK

   XIP Kernel Image...OK

 

Starting kernel ...

 

data abort

pc : [<30008010>]    lr : [<33f94754>]

sp : 33f4faa0  ip : 30008000  fp : 00000002

r10: 00000000 r9: 33e7fe2c r8: 33f4ffdc

r7: 33f9e278 r6: 33f9e278 r5: 30008000 r4: 00000000

r3 : 30008000  r2 : 30000100  r1 : 000000c1  r0 : 33f4fce8

Flags: nZCv  IRQs off  FIQs off  Mode SVC_32

Resetting CPU ...

reason:

        a. The kernel type is incorrect and the mach-type is inconsistent;

        b. The entry address in uImage is incorrect, because mkimage will add 64 bytes (0x40) of additional information after processing, so change the -e option above to

0x30008040         

3. Tips:

                Load address: 0x30008000

                Loading: T T T T T T T .....

reason:

                The error at this moment was caused by the network cable being too long!!! I used a 3 to 5 meter network cable and it was only TTT; when I changed it to a 1 meter cable, it was ########! It was so weird                       

    4. extra:

            Before, I directly generated uImag according to the above command, and it could run after downloading it to the development board; but this time it always goes to download->cpu resetting->download->cpu resetting...; (the only difference between before and after is the use of the mkimage tool!) It was fixed through b.


4. Configuration of u-boot environment variables:


    1. Print the current env:


        #printenv


    2. Set env:


        #setenv env_name env_value


        #setenv bootargs 'noinitrd root=/dev/nfs rw nfsroot=192.168.2.3:/home/wang2/codePrj/ldd/rootfs/qtopia4 ip=192.168.2.4:192.168.2.3:255.255.255.0 console=ttySAC0,115200  mem=64M'


My env:        


[zhong@mini2440]# printenv 

bootdelay=1

baudrate=115200

ethaddr=08:08:11:18:12:27

zhong=bmp d 70000

 stdin=serial

stdout=serial

stderr=serial

ethact=dm9000

filesize=266854

fileaddr=30008000

gatewayip=192.168.2.1

netmask=255.255.255.0

ipaddr=192.168.2.4

serverip=192.168.2.3

bootcmd=nfs 0x30008000 192.168.2.3:/home/wang2/codePrj/ldd/imgs/uImage;bootm

 0x30008000

bootargs=noinitrd root=/dev/nfs rw nfsroot=192.168.2.3:/home/wang2/codePrj/ldd/rootfs/qtopia4 ip=192.168.2.4:192.168.2.3:255.255.255.0 console=ttySAC0,115200  mem=64M

    


5. NFS can be started


Try to bring eth0 interface up......NFS root ...Done

 

Please press Enter to activate this console.


Keywords:mini2440  NFS Reference address:mini2440_NFS starts with uboot

Previous article:mini2440 u-boot linux kernel boot,Mini2440 uboot,kernel,root file system construction
Next article:Porting rtems-4.11 to MINI2440 (Part 2)

Recommended ReadingLatest update time:2024-11-16 12:56

MINI2440i2c driver learning 1
int main(int argc, char** argv) {  struct eeprom e;  fprintf(stderr, "Open /dev/i2c/0 with 8bit moden");  die_if(eeprom_open("/dev/i2c/0", 0x50, EEPROM_TYPE_8BIT_ADDR, &e) 0,    "unable to open eeprom device file "    "(check that the file exists and that it's readable)");           fprintf(stderr, "  Reading 256 byt
[Microcontroller]
mini2440_NFS starts with uboot
This article records how the mini2440 development board uses uboot to start the kernel through the nfs service. background: I have to use this board again today after putting it aside for a long time. I changed the machine before. Although kernel and rootfs are mounted via nfs, I can't get into u-boot... I got u-b
[Microcontroller]
Mini2440 bare metal program burning (linux+JLink)
1. Write source code source code: /*******************************led_off.S**************************/ .text .global _start _start:             LDR     R0,=0x56000010             MOV     R1,#0x00015400             STR     R1,             LDR     R0,=0x56000014             MOV     R1,#0x0df             STR     
[Microcontroller]
Linux 2.6.32.2 mini2440 platform transplantation-kernel transplantation, yaffs2 file system transplantation
1.1 Obtain the Linux kernel source code There are many ways to obtain the Linux kernel source code. If your Linux platform can access the Internet, you can directly enter the following command on the command line to obtain Linux-2.6.32.2: #wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.2.tar.gz Of
[Microcontroller]
Construction and research of embedded Linux NFS root file system
With the development of information technology, embedded system technology has been widely used in many fields such as national defense, communications, industrial control, and consumer electronics. Among them, Linux, as an open source, mature, efficient and stable multi-tasking operating system, has many incomparable
[Microcontroller]
Construction and research of embedded Linux NFS root file system
MINI2440 bare metal water lamp
Overview The running light is the first program that every embedded developer implements when they get a new controller. This article records the process of implementing the running light on the FriendlyArm MINI2440 platform. Implementation principle By looking at the MINI2440 schematic diagram provided by Friendly
[Microcontroller]
MINI2440 bare metal water lamp
About the configuration of mini2440 key interrupt
In this article, we take the key interrupt as an example (other interrupts are configured in similar ways): 1: First we should press the button to initialize, As can be seen from the figure above, the key external interrupts are EINT8, EINT11, EINT13, EINT14, EINT15, and EINT19. The corresponding GPIO ports are GP
[Microcontroller]
About the configuration of mini2440 key interrupt
Analysis of debugging scripts in MDK
I am going to write a simple bare metal program to run in mini2440. I saw two ways to start the chip in the manual: 1. Start from Nor Flash 2. Start from Nand Flash. After several days of intermittent work, I still can't burn it in. I remember that I usually burn and run the debugging program directly into the memor
[Microcontroller]
Analysis of debugging scripts in MDK
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号