Uboot ARM-9200 Embedded Development Board Process Target Tarn is a BootLoader program for a variety of embedded CPUs in a multimedia Denx team, which can be developed U-Boot software with CVS under Linux. Current version number: U-boot 1.0.2, see the definition in INCLUDE / VERSION.H. #CVS -D: PServer: anonymous@cvs.sourceforge.net: / cvsroot / u-boot login # cvs -z3 -d: pserver: anonymous@cvs.sourceforge.net: / cvsroot / u-boot checkout -p u- Boot This article describes the migration process of U-boot in S3C2410: The hardware configuration of S3C2410 is: LCPU: S3C2410LNOR: 16M, Intel EP28F128J3alsDRAM: 64M, Micron 48LC16M16A2-75 BLDM9000: Davicom (10 / 100m) NIC Lusb Host A configuration of a self-configured motherboard Read the makefile file, add two lines in the makefile file: S3C2410_Config: unconfig @. / Mkconfig $ (@: _ config =) ARM ARM920T S3C2410 where ARM is the type of CPU, the ARM920T is the code directory corresponding to the ARM CPU, S3C2410 is a self-motherboard the catalog. l Set the S3C2410 directory in the Board directory, copy content in the SMDK2410 directory (CP SMDK2410 / * S3C2410). l Copy SMDK2410.h (CP SMDK2410.H S3C2410.H) L to modify the directory name of the ARM compiler and the directory of the ARM compiler is: / OPT / Host / Armv4L / Bin / ARMV4L -unknown-linux - change cross-compile = arm-linux- to actual directory: If cross-compile = / opt / host / armv4l / bin / arm4l-unknown-linux-l is completed, you can test your configuration: #make s3c2410_config #Make Compile should be in Processor.h Error L Modify Processor.h: Union Debug_insn {U32 ARM; U16 thumb;} Modified: union debug_insn {u32 arm_mode; u16 thumb_mode;}
l Successful compilation, compiled programs are the same as SMDK2410. l Note: If the first modification has not been mistaken in Processor.h, in the example of an error, carefully check the above modifications (the modified content is incorrect), and run the touch command in the Examples directory (not running Touch will also Error, maybe uboot makefile is not written, no reason), compile. Generate the most basic U-Boot, no function, can only boot the L-modified program connection address: There is a config.mk file in the Board / S3C2410, which is used to set the starting address of the program connection because it will increase in U-boot. Function, so left 6M space, modify 33F80000 is 33A00000. l In order to perform modified U-boot downloaded with LOADB or TFTP in order to use Uboot, the U-boot downloaded: in the Board / S3C2410 MemSetup.s is bidders "0:" to the five sentences: LMOV R3, PCLLDR R4, = 0x3FFF0000LAND R3, R3, R4 // The above three sentences get the actual start-up memory address LAAD R0, R0, R3 // When debuging Uboot with a Go command, the startup address is in the address of RAMLADD R2, R2, R3 // to initialize the memory information, Plus the actual start address U0: (Marking 0, the original to exist) l Use the SJF software to download the compiled U-boot by the JTAG port, start! When you read the environment block, the CRC error and then enter the SMDK #. l Contempted to copy the PrintHexWord in Mizi Vivi, which can print some information when debug assembly, but there are defects in the PrintHexnibble, LDR R0, [R2, R0] should be changed to LDRB R0, [R2, R0 ], This can be used in a four-byte aligned system. Intel Nor Flash Operating Function LINTEL 28F128, found in the board directory to have this flash, copy the Flash.c in the CMI to the S3C2410 directory to change the original flash.c. Flash.c in LCMI is swap bytes when writing, so delete its WRITE_SHORT () and wirte_buff () functions, copy the wirte_word () and wirite_buff () function in the EP7312 motherboard directory, and wirite_buff () functions. Change Flash_Base0_Prelim in Flash.c to cfg_flash_base. Change flash_block_size to 0x20000, (E28F128J3A Flash is 128K). l s3c2410.h the flash content in the original: 1. # define PHYS_FLASH_10x00000000 / * Flash Bank # 1 * / 2. # define CFG_FLASH_BASEPHYS_FLASH_13 # define CONFIG_AMD_LV40014 # if 05. # define CONFIG_AMD_LV80016 # endif...
7. # define CFG_MAX_FLASH_BANKS1 / * max number of memory banks * / 8. # ifdef CONFIG_AMD_LV8009. # Define PHYS_FLASH_SIZE0x00100000 / * 1MB * / 10. # define CFG_MAX_FLASH_SECT (19) / * max number of sectors on one chip * / 11. # define CFG_ENV_ADDR (CFG_FLASH_BASE 0x0F0000) / * addr of environment * / 12. # endif13. # ifdef CONFIG_AMD_LV40014. # define PHYS_FLASH_SIZE0x00080000 / * 512KB * / 15. # define CFG_MAX_FLASH_SECT (11) / * max number of sectors on one chip * / 16. # define CFG_ENV_ADDR (CFG_FLASH_BASE 0x070000) to: 1. # define PHYS_FLASH_10x00000000 / * Flash Bank # 1 * / 2. # define PHYS_FLASH_SIZE0x01000000 / * 16 MB * / 3 ## define CFG_FLASH_PROTECTION4.define CFG_FLASH_BASEPHYS_FLASH_15 # define CFG_MONITOR_BASE.. PHYS_FLASH_16. # define CFG_MAX_FLASH_BANKS1 / * max number of memory banks * / 7. # define CFG_MAX_FLASH_SECT 128 / * max number of sectors on one chip * / 8. # define CFG_FLASH_ERASE_TOUT (2 * CFG_HZ) / * Timeout for Flash Erase * / 9 . # define cfg_flash_write_tout (2 * cfg_hz) / * Timeout for flash write * / 10. # definecfg_env_is_in_flash111. # d efine CFG_ENV_ADDR (PHYS_FLASH_1 0x60000) 12. # define CFG_ENV_SIZE0x20000 / * Total Size of Environment Sector * / l of the default_size cmd_mem.c cmd_get_data_size full function to 1, the default display in bytes, more intuitive, and does not appear Data Abort. In DO_MEM_MW () and MOD_MEM () Add: IF (AddR2Info (ADDR)! = Null) {Printf ("" can't wirtu ("can't wirt./n" );Return 0;} The MW and MM commands cannot modify the data in the flash, and only open the CP to modify the data in Flash. l Remove Flash_RASE () in Board / S3C2410 / Flash.c, move start = get_timer (0) to for () to remove Flash_RASE TIMEOUT errors. Setting Flash and SDRAM timing based on 28f128j3a-150, this is a 150NS Flash, so set the Flash timing to the slowest. Set the S3C2410 to 202.8 MHz and operate in asynchronous mode, modify MEMSETUP.s.
Implementing a network card function IN cards is DM9000, there is no corresponding driver in Uboot, so a network card driver has been written. 1. Turn the drive to Drivers / DM9000.c2. DM9000.O3 is added to DRIVERS / Makefile. Modify CS8900 => DM90004 in lib_arm / board.c. Add the following sentences in the include / Configs / S3C2410 #define config_driver_dm90001 / * we have a CS8900 on-board * / # define DM9000_BASE0x08000000 # define DM9000_BUS161 / * the Linux driver does accesses as shorts * / # define CONFIG_ETHADDR08: 00: 3e: 26: 0a: 5b #define CONFIG_NETMASK 255.255.255.0 # define CONFIG_IPADDR192. 168.2.120 # Define config_serverip192.168.2.122
1. Add implement USB functionality in include / configs / s3c2410 in CONFIG_COMMANDS in:. LCFG_CMD_USB | / lCFG_CMD_FAT | / 2 and add the following settings in the file: l # define CONFIG_USB_OHCIl # define CONFIG_USB_STORAGEl # define CONFIG_USB_KEYBOARDl # define CONFIG_DOS_PARTITIONl # defineCFG_DEVICE_DEREGISTERl # define Config_support_vfatl # define little LittleEndian3. At this time, USB Start and USB INFO are functioning normally, while others are not normal. 4. Function FATLS is not normal, modify FS / FAT / FAT.CL does not convert the VFAT's Unicode characters, join the Unicode character conversion function. Uni2ansi (), increasing the CP936 version of Slot2Str (), adding a Toshort (). l Join #define CP936L There is a alignment error in Fat_Getenv (), modify FAT.H to make FatBuff words. l Add two sentences in Do_fat_read () to eliminate the column root directory error. l Add two sentences in Board / cmd_fat.c to eliminate errors when there is no USB Storage device: if (! dev_desc) Printf ("not init storage usb device: / n USB Start / N USB INFO / N USB SCAN / N "); 5. Modify the FS / FAT / FAT.CGET_CLUSTER () function Add IF (Size / FS_BLOCK_SIZE> 0) to prevent reading files. Boot Linux now we can guide Linux. l To guide BZIP2's Linux core, change cfg_malloc_size to greater than 4ml to make compiled Linux memory, convert to UBOOT / TOOLS / MKIMAGE to UBOOT format 1.mkimage -a arm -o linux -t kernel -c bzip2 -a 30000000 - E 30008000-N 'Linux Kernel' -D VMLinux1.bz2 C2.MkImage -a Arm -o Linux -t kernel -c gzip -a 30000000-E 30008000-N 'Linux kernel' -d vmlinux.gz b3.mkimage -a ARM -O Linux -t ramdisk -c gzip -a 0-e 0 -n 'init ramdisk' -d RamDisk.Image.gz ramdiskl joins: 1. # Define config_bootarentgs "initrd = 0x30800000 0x200000 root = / dev / ram init = / linuxrc console = ttys0, 115200 "2. # define config_bootfile" vmlinux_for_uboot.gz "3. # Define config_bootcommand" Bootm 0x80000 0x1a0000 "0x80000 is the location in the kernel in the Flash. 0x1a0000 is the content of ramdisk.image.gz in Flash.
4. # defineCFG_LOAD_ADDR0x30800000 / * default load address * / l was added in the lib_arm armlinux.c do_bootm_linux / in: 1.memcpy ((char *) CFG_LOAD_ADDR, (char *) data, len); 2.data = CFG_LOAD_ADDR; the ramdisk Copy to the RAM of 0x30800000 position 3. Define the following configuration, incoming information into the Linux core TAG area #define config_setup_memory_tags # define config_initrd_tag # define config_cmdline_tag common U-boot command introduction
1.? Get all command list 2.Help: Help USB, list usb function instructions 3.ping: Note: You can only develop board PING other machine 4.setenv: Setting mutual environment variable: 5.setenv Serverip 192.168.0.16.setenv ipaddr 192.168.0.567.setenv bootcmd 'TFTP 32000000 VMLinux; KGO 32000000'8.saveEnv: Save Environment Variable 9. After setting the environment variable, save variable value 10.TFTP: TFTP 32000000 VMLinux, put server (ip = environment variable Setting Serverip) / TFTPDROOT / under VMLinux read into physical memory 32000000 via TFTP. 11.Kgo: KGO 3200000012.BOOTM: Bootm 320000013.Protect: Write the Flash to write to flash, protectOn 1: 0-3 (就 对 对) The first FLASH 0-3 sector is protected), protect off 1: 0-3 Cancel write protection 14.rase: Delete Flash sectors, ERASE 1: 0-2 (is 0-2 for each Flash Sector delete) 15.cp: copy content in memory, CP 32000000 0 40000 (copy 0x40000 bytes starting in memory to 0x40000 bytes to 0x0) 16.MW: Write an operation in RAM, MW 32000000 FF 10000 (Set the 0x10000 bytes starting in memory 0x32000000) 17.md: Modify the content in the RAM, MD 32000000 (Memory start address) 18.USB: LUSB Start: Start USB Function LUSB INFO: List device LUSB SCAN : Scan the USB Storage (U disk) device 19.fatls: Lists the DOS FAT file system, such as FATLS USB 0 lists files in the first U disk 20.fatload: read into a file in FAT, such as: Fatload USB 0: 0 32000000 aa.txt21. Read Aa.txt in USB to 0x32000000! 22.flinfo: Lists Flash information 23.LoadB: Prepare to receive files from kermit or super terminal transfer with Kermit protocol. 24.NFS: NFS 32000000 192.168.0.2:Aa.txt, the AA.TXT in the NFS file system in 192.168.0.2 (LINUX NFS file system) is read into memory 0x32000000.
Beijing Century Puchui Company www.sjsunny.com