Helio Loureiro

Bem-vindo ao código fonte

  • Increase font size
  • Default font size
  • Decrease font size

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

Welcome to the Frontpage

História da Ericsson

E-mail Print PDF
Image Publicado recentemente, um site interessante que conta a história da Ericsson e, por sua vez, parte da história das telecomunicações. Em inglês.

History of Ericsson

BTW fico pensando como os chineses escreverão sobre a histórias das telecomunicações no futuro. Deve ser algo: enquanto muitos gastavam criando, nós só otimizamos simplesmente copiando... ou talvez peguem a história de alguém e só falsifiquem os nomes. Se nem a cantora das olimpíadas conseguiu fugir da pirataria, quiçá o restante...

Last Updated on Tuesday, 26 August 2008 06:20
 
Bookmark and Share

Silenciando os absurdos do "_CRT value is absurd"

E-mail Print PDF
Image 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;
     }
 }
Last Updated on Sunday, 08 June 2008 18:15
 
Bookmark and Share

Ativando journaling no FreeBSD

E-mail Print PDF
Image 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:

Image

  • 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):

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

Fiz as alterações correspondentes no /etc/fstab:
/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

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):
Image
    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."

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.

Last Updated on Sunday, 08 June 2008 18:16
 
Bookmark and Share

Instalando FreeBSD em Laptops Compaq

E-mail Print PDF

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

Last Updated on Sunday, 29 August 2010 12:09
 
Bookmark and Share

Applescript for fun

E-mail Print PDF
Image Brincando com meu antigo companheiro de consultorias, o iBook xuxu, começei a quebrar a cabeça para fazer rodar um programa, um script, direto via interface gráfica, simplesmente com um clique. Acabei encontrando a linguagem, mais que natural, do Applescript. A linguagem é tão fácil que algumas coisas óbvias ficam difíceis.

Para criar shell scripts (ou inicialização de algum aplicativo java, como era meu caso), basta o código:

do shell script "/patch/script.sh"

Encontrei na net outro trecho de código simplesmente hilário...

say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo" using "Cellos"

Para quem quiser descobrir mais, aqui segue o manual:

Applescript Reference Manual
Last Updated on Sunday, 08 June 2008 18:30
 
Bookmark and Share

Teclado brasileiro no MacOSX

E-mail Print PDF
Image Reativando meu velho iBook G3, resolvi investir um pouco mais de tempo no brinquedo. Como não serei o usuário direto, estou procurando formas de melhorar seu uso. Entre os problemas que vi, o uso de acentos em português foi o mais gritante.

O suporte nativo é feito através do uso de "special keys" usando combinações. Felizmente encontrei uma alternativa muito melhor, habilitando as "dead-keys":"

http://br.geocities.com/fsc3lfm/br/

No momento teclo a partir do mesmo e tudo (em relação à acentuação) funciona corretamente :-)

Last Updated on Saturday, 17 May 2008 15:49
 
Bookmark and Share

FreeBSD STABLE-7.0 and Laptop Compaq NC6400

E-mail Print PDF

This article is kindly linked by:

http://tuxmobil.org/hp_compaq.html

http://tuxmobil.org/mobile_bsd.html

Image

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/ad4 since 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
Last Updated on Sunday, 12 April 2009 10:28 Read more...
 
Bookmark and Share


Page 8 of 16

Polls

Você encontrou o que procurava nesse site?
 

Syndication

feed-image Feed Entries

Visitors Counter

Hoje12
Ontem32
Semana134
Mês317
Visitantes96484
38.107.191.84

Statistics

Content View Hits : 68954

Random Image

debian_developers.fullsize.jpg