From d2fc5aa4ab35c9e886d5d94848fb0f0beaea20ea Mon Sep 17 00:00:00 2001 From: P L Sai Krishna Date: Wed, 1 Jul 2015 10:51:37 +0530 Subject: [PATCH] xilffs: Added Read_Only option. This patch modifies .mld and .tcl files to provide the Read_Only option to the user. By default this option is false. Signed-off-by: P L Sai Krishna --- lib/sw_services/xilffs/data/xilffs.mld | 1 + lib/sw_services/xilffs/data/xilffs.tcl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/sw_services/xilffs/data/xilffs.mld b/lib/sw_services/xilffs/data/xilffs.mld index 5cca0167..d72e8b87 100644 --- a/lib/sw_services/xilffs/data/xilffs.mld +++ b/lib/sw_services/xilffs/data/xilffs.mld @@ -50,5 +50,6 @@ BEGIN LIBRARY xilffs OPTION NAME = xilffs; PARAM name = fs_interface, desc = "Enables file system with selected interface. Enter 1 for SD.", type = int, default = 1; PARAM name = enable_mmc, desc = "Enables MMC support if true. If false, SD is enabled.", type = bool, default = false; + PARAM name = read_only, desc = "Enables the file system in Read_Only mode if true. ZynqMP fsbl will set this to true", type = bool, default = false; END LIBRARY diff --git a/lib/sw_services/xilffs/data/xilffs.tcl b/lib/sw_services/xilffs/data/xilffs.tcl index c4c02fc6..52b7e85d 100644 --- a/lib/sw_services/xilffs/data/xilffs.tcl +++ b/lib/sw_services/xilffs/data/xilffs.tcl @@ -108,6 +108,7 @@ proc xgen_opts_file {libhandle} { puts $file_handle "/* Xilinx FAT File System Library (XilFFs) User Settings */" set fs_interface [common::get_property CONFIG.fs_interface $libhandle] set enable_mmc [common::get_property CONFIG.enable_mmc $libhandle] + set read_only [common::get_property CONFIG.read_only $libhandle] # Checking if SD with FATFS is enabled. # This can be expanded to add more interfaces. @@ -118,6 +119,9 @@ proc xgen_opts_file {libhandle} { if {$periph == "ps7_sdio" || $periph == "psu_sd"} { if {$fs_interface == 1} { puts $file_handle "\#define FILE_SYSTEM_INTERFACE_SD" + if {$read_only == true} { + puts $file_handle "\#define FILE_SYSTEM_READ_ONLY" + } } else { error "ERROR: Invalid interface selected \n" }