steps we follwed is from a blog.... for AX4510 board...

What the author got follows and at the end, what we got.

----------------------------

We want the image to run from RAM and not FLAsh.

We have not enable flash with the jumper setting.

How do figureout:-

(A) To which memory / address) the Image is being loaded and executed.

(B) To execute from RAM, which address should it go.

(C) Where do I get information on the above issue, in general.?

(D) When I use Linux 2.4 for the same board, I did not face any problem - kernel panic -

(E) When /rc folder contained ram0 instead of present ram1,
the error was same but the error message was unable to mount rootfs, unknown block(0,0) not found..



But after downloading the image on to the board, we the error:



VFS: Cannot open root device "<NULL>" or unknown-block(0,255)

Please append a correct "root=" boot option

Kernel panic - not syncing: unt root fs on unknown-block(0,255)

can some one help where we went wrong?
-----------------------------------

Thanks

Natarajan

[COLOR="DarkRed"]We have followed the steps ditto...[/COLOR]






----------------------------------




uClinux-dist-2.6.9 in the transplant process S3C4510B



The moderator should be asked, now my transplant process described below:

Steps:

1, the following four documents will be downloaded to the work of the directory:

A: Download uClinux source:

http://www.uclinux.org/pub/uClinux/d...0041215.tar.gz

B: download the latest tool chain:

http://opensrc.sec.samsung.com/downl....0-20040713.sh

C: download the latest linux-core and core patch:

http://opensrc.sec.samsung.com/downl...-hsc0.patch.gz

http://www.kernel.org/pub/linux/kern...-2.6.9.tar.bz2

2, the installation arm-uclinux compiler linux host in the terminal enter:

$sh arm-uclinux-tools-base-gcc3.4.0-20040713.sh $ sh arm-uclinux-tools-base-gcc3.4.0-20040713.sh

Or:

$./ arm-uclinux-tools-base-gcc3.4.0-20040713.sh $. / Arm-uclinux-tools-base-gcc3.4.0-20040713.sh

因为该编译工具的默认安装路径是/root//bin/arm-uclinux-tool/bin,要想内核编译时系统能够找到它,需要更改主机的PATH环境变量,更改方法是: Because the compiler tool is the default installation path / root / / bin / arm-uclinux-tool / bin, in order to compile the kernel, the system can find it necessary to change the host of the PATH environment variable, change is:

$vi /root/.bash_profile $ vi / root / .bash_profile

找到PATH所在的行,原来的值应该是: PATH to find the line, the original value should be:

PATH=$PATH:$HOME/bin PATH = $ PATH: $ HOME / bin

改为: Read:

PATH=$PATH:$HOME/bin:$HOME/bin/arm-uclinux-tool/bin PATH = $ PATH: $ HOME / bin: $ HOME / bin / arm-uclinux-tool / bin

然后按ESC和输入:qw,存盘推出. ESC and then enter: qw, archiving launched.

之后注销Xwindow,重新登陆系统,新的环境变量就可以使用了. After the write-off Xwindow, re-landing system, the new environment variables can be used.

3, 解压内核源码 3, to extract the kernel source

$ tar -zxvf uClinux-dist-20041215.tar.gz $ Tar-zxvf uClinux-dist-20041215.tar.gz

会在当前目录下生成一个新的目录uClinux-dist; In the current directory will generate a new directory uClinux-dist;

4, 制作一个新的linux内核: 4, create a new linux kernel:

A: 解压新的linux内核: A: extract the new linux kernel:

$ tar -jxvf nux-2.6.9.tar.bz2 $ Tar-jxvf nux-2.6.9.tar.bz2

B: 给新的内核打上ARMNOMMU的补丁: B: The core of the new bear ARMNOMMU patch:

$ gzip -dc linux-2.6.9-hsc0.patch.gz | patch -p0 $ Gzip-dc linux-2.6.9-hsc0.patch.gz | patch-p0

5, 为uClinux更换最新的linux内核: 5, the latest replacement for uClinux linux kernel:

A: 进入uClinux的目录: A: uClinux into the directory:

$ cd uClinux-dist $ Cd uClinux-dist

B: 删除原来的内核: B: Delete the original core:

$ rm -rf linux-2.6.x $ Rm-rf linux-2.6.x

C: 更换内核: C: replacement of core:

$mv ../ linux-2.6.9 linux-2.6.x $ mv .. / linux-2.6.9 linux-2.6.x

