summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f45449)
raw | patch | inline | side by side (parent: 8f45449)
author | Sandeep Paulraj <s-paulraj@ti.com> | |
Fri, 19 Aug 2011 00:08:51 +0000 (20:08 -0400) | ||
committer | Sandeep Paulraj <s-paulraj@ti.com> | |
Fri, 19 Aug 2011 00:08:51 +0000 (20:08 -0400) |
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
src/util/iblConfig/build/Makefile | patch | blob | history | |
src/util/iblConfig/src/device.c | patch | blob | history | |
src/util/iblConfig/src/iblConfig.c | patch | blob | history |
index fdf50da3a3e4780a878a861dd6963653797dd6af..db924729df8460ddfa07a22a3df62d4dec7798ef 100644 (file)
#RT_LIB = $(C_DIR)/lib/libc.a
C_OPTS += -O2 -DEVM=$(EVM) -DI2C_MAP_ADDR=$(I2C_MAP_ADDR)
+ifeq ($(EVM),c6455)
+ DEVICE_ID = 1
+endif
+ifeq ($(EVM),c6474)
+ DEVICE_ID = 2
+endif
+ifeq ($(EVM),c6474l)
+ DEVICE_ID = 3
+endif
+ifeq ($(EVM),c6457)
+ DEVICE_ID = 4
+endif
+ifeq ($(EVM),c6472)
+ DEVICE_ID = 5
+endif
+ifeq ($(EVM),c6678l)
+ DEVICE_ID = 6
+endif
+ifeq ($(EVM),c6670l)
+ DEVICE_ID = 7
+endif
+
#LNK_OPTS += -i$(C_DIR)/lib -c $(RT_LIB)
LNK_OPTS +=
# Normal make process
###############################################################################
-$(IBLCFG_EXE): $(OBJS)
+$(IBLCFG_EXE): $(OBJS) gen_input
$(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@
cp $@ $@.dbg
mkdir -p $(OBJ_DIR)
touch $(OBJ_DIR)/.created
+gen_input:
+ touch input.txt
+ echo "file_name = ibl.bin" > input.txt
+ echo "device = $(DEVICE_ID)" >> input.txt
+ echo "offset = $(I2C_MAP_ADDR)" >> input.txt
###############################################################################
# Cleanup
-rm -rf *.dbg
-rm -rf *.out
-rm -rf *.bin
+ -rm -rf *.txt
index 959bef8fde28bd71c9c4f4afd2ee15d7e256768a..07b748b4488f2783c1aaa2cd6a768ff0ecd1128a 100644 (file)
ibl.bootModes[2].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
- SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr, 192,168,2,100);
- SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp, 192,168,2,101);
- SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
+ SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr, 158,218,100,112);
+ SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp, 158,218,100,25);
+ SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask, 255,255,255,0);
/* Use the e-fuse value */
ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0] = 'a';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1] = 'p';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2] = 'p';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3] = '.';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4] = 'o';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5] = 'u';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6] = 't';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0] = 'c';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1] = '6';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2] = '6';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3] = '7';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4] = '8';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5] = '-';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6] = 'l';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7] = 'e';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8] = '.';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9] = 'b';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = 'i';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = 'n';
ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
ibl.bootModes[2].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
- SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr, 192,168,2,100);
- SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp, 192,168,2,101);
- SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
+ SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr, 158,218,100,116);
+ SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp, 158,218,100,25);
+ SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask, 255,255,255,0);
/* Use the e-fuse value */
ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0] = 'a';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1] = 'p';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2] = 'p';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3] = '.';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4] = 'o';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5] = 'u';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6] = 't';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
- ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0] = 'c';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1] = '6';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2] = '6';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3] = '7';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4] = '0';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5] = '-';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6] = 'l';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7] = 'e';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8] = '.';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9] = 'b';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = 'i';
+ ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = 'n';
ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
index 64f4b3a1986bc1b3da477099de256a41a4ff069f..94700eaada7496f9d6fad1fc9f983855b65d930a 100644 (file)
#define TRUE 1
#define FALSE 0
#define MAX_LINE_LENGTH 40
-char *input_file = "input.txt";
+char *input_file = "./input.txt";
/* Parameters defined in the input_file */
#define FILE_NAME "file_name"
char file_name[MAX_LINE_LENGTH];
uint32_t device_id;
-uint32_t offset = I2C_MAP_ADDR;
+uint32_t offset;
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
typedef ibl_t (*ibl_config_fn)(void);
fp = fopen(input_file, "r");
if (fp == NULL)
{
- printf("Error in opening %s input file\n", input_file);
- return;
+ printf("Error in opening %s input file\n", input_file);
+ return;
}
ret = parse_input_file(fp);