-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Latest-Add meta-mathworks layer as a submodule and a patch to modify …
…the layer on top of it
- Loading branch information
1 parent
fdee125
commit 52548d3
Showing
177 changed files
with
343 additions
and
6,615 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,310 @@ | ||
diff --git a/conf/layer.conf b/conf/layer.conf | ||
index dc8f0d6..87fc4bb 100644 | ||
--- a/conf/layer.conf | ||
+++ b/conf/layer.conf | ||
@@ -7,7 +7,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
|
||
BBFILE_COLLECTIONS += "meta-mathworks" | ||
BBFILE_PATTERN_meta-mathworks = "^${LAYERDIR}/" | ||
-BBFILE_PRIORITY_meta-mathworks = "6" | ||
+BBFILE_PRIORITY_meta-mathworks = "7" | ||
|
||
LAYERDEPENDS_meta-mathworks = "core" | ||
LAYERDEPENDS_meta-mathworks += "xilinx" | ||
diff --git a/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdinit b/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdinit | ||
index a3d5651..169c89c 100644 | ||
--- a/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdinit | ||
+++ b/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdinit | ||
@@ -11,6 +11,8 @@ fi | ||
|
||
case "$1" in | ||
start) | ||
+ /usr/bin/rftool & | ||
+ /usr/bin/mw-rf-init & | ||
if [ -f ${_SD_ROOT}/init.sh ]; then | ||
echo "+++ Running sd card init.sh" | ||
${_SD_ROOT}/init.sh | ||
diff --git a/recipes-apps/mw-rf-init/files/Makefile b/recipes-apps/mw-rf-init/files/Makefile | ||
deleted file mode 100644 | ||
index 9f9c49f..0000000 | ||
--- a/recipes-apps/mw-rf-init/files/Makefile | ||
+++ /dev/null | ||
@@ -1,14 +0,0 @@ | ||
-APP = mw-rf-init | ||
- | ||
-# Add any other object files to this list below | ||
-SRCS=$(wildcard *.c) | ||
-APP_OBJS = $(SRCS:.c=.o) | ||
- | ||
-all: $(APP) | ||
- | ||
-$(APP): $(APP_OBJS) | ||
- $(CC) $(LDFLAGS) -o $@ $(APP_OBJS) $(LDLIBS) | ||
- | ||
-clean: | ||
- -rm -f $(APP) *.elf *.gdb *.o | ||
- | ||
diff --git a/recipes-apps/mw-rf-init/files/rf_init.c b/recipes-apps/mw-rf-init/files/rf_init.c | ||
deleted file mode 100644 | ||
index f1c2fb5..0000000 | ||
--- a/recipes-apps/mw-rf-init/files/rf_init.c | ||
+++ /dev/null | ||
@@ -1,206 +0,0 @@ | ||
-/* | ||
- * mw-rf-init application | ||
- * | ||
- * Initialize RFTOOL with parameters read from cfg file at boot-time | ||
- * | ||
- */ | ||
- | ||
-#include <stdio.h> | ||
-#include <string.h> | ||
-#include <stdlib.h> | ||
-#include <time.h> | ||
-#include <sys/socket.h> | ||
-#include <arpa/inet.h> | ||
- | ||
-#define TXT_LINE_SIZE 4096 | ||
-#define RPLY_LINE_SIZE 4096 | ||
- | ||
- | ||
-typedef struct { | ||
- int socket_desc_ctrl; | ||
- int socket_desc_data; | ||
- struct sockaddr_in rftool_ctrl; | ||
- struct sockaddr_in rftool_data; | ||
-} socketStruct ; | ||
- | ||
-char logbuf[RPLY_LINE_SIZE] = {0}; | ||
- | ||
-int setupComms(socketStruct *socketInput, FILE* fhlog); | ||
-void writeToLog(char * inputMsg,FILE* fh); | ||
- | ||
- | ||
-int main(int argc, char **argv) | ||
-{ | ||
- int status = 0; | ||
- socketStruct rftool_socket; | ||
- char rftool_reply[RPLY_LINE_SIZE]; | ||
- FILE* fh = NULL; | ||
- FILE* fhlog = NULL; | ||
- char textbuf[TXT_LINE_SIZE] = {0}; | ||
- char blank_line[] = "\n"; | ||
- char pause_line[] = "PAUSE\n"; | ||
- char CONFIG_FILE_LOC[64] = "/mnt/hdlcoder_rd/RF_Init.cfg"; | ||
- char RF_INIT_LOG_LOC[] = "/mnt/rf_init.log"; | ||
- | ||
- if (argc == 1) { | ||
- fprintf(stdout,"Usage:\n\trf-init <RFDC initialization file-name>\n"); | ||
- fprintf(stdout,"\nNo RFDC configuration file provide, default configuration file %s will be used.\n",CONFIG_FILE_LOC); | ||
- } | ||
- if (argc == 2) { | ||
- sprintf(CONFIG_FILE_LOC,"%s",argv[1]); | ||
- printf("Configuration files name provided:%s\n",CONFIG_FILE_LOC); | ||
- } | ||
- printf("Opening file %s\n", CONFIG_FILE_LOC); | ||
- fh = fopen(CONFIG_FILE_LOC,"r"); | ||
- fhlog = fopen(RF_INIT_LOG_LOC,"w"); | ||
- if (fh == NULL) | ||
- { | ||
- sprintf(logbuf,"rf_init: Could not locate %s ! Exiting...\n",CONFIG_FILE_LOC); | ||
- writeToLog(logbuf,fhlog); | ||
- goto TERM_ERR; | ||
- } | ||
- | ||
- if (setupComms(&rftool_socket,fhlog) < 0) | ||
- { | ||
- sprintf(logbuf,"rf_init: Could not connect to RFTOOL. Exiting...\n"); | ||
- perror(logbuf); | ||
- writeToLog(logbuf,fhlog); | ||
- | ||
- fclose(fh); | ||
- goto TERM_ERR; | ||
- } | ||
- | ||
- while (!feof(fh)) { | ||
- if (fgets(textbuf, sizeof(textbuf), fh) != NULL ) { | ||
- int compare2 = strncmp(textbuf,blank_line, 2); | ||
- int compare3 = strcmp(textbuf,pause_line); | ||
- if (compare2 == 0) { | ||
- printf("-----SKIP BLANK LINE-----..\n"); | ||
- } else if (compare3 == 0) { | ||
- printf("rf_init: PAUSING \n"); | ||
- usleep(1e6); | ||
- } else { | ||
- sprintf(logbuf,"rf_init: SENDING: %s",textbuf); | ||
- printf("%s",logbuf); | ||
- if ( send(rftool_socket.socket_desc_ctrl, | ||
- textbuf, | ||
- strlen(textbuf), | ||
- MSG_CONFIRM) < 0 ) { | ||
- perror("rf_init: Failed to send command to RFTOOL"); | ||
- } | ||
- fwrite(textbuf,strlen(textbuf),1,fhlog); | ||
- //look for acknowledgement | ||
- status = recv(rftool_socket.socket_desc_ctrl,rftool_reply,RPLY_LINE_SIZE,0); | ||
- if (status < 0) { | ||
- perror("rf_init: Failed to get ack packet from RFTOOL"); | ||
- fclose(fh); | ||
- goto TERM_ERR; | ||
- } else { | ||
- sprintf(logbuf,"rf_init: RECEIVED: %.*s \n",status,rftool_reply); | ||
- writeToLog(logbuf,fhlog); | ||
- } | ||
- } | ||
- } | ||
- | ||
- } | ||
- printf("rf_init: Flushing TCP/IP read buffer...\n"); | ||
- status = 1; | ||
- | ||
- while(status>0) | ||
- { //empty buffer until we get 0 bytes back (timed out..) | ||
- status = recv(rftool_socket.socket_desc_ctrl,rftool_reply,2048,0); | ||
- if (status > 0) { | ||
- sprintf(logbuf,"rf_init: RECEIVED: %.*s \n",status,rftool_reply); | ||
- writeToLog(logbuf,fhlog); | ||
- } | ||
- } | ||
- writeToLog("rf_init: finished writing to rftool \n",fhlog); | ||
- | ||
-TERM_ERR: | ||
- fflush(fhlog); | ||
- fclose(fhlog); | ||
- return(-1); | ||
- | ||
-fclose(fh); | ||
-fflush(fhlog); | ||
-fclose(fhlog); | ||
-return(0); | ||
-} | ||
- | ||
-int setupComms(socketStruct *socketInput, FILE * fhlog) | ||
-{ | ||
- struct timeval tv; | ||
- tv.tv_sec = 12; | ||
- tv.tv_usec = 0; | ||
- int MaxRetry = 20; | ||
- int err = 0; | ||
- | ||
- //Create socket | ||
- socketInput->socket_desc_ctrl = socket(AF_INET , SOCK_STREAM , 0); | ||
- socketInput->socket_desc_data = socket(AF_INET , SOCK_STREAM , 0); | ||
- if (socketInput->socket_desc_ctrl == -1) | ||
- { | ||
- sprintf(logbuf,"rf_init: Could not create socket"); | ||
- writeToLog(logbuf,fhlog); | ||
- } | ||
- | ||
- socketInput->rftool_ctrl.sin_addr.s_addr = inet_addr("127.0.0.1"); | ||
- socketInput->rftool_ctrl.sin_family = AF_INET; | ||
- socketInput->rftool_ctrl.sin_port = htons( 8081 ); | ||
- | ||
- socketInput->rftool_data.sin_addr.s_addr = inet_addr("127.0.0.1"); | ||
- socketInput->rftool_data.sin_family = AF_INET; | ||
- socketInput->rftool_data.sin_port = htons( 8082 ); | ||
- | ||
- //Connect to control plane | ||
- err = -1; | ||
- int connCount = 0; | ||
- while(err<0 && connCount<MaxRetry) | ||
- { | ||
- err = connect(socketInput->socket_desc_ctrl , | ||
- (struct sockaddr *)&socketInput->rftool_ctrl , | ||
- sizeof(socketInput->rftool_ctrl)); | ||
- sleep(1); | ||
- connCount++; | ||
- | ||
- if (err<0) | ||
- { | ||
- sprintf(logbuf,"rf_init: Could not connect to RFTOOL...Iteration:%d \n",connCount); | ||
- writeToLog(logbuf,fhlog); | ||
- } | ||
- | ||
- } | ||
- | ||
- if (err<0 && connCount>=MaxRetry) | ||
- { | ||
- sprintf(logbuf,"rf_init: Failed to establish connection after %d retries \n",connCount); | ||
- writeToLog(logbuf,fhlog); | ||
- return(-1); | ||
- } | ||
- | ||
- if (connect(socketInput->socket_desc_data , (struct sockaddr *)&socketInput->rftool_data , sizeof(socketInput->rftool_data)) < 0) | ||
- { | ||
- sprintf(logbuf,"rf_init: Data plane connection error"); | ||
- writeToLog(logbuf,fhlog); | ||
- return(-1); | ||
- } | ||
- else | ||
- { | ||
- sprintf(logbuf,"rf_init: Connected to data plane \n"); | ||
- writeToLog(logbuf,fhlog); | ||
- } | ||
- | ||
- // Apply timeout | ||
- setsockopt(socketInput->socket_desc_ctrl, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof tv); | ||
- setsockopt(socketInput->socket_desc_data, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof tv); | ||
- | ||
- return(err); | ||
- | ||
-} | ||
- | ||
- | ||
-void writeToLog(char * inputMsg,FILE* fh) | ||
-{ | ||
- printf("%s",inputMsg); | ||
- fwrite(inputMsg,strlen(inputMsg),1,fh); | ||
-} | ||
diff --git a/recipes-apps/mw-rf-init/mw-rf-init.bb b/recipes-apps/mw-rf-init/mw-rf-init.bb | ||
deleted file mode 100644 | ||
index b307188..0000000 | ||
--- a/recipes-apps/mw-rf-init/mw-rf-init.bb | ||
+++ /dev/null | ||
@@ -1,18 +0,0 @@ | ||
-# | ||
-# mw-rf-init recipe. | ||
-# | ||
-DESCRIPTION = "RF init for interacting with RFTOOL at boot up" | ||
-LICENSE = "MIT" | ||
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
- | ||
-SRC_URI = "file://rf_init.c \ | ||
- file://Makefile \ | ||
- " | ||
-S = "${WORKDIR}" | ||
-TARGET_CC_ARCH += "${LDFLAGS}" | ||
- | ||
-do_install() { | ||
- install -d ${D}/${bindir} | ||
- install -m 0755 ${S}/mw-rf-init ${D}/${bindir} | ||
-} | ||
- | ||
diff --git a/recipes-bsp/u-boot/files/bsp.cfg b/recipes-bsp/u-boot/files/bsp.cfg | ||
index 62b8d88..569c128 100644 | ||
--- a/recipes-bsp/u-boot/files/bsp.cfg | ||
+++ b/recipes-bsp/u-boot/files/bsp.cfg | ||
@@ -3,8 +3,8 @@ CONFIG_ENV_IS_IN_NOWHERE | ||
CONFIG_ENV_FAT_INTERFACE="mmc" | ||
CONFIG_ENV_FAT_DEVICE_AND_PART="0:auto" | ||
CONFIG_ENV_FAT_FILE="uboot.env" | ||
-CONFIG_ENV_SIZE=0x8000 | ||
-CONFIG_ENV_SECT_SIZE=0x8000 | ||
+CONFIG_ENV_SIZE=0x40000 | ||
+CONFIG_ENV_SECT_SIZE=0x40000 | ||
|
||
CONFIG_ENV_OVERWRITE=y | ||
# CONFIG_ENV_IS_IN_NAND is not set | ||
diff --git a/recipes-bsp/u-boot/files/etc/fw_env.config b/recipes-bsp/u-boot/files/etc/fw_env.config | ||
index ba7db4a..871cd43 100644 | ||
--- a/recipes-bsp/u-boot/files/etc/fw_env.config | ||
+++ b/recipes-bsp/u-boot/files/etc/fw_env.config | ||
@@ -7,6 +7,6 @@ | ||
|
||
# File Example | ||
# Filename Offset Size Sector Size (= Size) | ||
-/mnt/uboot.env 0x0000 0x8000 0x8000 | ||
-/mnt/uboot-redund.env 0x0000 0x8000 0x8000 | ||
+/mnt/uboot.env 0x0000 0x40000 0x40000 | ||
+/mnt/uboot-redund.env 0x0000 0x40000 0x40000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
|
||
the_ROM_image: | ||
{ | ||
[bootloader, destination_cpu=a53-0] ./images/linux/zynqmp_fsbl.elf | ||
[pmufw_image] ./images/linux/pmufw.elf | ||
[pmufw_image] ./images/linux/pmufw.elf | ||
[destination_cpu=a53-0, exception_level=el-3, trustzone] ./images/linux/bl31.elf | ||
[destination_cpu=a53-0, load=0x00100000] ./images/linux//system.dtb | ||
[destination_cpu=a53-0, exception_level=el-2] ./images/linux/u-boot.elf | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.