Already to 5.4.0?!?!  WO-HA!

Now I'm playing with rock64, some feedbacks:

I'll keep you up-to-date.

Cheers,

Agharta


Il 27/11/19 15:00, Nigel Sollars ha scritto:
Well done!,

I was waiting to see how this one went.  in the meantime Arch pushed out a 5.4.0-1 kernel,

archrock 5.4.0-1-ARCH #1 SMP

[    0.000000] Linux version 5.4.0-1-ARCH (builduser@leming) (gcc version 8.3.0 (GCC)) #1 SMP Tue Nov 26 02:44:10 UTC 2019
[    0.000000] Machine model: Pine64 Rock64


Looks like the Lima driver got some work ( more info inside dmesg ) among other cleanups

Nige

On Wed, Nov 27, 2019 at 8:43 AM agharta82@gmail.com <agharta82@gmail.com> wrote:

OH GUYS! WHAT A BEAUTIFUL DAY!!!!!

Finally I've found the solution!

So, first for all  SPI flash should be ERASED: fedora aarch64 does not have spi boot images (at 2019-11-27). To erase spi follow this link: https://github.com/ayufan-rock64/linux-u-boot/releases/download/2017.09-rockchip-ayufan-1065-g95f6152134/u-boot-erase-spi-rock64.img.xz

Second, install fedora-arm-installer package, then create a new ad-hoc script; this script for rock64 that I have made works well:

File is placed into folder /usr/share/arm-image-installer/boards.d/ and named rock64-rk3328

# write uboot
echo "= Writing idbloader.img for $TARGET .... on media $MEDIA"
dd if=$PREFIX/usr/share/uboot/$TARGET/idbloader.img of=$MEDIA seek=64; sync; sleep 5
echo "= Writing u-boot FIT image for $TARGET .... on media $MEDIA"
dd if=$PREFIX/usr/share/uboot/$TARGET/u-boot.itb of=$MEDIA seek=16384; sync; sleep 5
# set console for Rockchips
SYSCON=ttyS2,115200n8


I'm not sure about SYSCON because my serial adapter does not works at 1500000 baudrate, so I can't test it. I have leaved it at default. Hope someone can test and correct it if required.

References to find right dd seek:  http://opensource.rock-chips.com/wiki_Boot_option#Boot_from_SD.2FTF_Card


Next, download fedora aarch64 31 minimal xz image and:

arm-image-installer  --image=Fedora-Minimal-31-1.9.aarch64.raw.xz  --resizefs --media=/dev/THE_SD_MEDIA --target=rock64-rk3328 --addconsole  (and other stuff)

Insert sd into Rock64 and power on!

Connect HDMI cable, IT WORKS AND YOU CAN BOOT (a part of it)!!!

Wait a bit (by default search for ipv6 ip).

Connect Keyboard and follow on screen setup to set root password, Timezone etc...


AT THE END ALL WORKS!!!!!


Benson, feel free to integrate it to Pagure, and make a new fedora-arm-image-installer package.


Really guys, I am very very very happy!


Have a fantastic day!!!

Agharta






Il 15/11/19 09:18, agharta82@gmail.com ha scritto:

Interesting thing.

Following Your idea, i've dowloaded the spi boot https://github.com/ayufan-rock64/linux-u-boot/releases/download/2017.09-rockchip-ayufan-1065-g95f6152134/u-boot-flash-spi-rock64.img.xz

After decompressing it, if I do a 'cfdisk  u-boot-flash-spi-rock64.img' I can see sectors where images starts:

So, first boot image starts at sector 64, second at sector at 8192. Nice.

I need to investigate over it, to find a solution.

Thanks,

Agharta


Il 14/11/19 22:42, Nigel Sollars ha scritto:
Could you not grab the uboot and what nots from Ayufan,

https://github.com/ayufan-rock64/linux-u-boot

( perhaps build and test ), my original build ( current ) used this method..

Nige

On Thu, Nov 14, 2019 at 8:51 AM agharta82@gmail.com <agharta82@gmail.com> wrote:
I'm seriously thinking that the problem is how u-boot images are created.

