From: Wolfgang Denk Date: Fri, 01 Apr 2011 19:51:37 +0200 Subject: [U-Boot] [PATCH 2/2] Implementation of a bootloader area protection during auto-update (new CONFIG_SYSTEM_START_ADDR necessary) In-Reply-To: <1301671320-16131-2-git-send-email-christoph.koenig@ikt.uni-hannover.de> References: <1301671320-16131-1-git-send-email-christoph.koenig@ikt.uni-hannover.de> <1301671320-16131-2-git-send-email-christoph.koenig@ikt.uni-hannover.de> Message-ID: <20110401175137.B5D10F0320D@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Christoph Koenig, In message <1301671320-16131-2-git-send-email-christoph.koenig@ikt.uni-hannover.de> you wrote: > --- Subjecxt too long. Commit message missing. No explanation given what the code is supposed to do. SoB line missing. > +#ifdef CONFIG_SYSTEM_START_ADDR > + if (addr_first < CONFIG_SYSTEM_START_ADDR) { > + printf("Error: auto-update does not allow to write a new bootloader\n"); > + return 1; > + } > +#endif Explanation and documentation for new CONFIG_ option (in README) missing. I think this approach is too simplistic. Some boards have the boot loader at the beginning of the OR flash, some at the end, others right in the middle. Still others boot from NAND flash or SDCard. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Gods don't like people not doing much work. People who aren't busy all the time might start to _think_. - Terry Pratchett, _Small Gods_