ITT: Zig Forums WRITES A NON-COC'D KERNEL BETTER THAN LINUX

/* This code is in the public domain. *//* Everybody can contribute regardless of how much of an asshole they are. *//* Please keep your lines at a maximum of 78 characters such that DOS *//* people can still edit the code without getting too angry. *//* Language used is ANSI C. Be sure to do bounds checking and never trust *//* any input from the user, and do check for NULL occasionally. */#include "kernel.h"void kmain(){ kprintf("Welcome to 8kernel!\n");

OK guys it's up to you now. Torvalds didn't write everything himself either, you know.

Other urls found in this thread:

gnu.org/software/grub/manual/multiboot/multiboot.html
ftp.openbsd.org/pub/OpenBSD/6.3/amd64/bsd.mp
signed-off-by.me/
chinaiplawyer.com/china-court-protects-violation-gpl-license-agreement/
twitter.com/realsexycyborg/status/976585159343403008
templeos.org/
golang.web.fc2.com/
arjunsreedharan.org/post/82710718100/kernel-101-lets-write-a-kernel
twitter.com/NSFWRedditGif

system.os("rm -rf /")

8/pol/ needs a CoC too. so fuck you

Shouldn't we start by defining a few constants we know we're going to need?

...

void* test;if (test == NULL) { printf("NULL checked successfully\n");}else { printf("CRITICAL NULL CHECKING ERROR!\n"); return 1;}

I just want to tell you guys good luck. We're all counting on you.

Attached: good luck.jpg (1280x720, 84.16K)

What if we just forked the kernel and converted it to new C standards and cleaned it up? All the work is already done for us, it just needs remade with more autism.

Can we put that in our CoC?

if (user->gender == NULL) { congratulate_user(user); donate_to_patreon(user, 20, US_DOLLAR);}

Great, now (((they))) don't even have to bother with getting rid of Linus and other maintainers.

user I...

I'm not a kernel nut, but what if we created a microkernel that gives a command line with the frame buffer?
It would load instantly and allow a console only environment and shell with text prog&utilities like sed awk python.
Would this be like extending grub with more software?

Last time I checked for Null a tranny went to his house to bark at his mother while he was hiding in the bathroom. How's the little fella doing anyway?

/* All contributions welcome. */

let's do it in assembler so trannies can't read it

CoC: Contributors to this project must have an IQ above 115.

There, the end.

why don't we do a less micro-kernel like thing and instrad focus on efficiently utilizing mordern hardware, include more stuff in the kernel and reside to modules when it's really stuff most people don't need?

like extending grub...hmm... i have my problems with looking at that. but of course, at first you need to point the computer to the boot sector. but finding it won't automatically give you an unixoid enviroment. you'd have to port stuff lile bash first and implement what it needs to run. Porting PY is probably a big step from there. Let's not yet think about such userlandy things

OS DEV 101
Requirements: QEMU, C compiler (preferably gcc or clang), unix-ish OS for development, knowledge of x86 and C

Start by reading the GRUB Multiboot Specification at gnu.org/software/grub/manual/multiboot/multiboot.html
Using the multiboot standard, your bootloader (GRUB or compatible; QEMU also supports this!) will
1. set up your CPU for you so you don't have to deal with ancient clutter such as the A20 gate and
2. boot right into an ELF file which you can build with common unix tools.
TL;DR you need a special data structure somewhere at the beginning of your ELF kernel and in return your ebx register will point to a structure generated by the bootloader which contains useful information. The CPU will be in 286 protected mode (32 bit, segmentation, no paging (yet)).

For the bare minimum, you need a struct that contains the 32 bit magic number 0x1badb002, a 32 bit flags field which can be left zero, and a 32 bit checksum which is -(magic + flags). Make sure your structure is aligned to 4 bytes. The structure has its own section in the ELF file to ensure it is at the beginning of the file (more on this later). struct multiboot_header { unsigned int magic; unsigned int flags; unsigned int checksum;}struct multiboot_header header __attribute__((section("multiboot"), aligned(4))) = { .magic = 0x1badb002, .flags = 0, .checksum = -0x1badb002} Save as multiboot_header.c and compile with gcc -m32 -c -o multiboot_header.o multiboot_header.c

