Astralixi Lyra OS Megathread

New Devlog

Anyone know anywhere, where I can find information for the luckfox lyra, and a non-linux specific Lyra SDK?

As, to make my OS’s drivers, I need information for things like SPI and GPIO, and everything in the Lyra SDK and the wiki is all linux specific.

Ask any more questions if you need further clarification of what I am looking for.

Baremetal is what you’re looking for “non-linux”.

I didn’t find any “baremetal” project using the luckyfox lyra on web as of today (or maybe I missed some chinese blogs).
The SDK is a linux one for probably an obvious reason: maintenance is easy for the manufacturer, and also because 99% of the users want to use it directly with an env they know and compatible.
So I’m convinced that what you’re asking for doesn’t exist (baremetal SDK).

The closest SDK I can found is this one: GitHub - ArmSoM/rk3506-rkr4.2-sdk: rk3506-rkr4.2-sdk
More docs on pinout? rockchip_docs/rk3506 at main ¡ DeciHD/rockchip_docs ¡ GitHub

You probably need to extract the u-boot part from rk3506-rkr4.2-sdk and plug your own software (aka. payload) instead of the linux kernel in the config of u-boot.
u-boot is “mandatory” as it plays the role of the “BIOS”.

You probably won’t take any notice, given how many times I’ve told you it… But I’ll leave the links here for those who are curious.
And you probably still don’t understand that Pico != Lyra.
Lyra isn’t a simple MCU like Pico, it’s a more advanced MCU (aka. MPU) with memory management circuitry, multi-core, etc.
Let’s put it another way: in baremetal, it’s not plug-and-play as installing an extension to VS code. This brings us back to the starting point: it is simpler to start with Linux and develop directly on it.

Having a custom OS for the Pico wasn’t really absurd, given that the system is limited and cannot run a full Debian distribution, in addition to being accessible.
Do yourself a favour: really listen to the feedback… or forget about the Lyra, refocus on the Pico, and it would be quite feasible and comfortable for you.

9 Likes

Thanks for the resources, but I don’t want to switch to the Pico, because how limited it is. I am willing to take even a year if needed, to release Version Ultra of this OS, just so I can learn more about all this. After Version Ultra, I will only be releasing minor releases with bug fixes after that.

you’re worried about the limitations of a hardware that you haven’t even begun to push up against?

2 Likes

My friend, for a long time I’ve seen how you keep asking for advice about this ambitious project, yet you insist on ignoring the answers you’re given.

“We have to learn to walk before we can run.” — E. L. James

In other words, before tackling something as huge as an operating system for extremely complex hardware, you should learn to program — I mean really learn to program.

I hope this message doesn’t upset you. I’ve thought several times about writing to you, hoping you might realize it on your own. But well… I couldn’t hold back anymore :slight_smile:

2 Likes

Do not underestimate the sheer complexity of targeting a system-on-a-chip like the rk3506. I have been programming for the last 33 years, since I was a kid, and it would be a tall order for myself.

With that in mind, if you seriously want to write an OS, please consider targeting something smaller and more open like the RP2350. You will get much further this way and will likely learn a lot along the way, whereas insisting on targeting the rk3506 will almost certainly result in beating your head against the wall in frustration.

2 Likes

legit. i’m an embedded software engineer by trade and i wouldn’t know where to even begin to bring up a linux-targeted SoC in baremetal like that

5 Likes

But you are missing the point of the thread, he will

Listen up @maple @Tomassirio @tabemann @ArielPalazzesi @JackCarterSmith,

Back in the alpha and beta days, Astralixi was really just a tiny shell, not a full OS with a kernel, drivers, or anything like that. It only used about 64 KB because I was still learning and kept things super simple. I didn’t know all the cool stuff I could add that would need more RAM and CPU power. Now with the new version, I’m aiming for way better hardware, the Luckfox Lyra RK3506G2, and planning a real OS with all the usual parts like a proper kernel, drivers, filesystems, networking, and background services. That’s why the RAM use jumps to 16 MB. It’s not about being worried about limits I haven’t hit, it’s because the project has grown up and I want Astralixi to really use the hardware properly.

