📄 readme.rpxlite
字号:
# Porting U-Boot onto RPXlite board# Written by Yoo. Jonghoon# E-Mail : yooth@ipone.co.kr# IP ONE Inc.# Since 2001. 1. 29# Shell : bash# Cross-compile tools : Montavista Hardhat# Debugging tools : Windriver VisionProbe (PowerPC BDM)# ppcboot ver. : ppcboot-0.8.1################################################################ 1. Hardware setting###############################################################1.1. Board, BDM settings Install board, BDM, connect each other1.2. Save Register value Boot with board-on monitor program and save the register values with BDM.1.3. Configure flash programmer Check flash memory area in the memory map. 0xFFC00000 - 0xFFFFFFFF Boot monitor program is at 0xFFF00000 You can program on-board flash memory with VisionClick flash programmer. Set the target flash device as: 29DL800B (?) The flash memory device in the board *is* 29LV800B, but I cannot program it with '29LV800B' option. (in VisionClick flash programming tools) I don't know why...1.4. Save boot monitor program *IMPORTANT* Upload boot monitor program from board to file. boot monitor program starts at 0xFFF000001.5. Test flash memory programming Try to erase boot program in the flash memory, and re-write them. *WARNING* YOU MUST SAVE BOOT PROGRAM TO FILE BEFORE ERASING FLASH################################################################ 2. U-Boot setting###############################################################2.1. Download U-Boot tarball at ftp://ftp.denx.de (The latest version is ppcboot-0.8.1.tar.bz2) To extract the archive use the following syntax : > bzip2 -cd ppcboot-0.8.1.tar.bz2 | tar xf -2.2. Add the following lines in '.profile' export PATH=$PATH:/opt/hardhat/devkit/ppc/8xx/bin2.3. Make board specific config, for example: > cd ppcboot-0.8.1 > make TQM860L_config Now we can build ppcboot bin files. After make all, you must see these files in your ppcboot root directory. ppcboot ppcboot.bin ppcboot.srec ppcboot.map2.4. Make your own board directory into the ppcboot-0.8.1/board and make your board-specific files here. For exmanple, tqm8xx files are composed of .depend : Nothing Makefile : To make config file config.mk : Sets base address flash.c : Flash memory control files ppcboot.lds : linker(ld) script? (I don't know this yet) tqm8xx.c : DRAM control and board check routines And, add your board config lines in the ppcboot-0.8.1/Makefile Finally, add config_(your board).h file in the ppcboot-0.8.1/include/ I've made board/rpxlite directory, and just copied tqm8xx settings for now. Rebuild ppcboot for rpxlite board: > make rpxlite_config > make################################################################ 3. U-Boot porting###############################################################3.1. My RPXlite files are based on tqm8xx board files. > cd board > cp -r tqm8xx RPXLITE > cd RPXLITE > mv tqm8xx.c RPXLITE.c > cd ../../include > cp config_tqm8xx.h config_RPXLITE.h3.2. Modified files are: board/RPXLITE/RPXLITE.c /* DRAM-related routines */ board/RPXLITE/flash.c /* flash-related routines */ board/RPXLITE/config.mk /* set text base address */ cpu/mpc8xx/serial.c /* board specific register setting */ include/config_RPXLITE.h /* board specific registers */ See 'reg_config.txt' for register values in detail.################################################################ 4. Running Linux############################################################################################################################### Misc Information###############################################################mem_config.txt:===============Flash memory device : AM29LV800BB (1Mx8Bit) x 4 devicemanufacturer id : 01 (AMD)device id : 5B (AM29LV800B)size : 4Mbytesector # : 19Sector information :number start addr. size00 FFC0_0000 6401 FFC1_0000 3202 FFC1_8000 3203 FFC2_0000 12804 FFC4_0000 25605 FFC8_0000 25606 FFCC_0000 25607 FFD0_0000 25608 FFD4_0000 25609 FFD8_0000 25610 FFDC_0000 25611 FFE0_0000 25612 FFE4_0000 25613 FFE8_0000 25614 FFEC_0000 25615 FFF0_0000 25616 FFF4_0000 25617 FFF8_0000 25618 FFFC_0000 256reg_config.txt:===============/*------------------------------------------------------------------- *//*------------------------------------------------------------------- *//* SIU (System Interface Unit) *//* *//*------------------------------------------------------------------- *//*------------------------------------------------------------------- *//*### IMMR *//*### Internal Memory Map Register *//*### Chap. 11.4.1 */ ISB = 0xFA20 /* Set the Immap base = 0xFA20 0000 */ PARTNUM = 0x21 MASKNUM = 0x00 => 0xFA20 2100---------------------------------------------------------------------/*### SIUMCR *//*### SIU Module Configuration Register *//*### Chap. 11.4.2 *//*### Offset : 0x0000 0000 */ EARB = 0 EARP = 0 DSHW = 0 DBGC = 0 DBPC = 0 FRC = 0 DLK = 0 OPAR = 0 PNCS = 0 DPC = 0 MPRE = 0 MLRC = 10 /* ~KR/~RETRY/~IRQ4/SPKROUT functions as ~KR/~TRTRY */ AEME = 0 SEME = 0 BSC = 0 GB5E = 0 B2DD = 0 B3DD = 0 => 0x0000 0800---------------------------------------------------------------------/*### SYPCR *//*### System Protection Control Register *//*### Chap. 11.4.3 *//*### Offset : 0x0000 0004 */ SWTC = 0xFFFF /* SW watchdog timer count = 0xFFFF */ BMT = 0x06 /* BUS monitoring timing */ BME = 1 /* BUS monitor enable */ SWF = 1 SWE = 0 /* SW watchdog disable */ SWRI = 0 SWP = 1 => 0xFFFF 0689---------------------------------------------------------------------/*### TESR *//*### Transfer Error Status Register *//*### Chap. 11.4.4 *//*### Offset : 0x0000 0020 */ IEXT = 0 ITMT = 0 IPB = 0000 DEXT = 0 DTMT = 0 DPB = 0000 => 0x0000 0000---------------------------------------------------------------------/*### SIPEND *//*### SIU Interrupt Pending Register *//*### Chap. 11.5.4.1 *//*### Offset : 0x0000 0010 */ IRQ0~IRQ7 = 0 LVL0~LVL7 = 0 => 0x0000 0000---------------------------------------------------------------------/*### SIMASK *//*### SIU Interrupt Mask Register *//*### Chap. 11.5.4.2 *//*### Offset : 0x0000 0014 */ IRM0~IRM7 = 0 /* Mask all interrupts */ LVL0~LVL7 = 0 => 0x0000 0000---------------------------------------------------------------------/*### SIEL *//*### SIU Interrupt Edge/Level Register *//*### Chap. 11.5.4.3 *//*### Offset : 0x0000 0018 */ ED0~ED7 = 0 /* Low level triggered */ WMn0~WMn7 = 0 /* Not allowed to exit from low-power mode */ => 0x0000 0000---------------------------------------------------------------------/*### SIVEC *//*### SIU Interrupt Vector Register *//*### Chap. 11.5.4.4 *//*### Offset : 0x0000 001C */ INTC = 3C /* The lowest interrupt is pending..(?) */ => 0x3C00 0000---------------------------------------------------------------------/*### SWSR *//*### Software Service Register *//*### Chap. 11.7.1 *//*### Offset : 0x0000 001E */ SEQ = 0 => 0x0000---------------------------------------------------------------------/*### SDCR *//*### SDMA Configuration Register *//*### Chap. 20.2.1 *//*### Offset : 0x0000 0032 */ FRZ = 0 RAID = 01 /* Priority level 5 (BR5) (normal operation) */ => 0x0000 0001/*------------------------------------------------------------------- *//*------------------------------------------------------------------- *//* UPMA (User Programmable Machine A) *//* *//*------------------------------------------------------------------- *//*------------------------------------------------------------------- *//*### Chap. 16.6.4.1 *//*### Offset = 0x0000 017c */ T0 = CFFF CC24 /* Single Read */ T1 = 0FFF CC04 T2 = 0CAF CC04 T3 = 03AF CC08 T4 = 3FBF CC27 /* last */ T5 = FFFF CC25 T6 = FFFF CC25 T7 = FFFF CC25 T8 = CFFF CC24 /* Burst Read */ T9 = 0FFF CC04 T10 = 0CAF CC84 T11 = 03AF CC88 T12 = 3FBF CC27 /* last */ T13 = FFFF CC25 T14 = FFFF CC25 T15 = FFFF CC25 T16 = FFFF CC25 T17 = FFFF CC25 T18 = FFFF CC25 T19 = FFFF CC25 T20 = FFFF CC25 T21 = FFFF CC25 T22 = FFFF CC25 T23 = FFFF CC25 T24 = CFFF CC24 /* Single Write */ T25 = 0FFF CC04 T26 = 0CFF CC04 T27 = 03FF CC00 T28 = 3FFF CC27 /* last */ T29 = FFFF CC25 T30 = FFFF CC25 T31 = FFFF CC25 T32 = CFFF CC24 /* Burst Write */ T33 = 0FFF CC04 T34 = 0CFF CC80 T35 = 03FF CC8C T36 = 0CFF CC00 T37 = 33FF CC27 /* last */ T38 = FFFF CC25 T39 = FFFF CC25 T40 = FFFF CC25 T41 = FFFF CC25 T42 = FFFF CC25 T43 = FFFF CC25 T44 = FFFF CC25 T45 = FFFF CC25 T46 = FFFF CC25 T47 = FFFF CC25 T48 = C0FF CC24 /* Refresh */ T49 = 03FF CC24 T50 = 0FFF CC24 T51 = 0FFF CC24 T52 = 3FFF CC27 /* last */ T53 = FFFF CC25 T54 = FFFF CC25 T55 = FFFF CC25 T56 = FFFF CC25 T57 = FFFF CC25 T58 = FFFF CC25 T59 = FFFF CC25 T60 = FFFF CC25 /* Exception */ T61 = FFFF CC25 T62 = FFFF CC25 T63 = FFFF CC25/*------------------------------------------------------------------- *//*------------------------------------------------------------------- *//* UPMB *//* *//*------------------------------------------------------------------- *//*------------------------------------------------------------------- */---------------------------------------------------------------------/*### Chap. 16.6.4.1 *//*------------------------------------------------------------------- *//*------------------------------------------------------------------- *//* MEMC *//* *//*------------------------------------------------------------------- *//*------------------------------------------------------------------- */---------------------------------------------------------------------/*### BR0 & OR0 *//*### Base Registers & Option Registers *//*### Chap. 16.4.1 & 16.4.2 *//*### Offset : BR0(0x0000 0100) & OR0(0x0000 0104) *//*### Flash memory */ BA = 1111 1110 0000 0000 0 /* Base addr = 0xFE00 0000 */ AT = 000 PS = 00 PARE = 0 WP = 0 MS = 0 /* GPCM */ V = 1 /* Valid */ => 0xFE00 0001 AM = 1111 1110 0000 0000 0 /* 32MBytes */ ATM = 000 CSNT/SAM = 0 ACS/G5LA,G5LS = 00 BIH = 1 /* Burst inhibited */ SCY = 0100 /* cycle length = 4 */ SETA = 0 TRLX = 0 EHTR = 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -