# GENERIC kernel



## Twister (Dec 28, 2009)

Hello all!
Can you tell me what is processor FreeBSD GENERIC kernel and packages compiled for?


----------



## fonz (Dec 28, 2009)

FreeBSD is available for (at least) 6 architectures. The kernel and packages are compiled for one such particular architecture.

For example: if you download the i386 version of FreeBSD, the kernel and packages have been compiled for "regular PC-compatible" processors, the amd64 version is meant for 64-bit AMD processors, etc.

Alphons


----------



## vorbote (Dec 28, 2009)

To answer your question: A depends a bit. A GENERIC kernel for the IA32 architechture (ordinarily called "i386") has optimizations for the i486, i586 and i686 subarchitectures that are selected automatically at runtime. A GENERIC kernel for the amd64 and SPARC architectures is compiled for the lowest common denominator in those architectures, which for the compiler used, gcc, is called the "-march=generic" flag.


----------



## Alt (Dec 28, 2009)

fonz said:
			
		

> the amd64 version is meant for 64-bit AMD processors, etc.
> 
> Alphons


AFAIK arch "amd64" means architecture name, not AMD manufacturer, so it can be used on and 64bit processor like amd 64bit or 64bit intel (dual-cores etc).. Correct me if im wrong


----------



## crsd (Dec 28, 2009)

You are correct. http://www.freebsd.org/platforms/amd64.html lists CPUs, supported by amd64 port.


----------



## fonz (Dec 28, 2009)

Alt said:
			
		

> AFAIK arch "amd64" means architecture name, not AMD manufacturer, so it can be used on and 64bit processor like amd 64bit or 64bit intel (dual-cores etc).. Correct me if im wrong


You are correct, yes. I tried to keep it simple, but perhaps this was a bit _over_simplified.

Alphons


----------



## Graaf_van_Vlaanderen (Dec 28, 2009)

Also keep in mind that IA64 is referring to Intel's Ithanium CPU and hence is a different architecture, which is also supported in FreeBSD.

In other words IA64 is not the same as AMD64, while i686 is in fact the same as IA32. If I remember correctly the name AMD64 was used, because they were the first to release a 64-bit version of the i686 cpu. Similar acronyms for AMD64 are x86_64 or sometimes simply x64.


----------



## Twister (Dec 29, 2009)

Thanks for your answers
But I meant "procesor" not "architecture".
What is "processor family" FreeBSD GENERIC kernel is compiled for - Pentium or P2 or P3 ... ?


----------



## SirDice (Dec 29, 2009)

Twister said:
			
		

> Thanks for your answers
> But I meant "procesor" not "architecture".
> What is "processor family" FreeBSD GENERIC kernel is compiled for - Pentium or P2 or P3 ... ?


i486 and above.


----------



## Twister (Dec 29, 2009)

SirDice said:
			
		

> i486 and above.



 Why?
Is there anybody using it?
Why not i586 or i686?


----------



## SirDice (Dec 29, 2009)

Twister said:
			
		

> Why?
> Is there anybody using it?


Because there are still people running FreeBSD on 486 hardware.

If you don't like it, you can recompile the kernel yourself.


----------



## fronclynne (Dec 29, 2009)

*less than 20 minutes on a fairly slow system*



			
				Twister said:
			
		

> Why?
> Is there anybody using it?
> Why not i586 or i686?



It doesn't take much effort to remove the single "cpu I486_CPU" from the kernel config and recompile if you're bothered by it, but it would be quite a undertaking to install without it on some machines (& yes, many embedded systems & many older AMD systems need the 486 instructions in the kernel to run).


----------



## Twister (Dec 29, 2009)

Ok.
Thanks a lot for your answers.
What's with packages - is it compiled for i486 too?


----------



## SirDice (Dec 29, 2009)

AFAIK yes. The freebsd-i386 packages are. You're better off using the ports anyway. It'll take longer but in the long run it'll pay off. Some ports need to be build anyway if you want certain features (lang/php5 comes to mind).


----------



## fonz (Dec 29, 2009)

SirDice said:
			
		

> Some ports need to be build _[sic]_ anyway if you want certain features (lang/php5 comes to mind).



Exactly. Binary packages appear easier to install but they may have been compiled with certain defaults; if you build from ports you can configure the software precisely according to your needs and wishes.

This may sometimes be a bit cumbersome if a port has a lot of dependencies that haven't been installed yet either, because in such a case you may find yourself confronted with several configuration dialogs, but in the long run it does pay off. And given that you (the OP that is) appear to be quite particular about what you want and don't want (which is by no means a bad thing per se), I do recommend that you at least take a look at the ports mechanism. See for example the handbook for more information.

Alphons


----------



## Twister (Dec 30, 2009)

SirDice said:
			
		

> AFAIK yes. The freebsd-i386 packages are. You're better off using the ports anyway. It'll take longer but in the long run it'll pay off. Some ports need to be build anyway if you want certain features (lang/php5 comes to mind).



Thanks.
I use ports too.
I'm using FreeBSD since 4.5 and I built custom kernel in most of installations. Software was built from ports.
But sometimes I met with problems (and I meet it today!) with building from ports because ports are updating permanently and when you're trying to build complex port (like KDE) some inconsistencies arise.
More over - you need some ports only to build other port. When you use package - you don't need it.
So I want to use packages. But packages from freebsd.org are compiled for i486. Can anyone tell how create my own repository with packages? How can I tell OS to use my repository to find  packages?


----------



## SirDice (Dec 30, 2009)

Twister said:
			
		

> Can anyone tell how create my own repository with packages? How can I tell OS to use my repository to find  packages?


Just create /usr/ports/packages. If you do a [cmd=]make package[/cmd] in a port's directory it will create a package for you. Likewise both portmaster and portupgrade have options to create packages.


----------



## Alt (Dec 30, 2009)

Twister said:
			
		

> But sometimes I met with problems (and I meet it today!) with building from ports because ports are updating permanently and when you're trying to build complex port (like KDE) some inconsistencies arise.
> More over - you need some ports only to build other port. When you use package - you don't need it.
> So I want to use packages. But packages from freebsd.org are compiled for i486. Can anyone tell how create my own repository with packages? How can I tell OS to use my repository to find  packages?


Installing KDE from packages (via pkg_add -r) will lead to version problems when you later use ports. Thats cus KDE will get package he compiled against, not versions that you have in your /usr/ports

If you have many servers and they have similar HW you can build once on one "machine-builder" and make packages and kernels as SirDice said


----------

