boundarydevices / imx_usb_loader

USB & UART loader for i.MX5/6/7/8 series
GNU Lesser General Public License v2.1
262 stars 158 forks source link

[RFC] i.MX8QM/QX support v1 #80

Closed agners closed 5 years ago

agners commented 6 years ago

This is a first draft on how to implement i.MX8QM/i.MX8QX support. It skips the rather complex image parsing code and uses a separate image parsing functions. Due to different layout there are currently two functions used, but this should be simplified. The fiel download function is at this point also duplicated for simplicity reasons. For the actual DCD download/skip DCD and jump command functions are reused.

nxpfrankli commented 6 years ago

QM/QXP B0 chip change serial download method totally. I think not necessary to support A0 method again. B0 chip just need send raw data with report id 2. Needn't parser image format again

agners commented 6 years ago

Thanks for the update! I agree, that in this case upstream support for the A0 recovery mechanism does not make sense.

One question though: How does that work with the memory initialization? Does the boot ROM initialized DDR from the DCD part while simultaneously downloading?

nxpfrankli commented 6 years ago

DCD also giveup. ROM will call a function to initialize ddr when accept the enough data. then continue accept new part.

Tools will became very simple. See https://github.com/codeauroraforum/mfgtools/blob/uuu/libuuu/sdps.cpp

gibsson commented 6 years ago

Hi,

@falstaff84 , have you had time to evaluate the new uuu tool from NXP? Are you still interested in adding i.MX8QM/QXP support to imx-usb-loader or should we focus on NXP tool now that it seems closer to what imx-usb-loader offers? I'm asking because we haven't had a chance to look at it yet, but since you are contributing a lot to our project and seem to have also looked at uuu (https://github.com/codeauroraforum/mfgtools/commit/a006eb85f4002ef5afd25939cbe5b24d6106233f) your input is valuable.

Thanks

PS: About this RFC, it seems that it needs a respin to match new silicon serial downloader, are you ok if we close it?

agners commented 6 years ago

Yeah I was investigating in libuuu to evaluate where we should go. However, so far I only compiled uuu and did not use it yet.

I guess for development we could rather easily use either one... However, we make use imx_usb_loader in our installer to download U-Boot, kernel and a squashfs. This makes use of the SDP emulation in U-Boot and the imx_usb_loader batch mode. So it all depends on how well something like that would be realizable in libuuu.

I can keep you posted once we know more/have an idea where we want to go...

Yes I am ok to close this RFC.

nxpfrankli commented 6 years ago

Thank you for evaluate uuu. I think uuu can do same thing to download kernel and a squashfs(initramfs).

We enhance android fastboot protocol. and run uboot command in uuu.

I also want to add dfu protocol in uuu.