From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Fri, 03 Jun 2016 13:45:16 +0200 Subject: [U-Boot] [RFC PATCH 1/5] spl: dfu: add dfu support in SPL In-Reply-To: <6C6B28D4DC342643927BEAFCE8707BF67621C1E6@DBDE04.ent.ti.com> References: <1464356373-8375-1-git-send-email-ravibabu@ti.com> <1464356373-8375-2-git-send-email-ravibabu@ti.com> <20160530135400.63d7e020@amdc2363> <7DD822BE-D1C3-452B-A3E4-3F7929B2C832@ti.com> <20160530165902.232ea870@amdc2363> <6C6B28D4DC342643927BEAFCE8707BF67620E21B@DBDE04.ent.ti.com> <20160531103933.54d3509a@amdc2363> <6C6B28D4DC342643927BEAFCE8707BF67620F9F8@DBDE04.ent.ti.com> <20160531115526.1e8f4fc0@amdc2363> <6C6B28D4DC342643927BEAFCE8707BF67620FE98@DBDE04.ent.ti.com> <20160531144732.7464f21e@amdc2363> <6C6B28D4DC342643927BEAFCE8707BF676210794@DBDE04.ent.ti.com> <20160531171300.4e019dc1@amdc2363> <6C6B28D4DC342643927BEAFCE8707BF676219F3F@DBDE04.ent.ti.com> <20160602161445.4d429760@amdc2363> <6C6B28D4DC342643927BEAFCE8707BF67621A483@DBDE04.ent.ti.com> <20160603112707.4dc66535@amdc2363> <6C6B28D4DC342643927BEAFCE8707BF67621C1E6@DBDE04.ent.ti.com> Message-ID: <20160603134516.1063d724@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Ravi, > Hi Lukasz > > >> > >> >My point here is to first load SPL u-boot (which size is around > >> >110 KiB), and then download via DFU full-featured u-boot, which > >> >would be placed in SDRAM. > >> > >> Yes this is good idea, so the SPL-DFU will have only RAM device > >> support (to load u-boot into DDR). But we don't have DFU command > >> to jump to u-boot after loading u-boot into DDR. > > >I think that we don't need dfu command in SPL to boot fully-featured > >u-boot. > > >Lets consider following scenario: > > >- ROM bootloader (IPL) fetches SPL u-boot via USB. Then it passes > > execution to it. > >- The running SPL downloads fully-fledged u-boot [*] to RAM and > >passes > > execution to it (as it is done in board_init_r > > @ ./common/spl/spl.c). There is no need for any special command(s) > > to do that. > >- Fully-blown u-boot flashes all needed images and reboots the board. > >- Now the board is setup with proper u-boot, kernel and rootfs > > > [*] - This version of u-boot only requires to have hardcoded > > "bootcmd" > >env variable. It would consist the list of commands needed for > >flashing your target board. The "dfu_alt_info" should be hardcoded > >as well. > > > >> The DFU basically just > >> download firmware to memory devices like mmc/sd/eMMC/RAM. > >> So the > >> question is how to transfer control to u-boot after downloading > >> the u-boot to DDR using SPL-DFU/RAM. > > > Please consult board_init_r function at ./common/spl/spl.c > > Yes, this is common u-boot flow, make sense, I was thinking exiting > from DFU loop, user has to press Ctrl+C to exit from DFU after > download of u-boot to IRAM. It is not needed to press Ctrl+C to exit the loop. Please try dfu-util -e -a0 -D The '-e' switch allows to exit the loop and go into the prompt. Moreover, your can also try out the '-R' switch, which would impose board reset after successful dfu flashing. > We can leverage the existing DFU/RAM > support. Main concern is SPL+DFU size. I will rework and come back > on how much size can be reduced. Great. > > Thanks Lukasz for great support. No problem :-) > > Regards > Ravi > -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group