From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Date: Mon, 14 Nov 2016 16:20:49 +0100 Subject: [U-Boot] [PATCH 4/7] tools: sunxi: Add spl image builder In-Reply-To: <20161111162047.GI27304@bill-the-cat> References: <312ad66b8bd78b877f82ebd2fb16efcbb51e0a15.1478621974.git-series.maxime.ripard@free-electrons.com> <20161111162047.GI27304@bill-the-cat> Message-ID: <20161114152049.wifmnwbptb5ive3h@lukather> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Nov 11, 2016 at 11:20:47AM -0500, Tom Rini wrote: > On Tue, Nov 08, 2016 at 05:21:14PM +0100, Maxime Ripard wrote: > > > This program generates raw SPL images that can be flashed on the NAND with > > the ECC and randomizer properly set up. > > > > Signed-off-by: Maxime Ripard > [snip] > > +++ b/tools/sunxi-spl-image-builder.c > > @@ -0,0 +1,1113 @@ > > +/* > > + * Generic binary BCH encoding/decoding library > > OK, but this is also lib/bch.c and re-using lib/ code for tools is a > normal best practice. I'd suggest re-factoring this code in sunxi-tools > sot that it too borrows lib/bch.c from the kernel (and can re-sync > bugfixes if needed). Thanks! I finally figured that out. It turns out that the driver was doing a modulo by 0. I guess gcc's and our libgcc don't have the same behaviour in this case, but in U-boot's case, the function was simply returning (which is kind of odd). I'll send a fix for the driver. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: