Making a custom release - changing name

abf75

New Member


Messages: 2

I'm looking to create a custom release of FreeBSD for some clients. I've seen the docs on making a release and it seems pretty straight forward.

However, I haven't seen any details on how to change the naming/branding that comes up with through using the 'uname' command. I'm referring to the 'FreeBSD' part mostly. I understand how to change ident name of the kernel when you rebuild it and we plan on having a splash image to cover up the boot process.

We've got our own custom artwork, branding, and such that we'd like to use. I have not read through the FreeBSD/BSD license completely, but from what I have read it's my understanding that you can do this as long as you retain the FreeBSD copyright notice at boot time and in the source code. Is this correct?

How do I go about changing those particular instances of 'FreeBSD' when using 'uname'?

Thanks in advance!
 

vivek

Aspiring Daemon

Reaction score: 194
Messages: 805

I'm also not sure, but you need to change kernel files and may be few binary files. For example, /usr/src/usr.bin/w/ (source code of uptime and w commands).

HTH
 

Aprogas

Member

Reaction score: 24
Messages: 36

Modifying /usr/src/sys/conf/newvers.sh and recompiling your kernel might be enough. I think tools like w and uptime just pull their version information out of the loaded kernel.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,886
Messages: 31,157

Aprogas said:
I think tools like w and uptime just pull their version information out of the loaded kernel.
I had a quick look at the uname code. That uses a sysctl to get the system name.

I'm guessing that just editing that newvers.h file is enough. Never done it, much try it out sometime :e
 

Alt

Aspiring Daemon

Reaction score: 82
Messages: 726

We will be happy if you backport some of your custom features =)
 
OP
OP
A

abf75

New Member


Messages: 2

Thanks all for the replies so far.

Yes, working with /usr/src/sys/conf/newvers.sh did the trick. I only edited these lines (just as a test):

Code:
TYPE="MyBSD"
REVISION="1.0"
BRANCH="TEST"
and came out with:
$ uname -a
Code:
MyBSD server1.localhost 1.0-TEST MyBSD 1.0-TEST #1: Wed Aug 26 12:37:58 EDT 2009 [email]alexf@server1.localh[/email]ost:/usr/obj/usr/src/sys/SERVER1  i386
After rebooting, I had to make some adjustments (basically, just adding a case for MyBSD) to /etc/rc.subr as well because that caused havoc with a lot of my rc scripts. By default it just has a case for FreeBSD and NetBSD (I assume that's where rc.subr is from).

This looks like it should work for what we need to do. I will probably run into some problems with some ports that look for a version of FreeBSD, but should be able to work around that since we're only including a small select group of packages.

Thanks again, all!


@Alt: Yes, definitely. We haven't completed the project yet (it's just for a couple small local companies), however, if it turns out well, we'll certainly give back. :)
 
Top