<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cmd_jffs2.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>Move all command code into its own directory</title>
<updated>2016-01-25T15:39:43+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-01-18T03:53:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=72a8cf8dccf6f8b86d1683205e032a94eaa86938'/>
<id>72a8cf8dccf6f8b86d1683205e032a94eaa86938</id>
<content type='text'>
There are a lot of unrelated files in common, including all of the commands.
Moving them into their own directory makes them easier to find and is more
logical.

Some commands include non-command code, such as cmd_scsi.c. This should be
sorted out at some point so that the function can be enabled with or without
the associated command.

Unfortunately, with m68k I get this error:

m68k:  +   M5329AFEE
+arch/m68k/cpu/mcf532x/start.o: In function `_start':
+arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o

I hope someone can shed some light on what this means. I hope it isn't
depending on the position of code in the image.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Acked-by: Stefan Roese &lt;sr@denx.de&gt;
Acked-by: Przemyslaw Marczak &lt;p.marczak@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a lot of unrelated files in common, including all of the commands.
Moving them into their own directory makes them easier to find and is more
logical.

Some commands include non-command code, such as cmd_scsi.c. This should be
sorted out at some point so that the function can be enabled with or without
the associated command.

Unfortunately, with m68k I get this error:

m68k:  +   M5329AFEE
+arch/m68k/cpu/mcf532x/start.o: In function `_start':
+arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o

I hope someone can shed some light on what this means. I hope it isn't
depending on the position of code in the image.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Acked-by: Stefan Roese &lt;sr@denx.de&gt;
Acked-by: Przemyslaw Marczak &lt;p.marczak@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add GPL-2.0+ SPDX-License-Identifier to source files</title>
<updated>2013-07-24T13:44:38+00:00</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2013-07-08T07:37:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a4596601fd395f3afb8f82f3f840c5e00bdd57a'/>
<id>1a4596601fd395f3afb8f82f3f840c5e00bdd57a</id>
<content type='text'>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Use new numeric setenv functions</title>
<updated>2013-03-01T03:09:23+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2013-02-24T17:33:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=41ef372c1a2d344621c74aa4bce5cdb0970ba5f1'/>
<id>41ef372c1a2d344621c74aa4bce5cdb0970ba5f1</id>
<content type='text'>
Use setenv_ulong(), setenv_hex() and setenv_addr() in common/

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use setenv_ulong(), setenv_hex() and setenv_addr() in common/

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_jffs2: Fix get_part_sector_size_nor() overflow bug</title>
<updated>2011-01-18T23:04:43+00:00</updated>
<author>
<name>Peter Tyser</name>
<email>ptyser@xes-inc.com</email>
</author>
<published>2010-12-30T21:47:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=141053d60ac459bc3859c06fe7cf16160077f937'/>
<id>141053d60ac459bc3859c06fe7cf16160077f937</id>
<content type='text'>
When a flash partition was positioned at the very top of a 32-bit memory
map (eg located at 0xf8000000 with a size of 0x8000000)
get_part_sector_size_nor() would incorrectly calculate the partition's
ending address to 0x0 due to overflow.  When the overflow occurred
get_part_sector_size_nor() would falsely return a sector size of 0.
A sector size of 0 results in subsequent jffs2 operations failing.

To workaround the overflow subtract 1 from calculated address of
the partition endpoint.

Signed-off-by: Peter Tyser &lt;ptyser@xes-inc.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a flash partition was positioned at the very top of a 32-bit memory
map (eg located at 0xf8000000 with a size of 0x8000000)
get_part_sector_size_nor() would incorrectly calculate the partition's
ending address to 0x0 due to overflow.  When the overflow occurred
get_part_sector_size_nor() would falsely return a sector size of 0.
A sector size of 0 results in subsequent jffs2 operations failing.

To workaround the overflow subtract 1 from calculated address of
the partition endpoint.

Signed-off-by: Peter Tyser &lt;ptyser@xes-inc.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure that argv[] argument pointers are not modified.</title>
<updated>2010-07-04T21:55:42+00:00</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2010-06-28T20:00:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=54841ab50c20d6fa6c9cc3eb826989da3a22d934'/>
<id>54841ab50c20d6fa6c9cc3eb826989da3a22d934</id>
<content type='text'>
The hush shell dynamically allocates (and re-allocates) memory for the
argument strings in the "char *argv[]" argument vector passed to
commands.  Any code that modifies these pointers will cause serious
corruption of the malloc data structures and crash U-Boot, so make
sure the compiler can check that no such modifications are being done
by changing the code into "char * const argv[]".

