- Timestamp:
- Jul 24, 2014, 4:38:36 PM (10 years ago)
- Location:
- trunk/softs/tsar_boot
- Files:
-
- 1 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/Makefile
r758 r759 1 # let the user have a default configuration (ie for PLATFORM_DIR)1 # let the user have a default configuration (ie for HARD_CONFIG_PATH) 2 2 -include ./build.mk 3 3 … … 8 8 9 9 ifneq ($(MAKECMDGOALS),$(filter $(MAKECMDGOALS),clean distclean clean-doc doc)) 10 ifndef PLATFORM_DIR11 $(error please define PLATFORM_DIR 'make PLATFORM_DIR=foo')10 ifndef HARD_CONFIG_PATH 11 $(error please define HARD_CONFIG_PATH 'make HARD_CONFIG_PATH=foo') 12 12 else 13 $(info Make for $( PLATFORM_DIR))13 $(info Make for $(HARD_CONFIG_PATH)) 14 14 endif 15 15 endif … … 26 26 AR := mipsel-unknown-elf-ar 27 27 RM := rm -rf 28 SED := sed 28 29 ECHO := @echo 29 30 MKDIR := mkdir … … 38 39 # ============================================================================= 39 40 40 INCLUDE += -I. -Iinclude -Idrivers -I$( PLATFORM_DIR)41 INCLUDE += -I. -Iinclude -Idrivers -I$(HARD_CONFIG_PATH) 41 42 42 43 # ============================================================================= … … 108 109 ./version.sh > $@ 109 110 110 $(TARGET): $(BUILD_DIR) $(OBJS) $(PLATFORM_DIR)/ldscript $(BUILD_DIR)/platform.ld $(BUILD_DIR)/$(DRV_LIB) 111 $(BUILD_DIR)/preloader.ld: preloader.ld.in 112 $(ECHO) "[ CC ] $(notdir $<)" 113 $(CC) -x c $(INCLUDE) -E $< | $(SED) -e '/#/d' -e '/^[\s\t]*$$/d' > $@ 114 115 $(TARGET): $(BUILD_DIR) $(OBJS) $(BUILD_DIR)/preloader.ld $(BUILD_DIR)/platform.ld $(BUILD_DIR)/$(DRV_LIB) 111 116 $(ECHO) "[ LD ] $@" 112 $(LD) -o $@ -T $( PLATFORM_DIR)/ldscript$(OBJS) -L$(BUILD_DIR) -ldrivers117 $(LD) -o $@ -T $(BUILD_DIR)/preloader.ld $(OBJS) -L$(BUILD_DIR) -ldrivers 113 118 $(DU) -D $@ > $@.txt 114 119 … … 123 128 endif 124 129 125 $(BUILD_DIR)/platform.dtb: $( PLATFORM_DIR)/$(DTS)130 $(BUILD_DIR)/platform.dtb: $(HARD_CONFIG_PATH)/$(DTS) 126 131 $(ECHO) "[ DTC ] $(notdir $<)" 127 132 ${DTC} -O dtb -o $@ $< &> /dev/null -
trunk/softs/tsar_boot/README
r758 r759 12 12 driver/ Drivers source files and headers 13 13 14 conf/ Platform specific files and ldscript14 conf/ Platform specific files 15 15 For each platform, we must define a new directory. 16 16 Mandatory files: … … 18 18 - hard_config.h (can be generated using giet-vm genmap tool) 19 19 20 - ldscript 20 This file contains all physical segments addresses and sizes of the 21 hardware platform. It also contains other configuration definitions 22 as the disk controller type, mesh size, etc. Examples can be found 23 in the conf/ directory. 21 24 22 25 Optional files: … … 27 30 Mandatory arguments: 28 31 29 - PLATFORM_DIR=<platform_dir>32 - HARD_CONFIG_PATH=<platform_dir> 30 33 31 Defines the directory where to find the plateform specific 32 files 34 Defines the directory where to find the hard_config.h file 33 35 34 36 Optional arguments: … … 48 50 Platform device tree (by default is platform.dts) 49 51 52 Important characteristics of this preloader: 53 54 - Processor 0 performs loading of Operating System Boot Loader which must 55 be an ELF file located at the third block of the disk. 56 57 - Other processors wait to be waken up through an interruption generated 58 from a XICU mailbox. Each processor other than 0 has its own mailbox 59 in the local XICU. 60 61 - Stack allocation is only made for processor 0. The loaded Operating System 62 boot loader or kernel must perform stack allocation for other processors. 63 64 - Stack for processor 0 is allocated at the end of RAM segment in the 65 cluster (0,0). 66 50 67 Examples: 51 68 52 make PLATFORM_DIR=<platform_dir> USE_DT=069 make HARD_CONFIG_PATH=<platform_dir> USE_DT=0 53 70 54 71 Compile for <platform_dir> and do not compile device tree file 55 72 56 make PLATFORM_DIR=<platform_dir> DTS=platform_fpga.dts SYSTEM_CLK=2500073 make HARD_CONFIG_PATH=<platform_dir> DTS=platform_fpga.dts SYSTEM_CLK=25000 57 74 58 75 Compile for <platform_dir> and compile the 'platform_dpga.dts' 59 76 device tree file. System clock frequency is 25 MHz 60 77 61 make PLATFORM_DIR=<platform_conf> SYSTEM_CLK=2500078 make HARD_CONFIG_PATH=<platform_conf> SYSTEM_CLK=25000 62 79 63 80 Compile for <platform_dir> and compile the 'platform.dts'
Note: See TracChangeset
for help on using the changeset viewer.