diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..597d29b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,11 @@ +[submodule "mw-zcu216/project-spec/meta-mathworks"] + path = mw-zcu216/project-spec/meta-mathworks + url = https://github.com/mathworks/meta-mathworks +[submodule "project-spec/meta-mathworks"] + path = project-spec/meta-mathworks + url = https://github.com/mathworks/meta-mathworks + branch = petalinux-v2022.1 +[submodule "mw_zcu216/project-spec/meta-mathworks"] + path = mw_zcu216/project-spec/meta-mathworks + url = https://github.com/mathworks/meta-mathworks + branch = petalinux-v2022.1 diff --git a/mw-zcu216/project-spec/meta-mathworks b/mw-zcu216/project-spec/meta-mathworks new file mode 160000 index 0000000..dd14067 --- /dev/null +++ b/mw-zcu216/project-spec/meta-mathworks @@ -0,0 +1 @@ +Subproject commit dd140672aaa704f3554c58acd1b96148729911da diff --git a/mw_zcu111/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c b/mw_zcu111/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c index 2afc310..a090d9c 100755 --- a/mw_zcu111/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c +++ b/mw_zcu111/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c @@ -169,58 +169,63 @@ void acceptConnection(void) * helper function to get "\n" terminates string from * TCP socket */ -int getdataString(char *buf,int len) +int getdataString(char *buf, int len) { - int valread = 0; + int valread; char val; - unsigned int rbytes = 0; - struct timeval tv; - fd_set fdread; + int rbytes = 0; + struct timeval tv; + fd_set fdread; int selectStatus = 0; tv.tv_sec = 1; tv.tv_usec = 0; FD_ZERO(&fdread); - FD_SET( new_data_socket, &fdread ); + FD_SET(new_data_socket, &fdread); do { - selectStatus = select(new_data_socket + 1, &fdread, NULL, NULL, &tv); - if(selectStatus == 0) - return valread; - - if(FD_ISSET(new_data_socket, &fdread)) { - - valread += read( new_data_socket, &val, 1); - buf[rbytes++] = val; - if(valread == 0){ + selectStatus = + select(new_data_socket + 1, &fdread, NULL, NULL, &tv); + if (selectStatus == 0) + return rbytes; + + if (FD_ISSET(new_data_socket, &fdread)) { + valread = read(new_data_socket, &val, 1); + if (valread <= 0) { + if (valread < 0) + perror("info -> getdataString char read < 0"); break; } + else + buf[rbytes++] = val; } - } while((val != '\n') && (valread < len) && (rbytes < len)); + } while ((val != '\n') && (rbytes < len)); - return valread; + return rbytes; } - /* * helper function to get "\n" terminates string from * TCP socket */ -int getString(char *buf,int len) +int getString(char *buf, int len) { - int valread = 0; + int valread; char val; - unsigned int rbytes = 0; + int rbytes = 0; do { - valread += read(new_socket , &val, 1); - buf[rbytes++] = val; - if (valread == 0){ + valread = read(new_socket, &val, 1); + if (valread <= 0) { + if (valread < 0) + perror("info -> getString char read < 0"); break; } - } while((val != '\n') && (valread < len)); + else + buf[rbytes++] = val; + } while ((val != '\n') && (rbytes < len)); - return valread; + return rbytes; } /* diff --git a/mw_zcu216/README b/mw_zcu216/README index 7a92a76..2583d11 100644 --- a/mw_zcu216/README +++ b/mw_zcu216/README @@ -1,403 +1,25 @@ -################################################################################# -# I. Main Contents of Prebuilt # -# II. BSP generation steps # -# II.a Create and Configure a project # -# II.b Get openamp,qemu and xen device tree # -# II.c Enable openamp and its examples in rootfs # -# II.d Configuring BSP # -# II.e Project Build # -# II.f Clean up of configurations # -# II.g Packageing a BSP # -# III. Software Images # -# IV. Hardware Images # -# V. Software Projects # -################################################################################# - -I. Main Contents of Prebuilt -================================================================================ -|-- pre-built/ # Pre-built images directory -| |-- linux/ # Pre-built Linux system images -| | |-- images/ -| | | |-- zynqmp_fsbl.elf # First stage bootloader ELF -| | | |-- pmufw.elf # pmu firmware ELF -| | | |-- system.dtb # Device-tree Blob(DTB) used for Linux kernel -| | | |-- image.ub # FIT image including the kernel, DTB and rootfs -| | | |-- Image # FIT image including the kernel -| | | |-- u-boot.elf # U-boot ELF -| | | |-- u-boot.bin # U-boot bin -| | | |-- petalinux-sdimage.wic # wic image for SD card with BOOT and ROOT partitions with required files -| | | |-- BOOT.BIN # ZynqMP boot BIN file -| | | |-- boot.scr # boot.scr to provide the required default boot -| | | |-- pxelinux.cfg # pxelinux.cfg directory with default configuration file for pxe boot -| | | |-- bl31.elf # Arm trusted firmware ELF file -| | | |-- bl31.bin # Arm trusted firmware BIN file -| | | |-- rootfs.cpio.gz # Rootfs CPIO image used for FIT image(image.ub) -| | | |-- rootfs.cpio.gz.u-boot # Rootfs CPIO image with u-boot header for loading from u-boot -| | | |-- rootfs.tar.gz # Rootfs tar file which can be used for SD ext4 partition -| | | |-- rootfs.jffs2 # Rootfs jffs2 file which can be used for mounting rootfs on jffs2 file system -| | | |-- rootfs.manifest # Rootfs manifest file will have list of packages and version details -| | | |-- pmu_rom_qemu_sha3.elf # Pre-built pmu-rom ELF need for qemu boot(mandatory for both template and bsp projects -| | | | # Note: pmu_rom_qemu_sha3.elf is never generated from petalinux build, -| | | | # this needs to be copied from BSP project -| | | |-- system.bit # FPGA bitstream used in BSP HW design(same as below download.bit) -| | | |-- vmlinux # Statically linked kernel executable file used for kernel debugging -| | | |-- openamp.dtb # Openamp device-tree blob file -| | | |-- zynqmp-qemu-arm.dtb # qemu device-tree blob file for single arch -| | | |-- zynqmp-qemu-multiarch-arm.dtb # qemu device-tree blob file for multi arch and it has information of a53 and other devices -| | | |-- zynqmp-qemu-multiarch-pmu.dtb # qemu device-tree blob file for multi arch and it has information of microblaze nodes -| | |-- xen -| | | |-- xen.dtb # Xen device-tree blob file -| | | |-- xen-Image # Xen kernel image -| | | |-- xen-openamp.dtb # Xen openamp device-tree blob file -| | | |-- xen-qemu.dtb # Xen qemu device-tree blob file -| | | |-- xen-rootfs.cpio.gz # Xen rootfs CPIO image -| | | |-- xen # Xen binary -| | | |-- xen.cfg # Xen config file for image builder -| | | |-- xen_boot_sd.scr # Xen boot file for booting from SD card -| | | |-- xen_boot_sd.source # Xen boot source file of SD card booting -| | | |-- xen_boot_tftp.scr # Xen boot file for booting through tftp -| | | |-- xen_boot_tftp.source # Xen boot source file of tftp booting -| | |-- implementation/ -| | | |-- download.bit # FPGA bitstream - -II. BSP generation steps -================================================================================ -This section explain about BSP generation steps. - -Note: While building bsps, we use some openAMP, Xen and QEMU files from internal repos - If you want to use openAMP, Xen or QEMU, Please copy the files from published bsp's - While copying files please maintain same directory structure. - - II.a Creation and configuration of project - - $ petalinux-create -t project --template zynqMP --force -n - $ petalinux-config --get-hw-description= --silentconfig - - II.b Get openamp,qemu and xen device trees - - $ cp -r /project-spec/meta-user/recipes-bsp/device-tree/files/{openamp.dtsi,xen.dtsi,zynqmp-qemu-arm.dts,multi-arch/} /project-spec/meta-user/recipes-bsp/device-tree/files - - $ echo '/include/ "openamp.dtsi"' >> /project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi - - $ echo 'SRC_URI += "file://openamp.dtsi"' >> project-spec/meta-user/recipes-bsp/device-tree/device-tree.bbappend - - II.c Enable openamp and its examples in rootfs - - $ petalinux-config -c rootfs - Select following packages and save it - openamp-fw-echo-testd - openamp-fw-mat-muld - openamp-fw-rpc-demo - packagegroup-petalinux-openamp - II.d Configuring BSP - - 1. zcu102 rev1.0 boards - 2. zcu104 and zcu106 boards - 3. ultra96 board. - 4. zcu111 board - 5. zcu1275 and zc1285 boards - 6. zcu216 and zcu208 boards - Choose any desired board and follow steps in it. - - 1.zcu102 rev1.0 board - $ petalinux-config - Enter zcu102-rev1.0 for MACHINE_NAME option ( ZCU102 DTG board parameter for rev1.0) - Enter zynqmp-generic for YOCTO_MACHINE_NAME option - $ petalinux-config -c rootfs - Select following packages and save it - libmali-xlnx - package-management - - 2. zcu104 boards - $ echo 'CONFIG_gstreamer-vcu-examples' >> /project-spec/meta-user/conf/user-rootfsconfig - $ petalinux-config --silentconfig - $ petalinux-config -c rootfs - Select following packages and save it - packagegroup-petalinux-gstreamer - packagegroup-petalinux-matchbox - packagegroup-petalinux-x11 - packagegroup-petalinux-v4lutils - packagegroup-petalinux-audio - libdrm - libdrm-kms - libdrm-tests - gstreamer-vcu-examples - libmali-xlnx - package-management - - $ petalinux-config - Enter zcu104-revc for MACHINE_NAME option for zcu104 board ( ZCU104 DTG board parameter) - Enter zynqmp-generic for YOCTO_MACHINE_NAME option for zcu104 board - - NOTE: zcu104/zcu106 - Due to limited flash size, reduce the rootfs size to flash image.ub to qspi. - - 2.1 zcu106 boards - $ echo 'CONFIG_gstreamer-vcu-examples' >> /project-spec/meta-user/conf/user-rootfsconfig - $ petalinux-config --silentconfig - $ petalinux-config -c rootfs - Select following packages and save it - packagegroup-petalinux-gstreamer \ - packagegroup-petalinux-matchbox \ - packagegroup-petalinux-x11 \ - libdrm \ - libdrm-kms \ - libdrm-tests \ - gstreamer-vcu-examples \ - packagegroup-petalinux-v4lutils \ - packagegroup-petalinux-audio \ - board-fpga-autoload \ - libmali-xlnx \ - # For zcu106 create xsa dir in proj-spec - mkdir project-spec/xsa_dir/ - cp hardware/xilinx-zcu106-2020.2/outputs/zcu106_1.xsa project-spec/xsa_dir/ - cp hardware/xilinx-zcu106-2020.2-Rev2/outputs/zcu106_2.xsa roject-spec/xsa_dir/zcu106_2.0.xsa - # if rev1 or rev2 board info found in EEPROM it loads bitstream and dtbo of the corresponding board goes to the root prompt. - # if it is not able to identify as rev1 or rev2. It prints a bold warning like below and It loads rev 1 bitstream and dtbo and goes to the root prompt. - Valid Board Information Not Found, Loading zcu106 rev1.0 bitstream and dtbo (see fpgautil -h for removing and loading different bitstream and dtbo). - - $ petalinux-config - check the below are enable - CONFIG_SUBSYSTEM_REMOVE_PL_DTB - CONFIG_SUBSYSTEM_FPGA_MANAGER - - $ petalinux-config --silentconfig - $ petalinux-config - Enter zcu106-reva for MACHINE_NAME option for zcu106 boards (ZCU106 DTG board parameter ) - Enter zynqmp-generic for YOCTO_MACHINE_NAME option for zcu106 board - - 3. ultra96 board - $ cat >> project-spec/meta-user/conf/user-rootfsconfig <> project-spec/meta-user/conf/user-rootfsconfig << EOF -CONFIG_peekpoke -CONFIG_gpio-demo -CONFIG_rfdc -CONFIG_rfdc-read-write -CONFIG_rfdc-selftest -CONFIG_libsdfecusrintf -CONFIG_sdfec-demo -EOF - $ petalinux-config -c rootfs - Select following packages and save it - rfdc - rfdc-read-write - rfdc-selftest - libsdfecusrintf - sdfec-demo - $ petalinux-config - Enter zcu111-reva for MACHINE_NAME option ( ZCU111 DTG board parameter) - Enter "zcu111-zynqmp" for YOCTO_MACHINE_NAME option. - - 5.zcu1275 and zc1285 boards - $ cat >> project-spec/meta-user/conf/user-rootfsconfig << EOF -CONFIG_peekpoke -CONFIG_gpio-demo -CONFIG_rfdc -CONFIG_rfdc-read-write -CONFIG_rfdc-selftest -EOF - $ petalinux-config -c rootfs - Select following packages and save it - rfdc - rfdc-read-write - rfdc-selftest - $ petalinux-config - Enter zc1275-revb for MACHINE_NAME option ( ZC1275 DTG board parameter) - Enter zc1285-reva for MACHINE_NAME option ( ZC1285 DTG board parameter) - Enter zc1275-zynqmp for YOCTO_MACHINE_NAME option for zc1275 board - Enter zc1285-zynqmp for YOCTO_MACHINE_NAME option for zc1285 board - - $ Optional configurations. - If prebuilt kernel image is more than 128M, jtag boot command "petalinux-boot --jtag/--qemu --prebuilt 3 would not work due to overlap between kernel image & linux-boot.elf (bl33 used in jtag mode). So, to overcome this issue, BL33 entry address (U-boot and linux-boot.elf start/load address) is changed to 0x10080000. This is done through: - $petalinux-config - Enter 0x10080000 to CONFIG_SUBSYSTEM_PRELOADED_BL33_BASE. - $petalinux-config -c u-boot - Enter 0x10080000 to CONFIG_SYS_TEXT_BASE. - - 6.zcu216 and zcu208 and zcu208-sdfec boards - $ cat >> project-spec/meta-user/conf/user-rootfsconfig << EOF -CONFIG_peekpoke -CONFIG_gpio-demo -CONFIG_rfdc -CONFIG_rfdc-read-write -CONFIG_rfdc-selftest -CONFIG_rfclk -EOF - $ petalinux-config -c rootfs - Select following packages and save it - rfdc - rfdc-read-write - rfdc-selftest - rfclk - sdfec (only for zcu208 sdfec board) - $ petalinux-config - Enter zcu216-reva for MACHINE_NAME option ( ZCU216 DTG board parameter) - Enter zcu208-reva for MACHINE_NAME option ( ZCU208 DTG board parameter) - Enter zcu208-zynqmp for YOCTO_MACHINE_NAME option for zcu208 board - Enter zcu216-zynqmp for YOCTO_MACHINE_NAME option for zcu216 board - - II.e. Project Build - - 1. Build regular images - $ petalinux-build - $ petalinux-package --boot --u-boot --force - $ mkdir -p pre-built/linux/images - $ cp /images/linux/* /pre-built/linux/images/ - $ petalinux-package --wic --extra-bootfiles "rootfs.cpio.gz.u-boot" --images-dir /pre-built/linux/images --outdir /pre-built/linux/images - - 2. Build xen images - $ echo '/include/ "xen.dtsi"' >> /project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi - $ echo 'SRC_URI += "file://xen.dtsi \"' >> project-spec/meta-user/recipes-bsp/device-tree/device-tree.bbappend - $ petalinux-config - Select following config and save it. - Image Packaging Configuration - Root filesystem type (INITRD) - $ petalinux-config -c rootfs - Select following package and save it - packagegroup-petalinux-xen - $ petalinux-build - $ cp -L /images/linux/Image /pre-built/linux/images/xen-Image - $ cp -L /images/linux/system.dtb /pre-built/linux/images/xen.dtb - $ cp -L /images/linux/xen /pre-built/linux/images/xen - $ cp -L /images/linux/rootfs.cpio.gz /pre-built/linux/images/xen-rootfs.cpio.gz - $ cat > /pre-built/linux/xen/xen.cfg << EOL -MEMORY_START="0x0" -MEMORY_END="0x80000000" -XEN="xen" -DOM0_KERNEL="xen-Image" -DEVICE_TREE="xen.dtb" -DOM0_RAMDISK="xen-rootfs.cpio.gz" -NUM_DOMUS="0" -UBOOT_SOURCE="xen_boot.source" -UBOOT_SCRIPT="xen_boot.scr" -EOL - $ export XEN_CONFIG="/pre-built/linux/xen/xen.cfg" - $ export XEN_CONFIG_SKIP="1" - $ export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE XEN_CONFIG XEN_CONFIG_SKIP" - $ petalinux-build -c kernel -x do_deploy - $ rsync -arz --progress --delete /images/linux/xen_boot_* /pre-built/linux/xen - - II.f. Clean up of configurations - - Bydefault few configurations are enabled to generate prebuilt images. These configurations are cleaned up while packaging a bsp. However you can keep them if you need them in project. - - $ petalinux-config -c rootfs - disable following packages and save it - openamp-fw-echo-testd - openamp-fw-mat-muld - openamp-fw-rpc-demo - packagegroup-petalinux-openamp - packagegroup-petalinux-xen - libmali-xlnx - - $ petalinux-config - Select following config and save it. - Image Packaging Configuration - Root filesystem type (INITRD) - - - II.g. Packageing a BSP - Package the BSP with files generated with following command - $ petalinux-package --bsp -p --hwsource --output - - NOTE: --hwsource is optional and can be removed - -III. Software Images -================================================================================ -You can run the following command to rebuild the software images: - * zynqmp_fsbl.elf - * image.ub - * Image - * u-boot.elf - * system.dtb - * pmufw.elf - * bl31.elf - - $ petalinux-build - -You can also rebuild some of the images alone as follows: - * zynqmp_fsbl.elf - $ petalinux-build -c bootloader - - * u-boot.elf - $ petalinux-build -c u-boot - - * system.dtb - $ petalinux-build -c device-tree - - * kernel only: - $ petalinux-build -c kernel - -For more info regarding how to build images run "petalinux-build --help" command - -You can generate BOOT.BIN file with "petalinux-package --boot" command: - $ petalinux-package --boot --fpga pre-built/linux/images/system.bit \ - --fsbl pre-built/linux/images/zynqmp_fsbl.elf \ - --u-boot pre-built/linux/images/u-boot.elf \ - --pmufw prebuilt/linux/images/pmufw.elf \ - --atf pre-built/linux/images/bl31.elf - -IV. Hardware Images -================================================================================ - * design_1_wrapper.bit - The hardware project source files are in "hardware/" directory. You can - open the hardware project with vivado, and rebuild it. - -V. Software Projects -================================================================================ - * device-tree - DTG xsct software components can be found at "components/plnx_workspace/" directory +PetaLinux project creation for ZCU216 +The files in this repository serve as a starting point to create a PetaLinux project using PetaLinux 2022.2 for the ZCU216 board. + +Dependencies +The project requires the addition of the meta-mathworks layer on top of the files provided in this repository. +Run the following steps to download the meta-mathworks layer into the currnet project. + + git clone https://insidelabs-git.mathworks.com/EmbeddedLinux/PetaLinux + cd PetaLinux/ + git checkout mw-next + git submodule add https://github.com/mathworks/meta-mathworks mw_zcu216/project-spec/meta-mathworks + git submodule update --init --recursive + git add .gitmodules mw_zcu216/project-spec/meta-mathworks + +Use the 'additionalChanges.patch' file to customize on top of the meta-mathworks layer. You can apply the patch by placing it inside the meta-mathworks folder and using the following command: + + git apply additionalChanges.patch + +Run the build command to generate the required software images + + petalinux-build + +Run the following script to package the image files into the SD Card. Ensure you are in petalinux project directory before running the following script. + + source mw_package_binaries.sh \ No newline at end of file diff --git a/mw_zcu216/additionalChanges.patch b/mw_zcu216/additionalChanges.patch new file mode 100644 index 0000000..493880e --- /dev/null +++ b/mw_zcu216/additionalChanges.patch @@ -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 +-#include +-#include +-#include +-#include +-#include +- +-#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 \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 && connCountsocket_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 + diff --git a/mw_zcu216/mw_build_utils/boot.bif b/mw_zcu216/mw_build_utils/boot.bif index 1d4241c..bb7fa6b 100644 --- a/mw_zcu216/mw_build_utils/boot.bif +++ b/mw_zcu216/mw_build_utils/boot.bif @@ -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 } diff --git a/mw_zcu216/project-spec/configs/config b/mw_zcu216/project-spec/configs/config index 070ebd3..105b727 100644 --- a/mw_zcu216/project-spec/configs/config +++ b/mw_zcu216/project-spec/configs/config @@ -262,8 +262,8 @@ CONFIG_SUBSYSTEM_TFTPBOOT_DIR="/tftpboot" # # Firmware Version Configuration # -CONFIG_SUBSYSTEM_HOSTNAME="xilinx-zcu216-2022_2" -CONFIG_SUBSYSTEM_PRODUCT="xilinx-zcu216-2022.2" +CONFIG_SUBSYSTEM_HOSTNAME="zcu216-2022_2" +CONFIG_SUBSYSTEM_PRODUCT="zcu216-2022.2" CONFIG_SUBSYSTEM_FW_VERSION="1.00" # @@ -308,5 +308,6 @@ CONFIG_YOCTO_NETWORK_SSTATE_FEEDS_URL="http://petalinux.xilinx.com/sswreleases/r # # User Layers # -CONFIG_USER_LAYER_0="" +CONFIG_USER_LAYER_0="${PROOT}/project-spec/meta-mathworks" +CONFIG_USER_LAYER_1="" CONFIG_SUBSYSTEM_BOOTARGS_GENERATED=" earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/ram0 rw" diff --git a/mw_zcu216/project-spec/configs/u-boot-xlnx/platform-auto.h b/mw_zcu216/project-spec/configs/u-boot-xlnx/platform-auto.h deleted file mode 100644 index ceafa24..0000000 --- a/mw_zcu216/project-spec/configs/u-boot-xlnx/platform-auto.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * This file is auto-generated by PetaLinux SDK - * DO NOT MODIFY this file, the modification will not persist - */ - -#ifndef __PLNX_CONFIG_H -#define __PLNX_CONFIG_H - -/* The following table includes the supported baudrates */ - - -#define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, 115200 } - - - -/* processor - psu_cortexa53_0 */ -#define CONFIG_CPU_ARMV8 -#define CONFIG_CLOCKS -#define CONFIG_REMAKE_ELF -#define CONFIG_BOARD_EARLY_INIT_F -#define CONFIG_ARM_DCC -#define CONFIG_MP - -/* main_memory - psu_ddr_0 */ - -/* uart - psu_uart_0 */ -#define PSSERIAL0 "psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0\0" -#define SERIAL_MULTI "serial=setenv stdout serial;setenv stdin serial\0" -#define CONSOLE_ARG "console=console=ttyPS0,115200\0" -#define SERIAL_MULTI "serial=setenv stdout serial;setenv stdin serial\0" -#define CONFIG_BAUDRATE 115200 - -/* ethernet - psu_ethernet_3 */ -#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN -#define PHY_ANEG_TIMEOUT 20000 -#define CONFIG_MII -#define CONFIG_NET_MULTI -#define CONFIG_NETCONSOLE 1 -#define CONFIG_SERVERIP 172.28.75.71 -#define CONFIG_IPADDR - -/* spi_flash - psu_qspi_0 */ -#define XILINX_PS8_QSPI_CLK_FREQ_HZ 124998749 -#define CONFIG_SF_DEFAULT_SPEED (XILINX_PS8_QSPI_CLK_FREQ_HZ / 4) -#define CONFIG_MTD_PARTITIONS -#define CONFIG_SPI_FLASH_MTD - -/* sdio - psu_sd_1 */ -#define CONFIG_SUPPORT_EMMC_BOOT - -/* rtc - psu_rtc */ - -/* sata - psu_sata */ -#define CONFIG_LIBATA - -/* i2c - psu_i2c_1 */ - -/* i2c - psu_i2c_0 */ - -/* usb - psu_usb_0 */ -#define CONFIG_THOR_RESET_OFF -#define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000 -#define DFU_DEFAULT_POLL_TIMEOUT 300 - -/* zynq_ps */ -#define COUNTER_FREQUENCY 100000000 - -/* intc - psu_acpu_gic */ -#define ACPU_GIC_BASEADDR 0xF9010000 -#define CONFIG_GICV2 1 -#define GICD_BASE (ACPU_GIC_BASEADDR) -#define GICC_BASE (ACPU_GIC_BASEADDR + 0x10000) - -/* FPGA */ - -/* Memory testing handling */ -#define CONFIG_SYS_MEMTEST_START 0x0 -#define CONFIG_SYS_MEMTEST_END (0x0 + 0x1000) -#define CONFIG_SYS_LOAD_ADDR (0x0 + 0x100000) /* default load address */ -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - GENERATED_GBL_DATA_SIZE) -#define CONFIG_NR_DRAM_BANKS 2 - -/* Size of malloc() pool */ -#define SIZE 0x2000000 -#define CONFIG_SYS_MALLOC_LEN SIZE - - -/* BOOTP options */ -#define CONFIG_BOOTP_SERVERIP -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME -#define CONFIG_BOOTP_MAY_FAIL -#define CONFIG_BOOTP_DNS -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_PXE - -/*Command line configuration.*/ -#define CONFIG_CMDLINE_EDITING -#define CONFIG_AUTO_COMPLETE - -#define CONFIG_SUPPORT_RAW_INITRD - -/* Miscellaneous configurable options */ -#define CONFIG_SYS_CBSIZE 2048/* Console I/O Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE - -/* Use the HUSH parser */ -#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " - -#define CONFIG_ENV_VARS_UBOOT_CONFIG -#define CONFIG_ENV_OVERWRITE /* Allow to overwrite the u-boot environment variables */ - -#define CONFIG_LMB - -/* FDT support */ -#define CONFIG_DISPLAY_BOARDINFO_LATE - - -/* Boot Argument Buffer Size */ -#define CONFIG_SYS_MAXARGS 64 /* max number of command args */ -#define CONFIG_SYS_LONGHELP - -/* Initial memory map for Linux */ -#define CONFIG_SYS_BOOTMAPSZ 0x8000000 - -#endif /* __PLNX_CONFIG_H */ diff --git a/mw_zcu216/project-spec/hw-description/design_1.bit b/mw_zcu216/project-spec/hw-description/design_1.bit deleted file mode 100644 index a10e836..0000000 Binary files a/mw_zcu216/project-spec/hw-description/design_1.bit and /dev/null differ diff --git a/mw_zcu216/project-spec/hw-description/design_1.xsa b/mw_zcu216/project-spec/hw-description/design_1.xsa deleted file mode 100644 index fa98b0f..0000000 Binary files a/mw_zcu216/project-spec/hw-description/design_1.xsa and /dev/null differ diff --git a/mw_zcu216/project-spec/meta-mathworks b/mw_zcu216/project-spec/meta-mathworks new file mode 160000 index 0000000..1b1b01d --- /dev/null +++ b/mw_zcu216/project-spec/meta-mathworks @@ -0,0 +1 @@ +Subproject commit 1b1b01d265fb5461f58719984a6e998ca73275fc diff --git a/mw_zcu216/project-spec/meta-user/conf/user-rootfsconfig b/mw_zcu216/project-spec/meta-user/conf/user-rootfsconfig index ebdd3c0..a12f186 100644 --- a/mw_zcu216/project-spec/meta-user/conf/user-rootfsconfig +++ b/mw_zcu216/project-spec/meta-user/conf/user-rootfsconfig @@ -9,5 +9,4 @@ CONFIG_boost CONFIG_lttng-ust CONFIG_rftool CONFIG_mw-fs-overlay -CONFIG_mw-rf-init - +CONFIG_mw-rf-init \ No newline at end of file diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/gpio-demo/files/Makefile b/mw_zcu216/project-spec/meta-user/recipes-apps/gpio-demo/files/Makefile deleted file mode 100644 index 9106be1..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/gpio-demo/files/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -APP = gpio-demo - -# Add any other object files to this list below -APP_OBJS = gpio-demo.o - -all: $(APP) - -$(APP): $(APP_OBJS) - $(CC) $(LDFLAGS) -o $@ $(APP_OBJS) $(LDLIBS) - -clean: - -rm -f $(APP) *.elf *.gdb *.o - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/gpio-demo/files/gpio-demo.c b/mw_zcu216/project-spec/meta-user/recipes-apps/gpio-demo/files/gpio-demo.c deleted file mode 100644 index 4e17779..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/gpio-demo/files/gpio-demo.c +++ /dev/null @@ -1,355 +0,0 @@ -/* -* -* gpio-demo app -* -* Copyright (C) 2013 - 2016 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person -* obtaining a copy of this software and associated documentation -* files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included -* in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in this -* Software without prior written authorization from Xilinx. -* -*/ - -#include -#include -#include -#include -#include -#include -#include - -#define GPIO_ROOT "/sys/class/gpio" -#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) - -static enum {NONE, IN, OUT, CYLON, KIT} gpio_opt = NONE; - -static const unsigned long cylon[] = { - 0x00000080, 0x00000040, 0x00000020, 0x00000010, - 0x00000008, 0x00000004, 0x00000002, 0x00000001, - 0x00000002, 0x00000004, 0x00000008, - 0x00000010, 0x00000020, 0x00000040, 0x00000080, -}; - -static const unsigned long kit[] = { - 0x000000e0, 0x00000070, 0x00000038, 0x0000001c, - 0x0000000e, 0x00000007, 0x00000003, 0x00000001, - 0x00000003, 0x00000007, 0x0000000e, - 0x0000001c, 0x00000038, 0x00000070, 0x000000e0, -}; - -static int gl_gpio_base = 0; - -static void usage (char *argv0) -{ - char *basename = strrchr(argv0, '/'); - if (!basename) - basename = argv0; - - fprintf(stderr, - "Usage: %s [-g GPIO_BASE] COMMAND\n" - "\twhere COMMAND is one of:\n" - "\t\t-i\t\tInput value from GPIO and print it\n" - "\t\t-o\tVALUE\tOutput value to GPIO\n" - "\t\t-c\t\tCylon test pattern\n" - "\t\t-k\t\t KIT test pattern\n" - "\tGPIO_BASE indicates which GPIO chip to talk to (The number can be \n" - "\tfound at /sys/class/gpio/gpiochipN).\n" - "\tThe highest gpiochipN is the first gpio listed in the dts file, \n" - "\tand the lowest gpiochipN is the last gpio listed in the dts file.\n" - "\tE.g.If the gpiochip240 is the LED_8bit gpio, and I want to output '1' \n" - "\tto the LED_8bit gpio, the command should be:\n" - "\t\tgpio-demo -g 240 -o 1\n" - "\n" - "\tgpio-demo written by Xilinx Inc.\n" - "\n" - , basename); - exit(-2); -} - -static int open_gpio_channel(int gpio_base) -{ - char gpio_nchan_file[128]; - int gpio_nchan_fd; - int gpio_max; - int nchannel; - char nchannel_str[5]; - char *cptr; - int c; - char channel_str[5]; - - char *gpio_export_file = "/sys/class/gpio/export"; - int export_fd=0; - - /* Check how many channels the GPIO chip has */ - sprintf(gpio_nchan_file, "%s/gpiochip%d/ngpio", GPIO_ROOT, gpio_base); - gpio_nchan_fd = open(gpio_nchan_file, O_RDONLY); - if (gpio_nchan_fd < 0) { - fprintf(stderr, "Failed to open %s: %s\n", gpio_nchan_file, strerror(errno)); - return -1; - } - read(gpio_nchan_fd, nchannel_str, sizeof(nchannel_str)); - close(gpio_nchan_fd); - nchannel=(int)strtoul(nchannel_str, &cptr, 0); - if (cptr == nchannel_str) { - fprintf(stderr, "Failed to change %s into GPIO channel number\n", nchannel_str); - exit(1); - } - - /* Open files for each GPIO channel */ - export_fd=open(gpio_export_file, O_WRONLY); - if (export_fd < 0) { - fprintf(stderr, "Cannot open GPIO to export %d\n", gpio_base); - return -1; - } - - gpio_max = gpio_base + nchannel; - for(c = gpio_base; c < gpio_max; c++) { - sprintf(channel_str, "%d", c); - write(export_fd, channel_str, (strlen(channel_str)+1)); - } - close(export_fd); - return nchannel; -} - -static int close_gpio_channel(int gpio_base) -{ - char gpio_nchan_file[128]; - int gpio_nchan_fd; - int gpio_max; - int nchannel; - char nchannel_str[5]; - char *cptr; - int c; - char channel_str[5]; - - char *gpio_unexport_file = "/sys/class/gpio/unexport"; - int unexport_fd=0; - - /* Check how many channels the GPIO chip has */ - sprintf(gpio_nchan_file, "%s/gpiochip%d/ngpio", GPIO_ROOT, gpio_base); - gpio_nchan_fd = open(gpio_nchan_file, O_RDONLY); - if (gpio_nchan_fd < 0) { - fprintf(stderr, "Failed to open %s: %s\n", gpio_nchan_file, strerror(errno)); - return -1; - } - read(gpio_nchan_fd, nchannel_str, sizeof(nchannel_str)); - close(gpio_nchan_fd); - nchannel=(int)strtoul(nchannel_str, &cptr, 0); - if (cptr == nchannel_str) { - fprintf(stderr, "Failed to change %s into GPIO channel number\n", nchannel_str); - exit(1); - } - - /* Close opened files for each GPIO channel */ - unexport_fd=open(gpio_unexport_file, O_WRONLY); - if (unexport_fd < 0) { - fprintf(stderr, "Cannot close GPIO by writing unexport %d\n", gpio_base); - return -1; - } - - gpio_max = gpio_base + nchannel; - for(c = gpio_base; c < gpio_max; c++) { - sprintf(channel_str, "%d", c); - write(unexport_fd, channel_str, (strlen(channel_str)+1)); - } - close(unexport_fd); - return 0; -} - -static int set_gpio_direction(int gpio_base, int nchannel, char *direction) -{ - char gpio_dir_file[128]; - int direction_fd=0; - int gpio_max; - int c; - - gpio_max = gpio_base + nchannel; - for(c = gpio_base; c < gpio_max; c++) { - sprintf(gpio_dir_file, "/sys/class/gpio/gpio%d/direction",c); - direction_fd=open(gpio_dir_file, O_RDWR); - if (direction_fd < 0) { - fprintf(stderr, "Cannot open the direction file for GPIO %d\n", c); - return 1; - } - write(direction_fd, direction, (strlen(direction)+1)); - close(direction_fd); - } - return 0; -} - -static int set_gpio_value(int gpio_base, int nchannel, int value) -{ - char gpio_val_file[128]; - int val_fd=0; - int gpio_max; - char val_str[2]; - int c; - - gpio_max = gpio_base + nchannel; - - for(c = gpio_base; c < gpio_max; c++) { - sprintf(gpio_val_file, "/sys/class/gpio/gpio%d/value",c); - val_fd=open(gpio_val_file, O_RDWR); - if (val_fd < 0) { - fprintf(stderr, "Cannot open the value file of GPIO %d\n", c); - return -1; - } - sprintf(val_str,"%d", (value & 1)); - write(val_fd, val_str, sizeof(val_str)); - close(val_fd); - value >>= 1; - } - return 0; -} - -static int get_gpio_value(int gpio_base, int nchannel) -{ - char gpio_val_file[128]; - int val_fd=0; - int gpio_max; - char val_str[2]; - char *cptr; - int value = 0; - int c; - - gpio_max = gpio_base + nchannel; - - for(c = gpio_max-1; c >= gpio_base; c--) { - sprintf(gpio_val_file, "/sys/class/gpio/gpio%d/value",c); - val_fd=open(gpio_val_file, O_RDWR); - if (val_fd < 0) { - fprintf(stderr, "Cannot open GPIO to export %d\n", c); - return -1; - } - read(val_fd, val_str, sizeof(val_str)); - value <<= 1; - value += (int)strtoul(val_str, &cptr, 0); - if (cptr == optarg) { - fprintf(stderr, "Failed to change %s into integer", val_str); - } - close(val_fd); - } - return value; -} - -void signal_handler(int sig) -{ - switch (sig) { - case SIGTERM: - case SIGHUP: - case SIGQUIT: - case SIGINT: - close_gpio_channel(gl_gpio_base); - exit(0) ; - default: - break; - } -} - -int main(int argc, char *argv[]) -{ - extern char *optarg; - char *cptr; - int gpio_value = 0; - int nchannel = 0; - - int c; - int i; - - opterr = 0; - - while ((c = getopt(argc, argv, "g:io:ck")) != -1) { - switch (c) { - case 'g': - gl_gpio_base = (int)strtoul(optarg, &cptr, 0); - if (cptr == optarg) - usage(argv[0]); - break; - case 'i': - gpio_opt = IN; - break; - case 'o': - gpio_opt = OUT; - gpio_value = (int)strtoul(optarg, &cptr, 0); - if (cptr == optarg) - usage(argv[0]); - break; - case 'c': - gpio_opt = CYLON; - break; - case 'k': - gpio_opt = KIT; - break; - case '?': - usage(argv[0]); - default: - usage(argv[0]); - - } - } - - if (gl_gpio_base == 0) { - usage(argv[0]); - } - - nchannel = open_gpio_channel(gl_gpio_base); - signal(SIGTERM, signal_handler); /* catch kill signal */ - signal(SIGHUP, signal_handler); /* catch hang up signal */ - signal(SIGQUIT, signal_handler); /* catch quit signal */ - signal(SIGINT, signal_handler); /* catch a CTRL-c signal */ - switch (gpio_opt) { - case IN: - set_gpio_direction(gl_gpio_base, nchannel, "in"); - gpio_value=get_gpio_value(gl_gpio_base, nchannel); - fprintf(stdout,"0x%08X\n", gpio_value); - break; - case OUT: - set_gpio_direction(gl_gpio_base, nchannel, "out"); - set_gpio_value(gl_gpio_base, nchannel, gpio_value); - break; - case CYLON: -#define CYLON_DELAY_USECS (10000) - set_gpio_direction(gl_gpio_base, nchannel, "out"); - for (;;) { - for(i=0; i < ARRAY_SIZE(cylon); i++) { - gpio_value=(int)cylon[i]; - set_gpio_value(gl_gpio_base, nchannel, gpio_value); - } - usleep(CYLON_DELAY_USECS); - } - case KIT: -#define KIT_DELAY_USECS (10000) - set_gpio_direction(gl_gpio_base, nchannel, "out"); - for (;;) { - for (i=0; i/dev/null - exit $? - ;; - - restart) - $0 stop - sleep 1 - $0 start - ;; - - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/libiio/libiio.bb b/mw_zcu216/project-spec/meta-user/recipes-apps/libiio/libiio.bb deleted file mode 100644 index f79b940..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/libiio/libiio.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "Library for interfacing with IIO devices" -HOMEPAGE = "https://wiki.analog.com/resources/tools-software/linux-software/libiio" -BRANCH ?= "libiio-v0" -SECTION = "libs" -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c" -SRCREV = "${@ "c4498c27761d04d4ac631ec59c1613bfed079da5" if bb.utils.to_boolean(d.getVar('BB_NO_NETWORK')) else d.getVar('AUTOREV')}" -SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=${BRANCH}" -PV = "0.25+git${SRCPV}" - -S = "${WORKDIR}/git" - -inherit cmake python3native systemd gitpkgv - -DEPENDS = " \ - flex-native bison-native libaio \ - ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ -" - -EXTRA_OECMAKE = " \ - -DWITH_LOCAL_BACKEND=ON \ - -DWITH_XML_BACKEND=ON \ - -DWITH_NETWORK_BACKEND=ON \ - -DNEED_THREADS=1 \ - -DWITH_TESTS=ON \ - -DWITH_UTILS=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir}/udev/rules.d \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \ -" - -EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=TRUE" -EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '', '-DHAVE_DNS_SD=off', d)}" - -PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND PYTHON_BINDINGS TESTS" - -PACKAGECONFIG[USB_BACKEND] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1,libxml2" -PACKAGECONFIG[NETWORK_BACKEND] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2" -PACKAGECONFIG[PYTHON_BINDINGS] = ",,python3" -PACKAGECONFIG[TESTS] = "-DWITH_TESTS=ON,-DWITH_TESTS=OFF,libxml2" - -PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-python" - -RDEPENDS:${PN}-python = "${PN} python3-ctypes python3-stringold" - -#FILES:${PN}-tests = "${bindir}" -FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" - -SYSTEMD_PACKAGES = "${PN}-iiod" -SYSTEMD_SERVICE:${PN}-iiod = "iiod.service" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/libiio/mw-fs-overlay%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-apps/libiio/mw-fs-overlay%.bbappend deleted file mode 100644 index 80b0ac2..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/libiio/mw-fs-overlay%.bbappend +++ /dev/null @@ -1,48 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files/:" -#S = "${WORKDIR}/mw-fs-overlay" -#S = "${WORKDIR}" -#SRC_URI += " file://fw_env.config" -SRC_URI += " file://init.d/iiod" - -#inherit update-rc.d -DEPENDS_append = " update-rc.d-native" -#PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" -#RDEPENDS_${PN} = "initd-functions \ -# " - -#RPROVIDES_${PN}-functions = "initd-functions" -#RCONFLICTS_${PN}-functions = "lsbinitscripts" -#FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" -#HALTARGS ?= "-d -f" - -S = "${WORKDIR}" - - -do_install_append() { - install -d ${D}${sysconfdir}/init.d - install -d ${D}${sysconfdir}/rcS.d - install -d ${D}${sysconfdir}/rc1.d - install -d ${D}${sysconfdir}/rc2.d - install -d ${D}${sysconfdir}/rc3.d - install -d ${D}${sysconfdir}/rc4.d - install -d ${D}${sysconfdir}/rc5.d -# install -d ${D}${sysconfdir}/rc6.d - - install -m 0755 ${WORKDIR}/init.d/iiod ${D}${sysconfdir}/init.d/ -# install -m 0755 ${WORKDIR}/rcS.d/S99iiod ${D}${sysconfdir}/rcS.d/ - -# update-rc.d -r ${D} S99iiod start 99 2 3 4 5 . -# ln -sf ../init.d/S99iiod ${D}${sysconfdir}/rcS.d/S99iiod - update-rc.d -r ${D} iiod start 99 1 2 3 4 5 . - -} -#PACKAGE_ARCH = "${MACHINE_ARCH}" -#FILES_${PN} += "${sysconfdir}/rcS.d/" -#FILES_${PN} += "${sysconfdir}/rc1.d/" -#FILES_${PN} += "${sysconfdir}/rc2.d/" -#FILES_${PN} += "${sysconfdir}/rc3.d/" -#FILES_${PN} += "${sysconfdir}/rc4.d/" -#FILES_${PN} += "${sysconfdir}/rc5.d/" -#FILES_${PN} += "${sysconfdir}/rc6.d/" - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/libserialport/files/0001-uclinux-detection.patch b/mw_zcu216/project-spec/meta-user/recipes-apps/libserialport/files/0001-uclinux-detection.patch deleted file mode 100644 index 7d7199c..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/libserialport/files/0001-uclinux-detection.patch +++ /dev/null @@ -1,26 +0,0 @@ -From faab9aa5879fab93556b7a3a6f24070eeb3cbf15 Mon Sep 17 00:00:00 2001 -From: Paul Cercueil -Date: Mon, 29 Aug 2016 11:11:01 +0200 -Subject: [PATCH] Fix Linux files not compiled in with a toolchain for ucLinux - -Signed-off-by: Paul Cercueil ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index f6b66e8..de6f5b9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -74,7 +74,7 @@ AC_DEFINE_UNQUOTED([SP_LIB_VERSION_REVISION], [$SP_LIB_VERSION_REVISION], [.]) - AC_DEFINE_UNQUOTED([SP_LIB_VERSION_AGE], [$SP_LIB_VERSION_AGE], [.]) - AC_DEFINE_UNQUOTED([SP_LIB_VERSION_STRING], ["$SP_LIB_VERSION"], [.]) - --AM_CONDITIONAL([LINUX], [test -z "${host_os##linux*}"]) -+AM_CONDITIONAL([LINUX], [test -z "${host_os##linux*}" || test -z "${host_os##uclinux*}"]) - AM_CONDITIONAL([WIN32], [test -z "${host_os##mingw*}" || test -z "${host_os##cygwin*}"]) - AM_CONDITIONAL([MACOSX], [test -z "${host_os##darwin*}"]) - AM_CONDITIONAL([FREEBSD], [test -z "${host_os##freebsd*}"]) --- -2.8.1 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/libserialport/libserialport_0.1.1.bb b/mw_zcu216/project-spec/meta-user/recipes-apps/libserialport/libserialport_0.1.1.bb deleted file mode 100644 index fd8efdc..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/libserialport/libserialport_0.1.1.bb +++ /dev/null @@ -1,20 +0,0 @@ -DISCRIPTION = "C++ library for serial port support." -SECTION = "libs" -LICENSE = "LGPLv3+" -HOMEPAGE = "http://sigrok.org/download/source/libserialport" - -#SRC_URI = "${SOURCEFORGE_MIRROR}/libserial/libserial-${PV}.tar.gz" -SRC_URI = "https://sigrok.org/download/source/libserialport/libserialport-${PV}.tar.gz" -LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" - -S = "${WORKDIR}/libserialport-${PV}" - -SRC_URI_append = " file://0001-uclinux-detection.patch" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -inherit autotools pkgconfig - -SRC_URI[md5sum] = "b93f0325a6157198152b5bd7e8182b51" -SRC_URI[sha256sum] = "4a2af9d9c3ff488e92fb75b4ba38b35bcf9b8a66df04773eba2a7bbf1fa7529d" - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/libusb/libusb_1.0.bb b/mw_zcu216/project-spec/meta-user/recipes-apps/libusb/libusb_1.0.bb deleted file mode 100644 index 44c243f..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/libusb/libusb_1.0.bb +++ /dev/null @@ -1,35 +0,0 @@ -DISCRIPTION = "Userspace library for accessing USB devices" -SECTION = "libs" -LICENSE = "LGPL-2.1+" -HOMEPAGE = "http://libusb.info/" - -#LIBUSB_VERSION_MAJOR = ${PV} -#LIBUSB_VERSION = $(LIBUSB_VERSION_MAJOR).21 -#LIBUSB_SOURCE = libusb-$(LIBUSB_VERSION).tar.bz2 - - -SRC_URI = "https://github.com/libusb/libusb/releases/download/v${PV}.21/libusb-${PV}.21.tar.bz2" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" - -S = "${WORKDIR}/libusb-${PV}.21" - -inherit autotools pkgconfig - -# Don't configure udev by default since it will cause a circular -# dependecy with udev package, which depends on libusb -EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev" - -do_install_append() { - install -d ${D}${libdir} - if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then - mv ${D}${base_libdir}/pkgconfig ${D}${libdir} - fi -} - -FILES_${PN} += "${base_libdir}/*.so.*" - -FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la" - -SRC_URI[sha256sum] = "7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b" - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/base-files%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/base-files%.bbappend deleted file mode 100644 index c3090e4..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/base-files%.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files/zynqmp/fs-overlay/etc/:" -#S = "${WORKDIR}/mw-fs-overlay" -#S = "${WORKDIR}" -#SRC_URI += " file://fw_env.config" -SRC_URI += " file://fstab" - -do_install_append() { - install -d ${D}${sysconfdir} - # install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config - install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab - -} -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/busybox_%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/busybox_%.bbappend deleted file mode 100644 index b4bd93a..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/busybox_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files/common/fs-overlay/etc/:" -SRC_URI += " file://inetd.conf" - -do_install:append() { - install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/inetd.conf -} diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/config/.empty b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/config/.empty deleted file mode 100755 index e69de29..0000000 diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.conf deleted file mode 100644 index 1ba0680..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.conf +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Boot variables -# This script is sourced from various uboot manipulation scripts - -# Source configuration files from /etc/bootvars.d -for i in /etc/bootvars.d/*.conf ; do - if [ -r "$i" ]; then - . $i - fi - unset i -done - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/30common.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/30common.conf deleted file mode 100644 index dcf153f..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/30common.conf +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# Boot variables -# This script is sourced from various uboot manipulation scripts - -_SD_ROOT=/mnt -_RD_TGT_DIR=hdlcoder_rd/ -_UBOOT_RD_TGT_DIR=$_RD_TGT_DIR -_UBOOT_ROOT=$_SD_ROOT - -_SYS_RD_INIT_DIR=${_SD_ROOT}/${_RD_TGT_DIR} -_SYS_RD_NAME_FILE=rdname.conf - -_SYS_BOOT_MODE=NORMAL - -_TMPDIR=/tmp - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/35helper.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/35helper.conf deleted file mode 100644 index 83e539b..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/35helper.conf +++ /dev/null @@ -1,12 +0,0 @@ -# Helper functions shared across scripts - -numel() { - echo $#; -} - -get_elem() { - idx="\$$1" - shift - echo $@ | awk "{print $idx}" -} - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/40network.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/40network.conf deleted file mode 100644 index 1627885..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/40network.conf +++ /dev/null @@ -1,7 +0,0 @@ -# Network files for backup / restore - -_NETWORK_SRC_FILES="hostname interfaces udhcpd.conf" -_NETWORK_DST_FILES="/etc/hostname /etc/network/interfaces /etc/udhcpd.conf" -_NETWORK_REQ_FILES="true true false" -_NETWORK_FILES_NELEM=$(numel $_NETWORK_SRC_FILES) - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/50platform.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/50platform.conf deleted file mode 100644 index 023d471..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/bootvars.d/50platform.conf +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# Boot variables -# This script is sourced from various uboot manipulation scripts - -_UBOOT_SCR=uEnv.txt -_UBOOT_VAR_DEVICETREE=fdt_image -_UBOOT_VAR_BITSTREAM=bitstream_image -_UBOOT_VAR_RDNAME=hdlrdname -_UBOOT_DO_SYNC=true - -_SYS_PERSISTENT_FILESYSTEM=false -_SYS_DEFAULT_DEVICETREE_FILE=system.dtb -_SYS_DEFAULT_BITSTREAM_FILE=system.bit - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/inetd.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/inetd.conf deleted file mode 100644 index f6f5c5b..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/inetd.conf +++ /dev/null @@ -1,74 +0,0 @@ -# /etc/inetd.conf: see inetd(8) for further informations. -# -# Internet server configuration database -# -# -# If you want to disable an entry so it isn't touched during -# package updates just comment it out with a single '#' character. -# -# If you make changes to this file, either reboot your machine or -# send the inetd process a HUP signal: -# Do a "ps x" as root and look up the pid of inetd. Then do a -# kill -HUP -# inetd will re-read this file whenever it gets that signal. -# -# -#:INTERNAL: Internal services -# It is generally considered safer to keep these off. -echo stream tcp nowait root internal -echo dgram udp wait root internal -#discard stream tcp nowait root internal -#discard dgram udp wait root internal -daytime stream tcp nowait root internal -daytime dgram udp wait root internal -#chargen stream tcp nowait root internal -#chargen dgram udp wait root internal -time stream tcp nowait root internal -time dgram udp wait root internal - -# These are standard services. -# -#ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -ftp stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd -w / -telnet stream tcp nowait root /sbin/telnetd /sbin/telnetd -#nntp stream tcp nowait root tcpd in.nntpd -#smtp stream tcp nowait root tcpd sendmail -v -# -# Shell, login, exec and talk are BSD protocols. -# -# If you run an ntalk daemon (such as netkit-ntalk) on the old talk -# port, that is, "talk" as opposed to "ntalk", it won't work and may -# cause certain broken talk clients to malfunction. -# -# The talkd from netkit-ntalk 0.12 and higher, however, can speak the -# old talk protocol and can be used safely. -# -#shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L -#login stream tcp nowait root /usr/sbin/tcpd in.rlogind -L -#exec stream tcp nowait root /usr/sbin/tcpd in.rexecd -#talk dgram udp wait root /usr/sbin/tcpd in.talkd -#ntalk dgram udp wait root /usr/sbin/tcpd in.talkd -# -# Pop et al -# Leave these off unless you're using them. -#pop2 stream tcp nowait root /usr/sbin/tcpd in.pop2d -#pop3 stream tcp nowait root /usr/sbin/tcpd in.pop3d -# -# The Internet UUCP service. -# uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l -# -# Tftp service is provided primarily for booting. Most sites -# run this only on machines acting as "boot servers." If you don't -# need it, don't use it. -# -#tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd -#bootps dgram udp wait root /usr/sbin/in.bootpd in.bootpd -# -# Finger, systat and netstat give out user information which may be -# valuable to potential "system crackers." Many sites choose to disable -# some or all of these services to improve security. -# -#finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -w -#systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx -#netstat stream tcp nowait root /bin/netstat /bin/netstat -a -#ident stream tcp nowait root /usr/sbin/in.identd in.identd diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/alsa b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/alsa deleted file mode 100644 index a1d5a44..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/alsa +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Initialize the alsa system -# - -source /etc/bootvars.conf - -source /etc/init.d/start_only.sh - -if [ "$_SYS_PERSISTENT_FILESYSTEM" == "true" ]; then - UPDATE=mv -else - UPDATE=cp -fi - -if [ -d /sys/class/sound/card0 ]; then - if [ -f ${_SD_ROOT}/asound.state ]; then - echo "+++ Updating the ALSA config files" - $UPDATE -f ${_SD_ROOT}/asound.state /var/lib/alsa/asound.state - fi - - if [ -f /var/lib/alsa/asound.state ]; then - alsactl restore - else - alsactl init - fi -fi - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/backupSSHKeys b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/backupSSHKeys deleted file mode 100644 index c1aa005..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/backupSSHKeys +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Backup SSH keys to the SD card -# - -source /etc/bootvars.conf - -source /etc/init.d/start_only.sh - -SD_KEYDIR=${_SD_ROOT}/sshkeys -ETC_KEYDIRS="/etc/ssh /etc/dropbear" - -if [ "${_SYS_PERSISTENT_FILESYSTEM}" == "false" ]; then - echo -n "### Backing up SSH keys from to the SD card: " - for d in $ETC_KEYDIRS ; do - KEYFOLDER=$SD_KEYDIR/$(basename $d) - if [ ! -d $KEYFOLDER ]; then - mkdir -p $KEYFOLDER - fi - if [ -f $d/*host_*key* ]; then - echo "### Backup keys from $d to the SD card: " - cp $d/*host_*key* $KEYFOLDER - fi - done - sync - echo "OK" -fi - -exit 0 diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/backupSSHkeys b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/backupSSHkeys deleted file mode 100644 index d6dab00..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/backupSSHkeys +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# Restores SSH keys from the SD card -# - -source /etc/bootvars.conf - -source /etc/init.d/start_only.sh - -SD_KEYDIR=${_SD_ROOT}/sshkeys -ETC_KEYDIR=/etc/ssh - -if [ "${_SYS_PERSISTENT_FILESYSTEM}" == "false" ]; then - if [ ! -d $SD_KEYDIR ]; then - echo -n "Backing up SSH keys to the SD card: " - mkdir -p $SD_KEYDIR - cp $ETC_KEYDIR/ssh_host_*key* $SD_KEYDIR/ - sync - echo "OK" - fi -fi - -exit 0 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/hdlrd_init b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/hdlrd_init deleted file mode 100644 index 0e12c25..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/hdlrd_init +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# Run user defined init scripts -# - -source /etc/bootvars.conf - -if [ "${_SYS_BOOT_MODE}" == "RECOVERY" ]; then - exit 0 -fi - -case "$1" in - start) - script="init.sh" - ;; - stop) - script="shutdown.sh" - ;; - restart|reload) - "$0" stop - "$0" start - exit $? - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -if [ -d ${_SYS_RD_INIT_DIR} ]; then - if [ -f ${_SYS_RD_INIT_DIR}/${_SYS_RD_NAME_FILE} ]; then - # Check the RD name stored in the file - rdfile=$(cat ${_SYS_RD_INIT_DIR}/${_SYS_RD_NAME_FILE}) - # Compare to the RD name in uboot - rdvar=$(fw_getrdname) - rc=$? - if [ "$rdfile" == "$rdvar" ] && [ "$rc" == "0" ]; then - # determine if the script exists - if [ -f ${_SYS_RD_INIT_DIR}/${script} ]; then - echo "+++ Executing HD Reference Design ${script}..." - # Execute the script out of the RD dir - (cd ${_SYS_RD_INIT_DIR} && ./${script}) - exit $? - fi - fi - fi -fi - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/hostname b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/hostname deleted file mode 100644 index f7add9b..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/hostname +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Set the hostname -# - - -source /etc/init.d/start_only.sh - -# Update the hostname after copying/moving files from the SD card -/bin/hostname -F /etc/hostname -# Restart avahi-daemon if it exists to update the hostname -if [ -f /etc/init.d/avahi-daemon ]; -then - /etc/init.d/avahi-daemon stop - /etc/init.d/avahi-daemon start -fi - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/inetd b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/inetd deleted file mode 100644 index 2cf9a27..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/inetd +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# Starts the inetd daemon. -# - -NAME=inetd -DAEMON=/usr/sbin/$NAME - -case "$1" in - start) - echo -n "Starting $NAME: " - start-stop-daemon -S -q -x $DAEMON && echo "OK" || echo "Failed" - ;; - stop) - echo -n "Stopping $NAME: " - start-stop-daemon -K -q -n $NAME && echo "OK" || echo "Failed" - ;; - restart|reload) - $0 stop - $0 start - ;; - *) - echo $"Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/module_coldplug b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/module_coldplug deleted file mode 100644 index d4253cf..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/module_coldplug +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# Load modules for cold-plugged devices -# - -source /etc/init.d/start_only.sh - -echo "Loading drivers for discovered hardware..." - -modlist=$(grep -h MODALIAS /sys/bus/*/devices/*/uevent) -modaliases=$(echo "$modlist" | cut -d = -f 2 | sort -u) -modprobe -abq $modaliases 2>/dev/null - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/network b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/network deleted file mode 100644 index c97faf7..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/network +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# Start the network.... -# - -# Debian ifupdown needs the /run/network lock directory -source /etc/bootvars.conf - -if [ "${_SYS_NETWORK_DISABLE}" == "true" ]; then - echo -n "Networking disabled..." - exit 0 -fi - -mkdir -p /run/network - -case "$1" in - start) - echo "Stopping network..." - /sbin/ifdown -a -f - echo "Starting network..." - /sbin/ifup -a -f - ;; - stop) - echo -n "Stopping network..." - /sbin/ifdown -a -f - ;; - restart|reload) - "$0" stop - "$0" start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/network_scripts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/network_scripts deleted file mode 100644 index 9132365..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/network_scripts +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# Copy the network scripts from the boot device -# - -source /etc/bootvars.conf - -source /etc/init.d/start_only.sh - -if [ "$_SYS_PERSISTENT_FILESYSTEM" == "true" ]; then - UPDATE=mv - WARN_NOTFOUND=false -else - UPDATE=cp - WARN_NOTFOUND=true -fi - -for i in $(seq 1 $_NETWORK_FILES_NELEM); do - src=${_SD_ROOT}/$(get_elem $i $_NETWORK_SRC_FILES) - dst=$(get_elem $i $_NETWORK_DST_FILES) - warn=$(get_elem $i $_NETWORK_REQ_FILES) - if [ -f $src ]; then - echo "+++ Configuring $dst" - $UPDATE -f $src $dst - elif [ "$WARN_NOTFOUND" == "true" ] && [ "$warn" == "true" ]; then - echo "### $src file not found in the SD card. Using default settings in $dst..." - fi -done - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/restoreSSHKeys b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/restoreSSHKeys deleted file mode 100644 index ddad147..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/restoreSSHKeys +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# Restores SSH keys from the SD card -# - -source /etc/bootvars.conf - -source /etc/init.d/start_only.sh - -if [ "$_SYS_PERSISTENT_FILESYSTEM" == "true" ]; then - UPDATE=mv -else - UPDATE=cp -fi - -SD_KEYDIR=${_SD_ROOT}/sshkeys -ETC_KEYDIRS="/etc/ssh /etc/dropbear" - -if [ -d $SD_KEYDIR ]; then - echo -n "### Restoring SSH keys from the SD card to $d " - for d in $ETC_KEYDIRS ; do - KEYFOLDER=$SD_KEYDIR/$(basename $d) - if [ -f $KEYFOLDER/*host_*key* ]; then - echo -n "### Restoring keys from the SD card to $d " - ${UPDATE} -f $KEYFOLDER/*host_*key* $d/ - chmod 600 $d/*host_*key* - fi - if [ "$_SYS_PERSISTENT_FILESYSTEM" == "true" ]; then - rm -rf $SD_KEYDIR - fi - done - echo "OK" -fi - -exit 0 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/restoreSSHkeys b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/restoreSSHkeys deleted file mode 100644 index af6edf4..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/restoreSSHkeys +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# Restores SSH keys from the SD card -# - -source /etc/bootvars.conf - -source /etc/init.d/start_only.sh - -if [ "$_SYS_PERSISTENT_FILESYSTEM" == "true" ]; then - UPDATE=mv -else - UPDATE=cp -fi - -SD_KEYDIR=${_SD_ROOT}/sshkeys -ETC_KEYDIR=/etc/ssh - -if [ -d $SD_KEYDIR ]; then - echo -n "Restoring SSH keys from the SD card: " - ${UPDATE} -f $SD_KEYDIR/ssh_host_*key* $ETC_KEYDIR/ - chmod 600 $ETC_KEYDIR/ssh_host_*key* - echo "OK" - if [ "$_SYS_PERSISTENT_FILESYSTEM" == "true" ]; then - rm -rf $SD_KEYDIR - fi -fi - - -exit 0 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdcard_mount b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdcard_mount deleted file mode 100644 index f3f866f..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdcard_mount +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# Mount SD card partition -# - -_SD_ROOT=/dev/mmcblk0p1 - -source /etc/init.d/start_only.sh - -mounted=$(mount | grep "${_SD_ROOT}") -if [ "$mounted" == "" ] && [ "${_SD_ROOT}" != "" ] ; then - echo "+++ Waiting to mount SD card ..." - i=0 - while [ "$mounted" == "" ] && [ $i -lt 5 ]; do - sleep 1 - mount -a - mounted=$(mount | grep ${_SD_ROOT}) - i=$(( i + 1 )) - done - if [ "$mounted" != "" ]; then - echo "+++ SD Card mounted ..." - else - echo "ERROR: Failed to mount SD card" - fi -fi - - - - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdinit b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdinit deleted file mode 100644 index 66ef796..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/sdinit +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# Run the init.sh/shutdown.sh script on the SD card -# - -source /etc/bootvars.conf - -if [ "${_SYS_BOOT_MODE}" == "RECOVERY" ]; then - exit 0 -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 - fi - ;; - stop) - if [ -f ${_SD_ROOT}/shutdown.sh ]; then - echo "+++ Running sd card shutdown.sh" - ${_SD_ROOT}/shutdown.sh - fi - ;; - restart | reload) - "$0" stop - "$0" start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/start_only.sh b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/start_only.sh deleted file mode 100644 index 532393b..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/start_only.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Helper script for the start-only case -# - -case "$1" in - start) - # Continue script - ;; - stop) - # No shutdown action - exit 0 - ;; - restart|reload) - "$0" stop - "$0" start - exit $? - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/udhcpd b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/udhcpd deleted file mode 100644 index 758ba38..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/udhcpd +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# Start the udhcpd server.... -# - -source /etc/bootvars.conf - -if [ "${_SYS_NETWORK_DISABLE}" == "true" ]; then - echo -n "udhcpd disabled..." - exit 0 -fi - -mkdir -p /var/lib/misc - -case "$1" in - start) - echo "Starting udhcpd..." - touch /var/lib/misc/udhcpd.leases - /usr/sbin/udhcpd /etc/udhcpd.conf - ;; - stop) - echo "Stopping udhcpd..." - pkill /usr/sbin/udhcpd - ;; - restart|reload) - "$0" stop - "$0" start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/usb_network b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/usb_network deleted file mode 100644 index 39d7a79..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/usb_network +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# Start the usb ethernet.... -# - -source /etc/bootvars.conf - -if [ "${_SYS_NETWORK_DISABLE}" == "true" ]; then - echo -n "USB ethernet disabled..." - exit 0 -fi - -case "$1" in - start) - echo "Starting USB Ethernet..." - /sbin/modprobe -q g_ether - ;; - stop) - echo "Stopping USB Ethernet..." - /sbin/rmmod g_ether 2>/dev/null - ;; - restart|reload) - "$0" stop - "$0" start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/user_app b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/user_app deleted file mode 100644 index 090d4fd..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/user_app +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# Run the user-specified applciation -# - -source /etc/bootvars.conf - -if [ "${_SYS_BOOT_MODE}" == "RECOVERY" ]; then - exit 0 -fi - -case "$1" in - start) - if [ -f ${_SD_ROOT}/system.elf ]; then - echo "+++ Launching default application..." - ${_SD_ROOT}/system.elf > /tmp/system.elf.log & - echo $! > /tmp/system.elf.pid - fi - ;; - stop) - if [ -f /tmp/system.elf.pid ]; then - echo "+++ Terminating the default application..." - pid=$(cat /tmp/system.elf.pid) - kill $pid - fi - ;; - restart | reload) - "$0" stop - "$0" start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/user_init b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/user_init deleted file mode 100644 index 0e6cb34..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/init.d/user_init +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# Run user defined init scripts -# - -source /etc/bootvars.conf - -INIT_DIR=${_SD_ROOT}/init.d - -case "$1" in - start) - mode=start - lsargs="" - ;; - stop) - mode=stop - lsargs="-r" - ;; - restart | reload) - "$0" stop - "$0" start - exit $? - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -if [ -d $INIT_DIR ]; then - for i in $(ls $lsargs ${INIT_DIR}/S??*) ;do - - # Ignore dangling symlinks (if any). - [ ! -f "$i" ] && continue - - case "$i" in - *.sh) - # Source shell script for speed. - ( - trap - INT QUIT TSTP - set $mode - . $i - ) - ;; - *) - # No sh extension, so fork subprocess. - $i $mode - ;; - esac - done -fi diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/mdev.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/mdev.conf deleted file mode 100755 index bc96fda..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/mdev.conf +++ /dev/null @@ -1,56 +0,0 @@ -# -# mdev.conf for an embedded system -# - -# Syntax: -# [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] -# [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] -# [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] -# -# [-]: do not stop on this match, continue reading mdev.conf -# =: move, >: move and create a symlink -# !: do not create device node -# @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases - -# map mwipcore0 to mwipcore for legacy models -mwipcore0 root:root 660 >mwipcore -mwipcore(.+)0 root:root 660 >mwipcore%1 - -# support module loading on hotplug -$MODALIAS=.* root:root 660 @modprobe -b "$MODALIAS" - -# null may already exist; therefore ownership has to be changed with command -null root:root 666 @chmod 666 $MDEV -zero root:root 666 -full root:root 666 -random root:root 444 -urandom root:root 444 -hwrandom root:root 444 -grsec root:root 660 - -kmem root:root 640 -mem root:root 640 -port root:root 640 -# console may already exist; therefore ownership has to be changed with command -console root:tty 600 @chmod 600 $MDEV -ptmx root:tty 666 -pty.* root:tty 660 - -# Typical devices -tty root:tty 666 -tty[0-9]* root:tty 660 -vcsa*[0-9]* root:tty 660 -ttyS[0-9]* root:root 660 - -# alsa sound devices -pcm.* root:audio 660 =snd/ -control.* root:audio 660 =snd/ -midi.* root:audio 660 =snd/ -seq root:audio 660 =snd/ -timer root:audio 660 =snd/ - -# input stuff -event[0-9]+ root:root 640 =input/ -mice root:root 640 =input/ -mouse[0-9] root:root 640 =input/ -ts[0-9] root:root 600 =input/ diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/network/interfaces b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/network/interfaces deleted file mode 100755 index fd3aea9..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/network/interfaces +++ /dev/null @@ -1,16 +0,0 @@ -# interface configuration -auto lo eth0 -iface lo inet loopback -# eth0: Static configuration -iface eth0 inet static -address 192.168.1.101 -netmask 255.255.255.0 -gateway 192.168.1.1 - -# eth0: Dynamic configuration -# iface eth0 inet dhcp - -# usb0: Static configuration -iface usb0 inet static -address 10.10.10.1 -netmask 255.255.255.0 diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/ssh/sshd_config b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/ssh/sshd_config deleted file mode 100644 index f60c772..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/ssh/sshd_config +++ /dev/null @@ -1,134 +0,0 @@ -# $OpenBSD: sshd_config,v 1.94 2015/02/02 01:57:44 deraadt Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options override the -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -# The default requires explicit activation of protocol 1 -#Protocol 2 - -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 1024 - -# Ciphers and keying -#RekeyLimit default none -KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 - -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#RSAAuthentication yes -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -#PrintMotd yes -#PrintLastLog yes -#TCPKeepAlive yes -#UseLogin no -UsePrivilegeSeparation sandbox # Default for new installations. -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#UseDNS no -#PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/libexec/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udev/rules.d/100-mw-drivers.rules b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udev/rules.d/100-mw-drivers.rules deleted file mode 100644 index d6f9a69..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udev/rules.d/100-mw-drivers.rules +++ /dev/null @@ -1,2 +0,0 @@ -# map mwipcore0 to mwipcore for legacy models - KERNEL=="mwipcore0", SYMLINK+="mwipcore" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udev/scripts/network.sh b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udev/scripts/network.sh deleted file mode 100644 index ace3880..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udev/scripts/network.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# We get two "add" events for hostap cards due to wifi0 -echo "$INTERFACE" | grep -q wifi && exit 0 - -# udevd does clearenv(). Export shell PATH to children. -export PATH - -# if this interface has an entry in /etc/network/interfaces, let ifupdown -# handle it -if grep -q "iface \+$INTERFACE" /etc/network/interfaces; then - case $ACTION in - add) - ifconfig | grep -q "^$INTERFACE" || ifup $INTERFACE - ;; - remove) - ifdown $INTERFACE - ;; - esac - - exit 0 -fi diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udhcpd.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udhcpd.conf deleted file mode 100644 index 678d79f..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/etc/udhcpd.conf +++ /dev/null @@ -1,14 +0,0 @@ -# Range from with IP Addresses should be offer -start 10.10.10.100 -end 10.10.10.150 -max_leases 50 -# Interface on which the daemon listen. -interface usb0 -# How long the offer is available -offer_time 60 -# Lease file, where the leases written to -lease_file /var/lib/misc/udhcpd.leases -#Some options -option subnet 255.255.255.0 -option lease 3600 # 1h in seconds -# For more options see http://git.busybox.net/busybox/plain/examples/udhcp/udhcpd.conf diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_backup_network b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_backup_network deleted file mode 100644 index 667e9c5..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_backup_network +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# -# Copy the network scripts from the boot device -# - -source /etc/bootvars.conf - -if [ "$1" == "" ]; then - BACKUP_DIR=${_SD_ROOT} -else - BACKUP_DIR=$1 -fi - -if [ "$2" == "" ]; then - SRC="system" -else - SRC=$2 -fi - - -mkdir -p $BACKUP_DIR - -SD_KEYDIR=${BACKUP_DIR}/sshkeys -ETC_KEYDIR=/etc/ssh -mkdir -p $SD_KEYDIR - -echo "Backing up network configuration..." - -for i in $(seq 1 $_NETWORK_FILES_NELEM); do - file=$(get_elem $i $_NETWORK_SRC_FILES) - sysfile=$(get_elem $i $_NETWORK_DST_FILES) - - if [ "$SRC" == "system" ]; then - srcpath=$sysfile - else - srcpath=${SRC}/${file} - fi - - if [ -f $srcpath ]; then - cp -f $srcpath ${BACKUP_DIR}/${file} - fi -done - -if [ "$SRC" == "system" ]; then - cp $ETC_KEYDIR/ssh_host_*key* $SD_KEYDIR/ -else - cp ${SRC}/sshkeys/ssh_host_*key* $SD_KEYDIR/ -fi - -sync - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_getbootdev b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_getbootdev deleted file mode 100644 index d725228..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_getbootdev +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -source /etc/bootvars.conf - -_SD_PART=$(df -h ${_SD_ROOT} | grep /dev | sed -E "s|(/dev/\w+).*|\1|") -_SD_DEV=$(echo ${_SD_PART} | sed -E "s|(.*)[0-9]+|\1|" | sed -E "s|(.*)p|\1|") - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_reboot_mode b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_reboot_mode deleted file mode 100755 index 81bf322..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_reboot_mode +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -source /etc/bootvars.conf - -BOOTMODE=$1 - -case $BOOTMODE in - recovery|RECOVERY) - # Set the system to reboot into recovery mode - NEW_RAMDISK=${_SYS_RECOVERY_RAMDISK} - ;; - - normal|NORMAL) - # Set the system to reboot into normal mode - NEW_RAMDISK=${_SYS_NORMAL_RAMDISK} - ;; - *) - echo $"Usage: $0 {NORMAL|RECOVERY}" - exit 1 -esac - -RAMDISK_PATH=${_SD_ROOT}/${NEW_RAMDISK} - -if [ ! -e $RAMDISK_PATH -a "$NEW_RAMDISK" != "NONE" ]; then - echo "Could not find ramdisk file $RAMDISK_PATH" - exit 1 -fi - -# Set the ramdisk boot -fw_setenv ${_UBOOT_VAR_RAMDISK} $NEW_RAMDISK - -# Clear any custom bitstream/devicetree settings to ensure a normal boot -_mw_setboot_default - -# Backup the network settings -_mw_backup_network - -# Sync -sync diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_restore_network b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_restore_network deleted file mode 100644 index 71dffba..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_restore_network +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# Copy the network scripts from the boot device -# - -source /etc/bootvars.conf - -if [ "$1" == "" ]; then - echo "Usage: $0 {BACKUP_DIR}" - exit 1 -else - BACKUP_DIR=$1 -fi - -SD_KEYDIR=${BACKUP_DIR}/sshkeys - -echo "Restoring network configuration..." - - -for i in $(seq 1 $_NETWORK_FILES_NELEM); do - file=$(get_elem $i $_NETWORK_SRC_FILES) - - if [ -f ${BACKUP_DIR}/${file} ]; then - cp -f ${BACKUP_DIR}/${file} ${_SD_ROOT}/${file} - fi -done - -cp -r $SD_KEYDIR ${_SD_ROOT} - -sync - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_setboot_default b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_setboot_default deleted file mode 100644 index f7e9ccc..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_setboot_default +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -source /etc/bootvars.conf - -# syntax: mw_setboot [fw_set_xxx args] -mw_setboot ${_SYS_DEFAULT_BITSTREAM_FILE} ${_SYS_DEFAULT_DEVICETREE_FILE} "" "" "" - -# Wipe the RD init directory -rm -rf $_SYS_RD_INIT_DIR - -rc=$? -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_setbootfile b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_setbootfile deleted file mode 100644 index 8eae674..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/_mw_setbootfile +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -# Set a boot file to a new value -# Syntax _mw_setbootfile [] - -source /etc/bootvars.conf - -UBOOTVAR=$1 -FILEPATH=$2 -FILETYPE=$3 - -if [ "$#" == "4" ]; then - #override the target RD dir - _UBOOT_RD_TGT_DIR=$4 -fi - -# Determine if anything was passed in -if [ "$FILEPATH" = "" ]; then - # No arguement, do nothing - echo "# Leaving $FILETYPE unchanged" - exit 0 -fi - -SRCDIR=$(dirname $FILEPATH) -FILENAME=$(basename $FILEPATH) - -# Resolve whether a path was provided -if [ "$SRCDIR" == "." ]; then - # No path provided, use UBOOT Root - FILEPATH=${_SD_ROOT}/${FILENAME} - SRCDIR=${_UBOOT_ROOT} -else - # Resolve the absolute path - SRCDIR=$(cd $SRCDIR; pwd) -fi - -# Make sure the specified file exists -if [ ! -e ${FILEPATH} ]; then - echo "ERROR: $FILETYPE ${FILEPATH} not found" - exit 2 #ENOENT -fi - -# Determine the target path -if [ "$_UBOOT_RD_TGT_DIR" != "" ]; then - TGTDIR=${_UBOOT_ROOT}/${_UBOOT_RD_TGT_DIR} - TGTNAME=${_UBOOT_RD_TGT_DIR}/${FILENAME} -else - TGTDIR=$_UBOOT_ROOT - TGTNAME=$FILENAME -fi - -# Copy the files to the target folder -# Peform the copy if either -# 1) Source dir is not the root of the SD -# 2) The target RD dir is not empty -if [ "$SRCDIR" != "$_UBOOT_ROOT" ] || [ "$_UBOOT_RD_TGT_DIR" != "" ]; then - echo "# Copying $FILETYPE $FILENAME to $TGTDIR" - mkdir -p $TGTDIR - cp -f $FILEPATH ${TGTDIR}/${FILENAME} -fi - -fw_setenv $UBOOTVAR $TGTNAME -rc=$? - -sync - -if [ "$rc" == "0" ]; then - echo "# Set $FILETYPE to $TGTNAME" -fi - -exit $rc diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getbitstream b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getbitstream deleted file mode 100644 index fb68d08..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getbitstream +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Set uboot to print the bistream used when booting -# Syntax fw_getbitsteam - -source /etc/bootvars.conf - -fw_printenv -n $_UBOOT_VAR_BITSTREAM -rc=$? -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getdevicetree b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getdevicetree deleted file mode 100644 index 6699fd2..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getdevicetree +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Set uboot to print the devicetree used when booting -# Syntax fw_getdevicetree - -source /etc/bootvars.conf - -fw_printenv -n $_UBOOT_VAR_DEVICETREE -rc=$? -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getrdname b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getrdname deleted file mode 100644 index 1f33ccc..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_getrdname +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# Set uboot to print the RD name used when booting -# Syntax fw_getrdname - -source /etc/bootvars.conf - -RDNAME=$(fw_printenv -n $_UBOOT_VAR_RDNAME 2>/dev/null) -rc=$? -echo $RDNAME -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setbitstream b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setbitstream deleted file mode 100644 index c03bd6a..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setbitstream +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Set uboot to use a new bitstream when booting -# Syntax fw_setbitsteam - -source /etc/bootvars.conf - -NEWBIT=$1 -shift - -_mw_setbootfile $_UBOOT_VAR_BITSTREAM $NEWBIT Bitstream "$@" -rc=$? - -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setdevicetree b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setdevicetree deleted file mode 100644 index 19e1c5e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setdevicetree +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Set uboot to use a new devicetree when booting -# Syntax fw_setdevicetree - -source /etc/bootvars.conf - -NEWDT=$1 -shift - -# Determine if anything was passed in -if [ "$NEWDT" = "" ]; then - # No arguement passed in, use $_SYS_DEFAULT_DEVICETREE_FILE - echo "# No devicetree specified, using default ${_SYS_DEFAULT_DEVICETREE_FILE}" - NEWDT=$_SYS_DEFAULT_DEVICETREE_FILE -fi - -_mw_setbootfile "$_UBOOT_VAR_DEVICETREE" "$NEWDT" Devicetree "$@" -rc=$? - -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setdtoverlay b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setdtoverlay deleted file mode 100644 index ca8ab74..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setdtoverlay +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Set uboot to use a new devicetree overlay when booting -# Syntax fw_setoverlay - -source /etc/bootvars.conf - -NEWDTOVLY=$1 -shift - -# Determine if anything was passed in -if [ "$NEWDTOVLY" = "" ]; then - # No arguement passed in, use $_SYS_DEFAULT_DEVICETREE_FILE - echo "# No devicetree overlay specified, using default ${_SYS_DEFAULT_DEVICETREE_FILE} without overlays" - exit -fi - -_mw_setbootfile fdt_overlay "$NEWDTOVLY" DTO-file -rc=$? - -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setrdname b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setrdname deleted file mode 100644 index 66df0a7..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_setrdname +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# Set uboot to store the RD name used when booting -# Syntax fw_setrdname - -source /etc/bootvars.conf - -fw_setenv $_UBOOT_VAR_RDNAME $1 - -rc=$? -exit $rc - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_updatedtoverlay b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_updatedtoverlay deleted file mode 100644 index b26e0ea..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/fw_updatedtoverlay +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# Update device-tree overlay at run-time -# Syntax: fw_updatedtoverlay -export PATH="/sbin/:/usr/sbin/:$PATH" -OVLY_LOC="/sys/kernel/config/device-tree/overlays/mw_overlay" -DTB_DST_LOC="/tmp/mw_overlay.dtbo" -DTS_SRC_LOC=$1 - - -if [ ! -f ${DTS_SRC_LOC} ] || [ "$DTS_SRC_LOC" == "" ]; then - echo "Error: Devicetree overlay file '${DTS_SRC_LOC}' not found" - exit -fi - -if [ -e $OVLY_LOC ]; then - echo "Deleting existing overlay in $OVLY_LOC" - rm -rf $OVLY_LOC > /dev/null 2>&1 -fi - -dtc -o dtb -o $DTB_DST_LOC -@ $DTS_SRC_LOC - -if [ ! -e ${DTB_DST_LOC} ]; then - echo "Error: Could not create device-tree overlay file!" - exit -fi - -mkdir -p $OVLY_LOC -cat $DTB_DST_LOC > $OVLY_LOC/dtbo -DTO_STATUS="$(cat ${OVLY_LOC}/status)" - -if [ "$DTO_STATUS" != "applied" ]; then - echo "Error: Devicetree overlay file could NOT be applied!" - exit -else - echo "Devicetree overlay applied succesfully" -fi - -# disable IIOD -echo "Disable IIOD" -killall -9 iiod - -# Restart MathWorks drivers -echo "Disabling mwipcore drivers" -rmmod mwipcore -rmmod mwipcore_iio_streaming -rmmod mathworks_ip_common - -modprobe mwipcore -modprobe mwipcore_iio_streaming -modprobe mathworks_ip_common -echo "Restarted mwipcore drivers" - -echo "Enable IIOD" -iiod & - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/mw_setboot b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/mw_setboot deleted file mode 100644 index 4322d71..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/mw_setboot +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -# Update the chosen bitstream and devicetree for a given reference design -# syntax: mw_setboot [fw_set_xxx args] -# -# Both and may be either an absolute path or a -# file located at the root of the SD card -# -# Files not already located at the root of the SD card will be copied there - -source /etc/bootvars.conf -if [ $# != 4 ]; then - echo "ERROR: Not enough input arguments!" - echo "Usage: mw_setboot fpga_image fdt_image folder_name refdes_name" - exit 1; -fi -BITSTREAM=$1 -DEVICETREE=$2 -RDINITDIR=$3 -RDNAME=$4 -shift 4 - -if [ -e ${_UBOOT_ROOT}/${_UBOOT_SCR} ]; then - echo "WARNING: Uboot script $_UBOOT_SCR detected, this may override boot settings" -fi - -# Wipe the RD init directory -rm -rf $_SYS_RD_INIT_DIR -mkdir -p $_SYS_RD_INIT_DIR -# Store the RD name -echo -n "$RDNAME" > ${_SYS_RD_INIT_DIR}/${_SYS_RD_NAME_FILE} -# Copy the files to the RD init dir -if [ "$RDINITDIR" != "" ]; then - if [ ! -d $RDINITDIR ]; then - echo "ERROR: Specified reference design init folder does not exist" - exit 2 - fi - # Copy the files - cp -R $RDINITDIR/* $_SYS_RD_INIT_DIR - echo "# Copied $RDINITDIR to $_SYS_RD_INIT_DIR" - if [ -f ${_SYS_RD_INIT_DIR}/init.sh ]; then - # ensure the script can be executed - chmod +x ${_SYS_RD_INIT_DIR}/init.sh - fi -fi - -fw_setbitstream ${BITSTREAM} "$@" -rc=$? -if [ "$rc" != "0" ]; then - echo "ERROR: Failed to set the target bitstream" - exit $rc -fi - -fw_setdevicetree ${DEVICETREE} "$@" -rc=$? -if [ "$rc" != "0" ]; then - echo "ERROR: Failed to set the target devicetree" - exit $rc -fi - -fw_setrdname "${RDNAME}" "$@" -rc=$? -if [ "$rc" != "0" ]; then - echo "ERROR: Failed to set the target reference design name" - exit $rc -fi - -echo "# Set up boot for Reference Design: '$RDNAME'" - -exit 0 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/reboot-script.sh b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/reboot-script.sh deleted file mode 100644 index 1a69aad..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/common/fs-overlay/usr/sbin/reboot-script.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -has_systemd=$(ps -o comm 1 | grep systemd) - -if [ "$has_systemd" == "systemd" ]; then - systemctl reboot -else - /sbin/reboot -fi - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/backupSSHKeys.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/backupSSHKeys.service deleted file mode 100644 index 04d20c9..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/backupSSHKeys.service +++ /dev/null @@ -1,21 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/backupSSHKeys -Requires=sdcard_mount.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=no -ExecStart=/usr/sbin/backupSSHKeys start -ExecStop=/usr/sbin/backupSSHKeys stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/hostname.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/hostname.service deleted file mode 100644 index 51cd62b..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/hostname.service +++ /dev/null @@ -1,22 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/update_hostname -Before=network.service -After=usb_network.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/update_hostname start -ExecStop=/usr/sbin/update_hostname stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/inetd.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/inetd.service deleted file mode 100644 index 047faf5..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/inetd.service +++ /dev/null @@ -1,21 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/inetd -After=network.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/inetd start -ExecStop=/usr/sbin/inetd stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/network.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/network.service deleted file mode 100644 index 273d617..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/network.service +++ /dev/null @@ -1,21 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/network -After=hostname.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/network start -ExecStop=/usr/sbin/network stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/network_scripts.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/network_scripts.service deleted file mode 100644 index 1539b52..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/network_scripts.service +++ /dev/null @@ -1,22 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/network_scripts -Before=network.service -After=sdcard_mount.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/network_scripts start -ExecStop=/usr/sbin/network_scripts stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/nfs-common.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/nfs-common.service deleted file mode 100644 index 046e023..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/nfs-common.service +++ /dev/null @@ -1,34 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/nfscommon -Description=LSB: NFS support for both client and server -Before=multi-user.target -Before=graphical.target -Before=user_init.service -Before=network_scripts.service -Before=usb_network.service -Before=sdinit.service -Before=hostname.service -Before=user_app.service -Before=network.service -After=rpcbind.target -After=hwclock.service -After=sdcard_mount.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -SuccessExitStatus=5 6 -RemainAfterExit=yes -ExecStart=/usr/sbin/nfscommon start -ExecStop=/usr/sbin/nfscommon stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/restoreSSHKeys.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/restoreSSHKeys.service deleted file mode 100644 index 85f24fc..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/restoreSSHKeys.service +++ /dev/null @@ -1,21 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/restoreSSHKeys -Requires=network.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=no -ExecStart=/usr/sbin/restoreSSHKeys start -ExecStop=/usr/sbin/restoreSSHKeys stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/sdcard_mount.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/sdcard_mount.service deleted file mode 100644 index 3d302b3..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/sdcard_mount.service +++ /dev/null @@ -1,30 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -SourcePath=/usr/sbin/sdcard_mount -Before=rescue.target -Before=multi-user.target -Before=user_init.service -Before=network_scripts.service -Before=usb_network.service -Before=sdinit.service -Before=hostname.service -Before=nfscommon.service -Before=user_app.service -Before=dropbear.service -Before=network.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/sdcard_mount start -ExecStop=/usr/sbin/sdcard_mount stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/sdinit.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/sdinit.service deleted file mode 100644 index eeb07d2..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/sdinit.service +++ /dev/null @@ -1,24 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/sdinit -Before=rescue.target -Before=multi-user.target -Before=graphical.target -After=user_init.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/sdinit start -ExecStop=/usr/sbin/sdinit stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/start_only.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/start_only.service deleted file mode 100644 index c1cc141..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/start_only.service +++ /dev/null @@ -1,20 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/start_only.sh - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/start_only.sh start -ExecStop=/usr/sbin/start_only.sh stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/udhcpd.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/udhcpd.service deleted file mode 100644 index b4c8f60..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/udhcpd.service +++ /dev/null @@ -1,20 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/udhcpd - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/udhcpd start -ExecStop=/usr/sbin/udhcpd stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/usb_network.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/usb_network.service deleted file mode 100644 index 5ef9396..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/usb_network.service +++ /dev/null @@ -1,22 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/usb_network -Before=network.service -After=network_scripts.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/usb_network start -ExecStop=/usr/sbin/usb_network stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/user_app.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/user_app.service deleted file mode 100644 index a959987..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/user_app.service +++ /dev/null @@ -1,22 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/user_app -Before=sdinit.service -After=usb_network.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/user_app start -ExecStop=/usr/sbin/user_app stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/user_init.service b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/user_init.service deleted file mode 100644 index 22fa0b3..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/services/user_init.service +++ /dev/null @@ -1,22 +0,0 @@ -# Automatically generated by systemd-sysv-generator - -[Unit] -Documentation=man:systemd-sysv-generator(8) -SourcePath=/usr/sbin/user_init -Before=user_app.service -Before=sdinit.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/usr/sbin/user_init start -ExecStop=/usr/sbin/user_init stop -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/bootvars.d/50platform.conf b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/bootvars.d/50platform.conf deleted file mode 100644 index 8e0e8e7..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/bootvars.d/50platform.conf +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# Boot variables -# This script is sourced from various uboot manipulation scripts - -_UBOOT_SCR=uEnv.txt - -_UBOOT_VAR_DEVICETREE=fdt_image -_UBOOT_VAR_BITSTREAM=bitstream_image -_UBOOT_VAR_RAMDISK=initrd_image - -_UBOOT_DO_SYNC=true - -_SYS_PERSISTENT_FILESYSTEM=false -_SYS_DEFAULT_DEVICETREE_FILE=devicetree.dtb -_SYS_DEFAULT_BITSTREAM_FILE=system.bit - -_SYS_NORMAL_RAMDISK=rootfs.cpio.gz.u-boot - -_SYS_ZYNQMP_SILICON="ES1" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/fstab b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/fstab deleted file mode 100644 index 54fdbcf..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/fstab +++ /dev/null @@ -1,12 +0,0 @@ -# /etc/fstab: static file system information. -# -# -/dev/root / ext2 rw,noauto 0 1 -proc /proc proc defaults 0 0 -devpts /dev/pts devpts defaults,gid=5,mode=620 0 0 -tmpfs /dev/shm tmpfs mode=0777 0 0 -tmpfs /tmp tmpfs defaults 0 0 -sysfs /sys sysfs defaults 0 0 -configfs /config configfs defaults 0 0 -debugfs /sys/kernel/debug debugfs defaults 0 0 -/dev/mmcblk0p1 /mnt vfat defaults 0 0 diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/fw_env.config b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/fw_env.config deleted file mode 100644 index 47b461d..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/fw_env.config +++ /dev/null @@ -1,11 +0,0 @@ -# Configuration file for fw_(printenv/setenv) utility. -# Up to two entries are valid, in this case the redundant -# environment sector is assumed present. -# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash. -# Futhermore, if the Flash sector size is ommitted, this value is assumed to -# be the same as the Environment size, which is valid for NOR and SPI-dataflash - -# File Example -# Filename Offset Size Sector Size (= Size) -/mnt/uboot.env 0x0000 0x8000 0x8000 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/profile.d/prompt.sh b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/profile.d/prompt.sh deleted file mode 100644 index f9f9cc2..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/etc/profile.d/prompt.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# set the prompt -export PS1="\e[0;31mzynqrf> \e[m" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/sbin/reboot b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/sbin/reboot deleted file mode 120000 index 802cacd..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/sbin/reboot +++ /dev/null @@ -1 +0,0 @@ -zynqmp_reboot \ No newline at end of file diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/sbin/zynqmp_reboot b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/sbin/zynqmp_reboot deleted file mode 100755 index 0f594d9..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/sbin/zynqmp_reboot +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -################################## -# Reboot zynqmp ES1/ES2 systems -# -# See AR# 68514 -################################## - -source /etc/bootvars.conf - -PM_NODE="/sys/kernel/debug/zynqmp_pm/power" -ES1_RESET="reset_assert 1114 2" -ES2_RESET="system_shutdown 1 2" -STD_RESET="/bin/busybox reboot" - -# If there is no PM in debugfs, default to the standard method -if [ ! -e "$PM_NODE" ]; then - _SYS_ZYNQMP_SILICON="" -fi - -case "$_SYS_ZYNQMP_SILICON" in - "ES1") - sync - echo $ES1_RESET > $PM_NODE - ;; - "ES2") - sync - echo $ES2_RESET > $PM_NODE - ;; - *) - $STD_RESET - ;; -esac - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/usr/bin/zynqfpgaprog b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/usr/bin/zynqfpgaprog deleted file mode 100755 index 929ecac..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/usr/bin/zynqfpgaprog +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -DEVNODE=/dev/xdevcfg -DEVMAJ=259 -DEVMIN=0 - -SYSNODE=`find /sys/devices -type f -name prog_done` -PROGDONE="cat $SYSNODE" - -# create the device node if it doesn't already exist -if [ ! -e $DEVNODE ]; then - mknod $DEVNODE c $DEVMAJ $DEVMIN -fi - -if [ ! -e "$1" ]; then - echo "You must supply a byte-swapped bistream" - exit 1 -fi - -echo "Initial FPGA status: $($PROGDONE)" - -echo "Downloading bitstream" -cat $1 > $DEVNODE - -echo "Download completed" - -TIMEOUT=100 - -while [ "$($PROGDONE)" != 1 ]; do - TIMEOUT=$((TIMEOUT-1)) - if [ "$TIMEOUT" == "0" ]; then - echo "Programming Failed" - exit 1 - fi -done - -echo "Programming successful" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/usr/sbin/mw_fwupdate b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/usr/sbin/mw_fwupdate deleted file mode 100755 index 9df62e7..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/files/zynqmp/fs-overlay/usr/sbin/mw_fwupdate +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -source /etc/bootvars.conf - -source $(which _mw_getbootdev) - -NEW_IMG=$1 - -if [ ! -e ${_SD_DEV} ]; then - echo "ERROR: Could not find ${_SD_DEV}" - exit 1 -fi - -# Format the SD device -umount ${_SD_ROOT} -echo "# Wiping ${_SD_DEV}" -sfdisk --delete ${_SD_DEV} -echo "# Formatting ${_SD_DEV}" -echo ",,b;" | sfdisk ${_SD_DEV} -mkfs -t fat ${_SD_PART} - -echo "# Updating ${_SD_DEV}" -# Remount the SD device -/etc/init.d/S09sdcard_mount start -unzip $NEW_IMG -d ${_SD_ROOT} - -# Preserve the network settings -_mw_backup_network - -# Reboot into the new image -sync -reboot - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/init-ifupdown%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/init-ifupdown%.bbappend deleted file mode 100755 index f14cf54..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/init-ifupdown%.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files/common/fs-overlay/etc/network:" -SRC_URI += " file://interfaces" - -do_install_append() { - install -d ${D}${sysconfdir}/network/ - install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces - -} -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/mw-fs-overlay%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/mw-fs-overlay%.bbappend deleted file mode 100644 index 548753a..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/mw-fs-overlay%.bbappend +++ /dev/null @@ -1,26 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files/common/fs-overlay/usr:" -#Append symbolic links -SRC_URI += " file://sbin/" - -do_install:append() { - install -d ${D}${bindir} - cd ${D}${bindir} - ln -s ../sbin/fw_getbitstream fw_getbitstream - ln -s ../sbin/fw_getdevicetree fw_getdevicetree - ln -s ../sbin/fw_getrdname fw_getrdname - ln -s ../sbin/fw_setbitstream fw_setbitstream - ln -s ../sbin/fw_setdevicetree fw_setdevicetree - ln -s ../sbin/fw_setdtoverlay fw_setdtoverlay - ln -s ../sbin/fw_setrdname fw_setrdname - ln -s ../sbin/fw_updatedtoverlay fw_updatedtoverlay - ln -s ../sbin/_mw_backup_network _mw_backup_network - ln -s ../sbin/_mw_getbootdev _mw_getbootdev - ln -s ../sbin/_mw_reboot_mode _mw_reboot_mode - ln -s ../sbin/_mw_restore_network _mw_restore_network - ln -s ../sbin/mw_setboot mw_setboot - ln -s ../sbin/_mw_setboot_default _mw_setboot_default - ln -s ../sbin/_mw_setbootfile _mw_setbootfile - ln -s ../sbin/reboot-script.sh reboot -} - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/mw-fs-overlay.bb b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/mw-fs-overlay.bb deleted file mode 100644 index 098c39b..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/mw-fs-overlay.bb +++ /dev/null @@ -1,108 +0,0 @@ -# -# MW filesystem additions -# -DESCRIPTION = "Add MW startup files and other utilities" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -RDEPENDS:${PN} += "libubootenv" - -inherit systemd features_check - -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -FILESEXTRAPATHS:prepend := "${THISDIR}/common:" -FILESEXTRAPATHS:prepend := "${THISDIR}/services:" - -SRC_URI = " file://common file://zynqmp \ - file://services/hostname.service \ - file://services/inetd.service \ - file://services/network.service \ - file://services/network_scripts.service \ - file://services/nfs-common.service \ - file://services/sdcard_mount.service \ - file://services/sdinit.service \ - file://services/start_only.service \ - file://services/udhcpd.service \ - file://services/usb_network.service \ - file://services/user_app.service \ - file://services/user_init.service \ - file://services/backupSSHKeys.service \ - file://services/restoreSSHKeys.service \ - " - -PACKAGE_ARCH = "${MACHINE_ARCH}" -DEPENDS:append = " update-rc.d-native" - -SYSTEMD_SERVICE:${PN} = "sdcard_mount.service usb_network.service \ - sdinit.service network.service \ - network_scripts.service udhcpd.service \ - inetd.service user_app.service \ - nfs-common.service hostname.service \ - backupSSHKeys.service restoreSSHKeys.service" - -do_install() { - chmod -R 0755 ${WORKDIR}/common/fs-overlay/usr/sbin/ - chmod -R 0755 ${WORKDIR}/zynqmp/fs-overlay/etc/profile.d/ - install -d ${D}${sysconfdir}/ - install -m 0644 ${WORKDIR}/common/fs-overlay/etc/udhcpd.conf ${D}${sysconfdir}/udhcpd.conf - - install -d ${D}${sysconfdir}/bootvars.d/ - cp -r ${WORKDIR}/common/fs-overlay/etc/bootvars.conf ${D}${sysconfdir}/ - cp -r ${WORKDIR}/common/fs-overlay/etc/bootvars.d/* ${D}${sysconfdir}/bootvars.d/ - - install -d ${D}${sbindir}/ - install -d ${D}${sysconfdir}/init.d - - if [ "${@bb.utils.contains('INIT_MANAGER','systemd','yes','no',d)}" = "yes" ]; then - echo "Installing MW systemd services..." - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/backupSSHKeys ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/restoreSSHKeys ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/hostname ${D}${sbindir}/update_hostname - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/network ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/network_scripts ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/sdcard_mount ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/sdinit ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/usb_network ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/user_app ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/user_init ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/user_init ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/start_only.sh ${D}${sbindir}/ - install -m 0755 ${WORKDIR}/common/fs-overlay/etc/init.d/start_only.sh ${D}${sysconfdir}/init.d/ - install -d ${D}${systemd_system_unitdir}/ - cp -r ${WORKDIR}/services/* ${D}${systemd_system_unitdir}/ - else - echo "Installing MW sysvinit services..." - cp -r ${WORKDIR}/common/fs-overlay/etc/init.d/* ${D}${sysconfdir}/init.d - chmod -R 0755 ${D}${sysconfdir}/init.d - install -d ${D}${sysconfdir}/rcS.d - install -d ${D}${sysconfdir}/rc1.d - install -d ${D}${sysconfdir}/rc2.d - install -d ${D}${sysconfdir}/rc3.d - install -d ${D}${sysconfdir}/rc4.d - install -d ${D}${sysconfdir}/rc5.d - update-rc.d -r ${D} sdcard_mount start 8 1 2 3 4 5 . - update-rc.d -r ${D} restoreSSHKeys start 9 1 2 3 4 5 . - update-rc.d -r ${D} network_scripts start 38 1 2 3 4 5 . - update-rc.d -r ${D} hostname start 39 1 2 3 4 5 . - update-rc.d -r ${D} usb_network start 39 1 2 3 4 5 . - update-rc.d -r ${D} network start 40 1 2 3 4 5 . - update-rc.d -r ${D} inetd start 41 1 2 3 4 5 . - update-rc.d -r ${D} backupSSHKeys start 51 1 2 3 4 5 . - update-rc.d -r ${D} user_init start 97 1 2 3 4 5 . - update-rc.d -r ${D} user_app start 98 1 2 3 4 5 . - update-rc.d -r ${D} sdinit start 99 1 2 3 4 5 . - fi - - cp -r ${WORKDIR}/common/fs-overlay/usr/sbin/* ${D}/${sbindir}/ - chmod -R 0755 ${D}${sbindir}/ - - install -d ${D}/${sysconfdir}/udev/rules.d/ - cp -r ${WORKDIR}/common/fs-overlay/etc/udev/rules.d/* ${D}/${sysconfdir}/udev/rules.d/ -} - -FILES:${PN} += "${sysconfdir}/*" -FILES:${PN} += "${sbindir}/" -FILES:${PN} += "${systemd_system_unitdir}/" -SYSTEMD_AUTO_ENABLE = "enable" -INSANE_SKIP:${PN} += "installed-vs-shipped" -REQUIRED_DISTRO_FEATURES = "systemd" \ No newline at end of file diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/u-boot-fw-utils%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/u-boot-fw-utils%.bbappend deleted file mode 100644 index 4466fab..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/u-boot-fw-utils%.bbappend +++ /dev/null @@ -1,26 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files/zynqmp/fs-overlay/etc/:" -#S = "${WORKDIR}/mw-fs-overlay" -#S = "${WORKDIR}" -# -SRCREV = "0b0c6af38738f2c132cfd41a240889acaa031c8f" - -SRC_URI += "git://git.denx.de/u-boot.git" -SRC_URI += " file://fw_env.config" - -# remove patches introduced in older version -SRC_URI_remove = "file://0001-CVE-2019-13103.patch" -SRC_URI_remove = "file://0002-CVE-2019-13104.patch" -SRC_URI_remove = "file://0003-CVE-2019-13105.patch" -SRC_URI_remove = "file://0004-CVE-2019-13106.patch" -SRC_URI_remove = "file://0005-CVE-2019-14192-14193-14199.patch" -SRC_URI_remove = "file://0006-CVE-2019-14197-14200-14201-14202-14203-14204.patch" -SRC_URI_remove = "file://0007-CVE-2019-14194-14198.patch" -SRC_URI_remove = "file://0008-CVE-2019-14195.patch" -SRC_URI_remove = "file://0009-CVE-2019-14196.patch" - - -do_install_append() { - install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config -} -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/udev-extraconf%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/udev-extraconf%.bbappend deleted file mode 100644 index dd907ec..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-fs-overlay/udev-extraconf%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -# Override /etc/udev/scripts/network.sh -FILESEXTRAPATHS:prepend := "${THISDIR}/files/common/fs-overlay/etc/udev/scripts:" \ No newline at end of file diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/CMakeLists.txt b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/CMakeLists.txt deleted file mode 100644 index 7588935..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -set(CMAKE_VERBOSE_MAKEFILE ON) -# Set the project name and version -project(MWDeviceTreeGen VERSION 1.0) - -find_program(DTC_EXECUTABLE NAMES dtc) -if (NOT DTC_EXECUTABLE) - message(FATAL_ERROR "dtc (Device tree compiler) not found") -endif() - -# Get the path to the kernel source and the target architecture from the environment -set(ARCH "${ARCH}") -set(CROSS_COMPILE_GCC "${CROSS_COMPILE}gcc") -set(LINUX_KERNEL "${KERNEL_DIR}") - - -file(GLOB DTS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.dts") - -foreach (DTS_FILE IN LISTS DTS_FILES) - # Get the filename without folder and extension - get_filename_component(DTS_FILENAME_NOEXT ${DTS_FILE} NAME_WE) - set(DTS_PRE_PROC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DTS_FILENAME_NOEXT}.pre.dts") - set(DTS_PRE_PROC_DEP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DTS_FILENAME_NOEXT}.dts.dep") - set(DTB_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DTS_FILENAME_NOEXT}.dtb") - - # Create a custom command that generates a device-tree blobs - add_custom_command( - OUTPUT ${DTS_PRE_PROC_FILE} - COMMAND ${CROSS_COMPILE_GCC} -E -Wp,-MD,${DTS_PRE_PROC_DEP_FILE} -nostdinc -undef -D__DTS__ -x assembler-with-cpp -I${LINUX_KERNEL}/include -I${LINUX_KERNEL}/arch/arm64/boot/dts/xilinx -I${LINUX_KERNEL}/arch/arm/boot/dts/xilinx -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/common -I${CMAKE_CURRENT_SOURCE_DIR}/zynqmp -I${CMAKE_CURRENT_SOURCE_DIR}/zynq -o ${DTS_PRE_PROC_FILE} ${DTS_FILE} - DEPENDS ${DTS_FILE} - COMMENT "Pre-processing ${DTS_FILE}..." - VERBATIM - ) - - # Create a custom command that generates a device-tree blobs - add_custom_command( - OUTPUT ${DTB_FILE} - COMMAND ${DTC_EXECUTABLE} -@ -I dts -O dtb -o ${DTB_FILE} ${DTS_PRE_PROC_FILE} - DEPENDS ${DTS_PRE_PROC_FILE} - COMMENT "Compiling ${DTS_PRE_PROC_FILE} to ${DTB_FILE}..." - VERBATIM - ) - - list(APPEND DTB_FILES ${DTB_FILE}) -endforeach() -# Create a custom target that depends on the output generated by the custom command -add_custom_target( - CompileDTS ALL - DEPENDS ${DTB_FILES} -) - -foreach(DTB_FILE IN LISTS DTB_FILES) - install( - FILES ${DTB_FILE} - DESTINATION /boot/dtbs/ - ) -endforeach() diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_128.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_128.dts deleted file mode 100644 index 1cd5907..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_128.dts +++ /dev/null @@ -1,9 +0,0 @@ -#include "base.dtsi" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT - -#define MW_MM2S_DATAFMT "u128/128>>0" -#define MW_S2MM_DATAFMT "u128/128>>0" - -#include "zynqmp-adi-mw-axistream-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_128_aximaster.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_128_aximaster.dts deleted file mode 100644 index 93e10a2..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_128_aximaster.dts +++ /dev/null @@ -1,14 +0,0 @@ -#include "base.dtsi" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT - -#define MW_MM2S_DATAFMT "u128/128>>0" -#define MW_S2MM_DATAFMT "u128/128>>0" - -#include "zynqmp-adi-mw-axistream-iio-common.dtsi" -#include "zynqmp-mw-sharedmem-iio-common.dtsi" -/* define the PL DDR size */ -#define MW_PLDDR_SIZE_1 (0x00000000) -#define MW_PLDDR_SIZE_0 (0x20000000) // 512 MB -#include "zynqmp-mw-sharedmem-iio-plmem.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_32.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_32.dts deleted file mode 100644 index e443c86..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_32.dts +++ /dev/null @@ -1,2 +0,0 @@ -#include "base.dtsi" -#include "zynqmp-adi-mw-axistream-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_32_aximaster.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_32_aximaster.dts deleted file mode 100644 index 22e900f..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_32_aximaster.dts +++ /dev/null @@ -1,7 +0,0 @@ -#include "base.dtsi" -#include "zynqmp-adi-mw-axistream-iio-common.dtsi" -#include "zynqmp-mw-sharedmem-iio-common.dtsi" -/* define the PL DDR size */ -#define MW_PLDDR_SIZE_1 (0x00000000) -#define MW_PLDDR_SIZE_0 (0x20000000) // 512 MB -#include "zynqmp-mw-sharedmem-iio-plmem.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_64.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_64.dts deleted file mode 100644 index fc51931..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_64.dts +++ /dev/null @@ -1,8 +0,0 @@ -#include "base.dtsi" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT - -#define MW_MM2S_DATAFMT "u64/64>>0" -#define MW_S2MM_DATAFMT "u64/64>>0" -#include "zynqmp-adi-mw-axistream-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_64_aximaster.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_64_aximaster.dts deleted file mode 100644 index 1d331b7..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/adi_axistream_64_aximaster.dts +++ /dev/null @@ -1,14 +0,0 @@ -#include "base.dtsi" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT - -#define MW_MM2S_DATAFMT "u64/64>>0" -#define MW_S2MM_DATAFMT "u64/64>>0" - -#include "zynqmp-adi-mw-axistream-iio-common.dtsi" -#include "zynqmp-mw-sharedmem-iio-common.dtsi" -/* define the PL DDR size */ -#define MW_PLDDR_SIZE_1 (0x00000000) -#define MW_PLDDR_SIZE_0 (0x20000000) // 512 MB -#include "zynqmp-mw-sharedmem-iio-plmem.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axilite.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axilite.dts deleted file mode 100644 index e0d3497..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axilite.dts +++ /dev/null @@ -1 +0,0 @@ -#include "base.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axistream.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axistream.dts deleted file mode 100644 index b82332e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axistream.dts +++ /dev/null @@ -1,2 +0,0 @@ -#include "base.dtsi" -#include "zynqmp-mw-axistream-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axistream_64.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axistream_64.dts deleted file mode 100644 index 6716e85..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/axistream_64.dts +++ /dev/null @@ -1,2 +0,0 @@ -#include "base.dtsi" -#include "zynqmp-mw-axistream-iio-common-64.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/base.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/base.dtsi deleted file mode 100644 index caca673..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/base.dtsi +++ /dev/null @@ -1,13 +0,0 @@ -#include "zynqmp-zcu111-revA.dts" -/ { - chosen { - bootargs = "earlycon root=/dev/ram rw"; - }; -}; - -#include "zynqmp-mw-fpga-bridge-common.dtsi" -#include "zynqmp-mw-common.dtsi" -#include "mw-aximm-common.dtsi" -&mwipcore0 { - reg = <0xA0000000 0xffff>; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-dma.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-dma.dtsi deleted file mode 100644 index a3f5c42..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-dma.dtsi +++ /dev/null @@ -1,47 +0,0 @@ - -#include "adi-mw-axistream-dma.h" - -&fpga_axi { - axi4stream_mm2s: dma@0 { - compatible = "adi,axi-dmac-1.00.a"; - reg = <0x40020000 0xffff>; - #dma-cells = <1>; - interrupts = <0 0x1d 0>; - clocks = <&core_clkwiz 0>; - - adi,channels { - #size-cells = <0>; - #address-cells = <1>; - - axi4stream_mm2s_channel: dma-channel@0 { - reg = <0>; - adi,source-bus-width = ADI_MM2S_AXIM_DATAWIDTH; - adi,source-bus-type = ADI_AXI_DMAC_TYPE_AXI_MM; - adi,destination-bus-width = ADI_MM2S_AXIS_DATAWIDTH; - adi,destination-bus-type = ADI_AXI_DMAC_TYPE_AXI_STREAM; - }; - }; - }; - - axi4stream_s2mm: dma@1 { - compatible = "adi,axi-dmac-1.00.a"; - reg = <0x40030000 0xffff>; - #dma-cells = <1>; - interrupts = <0 0x1e 0>; - clocks = <&core_clkwiz 0>; - - adi,channels { - #size-cells = <0>; - #address-cells = <1>; - - axi4stream_s2mm_channel: dma-channel@0 { - reg = <0>; - adi,source-bus-width = ADI_S2MM_AXIS_DATAWIDTH; - adi,source-bus-type = ADI_AXI_DMAC_TYPE_AXI_STREAM; - adi,destination-bus-width = ADI_S2MM_AXIM_DATAWIDTH; - adi,destination-bus-type = ADI_AXI_DMAC_TYPE_AXI_MM; - }; - }; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-dma.h b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-dma.h deleted file mode 100644 index bb18005..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-dma.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ADI_MW_AXISTREAM_DMA__ -#define __ADI_MW_AXISTREAM_DMA__ - -#if defined(MW_DATAWIDTH_SELECT) && MW_DATAWIDTH_SELECT == 64 - #define ADI_MM2S_AXIM_DATAWIDTH <64> - #define ADI_MM2S_AXIS_DATAWIDTH <64> - #define ADI_S2MM_AXIM_DATAWIDTH <64> - #define ADI_S2MM_AXIS_DATAWIDTH <64> -#else - #define ADI_MM2S_AXIM_DATAWIDTH <32> - #define ADI_MM2S_AXIS_DATAWIDTH <32> - #define ADI_S2MM_AXIM_DATAWIDTH <32> - #define ADI_S2MM_AXIS_DATAWIDTH <32> -#endif - -#define ADI_AXI_DMAC_TYPE_AXI_MM <0> -#define ADI_AXI_DMAC_TYPE_AXI_STREAM <1> -#define ADI_AXI_DMAC_TYPE_AXI_FIFO <2> - -#endif /* __ADI_MW_AXISTREAM_DMA__ */ diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-iio-common.dtsi deleted file mode 100644 index 5cd7648..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-axistream-iio-common.dtsi +++ /dev/null @@ -1,4 +0,0 @@ -#include "adi-mw-axistream-dma.dtsi" -#include "mw-axistream-iio-common.dtsi" - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-dlhdl-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-dlhdl-iio-common.dtsi deleted file mode 100644 index f38e5bf..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/adi-mw-dlhdl-iio-common.dtsi +++ /dev/null @@ -1,2 +0,0 @@ -#include "adi-mw-axistream-dma.dtsi" -#include "mw-dlhdl-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-aximm-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-aximm-common.dtsi deleted file mode 100644 index 8eb32e1..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-aximm-common.dtsi +++ /dev/null @@ -1,16 +0,0 @@ -&mwipcore0 { - compatible = "mathworks,mwipcore-v3.00"; - #address-cells = <1>; - #size-cells = <0>; - - mmrd-channel@0 { - reg = <0x0>; - compatible = "mathworks,mm-read-channel-v1.00"; - mathworks,dev-name = "mmrd0"; - }; - mmwr-channel@1 { - reg = <0x1>; - compatible = "mathworks,mm-write-channel-v1.00"; - mathworks,dev-name = "mmwr0"; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-axistream-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-axistream-iio-common.dtsi deleted file mode 100644 index b536284..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-axistream-iio-common.dtsi +++ /dev/null @@ -1,39 +0,0 @@ -#include "mw-axistream-iio-common.h" - -&mwipcore0 { - compatible = "mathworks,mwipcore-v3.00"; - #address-cells = <1>; - #size-cells = <0>; - stream-channel@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x0>; - compatible = "mathworks,axi4stream-mm2s-channel-v1.00"; - dma-names = "mm2s"; - dmas = <&axi4stream_mm2s 0>; - mathworks,dev-name = "mm2s0"; - - data-channel@0 { - compatible = "mathworks,iio-data-channel-v1.00"; - mathworks,data-format = MW_MM2S_DATAFMT; - reg = <0x0>; - }; - }; - stream-channel@1 { - reg = <0x1>; - #address-cells = <1>; - #size-cells = <0>; - compatible = "mathworks,axi4stream-s2mm-channel-v1.00"; - dma-names = "s2mm"; - dmas = <&axi4stream_s2mm 0>; - mathworks,dev-name = "s2mm0"; - mathworks,sample-cnt-reg = <0x8>; - - data-channel@0 { - compatible = "mathworks,iio-data-channel-v1.00"; - mathworks,data-format = MW_S2MM_DATAFMT; - reg = <0x0>; - }; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-axistream-iio-common.h b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-axistream-iio-common.h deleted file mode 100644 index 5250fd4..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-axistream-iio-common.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __MW_AXISTREAM_COMMON__ -#define __MW_AXISTREAM_COMMON__ - -#if defined(MW_DATAWIDTH_SELECT) && MW_DATAWIDTH_SELECT == 64 - #define MW_MM2S_DATAFMT "u64/64>>0" - #define MW_S2MM_DATAFMT "u64/64>>0" -#else - #define MW_MM2S_DATAFMT "u32/32>>0" - #define MW_S2MM_DATAFMT "u32/32>>0" -#endif - -#endif /* __MW_AXISTREAM_COMMON__ */ diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-dlhdl-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-dlhdl-iio-common.dtsi deleted file mode 100644 index 164800e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-dlhdl-iio-common.dtsi +++ /dev/null @@ -1,67 +0,0 @@ -#include "mw-axistream-iio-common.h" -&mwipcore_ddr0 { - compatible = "mathworks,mwipcore-v3.00"; - #address-cells = <1>; - #size-cells = <0>; - mmwr-channel@1 { - compatible = "mathworks,mm-write-channel-v1.00"; - mathworks,dev-name = "mmwr0"; - reg = <0x1>; - }; - stream-channel@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x0>; - compatible = "mathworks,axi4stream-mm2s-channel-v1.00"; - dma-names = "mm2s"; - dmas = <&axi4stream_mm2s 0>; - mathworks,dev-name = "mm2s0"; - - data-channel@0 { - compatible = "mathworks,iio-data-channel-v1.00"; - mathworks,data-format = MW_MM2S_DATAFMT; - reg = <0x0>; - }; - }; - mmrd-channel@0 { - compatible = "mathworks,mm-read-channel-v1.00"; - mathworks,dev-name = "mmrd0"; - reg = <0x0>; - }; - stream-channel@1 { - reg = <0x1>; - #address-cells = <1>; - #size-cells = <0>; - compatible = "mathworks,axi4stream-s2mm-channel-v1.00"; - dma-names = "s2mm"; - dmas = <&axi4stream_s2mm 0>; - mathworks,dev-name = "s2mm0"; - mathworks,sample-cnt-reg = <0x40>; - - data-channel@0 { - compatible = "mathworks,iio-data-channel-v1.00"; - mathworks,data-format = MW_S2MM_DATAFMT; - reg = <0x0>; - }; - }; -}; - -&mwipcore_dl0 { - compatible = "mathworks,mwipcore-v3.00"; - #address-cells = <0x1>; - #size-cells = <0x0>; - linux,phandle = <0x41>; - phandle = <0x41>; - - mmrd-channel@0 { - reg = <0x0>; - compatible = "mathworks,mm-read-channel-v1.00"; - mathworks,dev-name = "mmrd0"; - }; - - mmwr-channel@1 { - reg = <0x1>; - compatible = "mathworks,mm-write-channel-v1.00"; - mathworks,dev-name = "mmwr0"; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-generic.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-generic.dtsi deleted file mode 100644 index d48706c..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-generic.dtsi +++ /dev/null @@ -1,15 +0,0 @@ -/{ - dma_misc { - compatible = "simple-bus"; - #address-cells = <0x1>; - #size-cells = <0x0>; - - mwmiscdma { - compatible = "mathworks,mwgeneric-v1.00"; - reg = <0x0>; - mwgen,type = "nomem"; - mwgen,devname = "mwmiscdma"; - }; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-sharedmem-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-sharedmem-iio-common.dtsi deleted file mode 100644 index be30243..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/mw-sharedmem-iio-common.dtsi +++ /dev/null @@ -1,26 +0,0 @@ -&mwipcore0 { - compatible = "mathworks,mwipcore-v3.00"; - #address-cells = <1>; - #size-cells = <0>; - - sharedmem@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x0>; - compatible = "mathworks,sharedmem-v1.00"; - memory-region = <&sharedmem>; - mathworks,dev-name = "sharedmem0"; - - read-channel@0 { - reg = <0x0>; - compatible = "mathworks,sharedmem-read-channel-v1.00"; - mathworks,dev-name = "rd0"; - }; - - write-channel@1 { - reg = <0x1>; - compatible = "mathworks,sharedmem-write-channel-v1.00"; - mathworks,dev-name = "wr0"; - }; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-dma.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-dma.dtsi deleted file mode 100644 index ab69a78..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-dma.dtsi +++ /dev/null @@ -1,46 +0,0 @@ - -#include "xilinx-mw-axistream-dma.h" - -&fpga_axi { - axi4stream_mm2s:axidma@0 { - #dma-cells = <0x1>; - #address-cells = <1>; - #size-cells = <0>; - compatible = "xlnx,axi-dma-1.00.a"; - reg = <0x40020000 0xffff>; - xlnx,include-sg = <0x1>; - xlnx,halt-mode = "reset-always"; - xlnx,addrwidth = <0x20>; - clocks = <&core_clkwiz 0>, <&core_clkwiz 0>, <&core_clkwiz 0>; - clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk"; - dma-channel@0 { - reg = <0x0>; - compatible = "xlnx,axi-dma-mm2s-channel"; - interrupts = <0x0 0x1d 0x4>; - dma-channels = <0x1>; - xlnx,datawidth = XLNX_MM2S_DATAWIDTH; - xlnx,no-coalesce; - }; - }; - axi4stream_s2mm:axidma@1 { - #dma-cells = <0x1>; - #address-cells = <1>; - #size-cells = <0>; - compatible = "xlnx,axi-dma-1.00.a"; - reg = <0x40030000 0xffff>; - xlnx,include-sg = <0x1>; - xlnx,halt-mode = "reset-always"; - xlnx,addrwidth = <0x20>; - clocks = <&core_clkwiz 0>, <&core_clkwiz 0>, <&core_clkwiz 0>; - clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk"; - dma-channel@0 { - reg = <0x0>; - compatible = "xlnx,axi-dma-s2mm-channel"; - interrupts = <0x0 0x1e 0x4>; - dma-channels = <0x1>; - xlnx,datawidth = XLNX_S2MM_DATAWIDTH; - xlnx,no-coalesce; - }; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-dma.h b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-dma.h deleted file mode 100644 index 146de66..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-dma.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __XLNX_MW_AXISTREAM_DMA__ -#define __XLNX_MW_AXISTREAM_DMA__ - -#if defined(MW_DATAWIDTH_SELECT) && MW_DATAWIDTH_SELECT == 64 - #define XLNX_MM2S_DATAWIDTH <0x40> - #define XLNX_S2MM_DATAWIDTH <0x40> -#else - #define XLNX_MM2S_DATAWIDTH <0x20> - #define XLNX_S2MM_DATAWIDTH <0x20> -#endif - -#endif /* __XLNX_MW_AXISTREAM_DMA__ */ diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-iio-common.dtsi deleted file mode 100644 index 0f66df0..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-axistream-iio-common.dtsi +++ /dev/null @@ -1,3 +0,0 @@ -#include "xilinx-mw-axistream-dma.dtsi" -#include "mw-axistream-iio-common.dtsi" - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-dlhdl-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-dlhdl-iio-common.dtsi deleted file mode 100644 index 8f37190..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/common/xilinx-mw-dlhdl-iio-common.dtsi +++ /dev/null @@ -1,3 +0,0 @@ -#include "xilinx-mw-axistream-dma.dtsi" -#include "mw-dlhdl-iio-common.dtsi" - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/dlhdl.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/dlhdl.dts deleted file mode 100644 index dc970ea..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/dlhdl.dts +++ /dev/null @@ -1,2 +0,0 @@ -#include "base.dtsi" -#include "zynqmp-mw-dlhdl-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/sharedmem_iio.dts b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/sharedmem_iio.dts deleted file mode 100644 index 5621fa7..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/sharedmem_iio.dts +++ /dev/null @@ -1,8 +0,0 @@ -#include "base.dtsi" -#include "zynqmp-mw-sharedmem-iio-common.dtsi" - -/* define the PL DDR size */ -#define MW_PLDDR_SIZE_1 (0x00000000) -#define MW_PLDDR_SIZE_0 (0x20000000) // 512 MB - -#include "zynqmp-mw-sharedmem-iio-plmem.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-adi-mw-axistream-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-adi-mw-axistream-iio-common.dtsi deleted file mode 100644 index 652c17e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-adi-mw-axistream-iio-common.dtsi +++ /dev/null @@ -1,12 +0,0 @@ -#include "zynq-mw-cma.dtsi" -#include "adi-mw-axistream-iio-common.dtsi" - -&axi4stream_mm2s { - reg = <0x40020000 0x10000>; - interrupts = <0x0 0x1d 0x0>; -}; -&axi4stream_s2mm { - reg = <0x40030000 0x10000>; - interrupts = <0x0 0x1e 0x0>; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axilite-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axilite-common.dtsi deleted file mode 100644 index 82abea0..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axilite-common.dtsi +++ /dev/null @@ -1,7 +0,0 @@ -&fpga_axi { - mwipcore0: mwipcore@0 { - compatible = "mathworks,mwipcore-v2.00"; - reg = <0x40010000 0x10000>; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-common.dtsi deleted file mode 100644 index b527a71..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-common.dtsi +++ /dev/null @@ -1,21 +0,0 @@ -#include "zynq-mw-cma.dtsi" -#include "xilinx-mw-axistream-dma.dtsi" - -&axi4stream_mm2s { - reg = <0x40020000 0x10000>; - dma-channel@0 { - interrupts = <0x0 0x1d 0x4>; - }; -}; -&axi4stream_s2mm { - reg = <0x40030000 0x10000>; - dma-channel@0 { - interrupts = <0x0 0x1e 0x4>; - }; -}; - -&mwipcore0 { - dmas = <&axi4stream_mm2s 0 - &axi4stream_s2mm 0>; - dma-names = "mm2s", "s2mm"; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-iio-common-64.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-iio-common-64.dtsi deleted file mode 100644 index 0636d36..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-iio-common-64.dtsi +++ /dev/null @@ -1,14 +0,0 @@ -#include "mw-axistream-iio-common.h" -#include "xilinx-mw-axistream-dma.h" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT -#undef XLNX_MM2S_DATAWIDTH -#undef XLNX_S2MM_DATAWIDTH - -#define MW_MM2S_DATAFMT "u64/64>>0" -#define MW_S2MM_DATAFMT "u64/64>>0" -#define XLNX_MM2S_DATAWIDTH <0x40> -#define XLNX_S2MM_DATAWIDTH <0x40> - -#include "zynq-mw-axistream-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-iio-common.dtsi deleted file mode 100644 index d165420..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-axistream-iio-common.dtsi +++ /dev/null @@ -1,16 +0,0 @@ -#include "zynq-mw-cma.dtsi" -#include "xilinx-mw-axistream-iio-common.dtsi" - -&axi4stream_mm2s { - reg = <0x40020000 0x10000>; - dma-channel@0 { - interrupts = <0x0 0x1d 0x4>; - }; -}; -&axi4stream_s2mm { - reg = <0x40030000 0x10000>; - dma-channel@0 { - interrupts = <0x0 0x1e 0x4>; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-can.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-can.dtsi deleted file mode 100644 index 0d5b64e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-can.dtsi +++ /dev/null @@ -1,13 +0,0 @@ -&axi { - can0: can@e0008000 { - compatible = "xlnx,zynq-can-1.0"; - clocks = <&clkc 19>, <&clkc 36>; - clock-names = "can_clk", "pclk"; - reg = <0xe0008000 0x1000>; - interrupts = <0 28 4>; - interrupt-parent = <&gic>; - tx-fifo-depth = <0x40>; - rx-fifo-depth = <0x40>; - status = "disabled"; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-cma.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-cma.dtsi deleted file mode 100644 index 4039084..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-cma.dtsi +++ /dev/null @@ -1,16 +0,0 @@ -/{ - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - /* global autoconfigured region for contiguous allocations */ - linux_cma: linux,cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x10000000>; - linux,cma-default; - }; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-common.dtsi deleted file mode 100644 index ef9879a..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-common.dtsi +++ /dev/null @@ -1,22 +0,0 @@ -/* Create the common FPGA AXI bus and clock */ -/ { - fpga_axi: fpga-axi@0 { - compatible = "simple-bus"; - interrupt-parent = <&intc>; - #address-cells = <0x1>; - #size-cells = <0x1>; - ranges; - }; - core_clkwiz: clockwiz0 { - compatible = "fixed-clock"; - #clock-cells = <1>; - clock-frequency = < 0x2faf080 >; - }; -}; - -/* Setup the default boot args for ramdisk and earlycon */ -/ { - chosen { - bootargs = "earlycon root=/dev/ram rw"; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-dlhdl-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-dlhdl-iio-common.dtsi deleted file mode 100644 index 5152acb..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-dlhdl-iio-common.dtsi +++ /dev/null @@ -1,46 +0,0 @@ -&fpga_axi { - mwipcore_ddr0: mwipcore_ddr@0 { - compatible = "mathworks,mwipcore-v2.00"; - reg = <0x40010000 0x10000>; - }; -}; - -&fpga_axi { - mwipcore_dl0: mwipcore_dl@0 { - compatible = "mathworks,mwipcore-v2.00"; - reg = <0x44A00000 0x10000>; - }; -}; - -#include "mw-axistream-iio-common.h" -#include "xilinx-mw-axistream-dma.h" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT -#undef XLNX_MM2S_DATAWIDTH -#undef XLNX_S2MM_DATAWIDTH - -#define MW_MM2S_DATAFMT "u32/32>>0" -#define MW_S2MM_DATAFMT "u32/32>>0" -#define XLNX_MM2S_DATAWIDTH <0x40> -#define XLNX_S2MM_DATAWIDTH <0x40> - - -#include "zynq-mw-cma.dtsi" -#include "xilinx-mw-dlhdl-iio-common.dtsi" - - -&axi4stream_mm2s { - reg = <0x40020000 0x10000>; - dma-channel@0 { - interrupts = <0x0 0x1d 0x4>; - }; -}; -&axi4stream_s2mm { - reg = <0x40030000 0x10000>; - dma-channel@0 { - interrupts = <0x0 0x1e 0x4>; - }; -}; - -/delete-node/ &mwipcore0; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-hdmicam-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-hdmicam-common.dtsi deleted file mode 100644 index 66666c2..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-hdmicam-common.dtsi +++ /dev/null @@ -1,135 +0,0 @@ -#include - -&hdmicam_i2c { - mux@70 { - compatible = "nxp,pca9546"; - reg = <0x70>; - reset-gpio = <&gpio0 87 1>; - #address-cells = <1>; - #size-cells = <0>; - i2c@1 { - #size-cells = <0>; - #address-cells = <1>; - reg = <1>; - - adv7511@39 { - compatible = "adv7511-media"; - reg = <0x39>; - powerdown-gpio = <&pca9534 4 GPIO_ACTIVE_HIGH>; - edid-addr = <0x3F>; - pktmem-addr = <0x38>; - cec-addr = <0x3C>; - - video-input { - input-id = <2>; - input-style = <1>; - input-color-depth = <8>; - bit-justification = <2>; - hsync-polarity = <0>; - vsync-polarity = <0>; - clock-delay = <3>; - }; - - video-output { - hdmi-mode = <0>; - output-format = <0>; - output-color-space = <0>; - up-conversion = <0>; - csc-enable = <1>; - csc-locked; - csc-scaling-factor = <2>; - csc-coefficients { - a1 = <0x0B37>; - a2 = <0x0800>; - a3 = <0x0000>; - a4 = <0x1A86>; - b1 = <0x1A49>; - b2 = <0x0800>; - b3 = <0x1D3F>; - b4 = <0x0422>; - c1 = <0x0000>; - c2 = <0x0800>; - c3 = <0x0E2D>; - c4 = <0x1914>; - }; - }; - - port { - adv7511_media: endpoint { - remote-endpoint = <&hdmicam_output>; - }; - }; - - }; - }; - - i2c@2 { - #size-cells = <0>; - #address-cells = <1>; - reg = <2>; - - adv7611@4c { - compatible = "adi,adv7611"; - reg = <0x4c>; - #address-cells = <0x1>; - #size-cells = <0x0>; - - reset-gpios = <&pca9534 0 0>; - hpd-gpios = <&pca9534 2 0>; - - port@0 { - reg = <0x0>; - }; - - port@1 { - reg = <0x1>; - adv7611: endpoint { - remote-endpoint = <&hdmicam_input>; - }; - }; - }; - }; - - i2c@3 { - #size-cells = <0>; - #address-cells = <1>; - reg = <3>; - - pca9534: pca9534@20 { - compatible = "nxp,pca9534"; - reg = <0x20>; - gpio-controller; - #gpio-cells = <2>; - }; - }; - }; -}; - -&fpga_axi { - hdmicam_bridge { - compatible = "adi,imageon-v4l2-bridge-1.00.a"; - - interrupt-parent = <&gpio0>; - interrupts = <86 0>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - hdmicam_input: endpoint { - remote-endpoint = <&adv7611>; - }; - }; - - port@1 { - reg = <1>; - hdmicam_output: endpoint { - remote-endpoint = <&adv7511_media>; - }; - }; - }; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-imageon-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-imageon-common.dtsi deleted file mode 100644 index 12bdab5..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-imageon-common.dtsi +++ /dev/null @@ -1,133 +0,0 @@ -#include -&fpga_axi { - imageon_bridge { - compatible = "adi,imageon-v4l2-bridge-1.00.a"; - - interrupt-parent = <&gpio0>; - interrupts = <86 0>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - imageon_input: endpoint { - remote-endpoint = <&adv7611>; - }; - }; - - port@1 { - reg = <1>; - imageon_output: endpoint { - remote-endpoint = <&adv7511_media>; - }; - }; - }; - }; -}; - -&imageon_i2c { - mux@70 { - compatible = "nxp,pca9546"; - reg = <0x70>; - reset-gpio = <&gpio0 87 1>; - #address-cells = <1>; - #size-cells = <0>; - i2c@1 { - #size-cells = <0>; - #address-cells = <1>; - reg = <1>; - - adv7511@39 { - compatible = "adv7511-media"; - reg = <0x39>; - powerdown-gpio = <&pca9534 4 GPIO_ACTIVE_HIGH>; - edid-addr = <0x3F>; - pktmem-addr = <0x38>; - cec-addr = <0x3C>; - - video-input { - input-id = <2>; - input-style = <1>; - input-color-depth = <8>; - bit-justification = <2>; - hsync-polarity = <0>; - vsync-polarity = <0>; - clock-delay = <3>; - }; - - video-output { - hdmi-mode = <0>; - output-format = <0>; - output-color-space = <0>; - up-conversion = <0>; - csc-enable = <1>; - csc-locked; - csc-scaling-factor = <2>; - csc-coefficients { - a1 = <0x0B37>; - a2 = <0x0800>; - a3 = <0x0000>; - a4 = <0x1A86>; - b1 = <0x1A49>; - b2 = <0x0800>; - b3 = <0x1D3F>; - b4 = <0x0422>; - c1 = <0x0000>; - c2 = <0x0800>; - c3 = <0x0E2D>; - c4 = <0x1914>; - }; - }; - - port { - adv7511_media: endpoint { - remote-endpoint = <&imageon_output>; - }; - }; - - }; - }; - - i2c@2 { - #size-cells = <0>; - #address-cells = <1>; - reg = <2>; - - adv7611@4c { - compatible = "adi,adv7611"; - reg = <0x4c>; - #address-cells = <0x1>; - #size-cells = <0x0>; - - reset-gpios = <&pca9534 0 0>; - hpd-gpios = <&pca9534 2 0>; - - port@0 { - reg = <0x0>; - }; - - port@1 { - reg = <0x1>; - adv7611: endpoint { - remote-endpoint = <&imageon_input>; - }; - }; - }; - }; - - i2c@3 { - #size-cells = <0>; - #address-cells = <1>; - reg = <3>; - - pca9534: pca9534@20 { - compatible = "nxp,pca9534"; - reg = <0x20>; - gpio-controller; - #gpio-cells = <2>; - }; - }; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-sharedmem-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-sharedmem-iio-common.dtsi deleted file mode 100644 index beb6049..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-sharedmem-iio-common.dtsi +++ /dev/null @@ -1,14 +0,0 @@ -/ { - memory_reserved: reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - sharedmem: region@14000000 { - reg = <0x14000000 0x4000000>; - no-map; - }; - }; -}; - -#include "mw-sharedmem-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-sharedmem-iio-plmem.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-sharedmem-iio-plmem.dtsi deleted file mode 100644 index 4d1f923..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-sharedmem-iio-plmem.dtsi +++ /dev/null @@ -1,46 +0,0 @@ -/{ - axi-gp1 { - compatible = "simple-bus"; - #address-cells = <0x1>; - #size-cells = <0x1>; - ranges; - - memory@80000000 { - device_type = "memory"; - reg = <0x80000000 MW_PLDDR_SIZE>; - }; - }; -}; - -&memory_reserved { - plmem: region@80000000 { - reg = <0x80000000 MW_PLDDR_SIZE>; - no-map; - }; -}; - -&mwipcore0 { - sharedmem@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x1>; - compatible = "mathworks,sharedmem-v1.00"; - memory-region = <&plmem>; - mathworks,dev-name = "plmem0"; - - read-channel@0 { - reg = <0x0>; - compatible = "mathworks,sharedmem-read-channel-v1.00"; - mathworks,dev-name = "rd0"; - }; - - write-channel@1 { - reg = <0x1>; - compatible = "mathworks,sharedmem-write-channel-v1.00"; - mathworks,dev-name = "wr0"; - }; - }; -}; - - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-video.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-video.dtsi deleted file mode 100644 index 0ea9499..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynq/zynq-mw-video.dtsi +++ /dev/null @@ -1,27 +0,0 @@ -&fpga_axi { - - mwipcore1: mwipcore-rgb2ycbcr@40020000 { - compatible = "mathworks,mwipcore-v2.00"; - reg = <0x40020000 0x10000>; - }; - - mwipcore2: mwipcore-ycbcr2rgb@40030000 { - compatible = "mathworks,mwipcore-v2.00"; - reg = <0x40030000 0x10000>; - }; - - - hdmicam_i2c: i2c@41600000 { - compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a"; - interrupt-parent = <&intc>; - interrupts = <0 29 0x4>; - reg = <0x41600000 0x10000>; - clocks = <&core_clkwiz 0>; - clock-names = "pclk"; - - #size-cells = <0>; - #address-cells = <1>; - }; -}; - -#include "zynq-mw-hdmicam-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-adi-mw-axistream-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-adi-mw-axistream-iio-common.dtsi deleted file mode 100644 index 78d5a2e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-adi-mw-axistream-iio-common.dtsi +++ /dev/null @@ -1,11 +0,0 @@ -#include "zynqmp-mw-cma.dtsi" -#include "adi-mw-axistream-iio-common.dtsi" - -&axi4stream_mm2s { - reg = <0xA0020000 0x10000>; - interrupts = <0x0 89 0x0>; -}; -&axi4stream_s2mm { - reg = <0xA0030000 0x10000>; - interrupts = <0x0 90 0x0>; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common-128.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common-128.dtsi deleted file mode 100644 index ac6fe36..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common-128.dtsi +++ /dev/null @@ -1,15 +0,0 @@ -#include "mw-axistream-iio-common.h" -#include "xilinx-mw-axistream-dma.h" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT -#undef XLNX_MM2S_DATAWIDTH -#undef XLNX_S2MM_DATAWIDTH - -#define MW_MM2S_DATAFMT "u128/128>>0" -#define MW_S2MM_DATAFMT "u128/128>>0" -#define XLNX_MM2S_DATAWIDTH <0x80> -#define XLNX_S2MM_DATAWIDTH <0x80> - -#include "zynqmp-mw-axistream-iio-common.dtsi" - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common-64.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common-64.dtsi deleted file mode 100644 index 86826db..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common-64.dtsi +++ /dev/null @@ -1,15 +0,0 @@ -#include "mw-axistream-iio-common.h" -#include "xilinx-mw-axistream-dma.h" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT -#undef XLNX_MM2S_DATAWIDTH -#undef XLNX_S2MM_DATAWIDTH - -#define MW_MM2S_DATAFMT "u64/64>>0" -#define MW_S2MM_DATAFMT "u64/64>>0" -#define XLNX_MM2S_DATAWIDTH <0x40> -#define XLNX_S2MM_DATAWIDTH <0x40> - -#include "zynqmp-mw-axistream-iio-common.dtsi" - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common.dtsi deleted file mode 100644 index a08db37..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-axistream-iio-common.dtsi +++ /dev/null @@ -1,16 +0,0 @@ -#include "zynqmp-mw-cma.dtsi" -#include "xilinx-mw-axistream-iio-common.dtsi" - -&axi4stream_mm2s { - reg = <0xA0020000 0x10000>; - dma-channel@0 { - interrupts = <0x0 89 0x4>; - }; -}; -&axi4stream_s2mm { - reg = <0xA0030000 0x10000>; - dma-channel@0 { - interrupts = <0x0 90 0x4>; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-cma.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-cma.dtsi deleted file mode 100644 index aaa3b79..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-cma.dtsi +++ /dev/null @@ -1,17 +0,0 @@ -/{ - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - /* global autoconfigured region for contiguous allocations */ - linux_cma: linux,cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x10000000>; - alloc-ranges = <0x0 0x00000000 0x0 0x80000000>; - linux,cma-default; - }; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-common.dtsi deleted file mode 100644 index f7a9197..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-common.dtsi +++ /dev/null @@ -1,15 +0,0 @@ -/{ - core_clkwiz: clockwiz0 { - compatible = "fixed-clock"; - #clock-cells = < 0x01 >; - clock-frequency = < 0x2faf080 >; - }; -}; - -&fpga_axi { - mwipcore0: mwipcore@A0000000 { - compatible = "mathworks,mwipcore-v3.00"; - reg = <0xA0000000 0x10000>; - }; -}; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-dlhdl-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-dlhdl-iio-common.dtsi deleted file mode 100644 index 17141ec..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-dlhdl-iio-common.dtsi +++ /dev/null @@ -1,50 +0,0 @@ -/{ - core_clkwiz: clockwiz0 { - compatible = "fixed-clock"; - #clock-cells = <1>; - clock-frequency = < 0x2faf080 >; - }; -}; -&fpga_axi { - mwipcore_ddr0: mwipcore_ddr@0 { - compatible = "mathworks,mwipcore-v2.00"; - reg = <0xA0010000 0x10000>; - }; -}; - -&fpga_axi { - mwipcore_dl0: mwipcore_dl@0 { - compatible = "mathworks,mwipcore-v2.00"; - reg = <0xA0000000 0x10000>; - }; -}; -#include "mw-axistream-iio-common.h" -#include "xilinx-mw-axistream-dma.h" - -#undef MW_MM2S_DATAFMT -#undef MW_S2MM_DATAFMT -#undef XLNX_MM2S_DATAWIDTH -#undef XLNX_S2MM_DATAWIDTH - -#define MW_MM2S_DATAFMT "u32/32>>0" -#define MW_S2MM_DATAFMT "u32/32>>0" -#define XLNX_MM2S_DATAWIDTH <0x40> -#define XLNX_S2MM_DATAWIDTH <0x40> - -#include "zynqmp-mw-cma.dtsi" -#include "xilinx-mw-dlhdl-iio-common.dtsi" - -&axi4stream_mm2s { - reg = <0xA0020000 0x10000>; - dma-channel@0 { - interrupts = <0x0 89 0x4>; - }; -}; -&axi4stream_s2mm { - reg = <0xA0030000 0x10000>; - dma-channel@0 { - interrupts = <0x0 90 0x4>; - }; -}; -/delete-node/ &mwipcore0; - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-fpga-bridge-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-fpga-bridge-common.dtsi deleted file mode 100644 index 1c4fde4..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-fpga-bridge-common.dtsi +++ /dev/null @@ -1,13 +0,0 @@ -/{ - fpd_hpm0_32: fpd-hpm0-32 { - compatible = "simple-bus"; - interrupt-names = "irq"; - interrupt-parent = <&gic>; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0xA0000000 0x0 0xA0000000 0x10000000>; - dma-ranges = <0x00000000 0x0 0x00000000 0x80000000>; - }; -}; - -#define fpga_axi fpd_hpm0_32 diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-sharedmem-iio-common.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-sharedmem-iio-common.dtsi deleted file mode 100644 index 751c437..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-sharedmem-iio-common.dtsi +++ /dev/null @@ -1,14 +0,0 @@ -/ { - memory_reserved: reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - sharedmem: region@14000000 { - reg = <0x0 0x14000000 0x0 0x4000000>; - no-map; - }; - }; -}; - -#include "mw-sharedmem-iio-common.dtsi" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-sharedmem-iio-plmem.dtsi b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-sharedmem-iio-plmem.dtsi deleted file mode 100644 index 88b2456..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/files/zynqmp/zynqmp-mw-sharedmem-iio-plmem.dtsi +++ /dev/null @@ -1,46 +0,0 @@ -/{ - fpd-hpm1-32 { - compatible = "simple-bus"; - #address-cells = <0x2>; - #size-cells = <0x2>; - ranges; - - memory@580000000 { - device_type = "memory"; - reg = <0x5 0x80000000 MW_PLDDR_SIZE_1 MW_PLDDR_SIZE_0>; - }; - }; -}; - -&memory_reserved { - plmem: region@580000000 { - reg = <0x5 0x80000000 MW_PLDDR_SIZE_1 MW_PLDDR_SIZE_0>; - no-map; - }; -}; - -&mwipcore0 { - sharedmem@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0x1>; - compatible = "mathworks,sharedmem-v1.00"; - memory-region = <&plmem>; - mathworks,dev-name = "plmem0"; - - read-channel@0 { - reg = <0x0>; - compatible = "mathworks,sharedmem-read-channel-v1.00"; - mathworks,dev-name = "rd0"; - }; - - write-channel@1 { - reg = <0x1>; - compatible = "mathworks,sharedmem-write-channel-v1.00"; - mathworks,dev-name = "wr0"; - }; - }; -}; - - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/mw-refdesign-dtb.bb b/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/mw-refdesign-dtb.bb deleted file mode 100644 index db36b5e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/mw-refdesign-dtb/mw-refdesign-dtb.bb +++ /dev/null @@ -1,45 +0,0 @@ -# mw-refdesign-dtb -DESCRIPTION = "Generate device-tree blobs for use with MathWorks example reference designs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -# Depend on the virtual/kernel for kernel source and cmake-native for CMake -DEPENDS = "virtual/kernel cmake-native dtc-native" - -# Specify the source files and other details as needed -SRC_URI = " file://base.dtsi \ - file://axilite.dts \ - file://axistream.dts \ - file://axistream_64.dts \ - file://dlhdl.dts \ - file://sharedmem_iio.dts \ - file://CMakeLists.txt \ - file://common \ - file://zynqmp \ - file://zynq \ -" - -S = "${WORKDIR}" - -inherit deploy -# Inherit cmake to use the cmake class functions -inherit cmake - -# Pass the architecture and cross-compile prefix to CMake -EXTRA_OECMAKE = " -DKERNEL_DIR=${STAGING_KERNEL_DIR} -DARCH=${KERNEL_ARCH} -DCROSS_COMPILE=${TARGET_PREFIX}" - -do_install() { - install -d ${D}/boot/mwdtbs - install -Dm 0644 ${B}/*.dtb ${D}/boot/mwdtbs/ -} - -do_deploy() { - install -d ${D}/boot/mwdtbs - install -Dm 0644 ${B}/*.dtb ${D}/boot/mwdtbs/ -} - -FILES:${PN} += "/boot/mwdtbs/*.dtb" -INSANE_SKIP:${PN} += "installed-vs-skipped" - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/Makefile b/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/Makefile deleted file mode 100644 index 29fb5cd..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -PEEK = peek -POKE = poke - -# Add any other object files to this list below -PEEK_OBJS = peek.o -POKE_OBJS = poke.o - -all: $(PEEK) $(POKE) - -$(POKE): $(POKE_OBJS) - $(CC) $(LDFLAGS) -o $@ $(POKE_OBJS) $(LDLIBS) - -$(PEEK): $(PEEK_OBJS) - $(CC) $(LDFLAGS) -o $@ $(PEEK_OBJS) $(LDLIBS) - -clean: - -rm -f $(POKE) $(PEEK) *.elf *.gdb *.o - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/peek.c b/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/peek.c deleted file mode 100644 index 0891b79..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/peek.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -* peek utility - for those who remember the good old days! -* -* -* Copyright (C) 2013 - 2016 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person -* obtaining a copy of this software and associated documentation -* files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included -* in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in this -* Software without prior written authorization from Xilinx. -* -*/ - -#include -#include -#include -#include -#include - -void usage(char *prog) -{ - printf("usage: %s ADDR\n",prog); - printf("\n"); - printf("ADDR may be specified as hex values\n"); -} - - -int main(int argc, char *argv[]) -{ - int fd; - void *ptr; - unsigned addr, page_addr, page_offset; - unsigned page_size=sysconf(_SC_PAGESIZE); - - if(argc!=2) { - usage(argv[0]); - exit(-1); - } - - fd=open("/dev/mem",O_RDONLY); - if(fd<1) { - perror(argv[0]); - exit(-1); - } - - addr=strtoul(argv[1],NULL,0); - page_addr=(addr & ~(page_size-1)); - page_offset=addr-page_addr; - - ptr=mmap(NULL,page_size,PROT_READ,MAP_SHARED,fd,(addr & ~(page_size-1))); - if((int)ptr==-1) { - perror(argv[0]); - exit(-1); - } - - printf("0x%08x\n",*((unsigned *)(ptr+page_offset))); - return 0; -} - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/poke.c b/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/poke.c deleted file mode 100644 index bc670c3..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/files/poke.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -* poke utility - for those who remember the good old days! -* - -* Copyright (C) 2013 - 2016 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person -* obtaining a copy of this software and associated documentation -* files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, -* publish, distribute, sublicense, and/or sell copies of the Software, -* and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included -* in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in this -* Software without prior written authorization from Xilinx. -* -*/ - -#include -#include -#include -#include -#include - -void usage(char *prog) -{ - printf("usage: %s ADDR VAL\n",prog); - printf("\n"); - printf("ADDR and VAL may be specified as hex values\n"); -} - -int main(int argc, char *argv[]) -{ - int fd; - void *ptr; - unsigned val; - unsigned addr, page_addr, page_offset; - unsigned page_size=sysconf(_SC_PAGESIZE); - - fd=open("/dev/mem",O_RDWR); - if(fd<1) { - perror(argv[0]); - exit(-1); - } - - if(argc!=3) { - usage(argv[0]); - exit(-1); - } - - addr=strtoul(argv[1],NULL,0); - val=strtoul(argv[2],NULL,0); - - page_addr=(addr & ~(page_size-1)); - page_offset=addr-page_addr; - - ptr=mmap(NULL,page_size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,(addr & ~(page_size-1))); - if((int)ptr==-1) { - perror(argv[0]); - exit(-1); - } - - *((unsigned *)(ptr+page_offset))=val; - return 0; -} diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/peekpoke.bb b/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/peekpoke.bb deleted file mode 100644 index bace395..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/peekpoke/peekpoke.bb +++ /dev/null @@ -1,25 +0,0 @@ -# -# This is the peekpoke apllication recipe -# -# - -SUMMARY = "peekpoke application" -SECTION = "PETALINUX/apps" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -SRC_URI = "file://peek.c \ - file://poke.c \ - file://Makefile \ - " -S = "${WORKDIR}" -CFLAGS_prepend = "-I ${S}/include" -do_compile() { - oe_runmake -} -do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/peek ${D}${bindir} - install -m 0755 ${S}/poke ${D}${bindir} - -} - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c b/mw_zcu216/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c index 14b85d2..e8d74ec 100644 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c +++ b/mw_zcu216/project-spec/meta-user/recipes-apps/rftool/files/tcp_interface.c @@ -178,7 +178,7 @@ void acceptConnection(void) */ int getdataString(char *buf, int len) { - int valread = 0; + int valread; char val; int rbytes = 0; struct timeval tv; @@ -195,18 +195,21 @@ int getdataString(char *buf, int len) selectStatus = select(new_data_socket + 1, &fdread, NULL, NULL, &tv); if (selectStatus == 0) - return valread; + return rbytes; if (FD_ISSET(new_data_socket, &fdread)) { - valread += read(new_data_socket, &val, 1); - buf[rbytes++] = val; - if (valread == 0) { + valread = read(new_data_socket, &val, 1); + if (valread <= 0) { + if (valread < 0) + perror("info -> getdataString char read < 0"); break; } + else + buf[rbytes++] = val; } - } while ((val != '\n') && (valread < len) && (rbytes < len)); + } while ((val != '\n') && (rbytes < len)); - return valread; + return rbytes; } /* @@ -215,19 +218,22 @@ int getdataString(char *buf, int len) */ int getString(char *buf, int len) { - int valread = 0; + int valread; char val; - unsigned int rbytes = 0; + int rbytes = 0; do { - valread += read(new_socket, &val, 1); - buf[rbytes++] = val; - if (valread == 0) { + valread = read(new_socket, &val, 1); + if (valread <= 0) { + if (valread < 0) + perror("info -> getString char read < 0"); break; } - } while ((val != '\n') && (valread < len)); + else + buf[rbytes++] = val; + } while ((val != '\n') && (rbytes < len)); - return valread; + return rbytes; } /* diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/.gdbinit b/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/.gdbinit deleted file mode 100644 index d59fb8d..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/.gdbinit +++ /dev/null @@ -1,2 +0,0 @@ -# Load the PetaLinux SDK main gdbinit script -source plnx_gdbinit diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/README b/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/README deleted file mode 100644 index f711bec..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/README +++ /dev/null @@ -1,32 +0,0 @@ -PetaLinux User Application Template -=================================== - -This directory contains a PetaLinux user application created from a template. - -If you are developing your application from scratch, simply start editing the -file trd-autostart.c. - -You can easily import any existing application code by copying it into this -directory, and editing the automatically generated Makefile. - -Before building the application, you will need to enable the application -from PetaLinux menuconfig by running: - "petalinux-config -c rootfs" -You will see your application in the "apps --->" submenu. - -To build your application, simply run "petalinux-build -c trd-autostart". -This command will build your application and will install your application -into the target file system host copy. - -You will also need to rebuild PetaLinux bootable images so that the images -is updated with the updated target filesystem copy, run this command: - "petalinux-build -c rootfs" - -You can also run one PetaLinux command to install the application to the -target filesystem host copy and update the bootable images as follows: - "petalinux-build" - -To add extra source code files (for example, to split a large application into -multiple source files), add the relevant .o files to the list in the local -Makefile where indicated. - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/Makefile b/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/Makefile deleted file mode 100644 index 8ae9307..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -APP = trd-autostart - -# Add any other object files to this list below -APP_OBJS = trd-autostart.o - -all: build - -build: $(APP) - -$(APP): $(APP_OBJS) - $(CC) $(LDFLAGS) -o $@ $(APP_OBJS) $(LDLIBS) - diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/remount b/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/remount deleted file mode 100755 index e2a2cf1..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/remount +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -mount -o remount,rw /media/card diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/trd-automount.rules b/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/trd-automount.rules deleted file mode 100755 index 01cd721..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/trd-automount.rules +++ /dev/null @@ -1,27 +0,0 @@ -KERNEL!="sd**" GOTO="media_by_label_auto_mount_end" -ENV{ID_BUS}!="usb", GOTO="media_by_label_auto_mount_next" -# Import FS infos -IMPORT{program}="/sbin/blkid -o udev -p %N" -# Always mount usb drive on to usb folder only -ENV{ID_FS_LABEL}=="", ENV{dir_name}="usb" -GOTO="media_by_label_auto_mount" - -LABEL="media_by_label_auto_mount_next" -KERNEL!="sd?", ENV{ID_BUS}!="ata", GOTO="media_by_label_auto_mount_end" -ATTRS{vendor}!="ATA", GOTO="media_by_label_auto_mount_end" -# Import FS infos -IMPORT{program}="/sbin/blkid -o udev -p %N" -# Always mount sata drive on to sata folder only -ENV{ID_FS_LABEL}=="", ENV{dir_name}="sata" - -LABEL="media_by_label_auto_mount" -# Global mount options -ACTION=="add", ENV{mount_options}="relatime" -# Filesystem-specific mount options -ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002" -# Mount the device -ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k1 /media/%E{dir_name}" -# Clean up after removal -ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}" -# Exit -LABEL="media_by_label_auto_mount_end" diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/trd-autostart.sh b/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/trd-autostart.sh deleted file mode 100755 index c26983b..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/files/trd-autostart.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# Execute userhook if present -USERHOOK_SD=/media/sd-mmcblk0p1/autostart.sh -if [ -f $USERHOOK_SD ]; then - sh $USERHOOK_SD & -fi diff --git a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/trd-autostart.bb b/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/trd-autostart.bb deleted file mode 100644 index 6f5a5b3..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-apps/trd-autostart/trd-autostart.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "TRD Init scripts" -SECTION = "PETALINUX/apps" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -SRC_URI = "\ - file://trd-autostart.sh \ - file://remount \ - file://trd-automount.rules \ - " - -S = "${WORKDIR}" - -inherit update-rc.d - -INITSCRIPT_NAME = "trd-autostart" -INITSCRIPT_PARAMS = "start 99 5 ." - -do_install() { - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${S}/trd-autostart.sh ${D}${sysconfdir}/init.d/trd-autostart - - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0755 ${S}/trd-automount.rules ${D}${sysconfdir}/udev/rules.d/trd-automount.rules - - install -d ${D}/${bindir} - install -m 0755 ${S}/remount ${D}/${bindir}/ -} - -RDEPENDS_${PN}_append += "bash" diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/openamp.dtsi b/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/openamp.dtsi deleted file mode 100644 index 0589f12..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/openamp.dtsi +++ /dev/null @@ -1,74 +0,0 @@ -/ { - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - rpu0vdev0vring0: rpu0vdev0vring0@3ed40000 { - no-map; - reg = <0x0 0x3ed40000 0x0 0x4000>; - }; - rpu0vdev0vring1: rpu0vdev0vring1@3ed44000 { - no-map; - reg = <0x0 0x3ed44000 0x0 0x4000>; - }; - rpu0vdev0buffer: rpu0vdev0buffer@3ed48000 { - no-map; - reg = <0x0 0x3ed48000 0x0 0x100000>; - }; - rproc_0_reserved: rproc@3ed00000 { - no-map; - reg = <0x0 0x3ed00000 0x0 0x40000>; - }; - }; - - zynqmp-rpu { - compatible = "xlnx,zynqmp-r5-remoteproc-1.0"; - #address-cells = <2>; - #size-cells = <2>; - ranges; - core_conf = "split"; - reg = <0x0 0xFF9A0000 0x0 0x10000>; - r5_0: r5@0 { - #address-cells = <2>; - #size-cells = <2>; - ranges; - memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; - pnode-id = <0x7>; - mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; - mbox-names = "tx", "rx"; - tcm_0_a: tcm_0@0 { - reg = <0x0 0xFFE00000 0x0 0x10000>; - pnode-id = <0xf>; - }; - tcm_0_b: tcm_0@1 { - reg = <0x0 0xFFE20000 0x0 0x10000>; - pnode-id = <0x10>; - }; - }; - }; - - - zynqmp_ipi1 { - compatible = "xlnx,zynqmp-ipi-mailbox"; - interrupt-parent = <&gic>; - interrupts = <0 29 4>; - xlnx,ipi-id = <7>; - #address-cells = <1>; - #size-cells = <1>; - ranges; - - /* APU<->RPU0 IPI mailbox controller */ - ipi_mailbox_rpu0: mailbox@ff990600 { - reg = <0xff990600 0x20>, - <0xff990620 0x20>, - <0xff9900c0 0x20>, - <0xff9900e0 0x20>; - reg-names = "local_request_region", - "local_response_region", - "remote_request_region", - "remote_response_region"; - #mbox-cells = <1>; - xlnx,ipi-id = <1>; - }; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/xen-qemu.dtsi b/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/xen-qemu.dtsi deleted file mode 100644 index 249a786..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/xen-qemu.dtsi +++ /dev/null @@ -1,16 +0,0 @@ -/ { - cpus { - cpu@1 { - //compatible = "disabled"; - device_type = "none"; - }; - cpu@2 { - //compatible = "disabled"; - device_type = "none"; - }; - cpu@3 { - //compatible = "disabled"; - device_type = "none"; - }; - }; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/xen.dtsi b/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/xen.dtsi deleted file mode 100755 index 7793a30..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/device-tree/files/xen.dtsi +++ /dev/null @@ -1,29 +0,0 @@ -&smmu { - status = "okay"; - mmu-masters = < &gem0 0x874 - &gem1 0x875 - &gem2 0x876 - &gem3 0x877 - &dwc3_0 0x860 - &dwc3_1 0x861 - &qspi 0x873 - &lpd_dma_chan1 0x868 - &lpd_dma_chan2 0x869 - &lpd_dma_chan3 0x86a - &lpd_dma_chan4 0x86b - &lpd_dma_chan5 0x86c - &lpd_dma_chan6 0x86d - &lpd_dma_chan7 0x86e - &lpd_dma_chan8 0x86f - &fpd_dma_chan1 0x14e8 - &fpd_dma_chan2 0x14e9 - &fpd_dma_chan3 0x14ea - &fpd_dma_chan4 0x14eb - &fpd_dma_chan5 0x14ec - &fpd_dma_chan6 0x14ed - &fpd_dma_chan7 0x14ee - &fpd_dma_chan8 0x14ef - &sdhci0 0x870 - &sdhci1 0x871 - &nand0 0x872>; -}; diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg deleted file mode 100644 index 62b8d88..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG_ENV_IS_IN_NOWHERE -# CONFIG_ENV_IS_IN_SPI_FLASH is not set -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_OVERWRITE=y -# CONFIG_ENV_IS_IN_NAND is not set -# CONFIG_ENV_IS_IN_SPI_FLASH is not set diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/devtool-fragment.cfg b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/devtool-fragment.cfg deleted file mode 100644 index d9bc5bb..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/devtool-fragment.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# CONFIG_SPL_BOOTCOUNT_LIMIT is not set -CONFIG_SPL_ENV_SUPPORT=y -CONFIG_SPL_SAVEENV=y -# CONFIG_SPL_ETH_SUPPORT is not set -# CONFIG_ENV_IS_NOWHERE is not set -# CONFIG_CMD_UBIFS is not set -CONFIG_ENV_IS_IN_FAT=y -CONFIG_ENV_FAT_INTERFACE="mmc" -CONFIG_ENV_FAT_DEVICE_AND_PART="0:auto" -CONFIG_ENV_FAT_FILE="uboot.env" -# CONFIG_SPL_ENV_IS_NOWHERE is not set -CONFIG_SPL_ENV_IS_IN_FAT=y diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/etc/fw_env.config b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/etc/fw_env.config deleted file mode 100644 index ba7db4a..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/etc/fw_env.config +++ /dev/null @@ -1,12 +0,0 @@ -# Configuration file for fw_(printenv/setenv) utility. -# Up to two entries are valid, in this case the redundant -# environment sector is assumed present. -# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash. -# Futhermore, if the Flash sector size is ommitted, this value is assumed to -# be the same as the Environment size, which is valid for NOR and SPI-dataflash - -# File Example -# Filename Offset Size Sector Size (= Size) -/mnt/uboot.env 0x0000 0x8000 0x8000 -/mnt/uboot-redund.env 0x0000 0x8000 0x8000 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/mw_xilinx_common.h b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/mw_xilinx_common.h deleted file mode 100644 index 9179db1..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/mw_xilinx_common.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (C) Copyright 2017 The MathWorks, Inc. - * - * Common MathWorks configuration options for all Zynq boards. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/* - * Initialize environment: - * Run the saveenv command on the first boot to initialize the env - * storage. - */ - -#ifndef __CONFIG_MW_XILINX_COMMON_H -#define __CONFIG_MW_XILINX_COMMON_H - -#if defined(CONFIG_ENV_IS_IN_FAT) || defined(CONFIG_ENV_IS_IN_MMC) -# define ENV_CMD_PRE_SAVEENV "mmc rescan;" -#else -# define ENV_CMD_PRE_SAVEENV "" -#endif - -#if defined(CONFIG_ENV_IS_IN_FAT) || defined(CONFIG_ZYNQMP_INIT_ENV) -# define ENV_CMD_INIT_ENV_ONCE \ - "uenv_init=" \ - "echo Storing default uboot environment...;" \ - "env set uenv_init true;" \ - ENV_CMD_PRE_SAVEENV \ - "saveenv\0" -#else -# define ENV_CMD_INIT_ENV_ONCE \ - "uenv_init=true \0" -#endif - -#endif /* __CONFIG_MW_XILINX_COMMON_H */ diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h deleted file mode 100644 index 6542b60..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h +++ /dev/null @@ -1,2 +0,0 @@ -#include -#include diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/libubootenv%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/libubootenv%.bbappend deleted file mode 100644 index 2e6900e..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/libubootenv%.bbappend +++ /dev/null @@ -1,17 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files/etc:" - - -SRC_URI:append = " file://fw_env.config" - -do_install:append() { - install -d ${D}${sysconfdir} - UBOOT_CONFIG=${BASE_WORKDIR}/${MACHINE_ARCH}${HOST_VENDOR}-${TARGET_OS}/u-boot-xlnx/*/build/.config - if [ -f $UBOOT_CONFIG ]; then - env_size=$(sed -n 's/CONFIG_ENV_SIZE\=\(.*\)/\1/p' $UBOOT_CONFIG) - echo "Set correct environment size, $env_size, from $UBOOT_CONFIG" - sed -i "s/0x8000/${env_size}/g" ${WORKDIR}/fw_env.config - fi - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend deleted file mode 100644 index 9d785a4..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend +++ /dev/null @@ -1,28 +0,0 @@ -SRC_URI += "file://bsp.cfg \ - file://devtool-fragment.cfg \ - " - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI_append = " file://platform-top.h" -SRC_URI_append += "file://mw_xilinx_common.h" -SRC_URI_append += "file://bsp.cfg" -#SRC_URI_append += "file://devtool-fragment.cfg" - -do_copy_configs () { - cp ${WORKDIR}/mw_xilinx_common.h ${S}/include/configs/mw_xilinx_common.h - } - - -do_configure_append () { - if [ "${U_BOOT_AUTO_CONFIG}" = "1" ]; then - install ${WORKDIR}/platform-auto.h ${S}/include/configs/ - install ${WORKDIR}/platform-top.h ${S}/include/configs/ - fi -} - -do_configure_append_microblaze () { - if [ "${U_BOOT_AUTO_CONFIG}" = "1" ]; then - install -d ${B}/source/board/xilinx/microblaze-generic/ - install ${WORKDIR}/config.mk ${B}/source/board/xilinx/microblaze-generic/ - fi -} diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr.bbappend b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr.bbappend deleted file mode 100644 index 2185c74..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI:append = " file://boot.cmd.mw.initrd" - -BOOTMODE = "mw" -BOOTFILE_EXT = ".initrd" - - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default deleted file mode 100644 index f37246c..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default +++ /dev/null @@ -1,52 +0,0 @@ -# This is a boot script for U-Boot -# Generate boot.scr: -# mkimage -c none -A arm -T script -d boot.cmd.default boot.scr -# -################ -## Please change the kernel_offset and kernel_size if the kernel image size more than -## the 100MB and BOOT.BIN size more than the 30MB -## kernel_offset --> is the address of qspi which you want load the kernel image -## kernel_size --> size of the kernel image in hex -############### -fdt_addr=0x1000 -imageub_addr=0x10000000 -kernel_addr=0x80000 -kernel_offset=0x1E00200 -kernel_size=0x7800000 -kernel_type=image.ub - -for boot_target in ${boot_targets}; -do - if test "${boot_target}" = "jtag" ; then - booti ${kernel_addr} - ${fdt_addr}; - exit; - fi - if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then - if test -e ${devtype} ${devnum}:${distro_bootpart} /image.ub; then - fatload ${devtype} ${devnum}:${distro_bootpart} ${imageub_addr} image.ub; - bootm ${imageub_addr}; - exit; - fi - if test -e ${devtype} ${devnum}:${distro_bootpart} /Image; then - fatload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr} Image; - booti ${kernel_addr} - ${fdt_addr}; - exit; - fi - booti ${kernel_addr} - ${fdt_addr}; - exit; - fi - if test "${boot_target}" = "xspi0"; then - sf probe 0 0 0; - if test "${kernel_type}" = "image.ub"; then - sf read ${imageub_addr} ${kernel_offset} ${kernel_size}; - bootm ${imageub_addr}; - exit; - fi - if test "${kernel_type}" = "Image"; then - sf read ${kernel_addr} ${kernel_offset} ${kernel_size}; - booti ${kernel_addr} - ${fdt_addr}; - exit; - fi - exit; - fi -done diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default.initrd b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default.initrd deleted file mode 100644 index 6198760..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default.initrd +++ /dev/null @@ -1,144 +0,0 @@ -# This is a boot script for U-Boot -# Generate boot.scr: -# mkimage -c none -A arm -T script -d boot.cmd.default boot.scr -# -################ -@@PRE_BOOTENV@@ - -for boot_target in ${boot_targets}; -do - if test "${boot_target}" = "jtag" ; then - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ - exit; - fi - if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then - echo Entered boot script - - # FIT Image booting... use image.ub - if test -e ${devtype} ${devnum}:${distro_bootpart} /@@FIT_IMAGE@@; then - fatload ${devtype} ${devnum}:${distro_bootpart} @@FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; - bootm @@FIT_IMAGE_LOAD_ADDRESS@@; - exit; - fi - - # Leagcy Image booting... (Non-FIT kernel) - echo Storing default uboot environment...; - mmc rescan; - saveenv - - # check and apply uEnv.txt if it exists - if test -e ${devtype} ${devnum}:${distro_bootpart} /uEnv.txt; then - echo Importing uEnv.txt environment from SD ... - load ${devtype} ${devnum}:${distro_bootpart} 0x00100000 uEnv.txt - echo Loaded environment from 0x00100000 - env import -t 0x00100000 ${filesize} - fi - - # Load FPGA bit file - if test -n ${bitstream_image}; then - if test -e ${devtype} ${devnum}:${distro_bootpart} ${bitstream_image}; then - echo Loading bitstream from ${bitstream_image} to RAM.. - load ${devtype} ${devnum}:${distro_bootpart} 0x1000000 ${bitstream_image}; - fpga loadb ${devtype}:${devnum} 0x1000000 ${filesize}; - else - echo No FPGA bit-file ${bitstream_image} found, exiting... - exit; - fi - - else - # Load Default bit-file "system.bit" if uboot env not set - if test -e ${devtype} ${devnum}:${distro_bootpart} /system.bit; then - echo Loading default bitstream from SD/MMC/eMMC to RAM.. - load ${devtype} ${devnum}:${distro_bootpart} 0x1000000 system.bit; - fpga loadb ${devtype}:${devnum} 0x1000000 ${filesize}; - else - echo No default system.bit bitstream detected, exiting... - exit; - fi - fi - - # Load image kernel - if test -e ${devtype} ${devnum}:${distro_bootpart} /@@KERNEL_IMAGE@@; then - fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGE@@;; - else - echo Kernel image not found, exiting... - exit; - fi - - # Load device-tree - if test -n ${fdt_image}; then - if test -e ${devtype} ${devnum}:${distro_bootpart} ${fdt_image}; then - fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ ${fdt_image}; - else - echo Device-tree ${fdt_image} not found, exiting... - exit; - fi - else - if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree.dtb; then - fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ devicetree.dtb; - echo Loading default devicetree.dtb device-tree... - else - echo No default device-tree devicetree.dtb found, exiting... - exit; - fi - fi - - # Apply Device-tree Overlay if it exists.. - if test -n ${fdt_overlay}; then - setenv fdtov_addr 240bf000 - - if test -e ${devtype} ${devnum}:${distro_bootpart} ${fdt_overlay}; then - echo Applying device-tree overlay - fdt addr @@DEVICETREE_ADDRESS@@ - fatload ${devtype} ${devnum}:${distro_bootpart} ${fdtov_addr} ${fdt_overlay} - fdt resize ${filesize} - fdt apply $fdtov_addr - echo Applied Device-Tree Overlay: ${fdt_overlay}... - else - echo Skipping device-tree overlay, could not find ${fdt_overlay}... - fi - else - echo Skipping device-tree overlay, no fdt_overlay env defined... - fi - - # Non-FIT kernel loading - if test -e ${devtype} ${devnum}:${distro_bootpart} /@@RAMDISK_IMAGE@@; then - echo Copying Linux from SD to RAM... - fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ @@RAMDISK_IMAGE@@; - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ - exit; - fi - - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ - exit; - fi - if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then - sf probe 0 0 0; - if test "@@QSPI_KERNEL_IMAGE@@" = "@@FIT_IMAGE@@"; then - sf read @@QSPI_FIT_IMAGE_LOAD_ADDRESS@@ @@QSPI_KERNEL_OFFSET@@ @@QSPI_FIT_IMAGE_SIZE@@; - bootm @@QSPI_FIT_IMAGE_LOAD_ADDRESS@@; - exit; - fi - if test "@@QSPI_KERNEL_IMAGE@@" = "@@KERNEL_IMAGE@@"; then - sf read @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_OFFSET@@ @@QSPI_KERNEL_SIZE@@; - sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@ - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ - exit; - fi - exit; - fi - if test "${boot_target}" = "nand" || test "${boot_target}" = "nand0"; then - nand info - if test "@@NAND_KERNEL_IMAGE@@" = "@@FIT_IMAGE@@"; then - nand read @@NAND_FIT_IMAGE_LOAD_ADDRESS@@ @@NAND_KERNEL_OFFSET@@ @@NAND_FIT_IMAGE_SIZE@@; - bootm @@NAND_FIT_IMAGE_LOAD_ADDRESS@@; - exit; - fi - if test "@@NAND_KERNEL_IMAGE@@" = "@@KERNEL_IMAGE@@"; then - nand read @@KERNEL_LOAD_ADDRESS@@ @@NAND_KERNEL_OFFSET@@ @@NAND_KERNEL_SIZE@@; - nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@; - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ - exit; - fi - fi -done diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default.ubifs b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default.ubifs deleted file mode 100644 index 2b21c3c..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default.ubifs +++ /dev/null @@ -1,55 +0,0 @@ -# This is a boot script for U-Boot -# Generate boot.scr: -# mkimage -c none -A arm -T script -d boot.cmd.default boot.scr -# -################ -@@PRE_BOOTENV@@ - -for boot_target in ${boot_targets}; -do - if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then - ubifsls @@FIT_IMAGE@@ - if test $? = 0; then - ubifsload @@QSPI_FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; - bootm @@QSPI_FIT_IMAGE_LOAD_ADDRESS@@; - exit; - fi - ubifsls @@KERNEL_IMAGE@@ - if test $? = 0; then - ubifsload @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGE@@; - fi - ubifsls system.dtb - if test $? = 0; then - ubifsload @@DEVICETREE_ADDRESS@@ system.dtb - fi - ubifsls @@RAMDISK_IMAGE@@ - if test $? = 0; then - ubifsload @@RAMDISK_IMAGE_ADDRESS@@ @@RAMDISK_IMAGE@@ - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ - exit; - fi - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ - exit; - fi - if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then - run bootcmd_${boot_target}; - if test -e ${devtype} ${devnum}:${distro_bootpart} /@@FIT_IMAGE@@; then - ext4load ${devtype} ${devnum}:${distro_bootpart} @@FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; - bootm @@FIT_IMAGE_LOAD_ADDRESS@@; - exit; - fi - if test -e ${devtype} ${devnum}:${distro_bootpart} /@@KERNEL_IMAGE@@; then - ext4load ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGE@@; - fi - if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then - ext4load ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; - fi - if test -e ${devtype} ${devnum}:${distro_bootpart} /@@RAMDISK_IMAGE@@; then - ext4load ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ @@RAMDISK_IMAGE@@; - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ - exit; - fi - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ - exit; - fi -done diff --git a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.mw.initrd b/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.mw.initrd deleted file mode 100644 index a564384..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.mw.initrd +++ /dev/null @@ -1,97 +0,0 @@ -# This is a boot script for U-Boot -# Generate boot.scr: -# mkimage -c none -A arm -T script -d boot.cmd.default boot.scr -# -################ -@@PRE_BOOTENV@@ - -echo "Running MathWorks SD boot script from ${devtype}${devnum}" - -# Environment init -if test -e ${devtype} ${devnum}:${distro_bootpart} /uboot.env -eq 1; then - echo "No environment found in ${devtype}${devnum}, saving default" - saveenv - # For uboot-redund.env if any - saveenv -fi - -# Load extra environment settings through uEnv.txt -if test -e ${devtype} ${devnum}:${distro_bootpart} /uEnv.txt; then - echo "Importing uEnv.txt environment from SD ..." - load ${devtype} ${devnum}:${distro_bootpart} 0x00100000 uEnv.txt - echo "Loaded environment to 0x00100000" - env import -t 0x00100000 ${filesize} -fi - -# Load FPGA fpga file -if test -z "${bitstream_image}" ; then - setenv bitstream_image system.bit -fi -if test -e ${devtype} ${devnum}:${distro_bootpart} ${bitstream_image}; then - echo "Loading fpga ${bitstream_image} from SD/MMC/eMMC to RAM.." - load ${devtype} ${devnum}:${distro_bootpart} 0x1000000 ${bitstream_image}; - fpga loadb ${devtype}:${devnum} 0x1000000 ${filesize}; -else - echo "FPGA not found. Continue using default FPGA configuration in BOOT.BIN." -fi - -# FIT Image booting... use image.ub -if test -e ${devtype} ${devnum}:${distro_bootpart} /@@FIT_IMAGE@@; then - fatload ${devtype} ${devnum}:${distro_bootpart} @@FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; - bootm @@FIT_IMAGE_LOAD_ADDRESS@@; - exit; -fi - -# Legacy Image booting... (Non-FIT kernel) - -# Load kernel image -if test -e ${devtype} ${devnum}:${distro_bootpart} /@@KERNEL_IMAGE@@; then - fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGE@@;; -else - echo "Kernel image not found, exiting..." - exit; -fi - -# Load device-tree -if test -z "${fdt_image}" ; then - setenv fdt_image system.dtb -fi -if test -e ${devtype} ${devnum}:${distro_bootpart} ${fdt_image}; then - fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ ${fdt_image}; -else - echo "Device-tree ${fdt_image} not found, exiting..." - exit; -fi - -# Apply device-tree overlay if it exists -if test -n ${fdt_overlay}; then - setenv fdtov_addr 0x1000000 - if test -e ${devtype} ${devnum}:${distro_bootpart} ${fdt_overlay}; then - echo "Applying device-tree overlay" - fdt addr @@DEVICETREE_ADDRESS@@ - fatload ${devtype} ${devnum}:${distro_bootpart} ${fdtov_addr} ${fdt_overlay} - fdt resize ${filesize} - fdt apply $fdtov_addr - if test $? -eq 0 ; then - echo "Applied device-tree overlay: ${fdt_overlay}..." - else - echo "Unable to apply device-tree overlay" - fi - else - echo "Skipping device-tree overlay, could not find ${fdt_overlay}..." - fi -else - echo "Skipping device-tree overlay, no fdt_overlay env defined..." -fi - -# Non-FIT kernel loading -if test -e ${devtype} ${devnum}:${distro_bootpart} /@@RAMDISK_IMAGE@@; then - echo "Copying Linux from SD to RAM..." - fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ @@RAMDISK_IMAGE@@; - @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ - exit; -fi - -@@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ - - diff --git a/mw_zcu216/project-spec/meta-user/recipes-core/base-files/base-files_%.bbappend b/mw_zcu216/project-spec/meta-user/recipes-core/base-files/base-files_%.bbappend deleted file mode 100644 index 43f3bf4..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-core/base-files/base-files_%.bbappend +++ /dev/null @@ -1,11 +0,0 @@ -# Mount the FAT32 boot partition to /mnt -dirs755 += "/mnt" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -do_install:append() { - sed -i '/mmcblk0p1/d' ${D}${sysconfdir}/fstab - cat >> ${D}${sysconfdir}/fstab < -Date: Mon, 11 Feb 2019 14:10:09 +0530 -Subject: [PATCH 1/3] power: supply: irps: Add support for irps supply - -Add driver support for irps chip. -Signed-off-by: Bhargav Shah -Signed-off-by: Nagaradhesh Yeleswarapu -Signed-off-by: Dragan Cvetic ---- - drivers/power/supply/Kconfig | 8 ++ - drivers/power/supply/Makefile | 1 + - drivers/power/supply/irps5401.c | 245 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 254 insertions(+) - create mode 100644 drivers/power/supply/irps5401.c - -diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig -index c84a7b1..3fd5291 100644 ---- a/drivers/power/supply/Kconfig -+++ b/drivers/power/supply/Kconfig -@@ -710,4 +710,12 @@ config CHARGER_WILCO - information can be found in - Documentation/ABI/testing/sysfs-class-power-wilco - -+config CHARGER_IRPS5401 -+ tristate "Infineon IRPS5401 driver" -+ depends on I2C -+ select REGMAP_I2C -+ select RATIONAL -+ help -+ Say Y to enable support for Infineon IRPS5401. -+ - endif # POWER_SUPPLY -diff --git a/drivers/power/supply/Makefile b/drivers/power/supply/Makefile -index 6c7da92..300105b 100644 ---- a/drivers/power/supply/Makefile -+++ b/drivers/power/supply/Makefile -@@ -92,3 +92,4 @@ obj-$(CONFIG_FUEL_GAUGE_SC27XX) += sc27xx_fuel_gauge.o - obj-$(CONFIG_CHARGER_UCS1002) += ucs1002_power.o - obj-$(CONFIG_CHARGER_BD70528) += bd70528-charger.o - obj-$(CONFIG_CHARGER_WILCO) += wilco-charger.o -+obj-y += irps5401.o -diff --git a/drivers/power/supply/irps5401.c b/drivers/power/supply/irps5401.c -new file mode 100644 -index 0000000..dd4409d ---- /dev/null -+++ b/drivers/power/supply/irps5401.c -@@ -0,0 +1,245 @@ -+/* -+ * Driver for IRPS5401 chip -+ * -+ * Copyright (C) 2018 Xilinx, Inc. All rights reserved. -+ * -+ * -+ * Description: -+ * This driver is to program IRPS5401 chip through I2C. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 2 of the License, or -+ * (at your option) any later version. -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define AVTT_SLAVE_REG_OFFSET 0x20 -+#define DAC_AVTT_FAULT_LIMIT_OFFSET 0x40 -+#define DAV_AVTT_MAX_OFFSET 0x24 -+#define DAC_AVTT_SEL_OFFSET 0x21 -+#define VTT_CONFIG_REG 0x00 -+ -+/** -+ * struct pwr_irps5401 -+ * @regmap: Device's regmap -+ * @i2c_client: I2C client pointer -+ */ -+struct pwr_irps5401 { -+ struct regmap *regmap; -+ unsigned long volt; -+ struct i2c_client *i2c_client; -+}; -+ -+static int iic_write(struct regmap *regmap, u8 reg_addr, u8 *data, u8 size) -+{ -+ u32 ret; -+ -+ ret = regmap_bulk_write(regmap, reg_addr, data, size); -+ if (ret) -+ pr_err("i2c write failed for register offset : 0x%x", reg_addr); -+ -+ return ret; -+} -+ -+static int irps5401_set_32v(struct pwr_irps5401 *data) -+{ -+ u8 tx_array[5]; -+ u32 ret; -+ -+ tx_array[0] = (u8) 0x18 & (0xff); -+ ret = iic_write(data->regmap, AVTT_SLAVE_REG_OFFSET, tx_array, 0x1); -+ if (ret) -+ goto err; -+ -+ tx_array[0] = (u8) 0x80 & (0xff); -+ tx_array[1] = (u8) 0x03 & (0xff); -+ ret = iic_write(data->regmap, DAC_AVTT_FAULT_LIMIT_OFFSET, tx_array, -+ 0x2); -+ if (ret) -+ goto err; -+ -+ tx_array[0] = (u8) 0x33 & (0xff); -+ tx_array[1] = (u8) 0x03 & (0xff); -+ ret = iic_write(data->regmap, DAV_AVTT_MAX_OFFSET, tx_array, 0x2); -+ if (ret) -+ goto err; -+ -+ tx_array[0] = (u8) 0x00 & (0xff); -+ tx_array[1] = (u8) 0x03 & (0xff); -+ ret = iic_write(data->regmap, DAC_AVTT_SEL_OFFSET, tx_array, 0x2); -+ if (ret) -+ goto err; -+ -+ return ret; -+err: -+ pr_err("%s() failed\n", __func__); -+ return ret; -+} -+ -+static int irps5401_set_25v(struct pwr_irps5401 *data) -+{ -+ u8 tx_array[5]; -+ u32 ret; -+ -+ tx_array[0] = (u8) 0x80 & (0xff); -+ tx_array[1] = (u8) 0x02 & (0xff); -+ ret = iic_write(data->regmap, DAC_AVTT_SEL_OFFSET, tx_array, 0x2); -+ if (ret) -+ goto err; -+ -+ tx_array[0] = (u8) 0xcd & (0xff); -+ tx_array[1] = (u8) 0x02 & (0xff); -+ ret = iic_write(data->regmap, DAC_AVTT_FAULT_LIMIT_OFFSET, tx_array, -+ 0x2); -+ if (ret) -+ goto err; -+ -+ tx_array[0] = (u8) 0xb3 & (0xff); -+ tx_array[1] = (u8) 0x02 & (0xff); -+ ret = iic_write(data->regmap, DAV_AVTT_MAX_OFFSET, tx_array, 0x2); -+ if (ret) -+ goto err; -+ return ret; -+err: -+ pr_err("%s() failed\n", __func__); -+ return ret; -+} -+ -+/* -+ * irps5401_update_voltage() - PMIC output voltage -+ * @data: Driver data structure -+ */ -+static int irps5401_update_voltage(struct pwr_irps5401 *data) -+{ -+ u8 tx_array[5]; -+ u32 val; -+ int ret = 0; -+ -+ tx_array[0] = (u8) 0x01 & (0xFF); -+ iic_write(data->regmap, VTT_CONFIG_REG, tx_array, 0x1); -+ if (ret) -+ goto err; -+ -+ if (data->volt == 25) { -+ ret = irps5401_set_25v(data); -+ } else if (data->volt == 30) { -+ ret = irps5401_set_32v(data); -+ } else { -+ pr_err("0x%x value is not supported\n", data->volt); -+ ret = 1; -+ } -+ -+ return ret ? (-1) : 1; -+err: -+ pr_err("%s() failed\n", __func__); -+ return -1; -+} -+ -+static const struct regmap_config irps5401_regmap_config = { -+ .reg_bits = 8, -+ .val_bits = 8, -+ .cache_type = REGCACHE_RBTREE, -+ .max_register = 0x41, -+}; -+ -+static ssize_t voltage_store(struct device *dev, -+ struct device_attribute *attr, const char *buf, size_t size) -+{ -+ unsigned long volt; -+ ssize_t status; -+ struct i2c_client *client = to_i2c_client(dev); -+ struct pwr_irps5401 *data = i2c_get_clientdata(client); -+ -+ status = kstrtoul(buf, 16, &volt); -+ data->volt = volt; -+ -+ status = irps5401_update_voltage(data); -+ if (status < 0) -+ return status; -+ return size; -+} -+static DEVICE_ATTR_WO(voltage); -+ -+static const struct attribute *irps_attrs[] = { -+ &dev_attr_voltage.attr, -+ NULL, -+}; -+ -+static const struct attribute_group irps_attributes = { -+ .attrs = (struct attribute **)irps_attrs, -+}; -+static int irps5401_probe(struct i2c_client *client, -+ const struct i2c_device_id *id) -+{ -+ struct pwr_irps5401 *data; -+ struct clk_init_data init; -+ u32 initial_fout; -+ int err; -+ struct device *dev = &client->dev; -+ -+ data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); -+ if (!data) -+ return -ENOMEM; -+ -+ data->i2c_client = client; -+ -+ data->regmap = devm_regmap_init_i2c(client, &irps5401_regmap_config); -+ if (IS_ERR(data->regmap)) { -+ dev_err(&client->dev, "failed to allocate register map\n"); -+ return PTR_ERR(data->regmap); -+ } -+ -+ i2c_set_clientdata(client, data); -+ -+ /* -+ * Create sysfs file entries for the device -+ */ -+ err = sysfs_create_group(&dev->kobj, &irps_attributes); -+ if (err < 0) -+ return err; -+ return 0; -+} -+ -+static int irps5401_remove(struct i2c_client *client) -+{ -+ sysfs_remove_group(&client->dev.kobj, &irps_attributes); -+ return 0; -+} -+ -+enum clk_lmx2594_variant { -+ irps5401 -+}; -+ -+static const struct i2c_device_id irps5401_id[] = { -+ { "irps5401", irps5401 }, -+ { } -+}; -+MODULE_DEVICE_TABLE(i2c, irsp5401_id); -+ -+static const struct of_device_id irps5401_of_match[] = { -+ { .compatible = "infineon,irps5401" }, -+ { }, -+}; -+MODULE_DEVICE_TABLE(of, irps5401_of_match); -+ -+static struct i2c_driver irps5401_driver = { -+ .driver = { -+ .name = "irps5401", -+ .of_match_table = irps5401_of_match, -+ }, -+ .probe = irps5401_probe, -+ .remove = irps5401_remove, -+ .id_table = irps5401_id, -+}; -+module_i2c_driver(irps5401_driver); -+ -+MODULE_AUTHOR("Bhargav Shah "); -+MODULE_DESCRIPTION("irps5401 driver"); -+MODULE_LICENSE("GPL"); --- -2.7.4 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0002-i2c-cadence-Implement-timeout.patch b/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0002-i2c-cadence-Implement-timeout.patch deleted file mode 100644 index 8ba0c2f..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0002-i2c-cadence-Implement-timeout.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 718eb3505894a19ecc0cc3a279535504bf591f4f Mon Sep 17 00:00:00 2001 -From: Shubhrajyoti Datta -Date: Mon, 18 Jun 2018 17:22:21 +0530 -Subject: [PATCH 2/3] i2c: cadence: Implement timeout - -In some cases we are waiting in a loop. Replace the infinite wait with -the timeout. - -Signed-off-by: Shubhrajyoti Datta -Signed-off-by: Dragan Cvetic ---- - drivers/i2c/busses/i2c-cadence.c | 30 ++++++++++++++++++++++++++---- - 1 file changed, 26 insertions(+), 4 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c -index 5be7b8d..67a3984 100644 ---- a/drivers/i2c/busses/i2c-cadence.c -+++ b/drivers/i2c/busses/i2c-cadence.c -@@ -383,6 +383,7 @@ static irqreturn_t cdns_i2c_master_isr(void *ptr) - struct cdns_i2c *id = ptr; - /* Signal completion only after everything is updated */ - int done_flag = 0; -+ unsigned int timeout; - irqreturn_t status = IRQ_NONE; - - isr_status = cdns_i2c_readreg(CDNS_I2C_ISR_OFFSET); -@@ -409,6 +410,7 @@ static irqreturn_t cdns_i2c_master_isr(void *ptr) - ((isr_status & CDNS_I2C_IXR_COMP) || - (isr_status & CDNS_I2C_IXR_DATA))) { - /* Read data if receive data valid is set */ -+ timeout = 1000; - while (cdns_i2c_readreg(CDNS_I2C_SR_OFFSET) & - CDNS_I2C_SR_RXDV) { - /* -@@ -427,6 +429,16 @@ static irqreturn_t cdns_i2c_master_isr(void *ptr) - - if (cdns_is_holdquirk(id, hold_quirk)) - break; -+ timeout--; -+ if (timeout) -+ mdelay(1); -+ else -+ break; -+ } -+ if (!timeout) { -+ id->err_status = -ETIMEDOUT; -+ complete(&id->xfer_done); -+ return IRQ_HANDLED; - } - - /* -@@ -436,12 +448,22 @@ static irqreturn_t cdns_i2c_master_isr(void *ptr) - * maintain transfer size non-zero while performing a large - * receive operation. - */ -+ timeout = 1000; - if (cdns_is_holdquirk(id, hold_quirk)) { - /* wait while fifo is full */ -- while (cdns_i2c_readreg(CDNS_I2C_XFER_SIZE_OFFSET) != -- (id->curr_recv_count - CDNS_I2C_FIFO_DEPTH)) -- ; -- -+ while ((cdns_i2c_readreg(CDNS_I2C_XFER_SIZE_OFFSET) != -+ (id->curr_recv_count - CDNS_I2C_FIFO_DEPTH))) { -+ timeout--; -+ if (timeout) -+ mdelay(1); -+ else -+ break; -+ } -+ if (!timeout) { -+ id->err_status = -ETIMEDOUT; -+ complete(&id->xfer_done); -+ return IRQ_HANDLED; -+ } - /* - * Check number of bytes to be received against maximum - * transfer size and update register accordingly. --- -2.7.4 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0003-drivers-misc-add-support-for-DDR-memory-management.patch b/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0003-drivers-misc-add-support-for-DDR-memory-management.patch deleted file mode 100644 index ce03798..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0003-drivers-misc-add-support-for-DDR-memory-management.patch +++ /dev/null @@ -1,838 +0,0 @@ -From 85615df13817f9e37d3d5830af4cffc5204249a0 Mon Sep 17 00:00:00 2001 -From: Nagaradhesh Yeleswarapu -Date: Thu, 4 Jul 2019 17:22:08 +0530 -Subject: [PATCH 3/3] drivers: misc: add support for DDR memory management - -Add support to map PL DDR or PS DDR memory and initiate DMA transfer -from PL or PS memory as per the usecase. - -Signed-off-by: Nagaradhesh Yeleswarapu -Signed-off-by: Dragan Cvetic ---- - drivers/misc/Kconfig | 6 + - drivers/misc/Makefile | 1 + - drivers/misc/pl_mem.c | 786 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 793 insertions(+) - create mode 100644 drivers/misc/pl_mem.c - -diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index 420a537..6c35349 100644 ---- a/drivers/misc/Kconfig -+++ b/drivers/misc/Kconfig -@@ -487,6 +487,12 @@ config PVPANIC - a paravirtualized device provided by QEMU; it lets a virtual machine - (guest) communicate panic events to the host. - -+config PL_MEM -+ tristate "PL Memory handler" -+ default y -+ ---help--- -+ This module provides support to access PL memory and map the momory. -+ - source "drivers/misc/jesd204b/Kconfig" - source "drivers/misc/c2port/Kconfig" - source "drivers/misc/eeprom/Kconfig" -diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile -index fb3af7b..9aed310 100644 ---- a/drivers/misc/Makefile -+++ b/drivers/misc/Makefile -@@ -60,3 +60,4 @@ obj-$(CONFIG_XILINX_SDFEC) += xilinx_sdfec.o - obj-$(CONFIG_XILINX_FLEX_PM) += xilinx_flex_pm.o - obj-$(CONFIG_XILINX_TRAFGEN) += xilinx_trafgen.o - obj-$(CONFIG_XILINX_JESD204B) += jesd204b/ -+obj-$(CONFIG_PL_MEM) += pl_mem.o -diff --git a/drivers/misc/pl_mem.c b/drivers/misc/pl_mem.c -new file mode 100644 -index 0000000..545baf9 ---- /dev/null -+++ b/drivers/misc/pl_mem.c -@@ -0,0 +1,786 @@ -+/* -+ * PL MEM Mapping driver -+ * -+ * Copyright (C) 2018 Xilinx, Inc. All rights reserved. -+ * -+ * Based on the UDMA Buff driver. -+ * -+ * Description: -+ * This PL MEM driver, allocates coherent memory in either PL or PS -+ * depending on the selection. Triggers DEV_TO_MEM or MEM_TO_DEVICE -+ * DMA depending on the usecase. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 2 of the License, or -+ * (at your option) any later version. -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define DEVICE_MAX_NUM 256 -+#define MAX_INSTANCES 4 -+#define DRIVER_NAME "plmem" -+#define DEVICE_NAME_FORMAT "plmem%d" -+/** -+ * sync_mode(synchronous mode) value -+ */ -+#define SYNC_MODE_INVALID (0x00) -+#define SYNC_MODE_NONCACHED (0x01) -+#define SYNC_MODE_WRITECOMBINE (0x02) -+#define SYNC_MODE_DMACOHERENT (0x03) -+#define SYNC_MODE_MASK (0x03) -+#define SYNC_ALWAYS (0x04) -+ -+/** -+ * _PGPROT_NONCACHED : vm_page_prot value when ((sync_mode & SYNC_MODE_MASK) -+ * == SYNC_MODE_NONCACHED) -+ * _PGPROT_WRITECOMBINE : vm_page_prot value when ((sync_mode & SYNC_MODE_MASK) -+ * == SYNC_MODE_WRITECOMBINE) -+ * _PGPROT_DMACOHERENT : vm_page_prot value when ((sync_mode & SYNC_MODE_MASK) -+ * == SYNC_MODE_DMACOHERENT ) -+ */ -+#if defined(CONFIG_ARM) -+#define _PGPROT_NONCACHED(vm_page_prot) pgprot_noncached(vm_page_prot) -+#define _PGPROT_WRITECOMBINE(vm_page_prot) pgprot_writecombine(vm_page_prot) -+#define _PGPROT_DMACOHERENT(vm_page_prot) pgprot_dmacoherent(vm_page_prot) -+#elif defined(CONFIG_ARM64) -+#define _PGPROT_NONCACHED(vm_page_prot) pgprot_writecombine(vm_page_prot) -+#define _PGPROT_WRITECOMBINE(vm_page_prot) pgprot_writecombine(vm_page_prot) -+#define _PGPROT_DMACOHERENT(vm_page_prot) pgprot_writecombine(vm_page_prot) -+#else -+#define _PGPROT_NONCACHED(vm_page_prot) pgprot_noncached(vm_page_prot) -+#define _PGPROT_WRITECOMBINE(vm_page_prot) pgprot_writecombine(vm_page_prot) -+#define _PGPROT_DMACOHERENT(vm_page_prot) pgprot_writecombine(vm_page_prot) -+#endif -+ -+#define MAX_DAC 16 -+enum { -+ NO_MEM = 0, -+ PL_MEM, -+ PS_MEM, -+}; -+ -+ -+enum { -+ DDR, -+ BRAM, -+ MAX, -+}; -+ -+static DEFINE_IDA(plmem_device_ida); -+static dev_t plmem_device_number; -+static bool plmem_platform_driver_done; -+static struct class *plmem_sys_class; -+struct dma_chan *chan_dac; -+struct dma_chan *chan_adc; -+ -+/** -+ * struct plmem_driver_data - Plmem driver data -+ * @sys_dev: character device pointer -+ * @dma_dev: Device pointer -+ * @cdev: character device structure -+ * @chan: DMA channel -+ * @complete: completion variable -+ * @device_number: character driver device number -+ * @is_dac: DAC or ADC device -+ * @size: size of memory pool -+ * @alloc_size: size of memory pool, aligned to a page size -+ * @virt_addr: virtual address of memory region -+ * @phys_addr: physical address of memory region -+ * @sync_mode: holds page prot information -+ * @mem_used: holds whether pool is uses or not -+ */ -+struct plmem_driver_data { -+ struct device *sys_dev; -+ struct device *dma_dev; -+ struct cdev cdev; -+ struct dma_chan *chan; -+ struct completion complete; -+ dev_t device_number; -+ bool is_dac; -+ int size; -+ size_t alloc_size; -+ void *virt_addr; -+ dma_addr_t phys_addr; -+ int sync_mode; -+ int mem_used; -+ u32 mem_type; -+}; -+ -+/** -+ * plmem_driver_file_open() - This is the driver open function. -+ * @inode: Pointer to the inode structure of this device. -+ * @file: Pointer to the file structure. -+ * Return: Success(=0) or error status(<0). -+ */ -+static int plmem_driver_file_open(struct inode *inode, struct file *file) -+{ -+ struct plmem_driver_data *this; -+ int status = 0; -+ u32 minor; -+ -+ this = container_of(inode->i_cdev, struct plmem_driver_data, cdev); -+ file->private_data = this; -+ /* dma buffer allocation */ -+ this->virt_addr = dma_alloc_coherent(this->dma_dev, this->alloc_size, -+ &(this->phys_addr), GFP_KERNEL); -+ if (IS_ERR_OR_NULL(this->virt_addr)) { -+ dev_err(this->dma_dev, "%s dma_alloc_coherent() failed\n", -+ __func__); -+ this->virt_addr = NULL; -+ return -ENOMEM; -+ } -+ -+ minor = MINOR(this->device_number); -+ return status; -+} -+ -+/** -+ * plmem_driver_file_release() - This is the driver release function. -+ * @inode: Pointer to the inode structure of this device. -+ * @file: Pointer to the file structure. -+ * Return: Success(=0) or error status(<0). -+ */ -+static int plmem_driver_file_release(struct inode *inode, struct file *file) -+{ -+ struct plmem_driver_data *this = file->private_data; -+ /* Terminate DMA transfer and reset required flags */ -+ dmaengine_terminate_all(this->chan); -+ return 0; -+} -+ -+/** -+ * plmem_driver_file_mmap() - This is the driver memory map function. -+ * @file: Pointer to the file structure. -+ * @vma: Pointer to the vm area structure. -+ * Return: Success(=0) or error status(<0). -+ */ -+static int plmem_driver_file_mmap(struct file *file, struct vm_area_struct *vma) -+{ -+ struct plmem_driver_data *this = file->private_data; -+ -+ if ((file->f_flags & O_SYNC) | (this->sync_mode & SYNC_ALWAYS)) { -+ switch (this->sync_mode & SYNC_MODE_MASK) { -+ case SYNC_MODE_NONCACHED: -+ vma->vm_flags |= VM_IO; -+ vma->vm_page_prot = _PGPROT_NONCACHED( -+ vma->vm_page_prot); -+ break; -+ case SYNC_MODE_WRITECOMBINE: -+ vma->vm_flags |= VM_IO; -+ vma->vm_page_prot = _PGPROT_WRITECOMBINE( -+ vma->vm_page_prot); -+ break; -+ case SYNC_MODE_DMACOHERENT: -+ vma->vm_flags |= VM_IO; -+ vma->vm_page_prot = _PGPROT_DMACOHERENT( -+ vma->vm_page_prot); -+ break; -+ default: -+ break; -+ } -+ } -+ vma->vm_private_data = this; -+ vma->vm_pgoff = 0; -+ return dma_mmap_coherent(this->dma_dev, vma, this->virt_addr, -+ this->phys_addr, this->alloc_size); -+} -+ -+/** -+ * plmem_driver_dma_read_done() - This is the dma read done event handler. -+ * @void: Pointer to the private data structure. -+ */ -+static void plmem_driver_dma_read_done(void *data) -+{ -+ struct plmem_driver_data *this = data; -+ /* send transfer done event */ -+ complete(&this->complete); -+} -+ -+/** -+ * plmem_driver_file_read() - This is the driver read function. -+ * @file: Pointer to the file structure. -+ * @buff: Pointer to the user buffer. -+ * @count: The number of bytes to be written. -+ * @ppos: Pointer to the offset value. -+ * Return: Transferred size. -+ */ -+static ssize_t plmem_driver_file_read(struct file *file, char __user *buff, -+ size_t count, loff_t *ppos) -+{ -+ struct plmem_driver_data *this = file->private_data; -+ struct dma_async_tx_descriptor *desc; -+ dma_cookie_t cookie; -+ -+ if (this->is_dac) { -+ dev_err(this->dma_dev, "%s Not a adc device\n", __func__); -+ return -EINVAL; -+ } -+ -+ pr_err("this->mem_type = %d, count = %ld\n", this->mem_type, count); -+ if (this->mem_type == DDR) { -+ desc = dmaengine_prep_slave_single(this->chan, -+ this->phys_addr, count, -+ DMA_DEV_TO_MEM, 0); -+ if (!desc) { -+ dev_err(this->dma_dev, "%s Failed to initiate DMA\n", -+ __func__); -+ return -ENOMEM; -+ } -+ desc->callback = plmem_driver_dma_read_done; -+ desc->callback_param = this; -+ cookie = dmaengine_submit(desc); -+ if (dma_submit_error(cookie)) { -+ dev_err(this->dma_dev, "%s Failed to submit DMA %d\n", -+ __func__, cookie); -+ return -EINVAL; -+ } -+ /* re-initialize the completion variable */ -+ reinit_completion(&this->complete); -+ /* Start DMA */ -+ dma_async_issue_pending(this->chan); -+ /* wait for done event */ -+ wait_for_completion(&this->complete); -+ } else { -+ dev_err(this->dma_dev, "%s Unsupported memtype : %d\n", __func__, this->mem_type); -+ return -EINVAL; -+ } -+ return 0; -+} -+ -+/** -+ * plmem_driver_dma_write_done() - This is the dma read done event handler. -+ * @void: Pointer to the private data structure. -+ */ -+static void plmem_driver_dma_write_done(void *data) -+{ -+ struct plmem_driver_data *this = data; -+ /* send transfer done event */ -+ complete(&this->complete); -+} -+ -+/** -+ * plmem_driver_file_write() - This is the driver write function. -+ * @file: Pointer to the file structure. -+ * @buff: Pointer to the user buffer. -+ * @count: The number of bytes to be written. -+ * @ppos: Pointer to the offset value -+ * Return: Transferred size. -+ */ -+static ssize_t plmem_driver_file_write(struct file *file, -+ const char __user *buff, -+ size_t count, loff_t *ppos) -+{ -+ struct plmem_driver_data *this = file->private_data; -+ struct dma_async_tx_descriptor *desc; -+ dma_cookie_t cookie; -+ -+ if (this->is_dac == 0) { -+ dev_err(this->dma_dev, "%s Not a dac device\n", __func__); -+ return -EINVAL; -+ } -+ if (this->mem_type >= MAX) { -+ dev_err(this->dma_dev, "%s Invalid mem type\n", __func__); -+ return -EINVAL; -+ } -+ -+ if (this->mem_type == DDR) { -+ pr_err("count = %ld\n", count); -+ desc = dmaengine_prep_dma_cyclic(this->chan, -+ this->phys_addr, count, -+ (count / 2), DMA_MEM_TO_DEV, 0); -+ if (!desc) { -+ dev_err(this->dma_dev, "%s Failed to initiate DMA\n", -+ __func__); -+ return -ENOMEM; -+ } -+ desc->callback = plmem_driver_dma_write_done; -+ desc->callback_param = this; -+ cookie = dmaengine_submit(desc); -+ if (dma_submit_error(cookie)) { -+ dev_err(this->dma_dev, "%s Failed to submit DMA %d\n", -+ __func__, cookie); -+ return -EINVAL; -+ } -+ /* re-initialize the completion variable */ -+ reinit_completion(&this->complete); -+ /* Start DMA */ -+ dma_async_issue_pending(this->chan); -+ /* wait for done event */ -+ wait_for_completion(&this->complete); -+ } else { -+ dev_err(this->dma_dev, "%s Unsupported memtype\n", __func__); -+ return -EINVAL; -+ } -+ return 0; -+} -+ -+static int plmem_driver_file_fsync(struct file *file, loff_t size, loff_t size1, -+ int datasync) -+{ -+ struct plmem_driver_data *this = file->private_data; -+ -+ dev_dbg(this->dma_dev, " %s\n", __func__); -+ /* Terminate DMA transfer and reset required flags */ -+ dmaengine_terminate_all(this->chan); -+ return 0; -+} -+ -+static const struct file_operations plmem_driver_file_ops = { -+ .owner = THIS_MODULE, -+ .open = plmem_driver_file_open, -+ .release = plmem_driver_file_release, -+ .mmap = plmem_driver_file_mmap, -+ .read = plmem_driver_file_read, -+ .write = plmem_driver_file_write, -+ .fsync = plmem_driver_file_fsync, -+}; -+ -+/** -+ * plmem_driver_create() - Create plmem driver data structure. -+ * @name: device name or NULL. -+ * @parent: parent device or NULL. -+ * @minor: minor_number. -+ * @size: buffer size. -+ * @channel: DMA channel name -+ * Return: Pointer to the plmem driver data structure or NULL. -+ * -+ * It does all the memory allocation and registration for the device. -+ */ -+static struct plmem_driver_data *plmem_driver_create(const char *name, -+ struct device *parent, -+ u32 minor, u32 size, -+ char *channel) -+{ -+ struct plmem_driver_data *this = NULL; -+ const unsigned int DONE_ALLOC_MINOR = (1 << 0); -+ const unsigned int DONE_CHRDEV_ADD = (1 << 1); -+ const unsigned int DONE_ALLOC_CMA = (1 << 2); -+ const unsigned int DONE_DEVICE_CREATE = (1 << 3); -+ struct dma_chan *chan; -+ int ret; -+ unsigned int done = 0; -+ -+ /* allocate device minor number */ -+ if (minor < DEVICE_MAX_NUM) { -+ if (ida_simple_get(&plmem_device_ida, minor, minor+1, -+ GFP_KERNEL) < 0) { -+ dev_err(parent, "couldn't allocate minor number(=%d)\n", -+ minor); -+ goto failed; -+ } -+ } else { -+ dev_err(parent, "invalid minor num(=%d),valid range: 0 to %d\n", -+ minor, DEVICE_MAX_NUM-1); -+ goto failed; -+ } -+ done |= DONE_ALLOC_MINOR; -+ /* create (plmem_driver_data*) this. */ -+ this = kzalloc(sizeof(*this), GFP_KERNEL); -+ if (IS_ERR_OR_NULL(this)) -+ goto failed; -+ /* make this->device_number and this->size */ -+ this->device_number = MKDEV(MAJOR(plmem_device_number), minor); -+ this->size = size; -+ this->alloc_size = (((size + ((1 << PAGE_SHIFT) - 1)) >> PAGE_SHIFT) -+ << PAGE_SHIFT); -+ this->sync_mode = SYNC_MODE_NONCACHED; -+ /* register /sys/class/udmabuf/udmabuf[0..n] */ -+ this->sys_dev = device_create(plmem_sys_class, -+ parent, -+ this->device_number, -+ (void *)this, -+ DEVICE_NAME_FORMAT, MINOR(this->device_number)); -+ -+ if (IS_ERR_OR_NULL(this->sys_dev)) { -+ this->sys_dev = NULL; -+ goto failed; -+ } -+ done |= DONE_DEVICE_CREATE; -+ -+ /* setup dma_dev */ -+ this->dma_dev = parent; -+ -+ of_dma_configure(this->dma_dev, NULL, true); -+ dma_set_mask(this->dma_dev, DMA_BIT_MASK(sizeof(dma_addr_t) * 8)); -+ dma_set_coherent_mask(this->dma_dev, -+ DMA_BIT_MASK(sizeof(dma_addr_t) * 8)); -+ -+ done |= DONE_ALLOC_CMA; -+ -+ /* add chrdev */ -+ cdev_init(&this->cdev, &plmem_driver_file_ops); -+ this->cdev.owner = THIS_MODULE; -+ if (cdev_add(&this->cdev, this->device_number, MAX_INSTANCES) != 0) { -+ dev_err(parent, "cdev_add() failed\n"); -+ goto failed; -+ } -+ done |= DONE_CHRDEV_ADD; -+ -+ dev_err(this->sys_dev, "major number = %d\n", -+ MAJOR(this->device_number)); -+ dev_err(this->sys_dev, "minor number = %d\n", -+ MINOR(this->device_number)); -+ dev_err(this->sys_dev, "buffer size = %zu\n", this->alloc_size); -+ if ((MINOR(this->device_number) == 0) || -+ (MINOR(this->device_number) == MAX_DAC)) { -+ chan = dma_request_slave_channel_reason(parent, channel); -+ if (IS_ERR(chan)) { -+ ret = PTR_ERR(chan); -+ dev_err(this->dma_dev, "%s DMA request channel failed:%d\n", -+ __func__, ret); -+ goto failed; -+ } -+ if ((MINOR(this->device_number) == 0)) -+ chan_dac = chan; -+ else -+ chan_adc = chan; -+ } else { -+ if (strcmp(channel, "dac") == 0) -+ chan = chan_dac; -+ else -+ chan = chan_adc; -+ } -+ this->chan = chan; -+ this->mem_type = BRAM; -+ init_completion(&this->complete); -+ -+ return this; -+failed: -+ if (done & DONE_CHRDEV_ADD) -+ cdev_del(&this->cdev); -+ if (done & DONE_ALLOC_CMA) -+ dma_free_coherent(this->dma_dev, this->alloc_size, -+ this->virt_addr, this->phys_addr); -+ if (done & DONE_DEVICE_CREATE) -+ device_destroy(plmem_sys_class, this->device_number); -+ if (done & DONE_ALLOC_MINOR) -+ ida_simple_remove(&plmem_device_ida, minor); -+ if (this != NULL) -+ kfree(this); -+ return NULL; -+} -+ -+static ssize_t plmem_show_mem_type(struct device *dev, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ struct plmem_driver_data *this = dev_get_drvdata(dev); -+ -+ return sprintf(buf, "%d", this->mem_type); -+} -+ -+static ssize_t plmem_store_mem_type(struct device *dev, -+ struct device_attribute *attr, -+ const char *buf, size_t len) -+{ -+ struct plmem_driver_data *this = dev_get_drvdata(dev); -+ long val; -+ int ret; -+ -+ if (kstrtoul(buf, 0, &val)) -+ return -EINVAL; -+ -+ if (val < 0) -+ return -EINVAL; -+ -+ this->mem_type = val; -+ dev_dbg(dev, "this->mem_type = %d\n", this->mem_type); -+ return sizeof(ret); -+} -+ -+static ssize_t plmem_show_selected_mem(struct device *dev, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ struct plmem_driver_data *this = dev_get_drvdata(dev); -+ -+ return sprintf(buf, "%d", this->mem_used); -+} -+ -+static ssize_t plmem_store_selected_mem(struct device *dev, -+ struct device_attribute *attr, -+ const char *buf, size_t len) -+{ -+ struct resource mem_res; -+ struct plmem_driver_data *this = dev_get_drvdata(dev); -+ struct device_node *mem_node; -+ unsigned long val; -+ int ret; -+ -+ if (kstrtoul(buf, 0, &val)) -+ return -EINVAL; -+ -+ switch (val) { -+ case PL_MEM: -+ /* setup dma_mask and coherent_dma_mask */ -+ dma_set_mask(this->dma_dev, -+ DMA_BIT_MASK(sizeof(dma_addr_t) * 8)); -+ dma_set_coherent_mask(this->dma_dev, -+ DMA_BIT_MASK(sizeof(dma_addr_t) * 8)); -+ this->mem_used = PL_MEM; -+ /* Decleare memory as coherent */ -+ mem_node = of_parse_phandle(dev->of_node, -+ "xlnx,dedicated-pl-mem", 0); -+ dev_dbg(dev, "Declearing PL DDR as coherent memory\n"); -+ if (mem_node) { -+ ret = of_address_to_resource(mem_node, 0, &mem_res); -+ if (!ret) { -+ dev_dbg(dev, "Declearing coherent memory\n"); -+ ret = dma_declare_coherent_memory(dev, -+ mem_res.start, mem_res.start, -+ resource_size(&mem_res)); -+ if (ret < 0) { -+ dev_err(dev, "fail: decl coheret: %d\n", -+ ret); -+ return -EINVAL; -+ } -+ } -+ } -+ of_node_put(mem_node); -+ break; -+ case PS_MEM: -+ this->mem_used = PS_MEM; -+ /* setup dma_mask and coherent_dma_mask */ -+ dma_set_mask(this->dma_dev, DMA_BIT_MASK(32)); -+ dma_set_coherent_mask(this->dma_dev, DMA_BIT_MASK(32)); -+ dev_dbg(dev, "Declearing PS DDR as coherent memory\n"); -+ break; -+ case NO_MEM: -+ dev_dbg(dev, "Releasing coherent memory\n"); -+ /* Release coherent memory and undeclare as coherent */ -+ this->mem_used = NO_MEM; -+ dma_free_coherent(this->dma_dev, this->alloc_size, -+ this->virt_addr, this->phys_addr); -+// dma_release_coherent_memory(dev->dma_mem); -+ dev->dma_mem = NULL; -+ this->virt_addr = NULL; -+ break; -+ default: -+ dev_err(dev, "%lu: invalid memory type (1, 2)\n", val); -+ return -EINVAL; -+ } -+ -+ return (sizeof(ret)); -+} -+ -+static DEVICE_ATTR(select_mem, S_IRUGO | S_IWUSR, -+ plmem_show_selected_mem, plmem_store_selected_mem); -+ -+ -+static DEVICE_ATTR(mem_type, S_IRUGO | S_IWUSR, -+ plmem_show_mem_type, plmem_store_mem_type); -+ -+static struct attribute *plmem_attributes[] = { -+ &dev_attr_select_mem.attr, -+ &dev_attr_mem_type.attr, -+ NULL, -+}; -+ -+static const struct attribute_group plmem_attr_group = { -+ .attrs = plmem_attributes, -+}; -+ -+/** -+ * plmem_platform_driver_probe() - Probe call for the device. -+ * @pdev: handle to the platform device structure. -+ * Return: Success(=0) or error status(<0). -+ * -+ * It does all the memory allocation and registration for the device. -+ */ -+static int plmem_platform_driver_probe(struct platform_device *pdev) -+{ -+ int retval = 0; -+ u32 minor_number = 0; -+ struct plmem_driver_data *driver_data; -+ int status; -+ int ret; -+ u32 size; -+ char channel[5]; -+ bool is_dac; -+ -+ status = of_property_read_u32(pdev->dev.of_node, "minor-number", -+ &minor_number); -+ if (status != 0) { -+ dev_err(&pdev->dev, "invalid property minor number.\n"); -+ retval = -ENODEV; -+ goto failed; -+ } -+ status = of_property_read_u32(pdev->dev.of_node, "size", &size); -+ if (status != 0) { -+ dev_err(&pdev->dev, "invalid property size.\n"); -+ retval = -ENODEV; -+ goto failed; -+ } -+ /* get device number */ -+ is_dac = of_property_read_bool(pdev->dev.of_node, "xlnx,dac-device"); -+ if (is_dac) -+ strcpy(channel, "dac"); -+ else -+ strcpy(channel, "adc"); -+ /* create (plmem_driver_data*)this. */ -+ driver_data = plmem_driver_create(DRIVER_NAME, &pdev->dev, -+ minor_number, size, channel); -+ if (IS_ERR_OR_NULL(driver_data)) { -+ dev_err(&pdev->dev, "driver create fail ret : %ld\n", -+ PTR_ERR(driver_data)); -+ retval = -EPROBE_DEFER; -+ goto failed; -+ } -+ driver_data->is_dac = is_dac; -+ ret = sysfs_create_group(&pdev->dev.kobj, &plmem_attr_group); -+ if (ret) { -+ dev_err(&pdev->dev, "sysfs creation failed\n"); -+ return ret; -+ } -+ dev_set_drvdata(&pdev->dev, driver_data); -+ return 0; -+failed: -+ dev_info(&pdev->dev, "driver install failed.\n"); -+ return retval; -+} -+ -+/** -+ * plmem_driver_destroy() - Remove the plmem driver data structure. -+ * @this: Pointer to the plmem driver data structure. -+ * Return: Success(=0) or error status(<0). -+ * -+ * Unregister the device after releasing the resources. -+ */ -+static int plmem_driver_destroy(struct plmem_driver_data *this) -+{ -+ if (!this) -+ return -ENODEV; -+ -+ dma_free_coherent(this->dma_dev, this->alloc_size, this->virt_addr, -+ this->phys_addr); -+ if (MINOR(this->device_number) == 0) -+ dma_release_channel(chan_dac); -+ else if (MINOR(this->device_number) == MAX_DAC) -+ dma_release_channel(chan_adc); -+ sysfs_remove_group(&this->dma_dev->kobj, &plmem_attr_group); -+ cdev_del(&this->cdev); -+ device_destroy(plmem_sys_class, this->device_number); -+ ida_simple_remove(&plmem_device_ida, MINOR(this->device_number)); -+ kfree(this); -+ return 0; -+} -+ -+/** -+ * plmem_platform_driver_remove() - Remove call for the device. -+ * @pdev: Handle to the platform device structure. -+ * Return: Success(=0) or error status(<0). -+ * -+ * Unregister the device after releasing the resources. -+ */ -+static int plmem_platform_driver_remove(struct platform_device *pdev) -+{ -+ struct plmem_driver_data *this = dev_get_drvdata(&pdev->dev); -+ int retval = 0; -+ -+ retval = plmem_driver_destroy(this); -+ if (retval != 0) -+ return retval; -+ dev_set_drvdata(&pdev->dev, NULL); -+ return 0; -+} -+ -+/** -+ * Open Firmware Device Identifier Matching Table -+ */ -+static const struct of_device_id plmem_of_match[] = { -+ { .compatible = "xlnx,pl-mem", }, -+ { /* end of table */} -+}; -+MODULE_DEVICE_TABLE(of, plmem_of_match); -+ -+/** -+ * Platform Driver Structure -+ */ -+static struct platform_driver plmem_platform_driver = { -+ .probe = plmem_platform_driver_probe, -+ .remove = plmem_platform_driver_remove, -+ .driver = { -+ .owner = THIS_MODULE, -+ .name = DRIVER_NAME, -+ .of_match_table = plmem_of_match, -+ }, -+}; -+ -+ -+/** -+ * plmem_module_exit() -+ */ -+static void plmem_module_exit(void) -+{ -+ -+ if (plmem_platform_driver_done) -+ platform_driver_unregister(&plmem_platform_driver); -+ if (plmem_device_number != 0) -+ unregister_chrdev_region(plmem_device_number, 0); -+ ida_destroy(&plmem_device_ida); -+} -+ -+/** -+ * plmem_module_init() -+ */ -+static int __init plmem_module_init(void) -+{ -+ int retval = 0; -+ -+ ida_init(&plmem_device_ida); -+ retval = alloc_chrdev_region(&plmem_device_number, 0, MAX_INSTANCES, -+ DRIVER_NAME); -+ if (retval != 0) { -+ pr_err("%s: couldn't allocate device major number\n", -+ DRIVER_NAME); -+ plmem_device_number = 0; -+ goto failed; -+ } -+ plmem_sys_class = class_create(THIS_MODULE, DRIVER_NAME); -+ if (IS_ERR_OR_NULL(plmem_sys_class)) { -+ pr_err("%s: couldn't create sys class\n", DRIVER_NAME); -+ retval = PTR_ERR(plmem_sys_class); -+ plmem_sys_class = NULL; -+ goto failed; -+ } -+ retval = platform_driver_register(&plmem_platform_driver); -+ if (retval) -+ pr_err("%s: couldn't register platform driver\n", DRIVER_NAME); -+ else -+ plmem_platform_driver_done = 1; -+ return 0; -+failed: -+ plmem_module_exit(); -+ return retval; -+} -+ -+late_initcall(plmem_module_init); -+module_exit(plmem_module_exit); -+ -+MODULE_AUTHOR("Xilinx, Inc."); -+MODULE_DESCRIPTION("User space mappable PL DMA buffer device driver"); -+MODULE_LICENSE("GPL v2"); --- -2.7.4 - diff --git a/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/devtool-fragment.cfg b/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/devtool-fragment.cfg deleted file mode 100644 index bddebf4..0000000 --- a/mw_zcu216/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/devtool-fragment.cfg +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_REGMAP_MMIO=y -# CONFIG_MMC_SDHCI_AM654 is not set -CONFIG_DMA_VIRTUAL_CHANNELS=y -CONFIG_AXI_DMAC=y diff --git a/project-spec/meta-mathworks b/project-spec/meta-mathworks new file mode 160000 index 0000000..1b1b01d --- /dev/null +++ b/project-spec/meta-mathworks @@ -0,0 +1 @@ +Subproject commit 1b1b01d265fb5461f58719984a6e998ca73275fc