Ralim / IronOS-Meta

Storing meta information about devices that dont need to be in the main repo
51 stars 10 forks source link

bootup logos for pinecil v2 #32

Closed mythicaleinhorn closed 9 months ago

mythicaleinhorn commented 1 year ago

I was wondering how to upload a bootup logo to the pinecil v2. When I use the update instructions from the Pine64 wiki, I end up overwriting the whole flash with the bootup logo. I'm surprised it even flashes anything at all because in the wiki it talks about needing .bin files, but I used the .dfu file.

River-Mochi commented 1 year ago

I was wondering how to upload a bootup logo to the pinecil v2.

Only the older original pinecil V1 models can use boot logo art for now since it uses DFU to do firmware updates and has a different MCU chip which accepts dfu image files.

The newer V2 has a BL706 MCU chip which takes "bin" files. The method to update the firmware can not use the same dfu flashers or dfu images from the past.

new Blisp flasher developed for the Pinecil V2 updating can not yet do boot logo art. For now Blisp can install IronOS firmware. Keep an eye for updates in the future. It's a little more complicated because of the way the BL706 is set up. I see that Ralim is working on this from an IronOS ticket.

wbokslag commented 1 year ago

I didn't feel like working around the limitations of the Blisp flashing tool, but got the bootup logo to work with relatively little effort. I did the following:

Advantage is that this uses the regular boot logo format, although the image is now embedded in the cpp sources. Thought I'd share. You should be able to figure it out, if not, let me know πŸ‘

River-Mochi commented 1 year ago

@wbokslag thank you for making this temporary work-around until ralim changes blisp for all.

are you able to write out a few more steps - some people this might be their first time doing something like this. since it's changing the source code and then you are flashing a modified pinecilv2.bin?

wbokslag commented 1 year ago

Of course. Here goes:

Overview

This post is intended as a workaround for getting a boot logo to work on a pinecil v2, as long as the blisp flashing tool does not support it. In this post, I'll go through all the steps to do the following:

Linux only, but you can certainly do it on windows too

Getting blisp

You can get blisp in this repo: https://github.com/pine64/blisp. For me, the precompiled version did not work. As soon as I ran it, even without parameters, it complains about a wrong GLIBC version and exits. I thus pulled the sources, and followed the instructions in the readme. I ended up with blisp compiled. Keep this file, or copy it to /usr/local/bin/blisp to make it available system-wide

Converting your image

./img2logo.py --pinecil Images/IronOS.png converted

Building IronOS

+static unsigned char bootlogo[] = {

Flashing

wbokslag commented 1 year ago

Sure!

As far as I know, the Pinecil V2 cannot be bricked, as the bootloader can always be used to recover/reflash the firmware. Any bugs in the implementation can thus simply be reverted and/or a precompiled firmware may be flashed without issue. As far as I know, thus, don't shoot me if you do manage to brick it beyond repair :-)

Firmware updates can be pulled using git pull and as long as the BootLogo.cpp file did not contain changes really close to our addition, should work fine after recompilation and flashing. The requested pic is below

photo1681644657

Happy to help,

Wouter

River-Mochi commented 1 year ago

@wbokslag some people probably feinted when they saw detailed instructions to make a custom fw for this :astonished:

PowerWiesel commented 1 year ago

Here's a build of 2.21 with the animated IronOS bootlogo. Have fun :smiley:

If 2.21 gives you a black screen when you power up the pinecil, you can disable bluetooth as a temporary workaround. Either just repower it until you get a screen or hold + and repower it until you get the debug screen and press - to get to the main screen. (it felt like you get a screen faster with the + method to me). Then disable bluetooth in Advanced> bluetooth

Big thanks to @wbokslag for his guide :heart:

2_21-animated.zip

River-Mochi commented 1 year ago

I made a video showing how to Install this specific "animated IRONOS logo" from the Zip file above that @PowerWiesel compiled and attached. anyone can easily use the IronOS animated boot logo art without compiling the firmware or doing any scary github code changes. unfortunately if you want something else, you have to follow instructions way above and try to do it yourself or bribe someone to make alternative for you.

🎞️ https://youtu.be/LksT2AVOJsI

Note: some people reported issues with newest 2.21. this may be related to bluetooth on it. If your screen is black, keep rebooting and press buttons, screen eventually appeared for people at which point, go to Advanced and turn off Bluetooth fixes it. Otherwise roll back to 2.20. Ralim is investigating the issue.


IronOS

RyanHakurei commented 1 year ago

@PowerWiesel What are the upper limits to an animated bootlogo? How many frames are able to be included?

PowerWiesel commented 1 year ago

@PowerWiesel What are the upper limits to an animated bootlogo? How many frames are able to be included?

I can't give you a real answer, but I can tell you that the IronOS animation got 20 frames and give you the link to the animation pull request

Just try to convert the gif and you will see if it works

wbokslag commented 1 year ago

@PowerWiesel What are the upper limits to an animated bootlogo? How many frames are able to be included?

If I understand correctly, the frames are not stored entirely. Basically, there is a 1KB area reserved for the boot logo or animation. After the initial image, a "delta" is specified per frame, telling how the next frame differs from the previous. As such, you can have many frames if they resemble a lot, or only a few if they contain large changes between frames.

However, when using my 'workaround', the logo data is stored in the code, and is no longer bound to this 1kb limitation. I'm sure you can fit in a larger animation, but you might need to make some adjustments to the gif-to-bootanim script and/or the bootlogo display code for the pinecil. Shouldn't be too hard if you have any experience with this sort of thing.

Ralim commented 1 year ago

Yep this is correct, the logo frames are either delta encoded or encoded as a whole frame (whatever is smaller for that frame).

Best advice is to try it and see, logos with largely static content with smaller animations will work better.

oe9fwv commented 9 months ago

for me this commandline https://github.com/Ralim/IronOS-Meta#generating-the-logo-files did not work:

"Go back to Powershell and type this command (change infile.png to the name of your image):

python img2logo.py infile.png out -m for Miniware python img2logo.py infile.png out -p for Pinecil"

There is another description here: https://github.com/Ralim/IronOS/blob/dev/Documentation/Logo.md

This commandline did the job for me. Maybe someone can look into this, I think it should be corrected. thank you,

Ralim commented 9 months ago

Ah thats my bad, Ill remove the out of date instructions in the readme here.

SaucinYaMom commented 7 months ago

Here's a build of 2.21 with the animated IronOS bootlogo. Have fun πŸ˜ƒ

If 2.21 gives you a black screen when you power up the pinecil, you can disable bluetooth as a temporary workaround. Either just repower it until you get a screen or hold + and repower it until you get the debug screen and press - to get to the main screen. (it felt like you get a screen faster with the + method to me). Then disable bluetooth in Advanced> bluetooth

Big thanks to @wbokslag for his guide ❀️

2_21-animated.zip

Any chance you can make one for 2.22?

Ralim commented 7 months ago

Currently 2.22 is believed to fix the Bluetooth boot issues. What would be the use case?

SaucinYaMom commented 7 months ago

I don't have the skills or time at the moment to compile a 2.22 version that includes the boot logo and I'd like to stay on the newest version with the boot logo but it's definitely not necessary

discip commented 7 months ago

If I'm not mistaken, you just need to do this:

https://github.com/Ralim/IronOS/pull/1863#issuecomment-1872219783

Ralim commented 7 months ago

Once the logo is flashed in the correct location it will survive upgrades as well :)