From: DaveKucharczyk Date: Mon, 10 Nov 2014 13:45:12 -0700 (MST) Subject: [U-Boot] porting u-boot, few final questions In-Reply-To: <5460FBE0.3070506@mail.bg> References: <545A5726.70800@denx.de> <1415207802518-194767.post@n7.nabble.com> <545A90D3.7030607@denx.de> <1415304221761-194989.post@n7.nabble.com> <1415632455656-195399.post@n7.nabble.com> <20141110154744.0F12438230A@gemini.denx.de> <5460FBE0.3070506@mail.bg> Message-ID: <1415652312700-195451.post@n7.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Update: my board_late_init() function wasn?t working because I defined BOARD_LATE_INIT instead of CONFIG_BOARD_LATE_INIT. Doh! Since arch/arm/lib/board.c file is being removed, and when CONFIG_SYS_GENERIC_BOARD is defined, we are now using? common/board_f.c (for pre-relocation init) common/board_r.c (for post-relocation init) So my board file sequence is (in order of calling sequence according to the above two files)? 1. board_early_init_f() ? needed to setup my uart, otherwise early output is missed 2. checkboard() ? print board info - still in flash 3. board_init() ? says chipselects should be setup here ? we are running from RAM now 4. initr_env() is called here 5. board_late_init() - Nikolay, appears you are correct, initr_env must be called first in order to use setenv. That?s why setenv didn?t work in board_early_init_f or checkboard or board_init. Fabio, your change worked when I use setenv in misc_init_r and helped me debug some issues. Thanks guys. Is there a doc or a good read that explains which init functions are necessary for what? Or which ones should be used for ?proper? design? I?m sure I?ll be back with more questions real soon. :) -- View this message in context: http://u-boot.10912.n7.nabble.com/porting-u-boot-MMU-question-tp194761p195451.html Sent from the U-Boot mailing list archive at Nabble.com.