From 365bb2230b9238147d30a14536a330ae98f6a910 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Thu, 20 May 2010 09:34:49 +0900 Subject: [PATCH] usbd: Erase the qboot also when write ubi image Signed-off-by: Minkyu Kang --- common/cmd_usbd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/cmd_usbd.c b/common/cmd_usbd.c index ead999b..bfe34c6 100644 --- a/common/cmd_usbd.c +++ b/common/cmd_usbd.c @@ -947,6 +947,17 @@ static int process_data(struct usbd_ops *usbd) /* File Systems */ case IMG_FILESYSTEM: + /* Erase the qboot also when write ubi image */ + { + int qboot_id; + qboot_id = get_part_id("qboot"); + + if (qboot_id != -1) { + sprintf(offset, "%x", parts[qboot_id]->offset); + sprintf(length, "%x", parts[qboot_id]->size); + nand_cmd(0, offset, length, NULL); + } + } ret = write_file_system(ramaddr, len, offset, length, part_id, ubi_update); break; -- 2.7.4