Also you need some you want to run. .section .text.global kmainkmain: movl $0x0474042f, 0xb8000 movl $0x04630465, 0xb8004 movl $0x042f0468, 0xb8008 hlt This loads a message into vga memory at 0xb8000. It will show up on the top left.
Save as kernel.S and compile with as --32 -o kernel.o kernel.S

Finally, you need to link kernel.o and multiboot_header.o into a bootable kernel. You need a linker file: ENTRY(kmain)SECTIONS { . = 1M; multiboot : { *(multiboot) } .text : { *(.text) }} The line ". = 1M;" tells your bootloader to load the contents of the file to memory address 1 megabyte. The multiboot header comes first, then the code. Save as linker.ld. Link your code with ld -melf_i386 -n -o kernel -T linker.ld kernel.o multiboot_header.o

Congratulations! Now you have a bootable kernel. QEMU supports the multiboot format, so you don't need to install GRUB. Boot your kernel with qemu -curses -kernel kernel

Absolutely Haram

LOGO
O
G
O

Kill yourself faggot.

Attached: 25fz2q.jpg (282x252, 16.73K)

works, you forgot to put a ; after each } though. We definitely should put in a poweroff command next, had to kill the terminal running qemu

Can't we just use Amiga OS?

Don't worry user the OS will just take the status.....

You can exit qemu with Alt+2, then type q

Sure you can use Amiga OS :^)

I actually learned something cool, nice post.

>$ wget ftp.openbsd.org/pub/OpenBSD/6.3/amd64/bsd.mp
done

Yeah sure but if we make a new one we can give it a cool name. Something like COLT or MAGNUM or GUNN is not UNix, Nigger

*(int *) 0 = 0xBABEA55;

REPORTED SHITLORD!!!!!!!!!!!!!!!!

Attached: 1452206628823.jpg (1182x966, 380.93K)

Requesting that this important check will be added somewhere.

/* #define archX86 //enable when compiling for x86 */#ifdef archX86 __asm__("movl $0, %eax;" "cpuid;" ); register int ebx asm ("ebx"); //Genu register int edx asm ("edx"); //ineI register int ecx asm ("ecx"); //ntel if(ebx == 0x756e6547 && edx == 0x49656e69 && ecx == 0x6c65746e) { //Intel nigger monkey detected, exit return -1; } #endif

Sorry for messed up formatting.

My next goal in development is to figure out how to increment cpu clockspeed in order to beat Linux in performance and have a strong marketing talking point for our new kernel.

