Am 29.08.2017 um 16:40 schrieb Michal Suchánek:
> On Tue, 29 Aug 2017 16:23:44 +0200
> Andreas Färber <afaer...@suse.de> wrote:
>> Am 29.08.2017 um 14:08 schrieb Michal Suchánek:
>>> On Fri, 25 Aug 2017 22:16:09 +0300
>>> "Matwey V. Kornilov" <matwey.korni...@gmail.com> wrote:
>>>   
>>>> It seems that the following tools are binary only:
>>>> https://github.com/rockchip-linux/rkbin/tree/master/tools
>>>> They are required to convert u-boot to proprietary loader known
>>>> format. Proprietary loader is required because there is no (yet?)
>>>> support for SPL in u-boot for rk3328.
>>>> The tools are also x86_64 only, so I wonder how could they be used
>>>> in OBS to produce package for u-boot image in deployable format.  
>>>
>>> There is rkflashtool https://github.com/linux-rockchip/rkflashtool
>>> which worked for me with some cheap rk33?? TV box for modifying a
>>> boot script on partition that is not accessible from Android. There
>>> was one caveat - the partitions were downloaded with some zero
>>> padding at the start.
>>>
>>> If you look for resources for Radxa Rock (rk3188) you can possibly
>>> find more about rockchip bootable card layout which may or may not
>>> work for you with 3328.  
>>
>> http://opensource.rock-chips.com/wiki_Main_Page is a good starting
>> point
>> - the workflow for 64-bit is slightly different.
>>
>> Note that this is not about flashing but about creating the files to
>> be flashed.
> 
> If rkflashtool works for your board you can download different
> partitions, backup them, upload your code into memory and execute it
> without making changes to storage, replace the content of different
> partitions on the medium with your own, observe the actual content
> change of the medium if you have offline access, restore the backups,
> etc.

Please see rkdeveloptool:

https://build.opensuse.org/package/show/hardware/rkdeveloptool

>> Mainline U-Boot circumvents many of those problems by using its own
>> FIT storage format, but it lags in enabling SPL for the various
>> chipsets.
> 
> There is some 'magic' part at the start of the medium which you need to
> preserve for the medium to be bootable. Using rkflashtool this is
> preserved while you can make changes to the other parts. Getting this
> 'magic' right is somewhat error-prone so it is easier to start with a
> bootable image that works and change parts one by one.

Like Matwey and I said, it's not that easy on arm64. Some parts can't be
flashed into individual partitions because the ARM Trusted Firmware
fip.bin and other Rockchip-specific formats are used, with several
binaries glued together ("the files to be flashed").

At oSC17 I spoke about an RK3328 TV box, where I did not succeed in
interrupting U-Boot, so the various "magic" pieces need to be replaced
with their latest versions according to the Rockchip instructions.
There's so many loader pieces that you can't just load one to memory;
you need to flash a compatible combination, reset and see if it works.

Matwey, see https://en.opensuse.org/HCL:Firefly-RK3399#U-Boot for how to
do it on RK3399 without SPL using Open Source tools apart from binary
"loaderimage". The same "armv8 with miniloader" instructions from
http://opensource.rock-chips.com/wiki_Boot_option should apply, just
with different files from the rkbin repo that you already know.

If you've meanwhile succeeded with SPL please let us know.
I barely just received a Rock64 and haven't played with it yet.

Guillaume has updated and submitted U-Boot - we'll need to check on
which additional boards can be enabled already and where/how to combine
that with my ATF builds - no progress there yet.

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
-- 
To unsubscribe, e-mail: opensuse-arm+unsubscr...@opensuse.org
To contact the owner, e-mail: opensuse-arm+ow...@opensuse.org

Reply via email to