From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 21 Jan 2019 10:53:12 +0100 Subject: [U-Boot] env: sf: fix environment in SPI NOR In-Reply-To: <20190119025407.GT27429@bill-the-cat> References: <20190118094556.1542119-1-hs@denx.de> <20190119025407.GT27429@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Tom, Am 19.01.2019 um 03:54 schrieb Tom Rini: > On Fri, Jan 18, 2019 at 10:45:56AM +0100, Heiko Schocher wrote: > >> commit 9a9d66f5eff0 ("env: add spi_flash_read_env function") >> >> breaks Environment functionality, as it reads only >> until 2 \0 are found, but fills the buffer with 0x0 >> instead 0xff which leads in an incorrect crc sum. >> >> Fix: init the read buffer with 0xff instead 0x00 >> >> Signed-off-by: Heiko Schocher > > Applied to u-boot/master, thanks! I am sorry, this patch was nonsense. After erasing the flash, and saving a default Environment, the CONFIG_ENV_SIZE bytes are filled with 0x00. So the memset with 0x00 should be OK. I have no idea what gone wrong on my board :-( I am not sure what gone wrong here, so, please can you revert this patch? bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de