# FREEBSD BASED OS DEVELOP



## fyguy43 (Mar 18, 2021)

how ı can develop freebsd based os at the source code?


----------



## SirDice (Mar 18, 2021)

Buy "The design and implementation of the FreeBSD OS; Second edition". Or just go and look through the source, it's open after all. 









						FreeBSD Handbook
					

A constantly evolving, comprehensive resource for FreeBSD users




					docs.freebsd.org
				





			FreeBSD Developers' Handbook
		






						Design and Implementation of the FreeBSD Operating System, The: McKusick, Marshall, Neville-Neil, George, Watson, Robert: 9780321968975: Amazon.com: Books
					

Design and Implementation of the FreeBSD Operating System, The [McKusick, Marshall, Neville-Neil, George, Watson, Robert] on Amazon.com. *FREE* shipping on qualifying offers. Design and Implementation of the FreeBSD Operating System, The



					www.amazon.com


----------



## zirias@ (Mar 18, 2021)

Before you buy a book, I might spare you some frustration by speaking openly:

If you have to ask such a question, stop right now. Better learn C first by writing userspace programs, starting from helloworld and not stopping until you reach something complex involving several translation units and clearly defined interfaces in header files.

THEN look online for resources about how an OS generally works. Read about what a kernel does (and if you intend to work on the kernel as well, you probably want to understand things like inter-process communication, context switches, syscalls, MMUs / virtual memory / page tables, (virtual) filesystems, and so on, this list is not exhaustive). Then you should know the basic workings of a userland as well. THEN you might want to buy a book about the design of FreeBSD.

Of course, once there, you have also to be clear about what your goal is. After all, FreeBSD *is* an operating system.


----------



## fyguy43 (Mar 18, 2021)

more precisely, I downloaded the source code from GitHub and do something for myself the problem did not appear, but I can not translate to iso


----------



## fyguy43 (Mar 18, 2021)

first ı develop a linux kernel to os I did not get enough support and I leave ı know c It was difficult to develop over bsd and I tried ubuntu I wrote on linux forums about bsd and got banned from all of them one by one MY ONLY WISH my own operating system AND I TRY IT PLEASE HELP


----------



## SirDice (Mar 18, 2021)

Read release(7) and the script in /usr/src/release/release.sh.


----------



## hruodr (Mar 18, 2021)

Perhaps begin reading a book on OS, like Andy Tannenbaum ones?


----------



## zirias@ (Mar 18, 2021)

1. Did you read (and understand) my response?

2. Are you talking about development or just compiling your own? FreeBSD sources are meant to be built on FreeBSD, so very first step is to install a FreeBSD system. It's no big deal you don't know this, but a strong indicator you shouldn't start working on code yet  But of course, for working on code, you will still need a running installation of FreeBSD first.


----------



## fyguy43 (Mar 18, 2021)

ı have freebsd


----------



## fyguy43 (Mar 18, 2021)

but usb   reading


----------



## drhowarddrfine (Mar 18, 2021)

This thread is going to be a long haul for years. fyguy43 You need to ask about specific problems you are having and not broad statements we have to guess as their meaning.


----------



## shkhln (Mar 18, 2021)

Obvious troll is, well, obvious.


----------



## kpedersen (Mar 18, 2021)

fyguy43 said:


> but usb   reading



This is not a statement or a question and is not related to any of your other posts. Is this a language barrier thing? Perhaps English is not your first language. Or do you not have enough effort to form coherent sentences?

The latter is an issue because if you show this same lack of commitment to developing an OS, it simply will never come to fruition.


----------



## zirias@ (Mar 18, 2021)

Well, I can give a *technical* primer for getting an environment you _could_ develop on:

 Install FreeBSD in a virtual machine (hacking on it will produce crashes), I'd probably start with the latest 13.0 installers right now
 get the source:
	
	



```
pkg install git-tiny
cd /usr/src
git clone https://git.freebsd.org/src.git .
```

 for development, you want to use `-CURRENT` (the unsupported development version) with all debugging enabled, so nothing else to do, stay on the main branch.
 put `kld_list="filemon"` in /etc/rc.conf and `WITH_META_MODE=yes` in /etc/src-env.conf, to avoid rebuilding everything on each compile – type `kldload filemon` to load the module without rebooting.
 build the development version as described in the handbook: https://docs.freebsd.org/en_US.ISO8859-1/books/handbook/makeworld.html
 once you're running `14.0-CURRENT`, happy hacking in /usr/src – use snapshots to get your VM back to a previous state in case of emergency, use a private branch and push it somewhere else to conserve your code changes in case you have to roll back.

Done this, I assume you will realize you still don't know what to do. Then is probably the time to give up, or take the (long) time and effort to actually learn a few things first, see previous posts in this thread.