This modification is the result of debugging a strange crash caused
after adding a new command, which used the following argument
processing code which has been working perfectly fine in all Unix
systems since version 6 - but not so in U-Boot:

int main (int argc, char **argv)
{
	while (--argc &gt; 0 &amp;&amp; **++argv == '-') {
/* ====&gt; */	while (*++*argv) {
			switch (**argv) {
			case 'd':
				debug++;
				break;
			...
			default:
				usage ();
			}
		}
	}
	...
}

The line marked "====&gt;" will corrupt the malloc data structures and
usually cause U-Boot to crash when the next command gets executed by
the shell.  With the modification, the compiler will prevent this with
an
	error: increment of read-only location '*argv'

N.B.: The code above can be trivially rewritten like this:

	while (--argc &gt; 0 &amp;&amp; **++argv == '-') {
		char *arg = *argv;
		while (*++arg) {
			switch (*arg) {
			...

Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The hush shell dynamically allocates (and re-allocates) memory for the
argument strings in the "char *argv[]" argument vector passed to
commands.  Any code that modifies these pointers will cause serious
corruption of the malloc data structures and crash U-Boot, so make
sure the compiler can check that no such modifications are being done
by changing the code into "char * const argv[]".

This modification is the result of debugging a strange crash caused
after adding a new command, which used the following argument
processing code which has been working perfectly fine in all Unix
systems since version 6 - but not so in U-Boot:

int main (int argc, char **argv)
{
	while (--argc &gt; 0 &amp;&amp; **++argv == '-') {
/* ====&gt; */	while (*++*argv) {
			switch (**argv) {
			case 'd':
				debug++;
				break;
			...
			default:
				usage ();
			}
		}
	}
	...
}

The line marked "====&gt;" will corrupt the malloc data structures and
usually cause U-Boot to crash when the next command gets executed by
the shell.  With the modification, the compiler will prevent this with
an
	error: increment of read-only location '*argv'

N.B.: The code above can be trivially rewritten like this:

	while (--argc &gt; 0 &amp;&amp; **++argv == '-') {
		char *arg = *argv;
		while (*++arg) {
			switch (*arg) {
			...

Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jffs2: fix hangs/crashs when not using CONFIG_JFFS2_PART_SIZE</title>
<updated>2010-01-25T23:07:50+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2010-01-08T13:03:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2903ad33a71251a3a87485b5b185852c8998f209'/>
<id>2903ad33a71251a3a87485b5b185852c8998f209</id>
<content type='text'>
Commit b5b004ad8a0ac6f98bd5708ec8b22fbddd1c1042 caused the sector_size to
be calculated incorrectly when the part size was not hardcoded.  This is
because the new code relied on part-&gt;size but tried to do the calculation
before it was initialized properly, and it did not take into consideration
the magic SIZE_REMAINING define.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit b5b004ad8a0ac6f98bd5708ec8b22fbddd1c1042 caused the sector_size to
be calculated incorrectly when the part size was not hardcoded.  This is
because the new code relied on part-&gt;size but tried to do the calculation
before it was initialized properly, and it did not take into consideration
the magic SIZE_REMAINING define.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove legacy NAND and disk on chip code.</title>
<updated>2009-07-17T00:07:47+00:00</updated>
<author>
<name>Scott Wood</name>
<email>scottwood@freescale.com</email>
</author>
<published>2009-04-01T20:02:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=be33b046b549ad88c204c209508cd7657232ffbd'/>
<id>be33b046b549ad88c204c209508cd7657232ffbd</id>
<content type='text'>
Legacy NAND had been scheduled for removal.  Any boards that use this
were already not building in the previous release due to an #error.

The disk on chip code in common/cmd_doc.c relies on legacy NAND,
and it has also been removed.  There is newer disk on chip code
in drivers/mtd/nand; someone with access to hardware and sufficient
time and motivation can try to get that working, but for now disk
on chip is not supported.

Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Legacy NAND had been scheduled for removal.  Any boards that use this
were already not building in the previous release due to an #error.

The disk on chip code in common/cmd_doc.c relies on legacy NAND,
and it has also been removed.  There is newer disk on chip code
in drivers/mtd/nand; someone with access to hardware and sufficient
time and motivation can try to get that working, but for now disk
on chip is not supported.

Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>General help message cleanup</title>
<updated>2009-06-12T18:47:16+00:00</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2009-05-24T15:06:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a89c33db96a1e55319a286dd4c3c05ca64ac6bfd'/>
<id>a89c33db96a1e55319a286dd4c3c05ca64ac6bfd</id>
<content type='text'>
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.

Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.

This patch cleans this up - for example:

Before:
	=&gt; help dtt
	dtt - Digital Thermometer and Thermostat

	Usage:
	dtt         - Read temperature from digital thermometer and thermostat.

After:
	=&gt; help dtt
	dtt - Read temperature from Digital Thermometer and Thermostat

	Usage:
	dtt

Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.

Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.

This patch cleans this up - for example:

Before:
	=&gt; help dtt
	dtt - Digital Thermometer and Thermostat

	Usage:
	dtt         - Read temperature from digital thermometer and thermostat.

After:
	=&gt; help dtt
	dtt - Read temperature from Digital Thermometer and Thermostat

	Usage:
	dtt

Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jffs2/mtdparts: Fix problem with usage from JFFS2 and MTDPARTS together</title>
<updated>2009-05-28T19:26:00+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2009-05-16T10:04:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=76b5883da2cf049cd410901c04ea450e5f5c27c3'/>
<id>76b5883da2cf049cd410901c04ea450e5f5c27c3</id>
<content type='text'>
Currently using JFFS2 with MTDPARTS enabled doesn't work. This is because
mtdparts_init() is available in both files, cmd_mtdparts.c and
cmd_jffs2.c. Please note that in the original cmd_jffs2.c file (before
the jffs2/mtdparts command/file split those 2 different versions
already existed. So this is nothing new. The main problem is that the
variables "current_dev" and "current_partnum" are declared in both
files now. This doesn't work.

This patch now changes the names of those variable to more specific
names: "current_mtd_dev" and "current_mtd_partnum". This is because
this patch also changes the declaration from static to global, so
that they can be used from both files.

Please note that my first tests were not successful. The MTD devices
selected via mtdparts are now accessed but I'm failing to see the
directory listed via the "ls" command. Nothing is displayed. Perhaps
I didn't generate the JFFS2 image correctly (I never used JFFS2 in
U-Boot before). Not sure. Perhaps somebody else could take a look at
this as well. I'll continue looking into this on Monday.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Detlev Zundel &lt;dzu@denx.de&gt;
Cc: Ilya Yanok &lt;yanok@emcraft.com&gt;
Cc: Renaud barbier &lt;renaud.barbier@ge.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently using JFFS2 with MTDPARTS enabled doesn't work. This is because
mtdparts_init() is available in both files, cmd_mtdparts.c and
cmd_jffs2.c. Please note that in the original cmd_jffs2.c file (before
the jffs2/mtdparts command/file split those 2 different versions
already existed. So this is nothing new. The main problem is that the
variables "current_dev" and "current_partnum" are declared in both
files now. This doesn't work.

This patch now changes the names of those variable to more specific
names: "current_mtd_dev" and "current_mtd_partnum". This is because
this patch also changes the declaration from static to global, so
that they can be used from both files.

Please note that my first tests were not successful. The MTD devices
selected via mtdparts are now accessed but I'm failing to see the
directory listed via the "ls" command. Nothing is displayed. Perhaps
I didn't generate the JFFS2 image correctly (I never used JFFS2 in
U-Boot before). Not sure. Perhaps somebody else could take a look at
this as well. I'll continue looking into this on Monday.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Detlev Zundel &lt;dzu@denx.de&gt;
Cc: Ilya Yanok &lt;yanok@emcraft.com&gt;
Cc: Renaud barbier &lt;renaud.barbier@ge.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Separate mtdparts command from jffs2</title>
<updated>2009-03-20T21:39:14+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2009-03-19T12:30:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=68d7d65100e84df00bca971c114092731b441090'/>
<id>68d7d65100e84df00bca971c114092731b441090</id>
<content type='text'>
Currently the mtdparts commands are included in the jffs2 command support.
This doesn't make sense anymore since other commands (e.g. UBI) use this
infrastructure as well now. This patch separates the mtdparts commands from
the jffs2 commands making it possible to only select mtdparts when no JFFS2
support is needed.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the mtdparts commands are included in the jffs2 command support.
This doesn't make sense anymore since other commands (e.g. UBI) use this
infrastructure as well now. This patch separates the mtdparts commands from
the jffs2 commands making it possible to only select mtdparts when no JFFS2
support is needed.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