Also, with the PicoCalc which has limited resources, I’m trying to build something people can actually use every day as their main computer. Like, I want it to be good enough that some folks could ditch their laptop or never even buy one, and just use Astralixi OS instead. It’s for tech fans from beginners to advanced so they can still get a lot done even if the hardware isn’t super powerful. It’s all about making something lightweight but capable that works well for everyday stuff.

I’m willing to take my time, maybe even a year, to learn, code, test, and work hard to get this final major release done right. I want to put in the effort to make Astralixi the best it can be.

Thx, Astrox.

oh… damn that took a while to write :frowning: hope you all will understand my goal.

And everyone here is trying to help you learn, and one of the main things we’re trying to get you to understand is that you need to break the project down into smaller achievable parts.
If you can make a proper OS for the pico you’re a lot closer to making a proper OS for a more powerful chip. A lot of the code will just transfer over to the new chip. And there are a lot more resources available for the pico than the lyra where you are basically the only person trying to do bare metal programming.

lol good luck

i held my tongue back a lot. he’s just delusional at this point

3 Likes

can i see a breakdown of this memory usage?

then why do you not listen to people with 10+ years experience calling you out on how you’re making things up

The issue with that, is that if I spend the time which I would spend making the OS for the Pico, would be just as much time as I can use to learn enough stuff for the RK3506G2 and just make the OS for the lyra without having to deal with the unpowerful pico. Plus, I don’t even have a raspberry pi pico or pico 2W, as my core got fried.

When you said that I can use most of the code from a pico version if I make one, for the Luckfox Lyra Version, that was incorrect. As my OS wouldn’t even be able to fit on the Picos.

For me, it is a great project to do for every low level enthusiast to create a baremetal software, little game or OS. I can only encourage you to do so!

But I’ve to be at least a little honest too. You should be aware that is globally a “solo quest” for the reasons I mentioned a lot : few or NDA locked docs for chip, limited sdk with a poorly or undocumented parts, official toolchain lack support in some case (like the for the first RISC-V chip on market who need manual patch), and more generally because there are very few people, online and available, who are familiar with this specific chip…

You saw it for the rk3506, you can barely find proper .h files with everything you need, plug’n’play, who run directly from your main().
Broadly speaking, any system doesn’t start really at “main()” on the power-up, but at a specific memory address, which extract the first or more instructions to “wake-up” the CPU, initialize the memory, etc. We can summarize as the purpose of the BIOS, “u-boot” or any others “first-stage bootloader”.
You didn’t saw that on the pico because the SDK do it for you (and because the architecture is sufficiently simple to be handled with few assembly/instructions). So from the PoV of the dev, the program “start” at the main().
And as I said, manufacturers are not going to spend time (and money) developing an SDK specifically for baremetal for less than 1% of users. They do it with what exist already as base: linux for the kernel, ubuntu for the distrib, u-boot for the boot handling.
This reminds me that the Armbian project could also be a source of inspiration. (at least for the boot stage, you just need to “plug” your OS in place of the linux kernel like I said).
Again, see the project Barebox that do exactly the same thing as you (replace the linux system by there own baremetal busybox). It’s a good starting point (try to run barebox on the lyra first, this should take you some times to add all the peripherals I/O and screen interface, when you’ve done with it, you probably got a good understanding of how the things work at this point. Then you can replace the “main()” of barebox by your own “cooking/OS-startup” and this will work like a charm!)

I don’t think you’ll find much more to explore, because as I said, there isn’t much there.
The rest of the help we can provide will be more about the details of C or perhaps about a specific aspect of using bare metal (such as ‘but where did my printf() go?!’).

4 Likes

again, really interested where the 16mb figure is coming from

1 Like

This conversation is slowly turning into comedy. In other threads, the author asks for help copying an image to an SD card, and here he tells us that he is working on the ‘Ultra’ version of his all-conquering operating system.

I have already tried several times to encourage the author to take a realistic approach. In vain. Instead, he continues to talk about his great, wonderful system. Not only here, but also on YouTube.

He’s probably 9 years old and finds this an entertaining game. If at all, in future I will only comment on his posts with humour.

3 Likes

that tracks

20 characters

2 Likes

I’m working on a similar OS. Here’s how I mapped mine.

9 Likes