I've searched inside usr/share/uboot/rockpro64-rk3399/ of sd-card, same
chip manufacturer. FYI all series of 3399 have same content (rock960,
rock-pi-4, roc, puma, orangepi, etc.. see usr/share/uboot filder).

The content is here:

idbloader.img
spl_sd.img
spl_spi.img
u-boot-dtb.img
u-boot-spl.bin
u-boot.bin
u-boot.dtb
u-boot.img
u-boot.itb


The rock64 content is different:

idbloader.img
u-boot-dtb.img
u-boot-spl.bin
u-boot.bin
u-boot.dtb
u-boot.img
u-boot.itb

Missing files: spl_sd.img, spl_spi.img


I think that the uboot build for rock64 was made only for eMMC module,
not for sd card.


How to known how uboot build was made?

Where are the build sources?


Many thanks again,

Agharta





Il 13/11/19 16:41, agharta82@gmail.com ha scritto:
I've found this thread:

http://u-boot.10912.n7.nabble.com/help-with-serial-on-the-rockchip64-td384563.html


Seems seek value for dd are correct.

sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64
sudo dd if=u-boot.itb of=/dev/mmcblk0 seek=16384

The question is if idbloader was built dorm mmc or for sdcard too....

Mmm.... as soon as I've resolved serial spi boot problem I think I can
tell You why Fedora does not boot.


Regards,

Agharta





Il 13/11/19 13:58, Nigel Sollars ha scritto:
Yes the output I gave you in my first post is a Rock64 4GB with a 64GB
eMMC running Arch Linux.  I can get you all the info you need when I
get back to the house.

Nige

On Wed, Nov 13, 2019 at 7:55 AM agharta82@gmail.com
<agharta82@gmail.com> wrote:
Hi all,

Many thanks Nigel, but nope.

This is the output:

