Discuss Scratch

adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

EarthOS is an operating system made for SMC Computer. Check out this for more info.
———————————————–
EarthOS is open source, everyone is welcome to contribute

EarthOS is written in PowerSlash, one of my programming languages. PowerSlash can be compiled to SMC (Scratch Machine Code), so you can run it in SMC Computer.

Studio: https://scratch.mit.edu/studios/25681011

There are 2 older releases of EarthOS: v1.0 and v1.5
These 2 releases ran in A++ Computer, which was discontinued. I've then started to work on EarthOS v2.0, but it got quickly discontinued because of the limitations of A++.

We're currently working on EarthOS v2.1 and v2.2 is going to be a stable release, which will be completely different. It'll have a kernel and a root filesystem (yes, it's similar to UNIX). Since it's similar to UNIX, it'll have multi-user support and multitasking. The first releases will be command line-based, but we'll create a GUI version too.

If you want to test the current state of EarthOS, you can use the nightly builds here.

PowerSlash and SMC are very limited at the moment. It doesn't have any GUI support, but I'll (probably) add it after we reach a stable release of CLI-based EarthOS.

How to join
Firstly, make sure you have met these requirements:
  • Basic knowledge of GitHub
  • Linux OS (Ubuntu recommended) - It's not necessary to have a Linux system on your main computer. You can use a Raspberry Pi too, or even an Android phone! I won't explain this here, please ask it below.
Don't forget to learn the basics of PowerSlash
I'm currently working on a documentation. For now, feel free to ask any questions about it.

Last edited by adazem009 (Aug. 26, 2023 08:43:06)

adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

Building from source
EarthOS sources are on GitHub in the EarthOS-SMC organization.
All these sources are merged in the build process and the output is EarthOS installation media, in a loadable code.
Initializing environment
Make sure you have a Linux system available (Ubuntu is recommended). It's recommended to run a Linux system directly on your PC. WSL and virtual machines should work too, but I haven't tested anything there.
My build tools should be compatible with any CPU architecture that supports bash and coreutils. Yes, Raspberry Pi (and even any Android device with Termux) is enough for the build process!
Once you have your Linux system set up, follow the instructions.
Note: This guide is made for Ubuntu. You'll need to change the installation commands if you use a non-Debian Linux distribution.

Before doing anything, make sure you have an Internet connection and open the terminal. You can do it either by pressing CTRL+ALT+T (in Ubuntu), or by finding it in the applications.

Install git and xclip
xclip is optional, it's used for easier PC code copying
sudo apt update && sudo apt install -y git xclip
Type your password when it asks, the input might be invisible in most Linux distributions.

Get EarthOS sources
You can download the source tree to your home directory. You can change this step to suit your needs:
cd ~
Now, download the EarthOS sources:
git clone https://github.com/EarthOS-SMC/EarthOS
cd EarthOS
chmod +x sync.sh
./sync.sh
The sources should download now.
Build
Run these commands from the EarthOS source tree:
chmod +x build.sh
./build.sh
You should now see a long output. When it finishes, your PC code will be saved in EarthOS.fssc
To copy the PC code, use this command:
xclip -selection clipboard EarthOS.fssc
You should now be able to paste your PC code in SMC Computer.
How to use custom sources
The links to source trees are in the sync.sh script. If you forked some of the EarthOS sources, you can edit this script. Look at this part of the script:
# Custom dependencies
if [ -d "${SRC}/parts" ]; then
  rm -rf "${SRC}/parts"
fi
mkdir "${SRC}/parts"
# PowerSlash userspace compiler
git clone "https://github.com/EarthOS-SMC/PowerSlash-userspace" "${SRC}/build/PowerSlash-userspace" &
# EarthOS MBR
git clone "https://github.com/EarthOS-SMC/EarthOS-MBR" "${SRC}/parts/mbr" &
# EarthOS little bootloader
git clone "https://github.com/EarthOS-SMC/little-bootloader" "${SRC}/parts/lbl" &
# EarthOS kernel
git clone "https://github.com/EarthOS-SMC/EarthOS-kernel" "${SRC}/parts/kernel" &
# EarthOS init system
git clone "https://github.com/EarthOS-SMC/init" "${SRC}/parts/init" &
You can change the URLs here. After you save the script, you can run it again to sync the new sources.

Last edited by adazem009 (March 21, 2021 17:06:43)

adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

Contributing
All EarthOS repositories can be found in the here.
Anyone is welcome to contribute (create issues and pull requests). There's a chance you can become a maintainer of a repository, or just have write access there.

Last edited by adazem009 (April 30, 2021 06:18:34)

smileycreations15
Scratcher
1000+ posts

EarthOS - The first Scratch OS that can be built from source!

Can I apply?
Also, if you want I can make something like this, kinda like JS.
let ENV = 2
if (ENV === 1){
  say("1")
} else {
  say("2")
}
So, I make a sandbox and this code is run.
Variables, if statements and other stuff are COMPILE TIME only.
So essentially, this “generates” SMC.
adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

smileycreations15 wrote:

Can I apply?
Also, if you want I can make something like this, kinda like JS.
let ENV = 2
if (ENV === 1){
  say("1")
} else {
  say("2")
}
So, I make a sandbox and this code is run.
Variables, if statements and other stuff are COMPILE TIME only.
So essentially, this “generates” SMC.
Sure, you can join. Make sure you meet the requirements above
I'll add you to the server developers application for now.
So, this is something like a JS version of SMC Computer, e. g. a version that doesn't run in Scratch, but in JS?
SuperRyn
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

oh dear i use windows and have poor knowledge of github
adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

SuperRyn wrote:

oh dear i use windows and have poor knowledge of github
It's not that hard. I started with absolutely no knowledge too
You can still use Ubuntu in WSL, but I haven't tested anything there.
ninjaMAR
Scratcher
1000+ posts

EarthOS - The first Scratch OS that can be built from source!

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
ninjaMAR
Scratcher
1000+ posts

EarthOS - The first Scratch OS that can be built from source!

adazem009 wrote:

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
What is server? Does it use JS?
You can comment using JS so could I add that?

Last edited by ninjaMAR (Dec. 19, 2020 23:48:32)

ninjaMAR
Scratcher
1000+ posts

EarthOS - The first Scratch OS that can be built from source!

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
What is server? Does it use JS?
You can comment using JS so could I add that?
Bump
adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
What is server? Does it use JS?
You can comment using JS so could I add that?
This application is for server software made in PowerSlash. It'll be software that can run in EarthOS.
ninjaMAR
Scratcher
1000+ posts

EarthOS - The first Scratch OS that can be built from source!

adazem009 wrote:

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
What is server? Does it use JS?
You can comment using JS so could I add that?
This application is for server software made in PowerSlash. It'll be software that can run in EarthOS.
Are we running the OS in scratch or somewhere else?
adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
What is server? Does it use JS?
You can comment using JS so could I add that?
This application is for server software made in PowerSlash. It'll be software that can run in EarthOS.
Are we running the OS in scratch or somewhere else?
Yes, it can be loaded in SMC Computer.
ninjaMAR
Scratcher
1000+ posts

EarthOS - The first Scratch OS that can be built from source!

adazem009 wrote:

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
What is server? Does it use JS?
You can comment using JS so could I add that?
This application is for server software made in PowerSlash. It'll be software that can run in EarthOS.
Are we running the OS in scratch or somewhere else?
Yes, it can be loaded in SMC Computer.
Cool! Am I in?
adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

adazem009 wrote:

ninjaMAR wrote:

Can I join?
I have a github account but I only use it for storing things.
I have a raspberry pi and a chromebook.
Sure
I haven't tested the building tools on ARM devices like Raspberry Pi, but they should work there too.
Please choose one of the applications above. You can change your role at anytime after you choose one. You don't need to have knowledge of PowerSlash right now, because I need to write a documentation. It'll probably be finished on early January, 2021.
Also you can try the build tools if you're interested. Follow the guide from the post above.
What is server? Does it use JS?
You can comment using JS so could I add that?
This application is for server software made in PowerSlash. It'll be software that can run in EarthOS.
Are we running the OS in scratch or somewhere else?
Yes, it can be loaded in SMC Computer.
Cool! Am I in?
Sure, I added you to server software developers. Tell me if you'd like to change it.
I'll also invite you to the studio.
867158
Scratcher
29 posts

EarthOS - The first Scratch OS that can be built from source!

Hi, I was curious about joining, I was wondering if SMC interprets code like a real CPU, with registers and all that. If so I was curious if we could maybe base EarthOS on some actual components of the Linux system, maybe have a compiler for C or C++ to machine code.
867158
Scratcher
29 posts

EarthOS - The first Scratch OS that can be built from source!

Also, would there be a better way to communicate about this project aside from scratch? Such as Discord or the like?
867158
Scratcher
29 posts

EarthOS - The first Scratch OS that can be built from source!

Also, would there be a better way to communicate about this project aside from scratch? Such as Discord or the like?
adazem009
Scratcher
100+ posts

EarthOS - The first Scratch OS that can be built from source!

867158 wrote:

Hi, I was curious about joining, I was wondering if SMC interprets code like a real CPU, with registers and all that. If so I was curious if we could maybe base EarthOS on some actual components of the Linux system, maybe have a compiler for C or C++ to machine code.
SMC is not really a machine language. It's just a bit close to it. Check out https://scratch.mit.edu/discuss/topic/459811

Powered by DjangoBB