Skip to contentSkip to conversation

nboot - load from partition

RFC New Ladislav Michl 2 participants 2 messages Aug 3, 2006 – Aug 4, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

currently nboot command is able to load kernel from given ofset of given nand chip. I hope others would find useful if it could load kernel from given partition, too. What about
nboot.part - load from current partition (given by partition variable)
nboot.part [part_name]

Comments and suggestions welcome and appreciated. Especialy ideas for some nice command name :-)

(It seems my nand erase patch from 24 Mar, Message-ID: <20060324012327.GA14685@orphique> is not needed - at least there was no feedback. Everyone writes so
perfect code that once written binary is never to be erased again? ;-))

Best regards,
ladis

#1 lore raw

RFC 1/1 nboot - load from partition

Quoted 7 lines · Ladislav Michl

Hi,

currently nboot command is able to load kernel from given ofset of given nand chip. I hope others would find useful if it could load kernel from given partition, too. What about
nboot.part - load from current partition (given by partition variable)
nboot.part [part_name]

nboot.part is not necessary, so droped.

Quoted 2 lines

Comments and suggestions welcome and appreciated. Especialy ideas for some nice command name :-)

I'm leaving for one week holiday, please give it a try.

Best regards,
ladis

common/env_nand.c +1 -1
index 0a05b09..4e92d3f 100644
@@ -146,7 +146,7 @@ int saveenv(void)
 	int ret = 0;
 
 	puts ("Erasing Nand...");
-	if (nand_erase(&nand_info[0], CFG_ENV_OFFSET, CFG_ENV_SIZE))
+	if (nand_erase(&nand_info[0], CFG_ENV_OFFSET, CFG_ENV_SIZE, 0))
 		return 1;
 
 	puts ("Writing to Nand... ");
include/nand.h +2 -2
index 905115b..ccac9c1 100644
@@ -48,7 +48,7 @@ static inline int nand_block_isbad(nand_
 	return info->block_isbad(info, ofs);
 }
 
-static inline int nand_erase(nand_info_t *info, ulong off, ulong size)
+static inline int nand_erase(nand_info_t *info, ulong off, ulong size, int clean)
 {
 	struct erase_info instr;
 
@@ -57,7 +57,7 @@ static inline int nand_erase(nand_info_t
 	instr.len = size;
 	instr.callback = 0;
 
-	return info->erase(info, &instr);
+	return nand_erase_nand(info, &instr, clean);
 }
 
 #endif
common/cmd_nand.c +150 -101

322 lines not on this page · raw message