aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/host_boot/include/mod_host_boot.h3
-rwxr-xr-xmodule/host_boot/src/mod_host_boot.c16
2 files changed, 5 insertions, 14 deletions
diff --git a/module/host_boot/include/mod_host_boot.h b/module/host_boot/include/mod_host_boot.h
index ea9fd67..d7fe0c4 100644
--- a/module/host_boot/include/mod_host_boot.h
+++ b/module/host_boot/include/mod_host_boot.h
@@ -20,7 +20,8 @@ struct se_host_config {
};
-#define GZIP_MAGIC 0x8B1F
+#define CRAMFS_XIP_MAGIC 0x3D45
+
/*!
* @}
*/
diff --git a/module/host_boot/src/mod_host_boot.c b/module/host_boot/src/mod_host_boot.c
index e447da2..8dc0db3 100755
--- a/module/host_boot/src/mod_host_boot.c
+++ b/module/host_boot/src/mod_host_boot.c
@@ -134,21 +134,11 @@ static int load_host_images(void)
return FWK_E_DATA;
}
- /* copy rootfs image from FLASH to SRAM, currently only cpio.gzip format
- is supported.
- TODO: 4MB of data is copied but once we migrate from SPIToC to GPT we
- will copy only till end of file.
- */
+ /* check for valid rootfs image from FLASH */
rootfs_magic = *((uint16_t*)ROOTFS_FLASH_BASE);
- if (rootfs_magic == GZIP_MAGIC) {
+ if (rootfs_magic != CRAMFS_XIP_MAGIC) {
host_ctx.log_api->log(MOD_LOG_GROUP_INFO,
- "[RAM] Loading Root FS at 0x%x\n",
- (void *) HOST_ROOTFS_BASE);
- memcpy((void*) HOST_ROOTFS_BASE, (void*) ROOTFS_FLASH_BASE,
- HOST_ROOTFS_SIZE);
- } else {
- host_ctx.log_api->log(MOD_LOG_GROUP_INFO,
- "[RAM] No valid rootfs found. Abort Host BOOT!\n");
+ "[FLASH] No valid rootfs found. Abort Host BOOT!\n");
return FWK_E_DATA;
}
return FWK_SUCCESS;