In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
I. develop board interface wiring tools
There are usually four interfaces that can be connected between development board and PC: serial port, JTAG, USB and network interface. Now there is no JTAG or interface on the PC, so you can use the adapter board to convert to parallel port or USB port to connect with the PC segment.
JTAG was originally used to test the chip. JTAG testing allows multiple devices to be connected in series through the JTAG interface to form a JTAG chain, which can test each device separately. Nowadays, the JTAG interface is often used to realize ISP (In-System Programmer, in-system programming) and to program FLASH and other devices. In 2440, when you need to burn NOR Flash, you need to use JTAG interface to burn software, and when the software is to burn to NAND Flash, you can use serial port and USB interface to operate. Here are the differences between NOR Flash, NAND Flah, and SDRAAM.
Both ROM and RAM refer to semiconductor memory, ROM is the abbreviation of Read Only Memory, and RAM is the abbreviation of Random Access Memory. ROM can still hold data when the system is powered off, while RAM usually loses data after a power outage, and a typical RAM is the computer's memory.
The chip features static RAM (Static RAM/SRAM), which is currently the fastest storage device for reading and writing, but it is also very expensive; RAM dynamic RAM (Dynamic RAM/DRAM), DRAM retains data for a short time, and the speed is slower than SRAM, but in terms of price, DRAM is much cheaper than SRAM; DDR RAM (Date-Rate RAM), also known as DDR SDRAM (Synchronous Dynamic RAM), can read and write data twice in one clock, which doubles the speed of data transmission.
there are two main types of Flash: NOR Flash and NADN Flash at present. The reading of NOR Flash is the same as that of SDRAM. Users can run the code loaded in NOR FLASH directly, which reduces the capacity of SRAM and saves costs. NAND Flash does not adopt the random read technology of memory, it reads in the form of reading one block at a time, usually reading 512 bytes at a time. Flash with this technology is cheaper. Users cannot run the code on NAND Flash directly, so many NAND Flash development boards in addition to using NAND Flah, there is a small NOR Flash to run startup code.
In the 2440 development board of , uboot is usually written on nor flash as a bootstrap, while linux kernel and the root file system are burned on nand flash, and this code is loaded and run in SDRAM.
Second, develop the burning of board program in TQ2440
A linux file system can be divided into four levels: hardware, bootloader, kernel and root file system. First of all, if the hardware can work, there needs to be a bootloader boot program, which sets hardware-related parameters and software variables, such as setting interrupt variables, turning off watchdog, initializing serial port, clock and other hardware parameters, setting stack and so on. To do this, the UBOOT code must be powered on and run automatically, which is usually burned in NOR Flash because NAND Flash cannot run the code, while linux kernel and root filesystem are burned into nand flash and wait for bootloader boot to be loaded into SDRAM to run.
1. Use J-link to burn u-boot to Nor Flash
The specific steps for compiling uboot with are as follows:
1. Decompress u-boot1.1.6 and enter the directory after decompression.
2. Patch
3. Compile with arm-linux-gcc3.4.5 compiler
Book/home/test/1_bare_metal/1_test$ tar xjf u-boot-1.1.6.tar.bz2 book/home/test/1_bare_metal/1_test$ cd u-boot-1.1.6/book/home/test/1_bare_metal/1_test/u-boot-1.1.6$ patch-p1
< ../u-boot-1.1.6_jz2440.patchbook/home/test/1_bare_metal/1_test/u-boot-1.1.6$ arm-linux-gcc -vReading specs from /work/tools/gcc-3.4.5-glibc-2.3.6/lib/gcc/arm-linux/3.4.5/specsConfigured with: /work/tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/work/tools/gcc-3.4.5-glibc-2.3.6 --with-float=soft --with-headers=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include --with-local-prefix=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-longThread model: posixgcc version 3.4.5book/home/test/1_bare_metal/1_test/u-boot-1.1.6$ make 100ask24x0_configbook/home/test/1_bare_metal/1_test/u-boot-1.1.6$ make 烧写uboot: 1、JLink 的 USB 口接到电脑上,JTAG 口用排线和开发板的 JTAG 口相连, 开发板设为 Nor Flash 启动并上电。 2、启动 J-Flash, 它在"Windows 开始菜单->All programs-> SEGGER "inside.
3. Select the menu "File-> Open-> Open Project …" Open the s3c2440.jflash in the CD.
4. Select the menu "Target-> Connect"
5. Select the menu "File-> Open", open the binary file you want to burn, such as u-boot.bin, and enter 0 in "Start address".
6. Select the menu "Target-> Auto" to automatically burn and write.
7. Restart the development board and start uboot.
# 100ask Bootloader for OpenJTAG # [n] Download u-boot to Nand Flash [o] Download u-boot to Nor Flash [c] Re-scan Nor Flash [u] Copy bootloader from nand to nor [v] Copy bootloader from nor to nand [k] Download Linux kernel uImage [j] Download root_jffs2 image [y] Download root_yaffs image [d] Download to SDRAM & Run [z] Download zImage into RAM [g] Boot linux from RAM [f] Format the Nand Flash [s] Set the boot parameters [ B] Boot the system [r] Reboot u-boot [q] Quit from menuEnter your selection:
two。 Using DNW and serial port tool CRT to burn the Linux kernel and root file system
The steps to compile the Linux kernel are:
1. Decompress linux2.6.22 and enter the directory after decompression.
2. Patch
3. Compile with arm-linux-gcc3.4.5 compiler
Book/home/test/1_bare_metal/1_test$ tar xjf linux-2.6.22.6.tar.bz2 book/home/test/1_bare_metal/1_test$ cd linux-2.6.22.6/book/home/test/1_bare_metal/1_test/linux-2.6.22.6$ patch-p1
< ../linux-2.6.22.6_jz2440.patch 4、这里我是用的是TQ2440开发板,因此韦老师的linux内核源码不能直接使用在TQ2440开发板上,需要对LCD和DM9000两个驱动程序进行修改。 将TQ2440源码\drivers_and_test\17th_dm9000c\修改好的\dm9dev9000c.c复制到linux-2.6.22.6/drivers/net目录下; 修改其Makefile:obj-$(CONFIG_DM9000) += dm9dev9000c.o #dm9000.o 将TQ2440源码drivers_and_test\10th_lcd\4th\lcd.c复制到linux-2.6.22.6/drivers/video目录下,并修改其Makefile:obj-$(CONFIG_FB_S3C2410) += lcd.o #s3c2410fb.o 5、修改config_ok为.config book/home/test/1_bare_metal/1_test/linux-2.6.22.6$ cp config_ok .config 6、编译make uImage,此事可能出现错误: book/home/test/1_bare_metal/1_test/linux-2.6.22.6$ make uImageMakefile:1449: *** mixed implicit and normal rules: deprecated syntax/home/test/1_bare_metal/1_test/linux-2.6.22.6/Makefile:416: *** mixed implicit and normal rules: deprecated syntax/home/test/1_bare_metal/1_test/linux-2.6.22.6/Makefile:1449: *** mixed implicit and normal rules: deprecated syntaxmake[1]: *** No rule to make target 'silentoldconfig'。 停止。 CHK include/linux/version.hmake: *** No rule to make target 'include/config/auto.conf', needed by 'include/asm-arm/.arch'。 停止。 根据提示修改这两行Makefile: 在makefile中将416行代码:config %config: scripts_basic outputmakefile FORCE 改为:%config: scripts_basic outputmakefile FORCE 在makefile中将1449行代码:/ %/: prepare scripts FORCE 改为:%/: prepare scripts FORCE 再次编译,编译成功。 ...UIMAGE arch/arm/boot/uImageImage Name: Linux-2.6.22.6Created: Fri Dec 29 20:05:44 2017Image Type: ARM Linux Kernel Image (uncompressed)Data Size: 1845828 Bytes = 1802.57 kB = 1.76 MBLoad Address: 0x30008000Entry Point: 0x30008000 Image arch/arm/boot/uImage is readybook/home/test/1_bare_metal/1_test/linux-2.6.22.6$ 7、在串口界面输入k命令下载uImage,使用dnw下载数据。 ##### 100ask Bootloader for OpenJTAG #####[n] Download u-boot to Nand Flash[o] Download u-boot to Nor Flash[c] Re-scan Nor Flash[u] Copy bootloader from nand to nor[v] Copy bootloader from nor to nand[k] Download Linux kernel uImage[j] Download root_jffs2 image[y] Download root_yaffs image[d] Download to SDRAM & Run[z] Download zImage into RAM[g] Boot linux from RAM[f] Format the Nand Flash[s] Set the boot parameters[b] Boot the system[r] Reboot u-boot[q] Quit from menuEnter your selection: kUSB host is connected. Waiting a download. 8、在串口界面输入y命令下载根文件系统,使用dnw下载数据。 ##### 100ask Bootloader for OpenJTAG #####[n] Download u-boot to Nand Flash[o] Download u-boot to Nor Flash[c] Re-scan Nor Flash[u] Copy bootloader from nand to nor[v] Copy bootloader from nor to nand[k] Download Linux kernel uImage[j] Download root_jffs2 image[y] Download root_yaffs image[d] Download to SDRAM & Run[z] Download zImage into RAM[g] Boot linux from RAM[f] Format the Nand Flash[s] Set the boot parameters[b] Boot the system[r] Reboot u-boot[q] Quit from menuEnter your selection: yUSB host is connected. Waiting a download.Now, Downloading [ADDRESS:30000000h,TOTAL:49769290]RECEIVED FILE SIZE:49769290 (725KB/S, 67S)NAND erase: device 0 offset 0x260000, size 0xfda0000Erasing at 0xffa0000 -- 3% complete.OKNAND write: device 0 offset 0x260000, size 0x2f76b40Writing data at 0x3033800 -- 13% complete. 49769280 bytes written: OK 9、启动开发板,查看效果。 Warning: firstuse finished 1tsdev (compaq touchscreen emulation) is scheduled for removal.See Documentation/feature-removal-schedule.txt for details.Warning: TimeZone::data Can't create a valid data object for 'Europe/Oslo'Warning: Unable to open /root/Settings/Categories.xmlWarning: could not register serverstarting pid 772, tty '/dev/s3c2410_serial0': '/bin/sh'# # lsbin lib mnt root tmpdev linuxrc opt sbin usretc lost+found proc sys# 3. 使用tftp网络烧写Linux内核和根文件系统 当开发板中安装好uboot后,还可以使用网络tftf下载linux内核与根文件系统,此时当tftp服务器为win7时,要保证开发板与PC机之间可以ping通。这里我采用开发板与PC机直接使用网线相连,PC机有线IP为192.168.2.20;开发板IP为192.168.2.10。 OpenJTAG>Set ipaddr 192.168.2.10OpenJTAG > set serverip 192.168.2.20OpenJTAG > saveSaving Environment to NAND...Erasing Nand...Writing to Nand... DoneOpenJTAG > printenvbootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200bootcmd=nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0bootdelay=2baudrate=115200ethaddr=08:00:3e:26:0a:5bnetmask=255.255.255.0stdin=serialstdout=serialstderr=serialmtdids=nand0=nandflash0mtdparts=mtdparts=nandflash0:256k@0 (bootloader), 128k (params), 2m (kernel),-(root) partition=nand0,0mtddevnum=0mtddevname=bootloaderipaddr=192.168.2.10serverip=192.168.2.20Environment size: 450 and 131068 bytes
1. The tftp side of the PC is set up to place the kernel and root file system that need to be downloaded in the server directory.
2. The development board goes to the uboot command line interface to download kernel:
Tftp 30000000 uImage
Mtdpart to view partition information
Nand erase kernel
Nand write.jffs2 30000000 kernel
3. Download the root file system
Tftp 30000000 fs_qtopia.yaffs2
Nand erase root
Nand write.yaffs 30000000 260000 (root Partition address) 2fb6b40 (size)
4. The startup effect of the development board:
4. Mount the kernel and root file system using a NFS server
uses NFS download method and tftp download method, which is roughly the same. At this time, make sure that the development board can ping with virtual machine ubuntu. At the same time, the nfs service has been enabled and the mount point has been set for the virtual machine:
Book~$ cat / etc/exports # / etc/exports: the access control list for filesystems which may be exported# to NFS clients. See exports (5). # # Example for NFSv2 and NFSv3:# / srv/homes hostname1 (rw,sync,no_subtree_check) hostname2 (ro,sync,no_subtree_check) # # Example for NFSv4:# / srv/nfs4 gss/krb5i (rw,sync,fsid=0,crossmnt,no_subtree_check) # / srv/nfs4/homes gss/krb5i (rw,sync,no_subtree_check) / work/nfs_root * (rw,sync,no_root_squash) # Mount directory
1. Download the kernel
Nfs 30000000 192.168.1.123:/work/nfs_root/uImage
Nand erase kernel
Nand write.jffs2 30000000 kernel
2. Download the root file system
Nfs 30000000 192.168.1.123:/work/nfs_root/fs_qtopia.yaffs2
Nand erase root
Nand write.yaffs 30000000 26000 2f76b40
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 238
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.