6, 确定配置: 6, identified configuration:

A: 因为目前还没有专门针对4510系列的kernel配置,所以我们使用espd-4510的配置: A: because there is no specific 4510 series kernel configuration, so we use the configuration espd-4510:

$cp inux-2.6.x/arch/armnommu/configs/espd_4510b_defconfig vendor/Samsung/4510B/config.linux-2.6.x $ cp inux-2.6.x/arch/armnommu/configs/espd_4510b_defconfig vendor/Samsung/4510B/config.linux-2.6.x

B: 同样,由于没有针对S3C4510B的vendor的配置,所以使用2.4的配置: B: Similarly, the absence of the vendor for S3C4510B configuration, using a 2.4 configuration:

$cp vendor/Samsung/4510B/config.vendor-2.4.x vendor/Samsung/4510B/config.vendor-2.6.x $ cp vendor/Samsung/4510B/config.vendor-2.4.x vendor/Samsung/4510B/config.vendor-2.6.x

7, 修改内核: 7, to amend the kernel:

A: 修改vendor/Samsung/4510B/Makefile: A: Laws vendor/Samsung/4510B/Makefile:

在第7行之后添加一行: At the 7 line, add the line:

RAMIMAGE = $(IMAGEDIR)/image.ram RAMIMAGE = $ (IMAGEDIR) / image.ram

在第68行之后添加一行: In section 68 added after his trip:

$(CROSS_COMPILE)ld -r -o $(ROOTDIR)/$(LINUXDIR)/romfs.o -b\ binary $(ROMFSIMG) $ (CROSS_COMPILE) ld-r-o $ (ROOTDIR) / $ (LINUXDIR) / romfs.o-b \ binary $ (ROMFSIMG)

$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S \ $ (CROSS_COMPILE) objcopy-O binary-R. Note-R. Comment-S \

$(ROOTDIR)/$(LINUXDIR)/linux $(RAMIMAGE) $ (ROOTDIR) / $ (LINUXDIR) / linux $ (RAMIMAGE)

B: 修改vendor/Samsung/4510B/rc: B: Laws vendor/Samsung/4510B/rc:

将第2、4行的/dev/ram0改为/dev/ram1; 2,4 will be the first trip / dev/ram0 read / dev/ram1;

在13行之后添加一行配置网卡,可以修改自己的IP地址,我的设定是: 13 firms added after his party card configuration, can modify their own IP address, I set up is:

ifconfig eth0 202.195.166.144 netmask 255.255.255.0 up ifconfig eth0 202.195.166.144 netmask 255.255.255.0 up

将最后一行的dhcpcd用httpd代替(启动http服务器)。 Will be the last line of dhcpcd instead of using httpd (start http server).

C:修改vendor/config/armnommu/config.arch, 将42行的arm-elf改为arm-uclinux,即: C: Laws vendor / config / armnommu / config.arch, will be 42 to the arm-elf to arm-uclinux, namely:

42 CROSS_COMPILE = arm-uclinux- 42 CROSS_COMPILE = arm-uclinux -

D:修改linux-2.6.x/arch/armnommu/arch/kernel/vmlinux-lds, 添加romfs.o D: Laws linux-2.6.x/arch/armnommu/arch/kernel/vmlinux-lds, add romfs.o

81 *(.got) /* Global offset table */ 81 * (. Got) / * Global offset table * /

82

83 romfs_start = .; 83 romfs_start =.;

84 romfs.o 84 romfs.o

85 romfs_end = .; 85 romfs_end =.;

注意等号前后都要有一个空格。 Equal attention should have a space before and after.

E:修改linux-2.6.x/arch/armnommu/kernel/setup.c,添加变量romfs_start, romfs_end及设置default_command_line: E: Laws linux-2.6.x/arch/armnommu/kernel/setup.c, add variables romfs_start, romfs_end and the setting up of default_command_line:

64 extern int _stext, _text, _etext, _edata, _end; 64 extern int _stext, _text, _etext, _edata, _end;

65 extern int romfs_start,romfs_end; 65 extern int romfs_start, romfs_end;

.................................................

682 char *from = default_command_line; 682 char * from = default_command_line;

683 sprintf(default_command_line, "root=/dev/ram0 console=ttyS0,57600 initrd=0x%08lx,%ldk keepinitrd", (unsigned long)&romfs_start,((unsigned long)&romfs_end - (unsigned long)&romfs_start)>>10); 683 sprintf (default_command_line, "root = / dev/ram0 console = ttyS0, 57600 initrd = 0x% 08lx,% ldk keepinitrd", (unsigned long) & romfs_start, ((unsigned long) & romfs_end - (unsigned long) & romfs_start)>> 10 );

