Chibrax Linux Proof of concept
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
rootfs.iso
|
||||
chibrax.tar.gz
|
||||
rootfs
|
||||
linux-firmware
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
sudo rm -rf rootfs/
|
||||
sudo rm root.iso
|
||||
sudo rm chibrax.tar.gz
|
||||
mkdir -p rootfs/
|
||||
mkdir -p rootfs/boot
|
||||
mkdir -p rootfs/chibrax
|
||||
|
||||
#installation de node & de grub
|
||||
sudo pacstrap rootfs coreutils nodejs grub efibootmgr sed
|
||||
|
||||
chmod +x ./chibraxLoader/build.sh
|
||||
cd chibraxLoader && ./build.sh && cd -
|
||||
sudo cp chibraxLoader/init rootfs/bin/
|
||||
|
||||
cd kernel && ./from_current.sh && cd -
|
||||
sudo cp kernel/src/vmlinuz rootfs/boot
|
||||
|
||||
echo "Cloning the firmware"
|
||||
git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
|
||||
cd linux-firmware && git pull && cd -
|
||||
sudo mkdir -p rootfs/usr/lib/firmware
|
||||
sudo cp linux-firmware/* rootfs/usr/lib/firmware/ -r
|
||||
|
||||
sudo cp rootfs\ overrides/* rootfs/ -r
|
||||
|
||||
echo "chrooted exit when you are done"
|
||||
sudo chroot rootfs /bin/bash
|
||||
|
||||
sudo rm rootfs/var/cache -rf
|
||||
|
||||
sudo tar -czvf chibrax.tar.gz rootfs
|
||||
sudo mkisofs -o rootfs.iso chibrax.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
init
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
gcc chibraxLoader.c -O3 -o init
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <unistd.h>
|
||||
#define ERR 1
|
||||
|
||||
#define node "/bin/node"
|
||||
#define chibrax "/chibrax/index.js"
|
||||
|
||||
int main() {
|
||||
return execl(node, node, chibrax);
|
||||
}
|
||||
+5206
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
dist/
|
||||
src/
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
pwd
|
||||
cd src
|
||||
make mrproper
|
||||
cp ../.config .config
|
||||
make -j$(nproc) bzImage
|
||||
cp arch/x86_64/boot/bzImage vmlinuz
|
||||
cd -
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
sudo rm root.iso
|
||||
sudo rm chibrax.tar.gz
|
||||
|
||||
echo "Cloning the firmware"
|
||||
git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
|
||||
cd linux-firmware && git pull && cd -
|
||||
sudo mkdir -p rootfs/usr/lib/firmware
|
||||
sudo cp linux-firmware/* rootfs/usr/lib/firmware/ -r
|
||||
|
||||
sudo cp rootfs\ overrides/* rootfs/ -r
|
||||
|
||||
sudo rm rootfs/var/cache -rf
|
||||
|
||||
sudo tar -czvf chibrax.tar.gz rootfs
|
||||
sudo mkisofs -o rootfs.iso chibrax.tar.gz
|
||||
@@ -0,0 +1,9 @@
|
||||
const fs = require('fs')
|
||||
const audiopath = '/dev/audio'
|
||||
|
||||
module.exports = (path) => {
|
||||
if(fs.existsSync(path) && fs.existsSync(audiopath)) {
|
||||
const data = fs.readFileSync(path)
|
||||
fs.writeFileSync(audiopath, data)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
const audio = require('./audio.js')
|
||||
|
||||
console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
|
||||
console.log(`
|
||||
|
||||
|
||||
_______ _________ ______ _______ _______
|
||||
( ____ \|\ /|\__ __/( ___ \ ( ____ )( ___ )|\ /|
|
||||
| ( \/| ) ( | ) ( | ( ) )| ( )|| ( ) |( \ / )
|
||||
| | | (___) | | | | (__/ / | (____)|| (___) | \ (_) /
|
||||
| | | ___ | | | | __ ( | __)| ___ | ) _ (
|
||||
| | | ( ) | | | | ( \ \ | (\ ( | ( ) | / ( ) \
|
||||
| (____/\| ) ( |___) (___| )___) )| ) \ \__| ) ( |( / \ )
|
||||
(_______/|/ \|\_______/|/ \___/ |/ \__/|/ \||/ \|
|
||||
|
||||
_______ _______
|
||||
( ___ )( ____ \
|
||||
| ( ) || ( \/
|
||||
| | | || (_____
|
||||
| | | |(_____ )
|
||||
| | | | ) |
|
||||
| (___) |/\____) |
|
||||
(_______)\_______)
|
||||
|
||||
`)
|
||||
|
||||
audio('/chibrax/sheeebr.wav')
|
||||
|
||||
while(1) {}
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
ChibraxOS Linux \r (\l)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
LSB_VERSION=1.4
|
||||
DISTRIB_ID=Chibrax
|
||||
DISTRIB_RELEASE=rolling
|
||||
DISTRIB_DESCRIPTION="ChibraxOS Linux"
|
||||
@@ -0,0 +1,9 @@
|
||||
NAME="Chibrax Linux"
|
||||
PRETTY_NAME="ChibraxOS"
|
||||
ID=chibrax
|
||||
BUILD_ID=rolling
|
||||
ANSI_COLOR="38;2;23;147;209"
|
||||
HOME_URL="https://archlinux.org/"
|
||||
DOCUMENTATION_URL="https://wiki.archlinux.org/"
|
||||
SUPPORT_URL="https://bbs.archlinux.org/"
|
||||
BUG_REPORT_URL="https://bugs.archlinux.org/"
|
||||
Reference in New Issue
Block a user