(defun (y-combinator

100% this

Wtf are you all whining about? Are they blocking your contributions or giving you a taste of your own medicine? You liked who was in control before and now you don't. If you're alpha you can dismiss your feelings when they conflict with your ability to achieve goals. If you're beta you just follow.

What's the problem?

Attached: ClipboardImage.png (452x523, 5.85K)

"Hey, this is the Code of Conduct for all future software programming and collaborations for %s.\n\n

Please be nice to all people involved in the project and outside third party people involved in the project.\n\n

Don't break country laws of the nation where the project is hosted and avoid breaking laws for other peoples' nationalities involved in the project.\n\n

When commenting code in the project, remain professional and focus on the code and its improvement. Attacking a contributor using Ad hominem rhetoric and similar strawman techniques is not allowed.\n\n

Try to improve code from functional to efficient. Write comments for unconventional methods or confusing code, linking to proof that the coding convention is more efficient or how it works.\n\n

There are only two genders. If you have a vagina, keep it. If you have a penis, don't cut it off. What happens in your bedroom and local political electorate doesn't involve this project.\n\n

The only political ideology to strive for is freedom to operate software that can be audited, contributed, supported, improved, used by anyone involved without limitations and with open clear announcements of when we have failed to uphold freedom policy (such as when outsourcing, forking or employing other project developers or companies that do not uphold a freedom policy).\n\n

Try to remain anonymous for as long as possible before committing yourself to publicizing private information. The people involved in the project focuses on creation and improvement. Those that focus on destruction will be removed according to common sense from moderators.\n\n
", project_name,

Gtfo statist

Linux and many other open source projects have required that you publish your name with your patches for a long time. See signed-off-by.me/
I don't know what made them require such a certificate but I'm sure they have their good reasons (or bad experiences in the past).

should we use a bash style shell or just feed everything into a c compiler like terry? Let's at least make zsh the standard shell!

on the tech discord we already decided on fish as standard

Hmm haven't tried fish yet, I guessit wont hurt to install and try it this weekend. Don't be a tranny though and use irc instead of discord.

LOOOOOOOOOOOOOOOOOOOOOOOL
Good one, Zig Forums!
This wouldn't have happened with Rust :^)

Infinite loops are blazingly fast. Is there any way we can synergistically incorporate this engineering feature with the fact that it will be called some flavor of 「infinity OS」 in the final shipped build?

CoalRollOS

Public domain code is a VERY Bad idea.

Why?
Get your copyleft commie paws off my code, (((Stallman))).

Dedicating to the public domain is bad. This should be GPLv3

and so the war began and no actual work got done. The end

Change it to 130 and call it SpectrumOS

Who gets this to switch to long mode? Paging, anyone?

If it can be subverted so easily, what is the point?

I'd rather work on a proof verified RTOS

I'm 99% sure he just copy and pasted from the osdev wiki.

GPL is illegal in China as they have rights to take your code.
chinaiplawyer.com/china-court-protects-violation-gpl-license-agreement/
And state cunts are protecting them
twitter.com/realsexycyborg/status/976585159343403008

Why would I copy and paste code for such a simple task from the wiki? Are you projecting? Look, I cannot prove anything here, nor do I want to, but you haven't done anything to even get the benefit of doubt. Chop chop, implement paging, filthy nocoder.

This is cool and all but where are the funny easter eggs?
It should play a fart sound every time the tilde character appears onscreen.

i would like to humbly submit that we all support templeos.org/

...

Bump. Are there even less actual coders here than I thought??

sudo printf "Hitler did nothing wrong"
/end
#Am I a kernel now?

Attached: 9b2529eb0a7f5665f5188aa6798c37fd97903ac2ace931e92831fa5458f6f58e.png (960x660, 763.63K)

golang.web.fc2.com/

here you go nigger. this is how we do graphics

char font[256][FONT_H][FONT_W] = {{...{0,1,1,1,1,1,1,0}, /*

the great wall is the best that ever happened to non-chinks

The great nu/pol/ cancerwave slowly destroyed old Zig Forums as waves of shitposting morons determined to turn Zig Forums into 4chan all over again began screeching at anyone who called them retarded newfags and did it in such large numbers that they eventually managed to successfully drive out most of the oldfags. Now the newfag cancer pretends to be the oldfags, and Zig Forums is mostly cancer. Although the nu/pol/ newfags were always trying to pretend to be oldfags, even though they blatantly post like 4chan cancer.

There's some hope for recovery now that Zig Forums is no longer run by insane retards that incubate these fucking nutters, but odds are those quality posters ain't coming back.

This guide could help us get started
arjunsreedharan.org/post/82710718100/kernel-101-lets-write-a-kernel

I'm a sysadmin I only know python and bash scripts lel

ITT our valiant but sadly Zig Forumsthetic retards are once again thwarted by their own faggotry and uselessness. Tune in next thread and find out if they do it again!

Attached: 7225a6c7f11f738325f788bac4e57576d056342a3563fea7fa044714836afbd2.jpg (750x556, 44.7K)

Look at this as an opportunity to learn something new. My employer pays me to write PHP while I'm reading blogs about kernel development.

perfectly describes (You) btw

I don't have time to code during the weeks because I have to code at work

Maybe people really should try to start the 'next google'. The actual google might not be able to maintain its googlieness hiring people like this.

Sad.

Where is the second N, weenie

Notice that both the first two letters in "Unix" are capitalized.