其中, console=ttyS0,57600为串口的波特率设置。 One, console = ttyS0, 57600 baud rate for the serial port settings.

F:修改uClinux-dist/linux-2.6.x/drivers/serial/serial_s3c4510b.c,更改串口的波特率。 F: Laws uClinux-dist/linux-2.6.x/drivers/serial/serial_s3c4510b.c, the serial baud rate changes.

注释掉126-160行,在161行添加一行: 126-160 comment out line, add the line in the 161 line:

ubd.bf.cnt0 = 26; ubd.bf.cnt0 = 26;

把第395、451、561行的19200改为57600。 395,451,561 to the first line of 19200 to 57600.

以上改动确定串口使用的波特率是57600。 Serial determine changes over the use of the baud rate is 57600.

8, 配置内核执行make menconfig,以下全选上,然后保存退出,其余具体各项配置暂不更改 8, the implementation of core configuration make menconfig, following elections on the whole, then save from the rest of the specific configuration not to change

(linux-2.6.x) Kernel Version (linux-2.6.x) Kernel Version

(uClibc) Libc Version (uClibc) Libc Version
[*] Default all settings (lose changes) (NEW)[*] Default all settings (lose changes) (NEW)
[*] Customize Kernel Settings (NEW)[*] Customize Kernel Settings (NEW)
[*] Customize Vendor/User Settings (NEW)[*] Customize Vendor / User Settings (NEW)
[*] Update Default Vendor Settings (NEW)[*] Update Default Vendor Settings (NEW)

第一次配置退出可能还会要求选择板类型,直接按数字选espd_4510b即可。 The first allocation may be asked to select from plate type, the number of directly elected espd_4510b can.

注意在配置内核的时候更改SDRAM的大小、选中httpd, boa, route等选项。 Attention to the core configuration changes when the size of SDRAM, check httpd, boa, route and other options.

9, 编译执行make,此处会出现错误,报告找不到一个文件,不要理会,先make image,再make一下就可以了,不行的话继续重复make image,make。 9, the compiler implementation make, here would be an error, the report can not find a file, not ignored, to make image, then click on the make, not to repeat the words make image, make.

执行完后images目录中会有一下文件: After the implementation of images in the directory will be the document:

[root@localhost images]# ls -la [root @ localhost images] # ls-la

总用量7552 The total amount of 7552

drwxr-xr-x 2 root root 4096 10月 9 12:19 . drwxr-xr-x 2 root root 4096 10月9 12:19.

drwxr-xr-x 16 1000 users 4096 10月 9 11:46 .. drwxr-xr-x 16 1000 users 4096 10月9 11:46 ..

-rw-r--r-- 1 root root 2873084 10月 9 12:19 image.bin - rw-r - r - 1 root root 2873084 10月9 12:19 image.bin

-rwxr-xr-x 1 root root 1951672 10月 9 12:19 image.ram - rwxr-xr-x 1 root root 1951672 10月9 12:19 image.ram

-rwxr-xr-x 1 root root 50200 10月 9 12:19 linux.data - rwxr-xr-x 1 root root 50200 10月9 12:19 linux.data

-rwxr-xr-x 1 root root 1903332 10月 9 12:19 linux.text - rwxr-xr-x 1 root root 1903332 10月9 12:19 linux.text

-rw-r--r-- 1 root root 919552 10月 9 12:19 romfs.img - rw-r - r - 1 root root 919552 10月9 12:19 romfs.img

上述生成文件的说明: The formation of the document:

romfs.img: 这个文件是通过tools/romfs-inst.sh 脚本,生成romfs 目录及其下面的文件,然后通过genromfs 程序打包成一个文件romfs.img。 romfs.img: This is a file through the tools / romfs-inst.sh script, generated romfs directory and the following documents, and then through genromfs procedures packaged into a document romfs.img. romfs.img 既可以放在flash 中,也可以放在ram 中,但需要在编译内核时在driver/block/blkmem.c 里指定地址,以便内核找到. romfs.img both can be placed on a flash, and also on the ram, but the need to compile the kernel at the driver / block / blkmem.c in the designated address, in order to find the core.

linux.text: 编译后的内核中text 段,一般放在flash 中,只读. linux.text: After compiling the core of the text, the general on the flash, read-only.

