From: Tom Rini Date: Sun, 22 Jan 2017 09:41:14 -0500 Subject: [U-Boot] [PATCH 2/2] config: Move CONFIG_BOARD_LATE_INIT to defconfigs In-Reply-To: <20170122040920.GX25981@bill-the-cat> References: <1484995713-3092-1-git-send-email-jagan@openedev.com> <1484995713-3092-2-git-send-email-jagan@openedev.com> <20170121230222.GW25981@bill-the-cat> <20170122040920.GX25981@bill-the-cat> Message-ID: <20170122144114.GY25981@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Jan 21, 2017 at 11:09:20PM -0500, Tom Rini wrote: > On Sun, Jan 22, 2017 at 12:45:44PM +0900, Masahiro Yamada wrote: > > Hi. > > > > > > 2017-01-22 8:02 GMT+09:00 Tom Rini : > > > On Sat, Jan 21, 2017 at 11:48:33AM +0100, Jagan Teki wrote: > > > > > >> Cc: Tom Rini > > >> Signed-off-by: Jagan Teki > > > > > > Note: theadorable_debug grows by ~161 bytes in SPL as it had been > > > enabling BOARD_LATE_INIT only for non-SPL which is now not allowed. > > > > > > Applied to u-boot/master, thanks! > > > > Now, CONFIG_BOARD_LATE_INIT can be enabled/disabled > > from menuconfig, but generally this is not user-configurable > > because disabling it will skip needed init procedure. > > > > I thought the right thing to do was > > [1] Make each board "select BOARD_LATE_INIT" > > > > or > > > > [2] Change board_late_init() into a weak function so that > > each board file can overrides it, then deprecate > > CONFIG_BOARD_LATE_INIT. > > In the fullness of time this should become a select, I agree. However, > it's more than a bit difficult to figure out where to, and then > automatically whack in, a 'select' line. I have something almost > working locally (that I'll just need to fixup the Kconfig files in, > after adding lines close to where they go) but like things that we can > clean up once 'imply' is a valid word, we really need to get things > converted, and then cleaned up. Thanks! So, what I came up with is: $ for F in `git grep -l BOARD_LATE_INIT configs/`;do \ T=`grep CONFIG_TARGET_ $F | sed -e 's/CONFIG_//' -e 's/=y//'` ; \ A=`grep CONFIG_ARCH_ $F | sed -e 's/CONFIG_//' -e 's/=y//' | head -n 1`; \ [ -z "$T" -a ! -z "$A" ] && sed -i -e \ "s#config "$A$"#config $A\n\tselect BOARD_LATE_INIT#" \ `git grep -lE "config $A$"` || \ sed -i -e "s#config "$T$"#config $T\n\tselect BOARD_LATE_INIT#" \ `git grep -lE "config $T$"`; done Followed by editing all modified Kconfig files, and a few hand additions that I found weren't covered by the above tests (sandbox and then oddly a few Tegra boards). I'm size-testing a build now and it looks like I've got a few things to fixup still. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: