# config kernel "Proc. family 586" .. should I change CHOST ??

## maxime1986

Hello

I have an Item Atom Z530 (i586). I installed gentoo x86.

Can I simply change my kernel config from CONFIG_M486 to CONFIG_M586 ??

Or have I to change my CHOST, bootstrap the system and do some complicated stuff  :Smile:  ?

Thank you in advance.

PS : sorry for my bad english

----------

## d2_racing

Hi, I think that you need to change your cflags too.

Can you post your actual :

```

# emerge --info

# cat /proc/cpuinfo

```

----------

## maxime1986

emerge --info

```
Portage 2.1.6.13 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r8 i686)

=================================================================

System uname: Linux-2.6.30-gentoo-r8-i686-Intel-R-_Atom-TM-_CPU_Z530_@_1.60GHz-with-gentoo-1.12.11.1

Timestamp of tree: Sat, 24 Oct 2009 16:00:01 +0000

app-shells/bash:     4.0_p28

dev-lang/python:     2.6.2-r1

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.63-r1

sys-devel/automake:  1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=native -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=native -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="fr_CA.UTF-8"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl acpi alsa ao audiofile avahi berkdb bzip2 clamav cli cracklib crypt cups cxx dbus dri encode ffmpeg fortran ftp gdbm gpm gzip hal iconv ipv6 isdnlog kerberos mbox memlimit modules mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection samba session spl ssl sysfs tcl tcpd theora unicode x86 zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

/proc/cpuinfo

```
processor   : 0

vendor_id   : GenuineIntel

cpu family   : 6

model      : 28

model name   : Intel(R) Atom(TM) CPU Z530   @ 1.60GHz

stepping   : 2

cpu MHz      : 800.000

cache size   : 512 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 1

apicid      : 0

initial apicid   : 0

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 xtpr pdcm lahf_lm tpr_shadow vnmi flexpriority

bogomips   : 3192.10

clflush size   : 64

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 6

model      : 28

model name   : Intel(R) Atom(TM) CPU Z530   @ 1.60GHz

stepping   : 2

cpu MHz      : 1600.000

cache size   : 512 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 1

apicid      : 1

initial apicid   : 1

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 xtpr pdcm lahf_lm tpr_shadow vnmi flexpriority

bogomips   : 3192.06

clflush size   : 64

power management:

```

----------

## pappy_mcfae

You should change your kernel. That is a no-brainer. Since your chost is i686-pc-linux-gnu, you don't have to do anything else.

Blessed be!

Pappy

----------

## d2_racing

In fact, you use -march=native so you already optmised.

```

CBUILD="i686-pc-linux-gnu" 

CFLAGS="-O2 -march=native -pipe" 

CHOST="i686-pc-linux-gnu" 

```

----------

## gringo

 *Quote:*   

> I have an Item Atom Z530 (i586)

 

um, why do you think the atom is an i586 ? 

cheers

----------

## maxime1986

 *gringo wrote:*   

>  *Quote:*   I have an Item Atom Z530 (i586) 
> 
> um, why do you think the atom is an i586 ? 
> 
> cheers

 

http://en.gentoo-wiki.com/wiki/CompuLab_fit-PC#Bootstrapping

but the doc it's for fitpc1 ... I have a fitpc2 ...

Maybe fitpc2 it's not an i586 ...

However when I do make menuconfig i586 and i686 is the same option CONFIG_M586.

maybe it's a i686 :

http://browse.geekbench.ca/geekbench2/view/137490

----------

## pappy_mcfae

Technically, it's a core2 with a few less goodies. You can use the core-2 kernel CPU settings.

Blessed be!

Pappy

----------

## maxime1986

 *pappy_mcfae wrote:*   

> Technically, it's a core2 with a few less goodies. You can use the core-2 kernel CPU settings.
> 
> Blessed be!
> 
> Pappy

 

Thanks for the information.

----------

## energyman76b

wikipedia disagrees:

Atom therefore represents a partial revival of the principles used in earlier Intel designs such as Intel P5 and the i486, with the sole purpose of enhancing the performance per watt ratio. 

http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3276&p=6

----------

## maxime1986

I just try with CONFIG_M686=y and it is working for now.

----------

## gringo

 *Quote:*   

> Atom therefore represents a partial revival of the principles used in earlier Intel designs such as Intel P5 and the i486, with the sole purpose of enhancing the performance per watt ratio. 

 

well, yeah, it may have some of the ideas of the 486 world but stating that the atom _is_ 585 is just plain wrong IMO.

btw, not even the intel guys agreed on what were the best instructions to use in linux world till we had -march=atom  :Smile: 

http://lkml.org/lkml/2008/10/13/235

cheers

----------

## emerald

I'm running an atom with -march=core2 -mtune=generic since the features it supports are the same as the generic core2 architecture, but since it only uses in-order execution of microops (compared to out-of-order execution in core2) it's (should be) best to tune to a generic (or pentium) architecture. The out-of-order execution was introduced with the 686 (pentium pro) architecture.

For the kernel it should be best to optimize for core2 and again activate generic tuning.

----------

## pigeon768

-march=core2 -mtune=generic is counter productive. Use -march=native.

Either way, the atom is i686. The fit-pc1 had a i586 geode, so that's why the article says to use i586 CHOST.

----------

## emerald

 *pigeon768 wrote:*   

> -march=core2 -mtune=generic is counter productive. Use -march=native.
> 
> Either way, the atom is i686. The fit-pc1 had a i586 geode, so that's why the article says to use i586 CHOST.

 

The atom, indeed, is i686, so i686 CHOST should be used.

But, since gcc doesn't yet know the atom scheduling it's better to give a hint about the scheduling, thats the -mtune switch for. And if you want to use distcc for compiling, which i do, you will have to specify the correct arch including supported extensions, otherwise (with -march=native) distcc won't compile remotely but only local.

In general, the atom supports the extensions the core2 supports too, so nothing done wrong with this choice.

----------

