TimJTi commented on code in PR #3068:
URL: https://github.com/apache/nuttx-apps/pull/3068#discussion_r2073755822


##########
boot/nxboot/loader/boot.c:
##########
@@ -403,6 +440,42 @@ static int perform_update(struct nxboot_state *state, bool 
check_only)
   return OK;
 }
 
+#ifdef CONFIG_NXBOOT_COPY_TO_RAM
+int nxboot_ramcopy(void)
+{
+  int primary;
+  struct nxboot_img_header header;
+  ssize_t bytes;
+  static uint8_t *buf;
+  size_t size;
+
+  primary = flash_partition_open(CONFIG_NXBOOT_PRIMARY_SLOT_PATH);
+  if (primary < 0)
+    {
+      return ERROR;
+    }
+
+  get_image_header(primary, &header);
+  buf = malloc(header.size);
+  if (!buf)
+    {
+      return ERROR;
+    }
+
+  size = header.size - CONFIG_NXBOOT_HEADER_SIZE;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to