linux.data: 编译后的内核中data,init 段,一般放在sdram 中,读写. linux.data: After compiling the core of the data, init, the general on the sdram, read and write.

image.bin: 上面三个文件顺序连接而生成的= linux.text + linux.data + romfs.img image.bin: the above three documents linking the order and generated = linux.text + linux.data + romfs.img

image.ram: 这个内核没有压缩过,而且必须在ram 里运行.所以需要通过板子上的bootloader将它下载到指定位置后开始执行.从ram 里启动内核,则代码段和数据段都在ram 里面.这个文件是编译生成的elf 格式的linux内核,通过arm-elf-objcopy 工具生成的二进制映像文件。 image.ram: This core has not compressed, and must be in operation in the ram. so it is necessary to board the bootloader it downloaded to a designated location after implementation. ram, activated from the core, code, and data in paragraph ram inside. compile a document that is generated elf format linux kernel, through arm-elf-objcopy tool to generate the binary image files.

对于image.ram文件,利用bootloader将其加载到0x8000地址处执行,接上串口就能看 到如下信息了。 For image.ram document, using its load bootloader 0 x8000 address to the Executive, connected to serial port you can see the information below.

Linux version 2.6.9-hsc0 (root@localhost) (gcc version 3.4.0) #57 Sun Oct 9 12:5 Linux version 2.6.9-hsc0 (root @ localhost) (gcc version 3.4.0) # 57 Sun Oct 9 12:5

CPU: Samsung-S3C4510B [36807001] revision 1 (ARMv4T) CPU: Samsung-S3C4510B [36807001] revision 1 (ARMv4T)

Machine: ESPD 4510B(S3C4510B) Machine: ESPD 4510B (S3C4510B)

Warning: bad configuration page, trying to continue Warning: bad configuration page, trying to continue

Built 1 zonelists Built 1 zonelists

Kernel command line: root=/dev/ram0 console=ttyS0,57600 initrd=0xd Kernel command line: root = / dev/ram0 console = ttyS0, 57600 initrd = 0xd

PID hash table entries: 128 (order: 7, 2048 bytes) PID hash table entries: 128 (order: 7, 2048 bytes)

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory: 16MB = 16MB total Memory: 16MB = 16MB total

Memory: 14236KB available (1800K code, 101K data, 56K init) Memory: 14236KB available (1800K code, 101K data, 56K init)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

checking if image is initramfs...it isn't (ungzip failed); looks like an initrd checking if image is initramfs ... it isn't (ungzip failed); looks like an initrd

NET: Registered protocol family 16 NET: Registered protocol family 16

ttyS0 at I/O 0x3ffd000 (irq = 4) is a Samsung S3C4510B Internal UART ttyS0 at I / O 0x3ffd000 (irq = 4) is a Samsung S3C4510B Internal UART

ttyS1 at I/O 0x3ffe000 (irq = 6) is a Samsung S3C4510B Internal UART ttyS1 at I / O 0x3ffe000 (irq = 6) is a Samsung S3C4510B Internal UART

RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize

loop: loaded (max 8 devices) loop: loaded (max 8 devices)

Samsung S3C4510B Ethernet Driver version 0.2 (2004-06-13) <curt@cucy.com> Samsung S3C4510B Ethernet Driver version 0.2 (2004-06-13) <curt@cucy.com>

NET: Registered protocol family 2 NET: Registered protocol family 2

IP: routing cache hash table of 512 buckets, 4Kbytes IP: routing cache hash table of 512 buckets, 4Kbytes

