Ir para o conteúdo
ou

Software livre Brasil

Tela cheia
 Feed RSS

Helio Loureiro

27 de Maio de 2009, 0:00 , por Software Livre Brasil - | Ninguém está seguindo este artigo ainda.

Silenciando os absurdos do "_CRT value is absurd"

8 de Junho de 2008, 0:00, por Home - 0sem comentários ainda

Cansado de ver as mensagens surgindo o tempo todo:

acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C)

Fiz uma alteração nessa parte do ACPI e removi a mensagem. Acho que não vai fazer muita falta mesmo...
--- /usr/src/sys/dev/acpica/acpi_thermal.c-original 2008-06-08 17:38:40.000000000 -0300 
+++ /usr/src/sys/dev/acpica/acpi_thermal.c 2008-06-08 17:39:27.000000000 -0300
@@ -677,8 +677,10 @@
acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what) {
if (*val != -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000)) {
+ /* device_printf(sc->tz_dev,
"%s value is absurd, ignored (%d.%dC)\n",
what, TZ_KELVTOC(*val));
+ */ *val = -1;
}
}
 


Ativando journaling no FreeBSD

8 de Junho de 2008, 0:00, por Home - 0sem comentários ainda
{mosimage} Finalmente resolvi bater um pouco a cabeça e tentar habilitar a função de journaling em FreeBSD (um pouco movido pela inveja de ver isso funcionado em Linux, um pouco porque essa foi uma das "top" features do FreeBSD-7.0). O grande desafio foi fazer isso em um sistema já ativo. Já havia deixada uma partição livre, /dev/ad4s1h, com 360 MB livres, mas descobri que precisava de uma relação de partição/partição para ter o journaling ativado.

Meu disco usava a seguinte separação de slices:

{mosimage}

  • ad4s1a em / (UFS2)
  • ad4s1b como swap
  • ad4s1c reservado para o disco todo (default)
  • ad4s1d em /tmp (UFS2 e soft-updates)
  • ad4s1e em /var (UFS2 e soft-updates)
  • ad4s1f em /home (UFS2 e soft-updates)
  • ad4s1g em /usr (UFS2 e soft-updates)
  • ad4s1h disponível com 360MB

Descobri que o sistema de label de slices do BSD ainda mantém a limitação de 8 slices por partição, o que restringe somente ao uso das letras a-h. Com isso esgotado, as alternativas de criar ad4s1i, ad4s1j e assim por diante, impossível.

Buscando na rede, descobri que a forma de fazer isso seria atribuindo o tamanho total de disco a ser alterado para ad4s1h e depois aplicando o disklabel sobre o mesmo, na forma "disklabel -e ad4s1h", onde novamente a letras de a-h estão disponíveis. Com isso, criei os labels ad4s1ha, ad4s1hb, ad4s1hc, ad4s1hd, ad4s1he, ad4s1hf e ad4s1hg, para cada um corresponder ao seu journal, com 50MB.