----------



## fyguy43 (Mar 18, 2021)

freebsd doesnt read usb flash disk 
and ı cant create iso on free bsd 
mounting problems is first thing
second thing is source code 
and my problem is develop a os based on free bsd source code


----------



## SirDice (Mar 18, 2021)

fyguy43 A forum isn't discord, IRC or some chat service. Please stop posting several one line posts in a row. Think about what you want to say, then post it.

And I strongly urge you to start learning to _use_ FreeBSD _before_ you even attempt to develop for it. It's pretty clear you have very little experience, get some of that first.

Handbook


----------



## tyson (Mar 18, 2021)

I strongly suggest fyguy43 to first learn basic things, like reading documentation, using command line tools etc.
Fastest way to make your own OS is do : `sed -i 's/FreeBSD/fyguy43OS/g' /usr/src/*`
but you would know it if you had any experience.

EDIT: real example:
`find /usr/src  \( -type d -name .git -prune \) -o -type f |xargs sed -i '' 's/FreeBSD/TySoNOS/g'`


----------



## Mjölnir (Mar 18, 2021)

Zirias said:


> put `kld_list="filemon"` in /etc/rc.conf and `WITH_META_MODE=yes` in /etc/src-env.conf, to avoid rebuilding everything on each compile – type `kldload filemon` to load the module without rebooting.


Do _not_ follow this bad recommendation, it simply doesn't work... instead, `echo` `filemon_load=\"YES\"` `>>` /boot/loader.conf and then `reboot`.  Zirias, please take one topic from my todo list, and file in a qualified bug report concerning filemon(4): _"filemon(4) does not work when loaded @runtime; please fix and/or document"._

fyguy43, OTT, you may want to enlist to either one of

traditional university
regular distant university (federal or private with good reputation)
free online "university" (e.g. _Wikiversity_ or there's some other good service in the UK IIRC)
and study computer science, @least the basic courses, of course visit _"basic OS design principles"_ or similar.  Then don't hesitate to do your experiments, and come back here in 5+ years to report your success story.


----------



## zirias@ (Mar 18, 2021)

Mjölnir said:


> Do _not_ follow this bad recommendation, it simply doesn't work... instead, `echo` `filemon_load=\"YES\"` `>>` /boot/loader.conf and then `reboot`. _*[FONT=monospace]Zirias[/FONT]*_, please take one topic from my todo list, and file in a qualified bug report concerning filemon(4): _"filemon(4) does not work when loaded @runtime; please fix and/or document"._


For me, it does.


----------



## ralphbsz (Mar 18, 2021)

So you say you want to develop an OS. That requires a lot of skill. Your messages do not give me confidence that you have those skills. But perhaps you can learn. The first thing we would need to know to give you any help or guidance is: What is your skill level? And what problem do you want to solve? Why do you want "your own OS"? Modifying an OS is hard, tedious, and most likely will break it; writing one from scratch is virtually impossible today. So please explain what your real goal is.



fyguy43 said:


> freebsd doesnt read usb flash disk


Works fine for me. Always has. I have been using FreeBSD for about 6 years now, other *BSDs before that, and never had a problem with that.



> and ı cant create iso on free bsd


Do you mean creating an ISO from other files? Easy, install the mkisofs program. I think it is installed as part of a package that includes other tools for writing to CDs.

Or do you mean creating a bootable ISO image as part of kernel compilation? SirDice pointed you at the release script above.



> mounting problems is first thing


If you have specific problems with mounting things, you need to give us details. Like for example "I have a YoyoDyne external disk, connected via a purple cable, that is formatted in the Elephant file system. I created the file system and wrote it using Minix. I want to mount it on FreeBSD, and don't know what mount command to use". That would be a good question to ask. Just saying that "mounting is the first thing" is not an answerable question.



> second thing is source code
> and my problem is develop a os based on free bsd source code


The source code for FreeBSD is trivial to find. The book by Kirk McKusick is an excellent guide. If you don't know how to find the source code, and are not willing to read that book, you will not have any chance to develop an OS.


----------



## Deleted member 66267 (Mar 19, 2021)

Based on the meme he used for his avatar I guess this guy was from Reddit but just assume he's honest 

BTW, what you are going to do seems to be creating a distro of FreeBSD for me. Just like creating another Linux distro, it's easy, not require much knowledge but more about building and packaging. You could use GhostBSD as a reference: https://github.com/GhostBSD

IMHO the word "develop" is misused here. In no way I think he's possible to develop a new OS!


----------



## tyson (Mar 20, 2021)

failure said:


> IMHO the word "develop" is misused here. In no way I think he's possible to develop a new OS!


Yeah. Its like comparing script kiddie to a hacker.


----------