TCP: Hash tables configured (established 1024 bind 204 TCP: Hash tables configured (established 1024 bind 204

NET: Registered protocol family 17 NET: Registered protocol family 17

RAMDISK: romfs filesystem found at block 0 RAMDISK: romfs filesystem found at block 0

RAMDISK: Loading 898KiB [1 disk] into ram disk... done. RAMDISK: Loading 898KiB [1 disk] into ram disk ... done.

VFS: Mounted root (romfs filesystem) readonly. VFS: Mounted root (romfs filesystem) readonly.

Freeing init memory: 56K Freeing init memory: 56K

Shell invoked to run file: /etc/rc Shell invoked to run file: / etc / rc

Command: hostname Samsung Command: hostname Samsung

Command: /bin/expand /etc/ramfs.img /dev/ram1 Command: / bin / expand / etc / ramfs.img / dev/ram1

Command: mount -t proc proc /proc Command: mount-t proc proc / proc

Command: mount -t ext2 /dev/ram1 /var Command: mount-t ext2 / dev/ram1 / var

Command: mkdir /var/config Command: mkdir / var / config

Command: mkdir /var/tmp Command: mkdir / var / tmp

Command: mkdir /var/log Command: mkdir / var / log

Command: mkdir /var/run Command: mkdir / var / run

Command: mkdir /var/lock Command: mkdir / var / lock

Command: mkdir /var/empty Command: mkdir / var / empty

Command: cat /etc/motd Command: cat / etc / motd

Welcome to Welcome to

____ _ _ ____ _ _

/ __| ||_| / __ | | | _ |

_ _| | | | _ ____ _ _ _ _ _ _ | | | | _ ____ _ _ _ _

| | | | | | || | _ \| | | |\ \/ / | | | | | | | | | _ \ | | | | \ \ / /

| |_| | |__| || | | | | |_| |/ \ | | _ | | | __ | | | | | | | | _ | | / \

| ___\____|_||_|_| |_|\____|\_/\_/ | ___ \ ____|_||_|_| | _ | \ ____| \ _ / \ _ /

| | | |

|_| | _ |

For further information check: For further information check:

http://www.uclinux.org/

Command: ifconfig lo 127.0.0.1 Command: ifconfig lo 127.0.0.1

Command: route add -net 127.0.0.0 netmask 255.255.255.0 lo Command: route add-net 127.0.0.0 netmask 255.255.255.0 lo

Command: ifconfig eth0 202.195.166.144 netmask 255.255.255.0 up Command: ifconfig eth0 202.195.166.144 netmask 255.255.255.0 up

Command: httpd & Command: httpd &

[15]

Execution Finished, Exiting Execution Finished, Exiting

Sash command shell (version 1.1.1) Sash command shell (version 1.1.1)

/>

参考文献: References:

1、4510 学习开发板--以静致远 1, 4510 学习开发板--以静致远

2、Getting familiar with uClinux/ARM 2.6:Getting Familiar with uClinux/ARM 2 2, Getting familiar with uClinux / ARM 2.6: Getting Familiar with uClinux/ARM 2

3、在S3C4510B上运行uClinux-2.6的过程:http://www.embed.com.cn/bbs/dispbbs....ID=7791&page=6 3, in S3C4510B running uClinux-2.6 on the process: http://www.embed.com.cn/bbs/dispbbs....ID=7791&page=6



































===========================Load uClinux======================== THIS IS WHAT WE GET...WITH THE IMAGE...







Mini TFTP Server 1.0 (IP : 192.168.1.2) - Load uClinux image(RAM)

Command: tftp -i 192.168.1.2 put image.ram



Starting the TFTP download...

....................................

Boot uClinux? (y/n) yLinux version 2.6.9-hsc0 (root@linux-sm5i) (gcc version 3.4

.0) #2 Mon Jun 16 18:14:01 IST 2008

CPU: Samsung-S3C4510B [36807001] revision 1 (ARMv4T)

Machine: ESPD 4510B(S3C4510B)

Warning: bad configuration page,

Built 1 zonelists

Kernel command line: root = / dev/ram0 console = ttyS0, 57600 initrd = 0x00133a4

c, 84076k keepinitrd

PID hash table entries: 64 (order: 6, 1024 bytes)

Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)

Inode-cache hash table entries: 102 bytes)

Memory: 8MB = 8MB total

Memory: 6816KB available (1078K code, 126K data, 56K init)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

NET: Registered protocol family 16

ttyS0 at I/O 0x3ffd000 (irq = 4) is a Samsung S3C4510B Internal UART

ttyS1 at I/O 0x3ffe000 (irq = 6) is a Samsung S3C4510B Internal UART

RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize

loop: loaded (max 8 devices)

Samsung S3C4510B Ethernet Driver version 0.2 (2004-06-13) <curt@cucy.com>

NET: Registered protocol family 2

IP: routing cache hash table of 512 buckets, 4Kbytes

TCP: Hash tables configu512 bind 1024)

NET: Registered protocol family 1

NET: Registered protocol family 17

VFS: Cannot open root device "<NULL>" or unknown-block(0,255)

Please append a correct "root=" boot option

Kernel panic - not syncing: unt root fs on unknown-block(0,255)

We will be delighted to receiving suggestions...

NATARAJAN