O passo seguinte foi criar e ativar o journal. Seguindo a man page, gjournal (8), segui os passos como abaixo (após o boot em single mode):
{CODE} gjournal load gjournal label -f ad4s1d ad4s1hd gjournal label -f ad4s1e ad4s1he gjournal label -f ad4s1f ad4s1hf gjournal label -f ad4s1g ad4s1hg tunefs -J enable -n disable ad4s1d.journal tunefs -J enable -n disable ad4s1e.journal tunefs -J enable -n disable ad4s1f.journal tunefs -J enable -n disable ad4s1g.journal {/CODE}
Fiz as alterações correspondentes no /etc/fstab:
{CODE} /dev/ad4s1b none swap sw 0 0 /dev/ad4s1a / ufs rw 1 1 /dev/ad4s1f.journal /home ufs async,rw 2 2 /dev/ad4s1d.journal /tmp ufs async,rw 2 2 /dev/ad4s1g.journal /usr ufs async,rw 2 2 /dev/ad4s1e.journal /var ufs async,rw 2 2 linprocfs /compat/linux/proc linprocfs rw 0 0 proc /proc procfs rw 0 0 {/CODE}
O primeiros boot falharam devido ao fato de que "gjournal load" não existe em nenhum ponto do rc.conf. Fiz uma alteração em "/etc/rc.d/fsck" para que isso funcionasse (linhas 30-32):
{mosimage} {CODE} 28 fsck_start() 29 { 30 # patch to force gjournal load 31 echo -n 'Load gjournal (as patch): ' 32 /sbin/gjournal load 33 34 if [ "$autoboot" = no ]; then 35 echo "Fast boot: skipping disk checks." {/CODE}

Ainda não descobri como ativar a partição raiz, "/", com journaling também, mas só o fato de ter feito isso com a demais já fez muita diferença: o sistema ficou muito mais rápido.



Instalando FreeBSD em Laptops Compaq

17 de Maio de 2008, 0:00, por Home - 0sem comentários ainda

Se tiver tentando instalar FreeBSD num laptop Compaq nc6440, veja como em:

FreeBSD STABLE-7.0 and Laptop Compaq NC6400

Para o modelo nc6220, veja:

FreeBSD-7.0 and Compaq nc6220



FreeBSD STABLE-7.0 and Laptop Compaq NC6400

3 de Maio de 2008, 0:00, por Home - 0sem comentários ainda

This article is kindly linked by:

http://tuxmobil.org/hp_compaq.html

 

http://tuxmobil.org/mobile_bsd.html

Barely finished my last article about FreeBSD (PRERELEASE at that time) on Compaq laptops, and my computer was replaced (as part of Company refresh policy). I was upgraded to a laptop Compaq NC 6400.

As any good lazy Unix sysadmin (and clever), I just recovered a backup from my previous model (nc 6220). It worked *almost fine*. Just a few adjustments were needed.

Previously I wrote about my quest, getting FreeBSD up and running. As such, let me start describing a little better this laptop hardware:

  • CPU Intel Centrino Dual Core 1.66 GHz
  • 2 GB of RAM
  • 80 GB of Hard Disk SATA (faster!!! And kernel says 76319 MB instead)
  • Built-in bluetooth
  • Built-in Wireless Intel 3945ABG
  • 3 USB ports
  • VGA and S/Video outputs
  • CD/DVD-RW unity (finally!!!)
  • SD Memory card reader
  • Gigabit Ethernet interface (Broadcom)
  • Internal Modem
  • Smart Card reader
  • Fingerprint sensor
  • Sound system Intel 82801G

Getting hands dirty

First thing, I had to move my partitions from /dev/ad0 to /dev/ad4since they use the new SATA interface. A boot with recovery disk was enough to achieve this.

First boot was ok, but far from fine. Screen came up weirdly, caused by xorg.conf, due the chipset swap from i810 to i915. And also the physical screen size was different from old 14".

Seeking in google, I found the following links:

NC 6400 Bios update FreeBSD settings for chipset i915 Xorg.conf for NC6400 (in Linux) Linux on an HP Compaq NC6400

Last resource was really handy. I could realize screen was 1280x800 instead. And some Linux procedures (not so few nowadays) helped me to make a roadmap to have FreeBSD successfully installed.

Graphical card 945GM

To achieve an optimal usage, add the following lines in /boot/loader.conf:

i915_load="YES" 

It'll load all required modules (drm and so on).

Through ports, install package sysutils/915resolution. Then add the following lines to /etc/rc.conf:

i915resolution_enable="YES" 
i915resolution_modes="3c" 
i915resolution_width=1280 
i915resolution_height=800 

This will be enough to fix the poorly effect from xorg usage only.

Sound card Intel 82801G

Just add the following line to /boot/loader.conf:

snd_hda_load="YES" 

Wireless 3945ABG (wpi0)

This one was a little bit trick. I had to add the following lines to /boot/loader.conf:

wlan_wep_load="YES" 
wlan_scan_sta_load="YES" 
if_ath_load="YES" 
legal.intel_wpi.license_ack=1 
wpifw_load="YES" 
if_wpi_load="YES" 
wlan_load="YES" 
wlan_amrr_load="YES" 
firmware_load="YES" 

The last statement, firmware_load isn't needed since legal.intel_wpi.license_ack is in place, but it didn't hurt me to include there :-)

Internet Keys

As a plus, I added package sysutils/lineakd to make all internet keys useful (they were dead before). I configured /usr/local/etc/lineakkb.def as described in Linux article, just appending the following lines:

[HP-NC6400]
  brandname = "Hewlett Packard"
  modelname = "Compaq NC6400"
  [KEYS]
    Information      = 245
    Wireless         = 133
    Presentation     = 205
    Mute             = 160
    VolumeDown       = 174
    VolumeUp         = 176
  [END KEYS]
[END HP-NC6400]

It worked fine.

Dual Core CPU

It works by default once ACPI is enabled. Just check the following line in your boot messages:

SMP: AP CPU #1 Launched!
I've seen lately a lot of kernel messages as below:
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C)
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C) 
acpi_tz0: _CRT value is absurd, ignored (256.0C)

It's harmless, but annoying. I tried to remove it setting sysctl with hw.acpi.thermal.polling_rate=0, but it didn't work...

Gigabit ethernet (bge0)

Just loaded as before, as bge0.

ACPI and sleep mode

Remains as a dream. Not working and crashing everything, as before. Some day it'll be fixed... For now, I need to shutdown my laptop every time. At least it isn't crashing on boot as before.

Card reader, fingerprint sensor and others

Not working and just detected as generic USB. Since I don't use so much those things, I really don't care about it. Maybe it would useful for internal modem, but since wireless broadband is becoming popular, I really don't think I'll need it soon.

Status Brief

  • Dual core CPU: Working (requires ACPI)
  • Sound system Intel 82801G: Working (requires snd_hda)
  • Video card Mobile 945GM: Working (requires i915 module and i915resolution)
  • Gigabit Ethernet: Working (requires if_bge)
  • Bluetooth: Working
  • Wireless 3945ABG: Working (requires wpifw, if_wpi andlegal.intel_wpi.license_ack=1 )
  • SD Memory card reader: Not working
  • Internal Modem: Not working
  • Smart Card reader: Not working
  • Fingerprint sensor: Not working


Tags deste artigo: #debian #debianbr #debianse #softwarelivre #freesoftware #linux #python