From: Kever Yang Date: Tue, 15 Jan 2019 10:05:49 +0800 Subject: [U-Boot] rk3288: firefly: flashing emmc from maskrom using USB In-Reply-To: <52e6188a-4932-9f68-e850-8f5aa7e4fc0b@embed.me.uk> References: <52e6188a-4932-9f68-e850-8f5aa7e4fc0b@embed.me.uk> Message-ID: <5c99bdf1-49fb-1416-bb19-7bcdd3b0ac7d@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de HI Jack, On 01/15/2019 01:28 AM, Jack Mitchell wrote: > I'm having issues flashing the emmc on my firefly board using USB. For > some reason it seems as though trying to write to the emmc flash sector > 0x40 for uboot spl+proper from the Maskrom/Loader doesn't work. Can > anyone elaborate on what I'm doing wrong, or another way I could achieve > this? > > The current state of the emmc is empty, so it boots into the maskrom on > reset. > > I've tried with the Rockchip Loader binary as shown below: > > $ tools/mkimage -n rk3288 -T rksd -d \ > spl/u-boot-spl-dtb.bin out && \ > cat u-boot-dtb.bin >> out > > $ rkdeveloptool db RK3288Loader_uboot_V2.17.02.bin Where did you get this loader? I think you may need to update it for write emmc correctly with 'wl' command, eg. you can merge the loader from latest rockchip rkbin with below command: tools/boot_merger --replace tools/rk_tools/ .=C2=A0 RKBOOT/RK3288MINIALL.ini Thanks, - Kever > > $ rkdeveloptool wl 64 out > > $ rkdeveloptool rd > > This just loads back into the maskrom as if nothing was written to the em= mc. > > I've used the same method but writing to an sd card: > > $ tools/mkimage -n rk3288 -T rksd -d \ > spl/u-boot-spl-dtb.bin out && \ > cat u-boot-dtb.bin >> out > > $ dd if=3Dout of=3D/dev/sdc seek=3D64 > > This works fine and boots into full uboot as I would expect, but from > the sd card rather than the emmc. > > I have then flashed the emmc from the sd card running uboot, which then > enables me to boot uboot from the emmc. > > I can also use rockusb from the sd card uboot to flash uboot to the emmc > using the following commands: > > uboot> rockusb 0 mmc 0 > > $ rkdeveloptool wl 64 out > > $ rkdeveloptool rd > > This also works. However both working methods require me starting uboot > from an sd card in the first instance. How can I successfully flash the > emmc using just USB? Any input would be appreciated. > > Regards, > Jack. >