C`Ek�kh[j�C4Mkj_C6�n�4��Vj-[mC`�d[�6��K��RV%���<U�5TU��]JU�BVU��꭫U�U���U�U
]��UեUQR����(�(��U*U�U��L�\� �ꨊ婪����ժ�)U�UQQ
Q�ժw�UUQQQ���U�(J�*�(�U*�e�E���
U� �WE���i���+� �
�UU(�UU�i+�*��*���Uj�*�E�*�J���BZ���U��.�ծ���������(���U��UTQQ���i-���U��UTQQ�%��(��u,�U��


Not good....

Benson, i would contribute to Pagure..... if something works!

Actually I've found boot images of Rock64 inside fedora sdcard but I
can't made them working.

Nigel, do You have a Rock64 sbc? Does Your serial console works
during SPI boot?


Many thanks to both.

Cheers,

Agharta



Il 13/11/19 04:49, Benson Muite ha scritto:

On 11/13/19 2:29 AM, Nigel Sollars wrote:

Serial console / uart setup,

1500000 8n1

Thanks Nigel.


Nige

Agharta, Please let us know if it works, and if so can you
contribute to the Pagure repository?


On Tue, Nov 12, 2019 at 2:08 PM agharta agharta
<agharta82@gmail.com> wrote:

Hi Benson,

No, unfortunately seems not working.

I've tried with seek (16348, 64, 512, etc). No luck.

I think the problem is related how to boot images are builded.

Should I write sidbloader.img?

Following Your link about ARMv8, i see at row 3:

dd if=$PREFIX/usr/share/uboot/$TARGET/spl.img of=$MEDIA seek=64;
sync; sleep 5

But spl.img is not available in usr/share/uboot/ in my sdcard.

So, I still searching over web.

Meanwhile, did You known that serial console speed of



Il 12/11/19 07:46, Benson Muite ha scritto:

Hi Agharta,

Thanks for the update. Responses below. Hope you are successful.

Benson

On 11/11/19 7:09 PM, agharta82@gmail.com wrote:

Hi Benson,

You helped me a lot!!!

Following Your suggestion, I've investigate over $TARGET and $MEDIA.

After writing sdcard with pine64-lts, inside usr/share/uboot/ (of
sdcard) i can see rock64-rk3328 (my sbc), rockpro64-rk3399 and many
other sbc not listed into arm-image-installer folder
(/usr/share/arm-image-installer/boards.d/)!!!!!!!!

So, rock64 is really supported by fedora (31, minimal, aarch64)!!!

Another interesting thing: if I create a file called rock64-rk3328
into my /usr/share/arm-image-installer/boards.d/ and set
--target=rock64-rk3328, arm-image-installer executes IT!

So, next step: I've copied pine64-lts into rock64-rk3328.

One question: rock64-rk3328 folder does not have sunxi-spl.bin, but
a file called idbloader.img. Should I 'dd' it insead of sunxi-spl.bin?

Following this link seems yes
http://opensource.rock-chips.com/wiki_Boot_option

Thanks, this seems helpful.

Seems needed to add some extra stuffs too (seek):

dd if=idbloader.img of=sdb seek=64
dd if=u-boot.itb of=sdb seek=16384

So, script become as follow:

# write uboot
echo "= Writing idbloader.img for $TARGET ...."
dd if=$PREFIX/usr/share/uboot/$TARGET/sidbloader.img of=$MEDIA bs=8k
seek=64; sync
echo "= Writing u-boot FIT image for $TARGET ...."
dd if=$PREFIX/usr/share/uboot/$TARGET/u-boot.itb of=$MEDIA bs=8k
seek=16384; sync; sleep 5
# set console for allwinner
SYSCON=ttyS0,115200


Looks similar to what is at:

https://pagure.io/arm-image-installer/blob/master/f/socs.d/Rockchips-ARMv8


https://pagure.io/arm-image-installer/blob/master/f/socs.d/Rockchips-ARMv7


Might need to change seek value. I do not have that board, so cannot
try this out, but hope it works. If it does work, can you contribute
the script back? I believe additions are also needed here:

https://pagure.io/arm-image-installer

https://pagure.io/arm-image-installer/blob/master/f/boards.d

Tomorrow I'll try!


Thanks a lot for Your support.

Best regards,

Agharta



Il 11/11/19 16:21, Benson Muite ha scritto:

Hi Agharta,

I used an earlier Fedora release on Banana pro (after first using
Fedora combined with a different kernel). It worked ok, but took a
bit of time for the Arm image to support Banana pro.

On 11/11/19 4:04 PM, agharta82@gmail.com wrote:

Hi Benson

a) Yes, but I can't specify Rock64 as --target parameter.

"A number of Pine64 boards are supported, but you might use as a
bass to get something for rock64" Can You explain me how? Is it
possibile without manual recompilation, etc...? (see why in b) and c) )

There was a message earlier on the list that support had been added
for rock 64. Thus you might be able to take the configuration for
Pine64 and modify that for Rock 64, though can also wait. After
installing the arm image installer, as indicated at
https://fedoraproject.org/wiki/Architectures/ARM/Installation in a
terminal I can type

$ls /usr/share/arm-image-installer/boards.d/

to get a listing of supported boards. Typing

$more /usr/share/arm-image-installer/boards.d/pinebook

gives settings for Pinebook, which are

# write uboot
echo "= Writing sunxi-spl.bin for $TARGET ...."
dd if=$PREFIX/usr/share/uboot/$TARGET/sunxi-spl.bin of=$MEDIA bs=8k
seek=1; sync
echo "= Writing u-boot FIT image for $TARGET ...."
dd if=$PREFIX/usr/share/uboot/$TARGET/u-boot.itb of=$MEDIA bs=8k
seek=5; sync; sleep 5
# set console for allwinner
SYSCON=ttyS0,115200

The commands for pine_h64, pine64_plus and pine64-lts are the same,
so you might try these for your Rock 64.

b) Yes, an Armbian kernel....but I'd like to use a 'standard' kernel.

Ok.

c) Yes, is possibile, but i still prefer a community delivered rpm
(and maintained).

Noted. Thanks for using and reporting where work is still required.
Sorry cannot be much more help at present.

Thanks again for Your support.

Best regards,

Agharta



_______________________________________________
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-leave@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org





--
“Science is a differential equation. Religion is a boundary condition.”
                                                                                                  Alan Turing