Welcome to zewaren.net. This site presents myself and mostly archives the solutions to some problems I once had.

How to get rid of "Warning: using insecure memory" using spamassasin on FreeBSD

Not so frequently asked questions and stuff: 

Situation

You run sa-update periodically and in your logs you get some lousy:

Warning: using insecure memory! 

Fix

The well known fix is to add some option into the gpg configuration file.

The key is to know where to find it:

/usr/local/etc/mail/spamassassin/sa-update-keys/gpg.conf

no-secmem-warning

How to create a rar file with every file matching a pattern (including subdirectories) on Windows

Not so frequently asked questions and stuff: 

Creating the rar file

How to create a rar file with any file matching a pattern (including subdirectories) on Windows.

forfiles /s /m wallet.dat /c "cmd /c echo @relpath" | "c:\Program Files\WinRAR\Rar.exe" a -dh -rr524288 wallets.rar @

RAR 4.20   Copyright (c) 1993-2012 Alexander Roshal   9 Jun 2012
Registered to zewaren

Updating archive wallets.rar

Updating  .\Alphacoin\wallet.dat                                      OK
Updating  .\AmericanCoin\wallet.dat                                   OK
Updating  .\AndroidsToken\wallet.dat                                  OK
Updating  .\Betacoin\wallet.dat                                       OK
Updating  .\Bitcoin\wallet.dat                                        OK
Updating  .\Colossuscoin\wallet.dat                                   OK
Updating  .\digitalcoin\wallet.dat                                    OK
Updating  .\eMark\wallet.dat                                          OK
Updating  .\Fastcoin\wallet.dat                                       OK
Updating  .\Feathercoin\wallet.dat                                    OK
Updating  .\Florincoin\wallet.dat                                     OK
Updating  .\Franko\wallet.dat                                         OK
Updating  .\Gridcoin\wallet.dat                                       OK
Updating  .\IncaKoin\wallet.dat                                       OK
Updating  .\Litecoin\wallet.dat                                       OK
Updating  .\Luckycoin\wallet.dat                                      OK
Updating  .\Namecoin\wallet.dat                                       OK
Updating  .\NetCoin\wallet.dat                                        OK
Updating  .\NovaCoin\wallet.dat                                       OK
Updating  .\Ocoin\wallet.dat                                          OK
Updating  .\Phoenixcoin\wallet.dat                                    OK
Updating  .\PPCoin\wallet.dat                                         OK
Updating  .\Primecoin\wallet.dat                                      OK
Updating  .\Protoshares\wallet.dat                                    OK
Updating  .\Redcoin\wallet.dat                                        OK
Updating  .\RoyalCoin\wallet.dat                                      OK
Updating  .\Terracoin\wallet.dat                                      OK
Updating  .\Worldcoin\wallet.dat                                      OK
Updating  .\YaCoin\wallet.dat                                         OK
Updating  .\Sexcoin\wallet.dat                                        OK
Done

This example will find any file named wallet.dat and include it in the rar file. You can use wildchars in the pattern.

This will preserve the directory structure.

-dh allows you to add files that are in use by another process.

-rr524288 adds a recovery record to the archive, with the maximum number of sectors (never too cautious).

Checking the rar file

"c:\Program Files\WinRAR\Rar.exe" vb wallets.rar
Alphacoin\wallet.dat
AmericanCoin\wallet.dat
AndroidsToken\wallet.dat
Betacoin\wallet.dat
Bitcoin\wallet.dat
Colossuscoin\wallet.dat
digitalcoin\wallet.dat
eMark\wallet.dat
Fastcoin\wallet.dat
Feathercoin\wallet.dat
Florincoin\wallet.dat
Franko\wallet.dat
Gridcoin\wallet.dat
IncaKoin\wallet.dat
Litecoin\wallet.dat
Luckycoin\wallet.dat
Namecoin\wallet.dat
NetCoin\wallet.dat
NovaCoin\wallet.dat
Ocoin\wallet.dat
Phoenixcoin\wallet.dat
PPCoin\wallet.dat
Primecoin\wallet.dat
Protoshares\wallet.dat
Redcoin\wallet.dat
RoyalCoin\wallet.dat
Terracoin\wallet.dat
Worldcoin\wallet.dat
YaCoin\wallet.dat
Sexcoin\wallet.dat

Image

How to change the icon, version or another resource of Windows executables built with PAR::Packer

Not so frequently asked questions and stuff: 

Situation

You're using PAR::Packer to create a nice Windows executable out of one of your perl script.

However, the --info and --icon switch aren't working. You might also want to embed some other resource into your executable.

Trying the usual methods

exe_update.pl

exe_update --icon=jambon.ico jambon.exe

exe_update does not work with PAR::Packer executable. It will destroy your file.

ResHacker

ResHacker.exe -modify       "jambon.exe", "jambon.exe", "jambon.ico", ICONGROUP, WINEXE, 0
ResHacker.exe -delete       "jambon.exe", "jambon.exe", versioninfo,1,
ResHacker.exe -addoverwrite "jambon.exe", "jambon.exe", "jambon\version_info.res", versioninfo,1,

ResHacker will edit the resource of your file correctly. However, the executable will error when launching since its signature has changed. This is not acceptable.

Where the icon and version comes from

When built statically, a pp compiled executable is made of data stored in Static.pm, which is made from Static.in and boot.exe. This boot.exe file is the one that contains the final resources.

The resources used to build this file are located in cpan\build\PAR-Packer-1.015-?????\myldr\winres. Modifying these files and rebuilding boot.exe will allow you to change your final executable resources.

The ugly solution that works

Before packing your perl script, rebuild boot.exe with your custom information.

This can easily be automated using a makefile, like this one:

PERL_DIR = C:\StupidPrograms\strawberryperl\perl
PAR_PACKER_SRC = C:\StupidPrograms\strawberryperl\cpan\build\PAR-Packer-1.015-2TLZDS

all:
   copy /Y medias\jambon.ico $(PAR_PACKER_SRC)\myldr\winres\pp.ico
 copy /Y medias\jambon.rc $(PAR_PACKER_SRC)\myldr\winres\pp.rc
   del $(PAR_PACKER_SRC)\myldr\ppresource.coff
   cd /D $(PAR_PACKER_SRC)\myldr\ && perl Makefile.PL
    cd /D $(PAR_PACKER_SRC)\myldr\ && dmake boot.exe
  cd /D $(PAR_PACKER_SRC)\myldr\ && dmake Static.pm
 attrib -R $(PERL_DIR)\site\lib\PAR\StrippedPARL\Static.pm
  copy /Y $(PAR_PACKER_SRC)\myldr\Static.pm $(PERL_DIR)\site\lib\PAR\StrippedPARL\Static.pm

    pp -o jambon.exe -f PodStrip -f Bleach -f Obfuscate --compress=9 jambon.pl

Your perl installation might be different than mine, so you'll want to adapt the scripts.

This solution is quite ugly, but it does work.

How to restart dwm.exe on Windows 8 because it take too much memory

Not so frequently asked questions and stuff: 

Situation

If you're like me, you seldom restart your desktop computers.

When using Windows 8, I noticed that after a few weeks, the Desktop Window Manager process (C:\Windows\System32\dwm.exe) was taking over a gigabyte of memory. I like my memory, but not when it's used to create memory leaks.

Solution

Kill it with fire.

Using Process Explorer

  1. Start Process Explorer as administrator.
  2. Kill explorer.exe.
  3. Suspend winlogon.exe.
  4. Kill dwm.exe.
  5. Resume winlogon.exe.
  6. Start explorer.exe.

Using command line

taskkill /IM explorer.exe /F
pssuspend.exe winlogon.exe
taskkill /IM dwm.exe /F
pssuspend.exe -r winlogon.exe
dwm.exe
explorer.exe

Do NOT do this when logged in remotely using remote desktop.

BeagleBone Black, FreeBSD and GPIOs

Not so frequently asked questions and stuff: 

The LEDs of a BeagleBone Black running FreeBSD are lighten up.The FreeBSD logo

Introduction

The BeagleBone black, using its AM335X CPU, provides a number of GPIOs. Let's try to make them work.

Trying to find the device

dmesg indicates that the kernel found a GPIO device.

gpio0:  mem 0x44e07000-0x44e07fff,0x4804c000-0x4804cfff,0x481ac000-0x481acfff,0x481ae000-0x481aefff irq 96,97,98,99,32,33,62,63 on simplebus0
gpioc0:  on gpio0
gpiobus0:  on gpio0

devinfo and ofwdump confirm that the corresponding nodes exist.

# devinfo
nexus0
  fdtbus0
    simplebus0
      aintc0
      ti_scm0
      am335x_prcm0
      am335x_dmtimer0
      gpio0
        gpioc0
        gpiobus0
      uart0
      ti_edma30
      sdhci_ti0
        mmc0
          mmcsd0
      sdhci_ti1
        mmc1
          mmcsd1
      cpsw0
        miibus0
          smscphy0
      iichb0
        iicbus0
          iic0
          am335x_pmic0
      am335x_pwm0
      am335x_pwm1
      am335x_pwm2
      musbotg0
        usbus0
          uhub0
            ustorage_fs0
        usbus1
          uhub1


# ofwdump -a
Node 0x38:
  Node 0xc4: am335x
    Node 0x124: interrupt-controller@48200000
    Node 0x1b4: scm@44e10000
    Node 0xb24: prcm@44E00000
    Node 0xb88: dmtimers@44E05000
    Node 0xc6c: gpio
    Node 0xd14: serial@44E09000
    Node 0xda8: serial@48022000
    Node 0xe54: serial@48024000
    Node 0xf00: serial@481a6000
    Node 0xfac: serial@481a8000
    Node 0x1058: serial@481aa000
    Node 0x1104: edma3@49000000
    Node 0x1188: mmchs0@48060000
    Node 0x120c: mmchs1@481D8000
    Node 0x12a4: ethernet@4A100000
      Node 0x1340: mdio@0
        Node 0x1388: ethernet-phy@0
    Node 0x13c8: i2c@44e0b000
      Node 0x1454: pmic@24
    Node 0x1494: pwm@48300000
    Node 0x1548: pwm@48302000
    Node 0x15fc: pwm@48304000
    Node 0x16b0: lcd@4830e000
    Node 0x1738: usb@47400000
    Node 0x1808: mbox0@480C8000
    Node 0x1874: spinlock0@480CA000
    Node 0x18c0: pruss@4A300000
  Node 0x1944: aliases
  Node 0x198c: memory
  Node 0x19c4: chosen

# ofwdump -p /am335x/gpio
Node 0xc6c: gpio
  #gpio-cells:
    00 00 00 03
  compatible:
    74 69 2c 67 70 69 6f 00
    'ti,gpio'
  gpio-controller:
  reg:
    44 e0 70 00 00 00 10 00 48 04 c0 00 00 00 10 00 48 1a c0 00
    00 00 10 00 48 1a e0 00 00 00 10 00
  interrupts:
    00 00 00 60 00 00 00 61 00 00 00 62 00 00 00 63 00 00 00 20
    00 00 00 21 00 00 00 3e 00 00 00 3f
  interrupt-parent:
    00 00 00 01

Using the device

Reading the kernel source code indicates that the GPIOs are used with a tool called gpioctl.

Listing the available IOs shows that some of them are already configured.

# gpioctl -f /dev/gpioc0 -l
pin 00: 0       gpio_0
pin 01: 0       gpio_1
pin 02: 0       gpio_2
pin 03: 0       gpio_3
pin 04: 0       gpio_4
pin 05: 0       gpio_5
pin 06: 0       gpio_6
pin 07: 0       gpio_7
pin 08: 0       gpio_8
pin 09: 0       gpio_9
pin 10: 0       gpio_10
pin 11: 0       gpio_11
pin 12: 0       gpio_12
pin 13: 0       gpio_13
pin 14: 0       gpio_14
pin 15: 0       gpio_15
pin 16: 0       gpio_16
pin 17: 0       gpio_17
pin 18: 0       gpio_18
pin 19: 0       gpio_19
pin 20: 0       gpio_20
pin 21: 0       gpio_21
pin 22: 0       gpio_22
pin 23: 0       gpio_23
pin 24: 0       gpio_24
pin 25: 0       gpio_25
pin 26: 0       gpio_26
pin 27: 0       gpio_27
pin 28: 0       gpio_28
pin 29: 0       gpio_29
pin 30: 0       gpio_30
pin 31: 0       gpio_31
pin 32: 0       gpio_32
pin 33: 0       gpio_33
pin 34: 0       gpio_34
pin 35: 0       gpio_35
pin 36: 0       gpio_36
pin 37: 0       gpio_37
pin 38: 0       gpio_38
pin 39: 0       gpio_39
pin 40: 0       gpio_40
pin 41: 0       gpio_41
pin 42: 0       gpio_42
pin 43: 0       gpio_43
pin 44: 0       gpio_44
pin 45: 0       gpio_45
pin 46: 0       gpio_46
pin 47: 0       gpio_47
pin 48: 0       gpio_48
pin 49: 0       gpio_49
pin 50: 0       gpio_50
pin 51: 0       gpio_51
pin 52: 0       gpio_52
pin 53: 0       gpio_53
pin 54: 0       gpio_54
pin 55: 0       gpio_55
pin 56: 0       gpio_56
pin 57: 0       gpio_57
pin 58: 0       gpio_58
pin 59: 0       gpio_59
pin 60: 0       gpio_60
pin 61: 0       gpio_61
pin 62: 0       gpio_62
pin 63: 0       gpio_63
pin 64: 0       gpio_64
pin 65: 0       gpio_65
pin 66: 0       gpio_66
pin 67: 0       gpio_67
pin 68: 0       gpio_68
pin 69: 0       gpio_69
pin 70: 0       gpio_70
pin 71: 0       gpio_71
pin 72: 0       gpio_72
pin 73: 0       gpio_73
pin 74: 0       gpio_74
pin 75: 0       gpio_75
pin 76: 0       gpio_76
pin 77: 0       gpio_77
pin 78: 0       gpio_78
pin 79: 0       gpio_79
pin 80: 0       gpio_80
pin 81: 0       gpio_81
pin 82: 0       gpio_82
pin 83: 0       gpio_83
pin 84: 0       gpio_84
pin 85: 0       gpio_85
pin 86: 0       gpio_86
pin 87: 0       gpio_87
pin 88: 0       gpio_88
pin 89: 0       gpio_89
pin 90: 0       gpio_90
pin 91: 0       gpio_91
pin 92: 0       gpio_92
pin 93: 0       gpio_93
pin 94: 0       gpio_94
pin 95: 0       gpio_95
pin 96: 0       gpio_96
pin 97: 0       gpio_97
pin 98: 0       gpio_98
pin 99: 0       gpio_99
pin 100:        0       gpio_100
pin 101:        0       gpio_101
pin 102:        0       gpio_102
pin 103:        0       gpio_103
pin 104:        0       gpio_104
pin 105:        0       gpio_105
pin 106:        0       gpio_106
pin 107:        0       gpio_107
pin 108:        0       gpio_108
pin 109:        0       gpio_109
pin 110:        0       gpio_110
pin 111:        0       gpio_111
pin 112:        0       gpio_112
pin 113:        0       gpio_113
pin 114:        0       gpio_114
pin 115:        0       gpio_115
pin 116:        0       gpio_116
pin 117:        0       gpio_117
pin 118:        0       gpio_118
pin 119:        0       gpio_119
pin 120:        0       gpio_120
pin 121:        0       gpio_121
pin 122:        0       gpio_122
pin 123:        0       gpio_123
pin 124:        0       gpio_124
pin 125:        0       gpio_125
pin 126:        0       gpio_126
pin 127:        0       gpio_127

Let's try to play with the board's 4 builtin LEDs.

# gpioctl -f /dev/gpioc0 -t 53
# gpioctl -f /dev/gpioc0 -t 54
# gpioctl -f /dev/gpioc0 -t 55
# gpioctl -f /dev/gpioc0 -t 56

Yep, they work.

Let's try configure another random IO.

# gpioctl -f /dev/gpioc0 -c 49 OUT OD
0/OUT
1/OD

GPIO1_17 (P9.23) should be configured as an open-drain output pin. Let's try to change its value.

root@beaglebone:~ # while 1
while? gpioctl -f /dev/gpioc0 -t 49
while? sleep 1
while? end
^C

We created a very slow bit-banged PWM.

Reference and relevant information

BeagleBone Black, FreeBSD and PWMs

Not so frequently asked questions and stuff: 

Two PWM output from a BeagleBone Black running FreeBSDThe FreeBSD logo

Introduction

The BeagleBone black, using its AM335X CPU, provides a number of PWM output. Let's try to make them work.

Trying to find the device

dmesg indicates that the kernel found 3 PWM devices.

am335x_pwm0:  mem 0x48300000-0x483000ff,0x48300100-0x4830017f,0x48300180-0x483001ff,0x48300200-0x4830025f irq 86,58 on simplebus0
am335x_pwm1:  mem 0x48302000-0x483020ff,0x48302100-0x4830217f,0x48302180-0x483021ff,0x48302200-0x4830225f irq 87,59 on simplebus0
am335x_pwm2:  mem 0x48304000-0x483040ff,0x48304100-0x4830417f,0x48304180-0x483041ff,0x48304200-0x4830425f irq 88,60 on simplebus0

devinfo and ofwdump confirm that the corresponding nodes exist.

# devinfo
nexus0
  fdtbus0
    simplebus0
      aintc0
      ti_scm0
      am335x_prcm0
      am335x_dmtimer0
      gpio0
        gpioc0
        gpiobus0
      uart0
      ti_edma30
      sdhci_ti0
        mmc0
          mmcsd0
      sdhci_ti1
        mmc1
          mmcsd1
      cpsw0
        miibus0
          smscphy0
      iichb0
        iicbus0
          iic0
          am335x_pmic0
      am335x_pwm0
      am335x_pwm1
      am335x_pwm2
      musbotg0
        usbus0
          uhub0
            ustorage_fs0
        usbus1
          uhub1


# ofwdump -a
Node 0x38:
  Node 0xc4: am335x
    Node 0x124: interrupt-controller@48200000
    Node 0x1b4: scm@44e10000
    Node 0xb24: prcm@44E00000
    Node 0xb88: dmtimers@44E05000
    Node 0xc6c: gpio
    Node 0xd14: serial@44E09000
    Node 0xda8: serial@48022000
    Node 0xe54: serial@48024000
    Node 0xf00: serial@481a6000
    Node 0xfac: serial@481a8000
    Node 0x1058: serial@481aa000
    Node 0x1104: edma3@49000000
    Node 0x1188: mmchs0@48060000
    Node 0x120c: mmchs1@481D8000
    Node 0x12a4: ethernet@4A100000
      Node 0x1340: mdio@0
        Node 0x1388: ethernet-phy@0
    Node 0x13c8: i2c@44e0b000
      Node 0x1454: pmic@24
    Node 0x1494: pwm@48300000
    Node 0x1548: pwm@48302000
    Node 0x15fc: pwm@48304000
    Node 0x16b0: lcd@4830e000
    Node 0x1738: usb@47400000
    Node 0x1808: mbox0@480C8000
    Node 0x1874: spinlock0@480CA000
    Node 0x18c0: pruss@4A300000
  Node 0x1944: aliases
  Node 0x198c: memory
  Node 0x19c4: chosen

# ofwdump -p /am335x/pwm@48300000
Node 0x1494: pwm@48300000
  compatible:
    74 69 2c 61 6d 33 33 35 78 2d 70 77 6d 00
    'ti,am335x-pwm'
  #address-cells:
    00 00 00 01
  #size-cells:
    00 00 00 01
  reg:
    48 30 00 00 00 00 01 00 48 30 01 00 00 00 00 80 48 30 01 80
    00 00 00 80 48 30 02 00 00 00 00 60
  interrupts:
    00 00 00 56 00 00 00 3a
  interrupt-parent:
    00 00 00 01
  pwm-device-id:
    00 00 00 00

Using the device

There doesn't seem to be much documentation on how to use these devices.

Reading the kernel indicates that the configuration is done using sysctl.

# sysctl -a | grep pwm
"Giant","am335x_pwm softc"
dev.am335x_pwm.0.%desc: AM335x PWM
dev.am335x_pwm.0.%driver: am335x_pwm
dev.am335x_pwm.0.%parent: simplebus0
dev.am335x_pwm.0.period: 1000
dev.am335x_pwm.0.dutyA: 0
dev.am335x_pwm.0.dutyB: 0
dev.am335x_pwm.1.%desc: AM335x PWM
dev.am335x_pwm.1.%driver: am335x_pwm
dev.am335x_pwm.1.%parent: simplebus0
dev.am335x_pwm.1.period: 1000
dev.am335x_pwm.1.dutyA: 0
dev.am335x_pwm.1.dutyB: 0
dev.am335x_pwm.2.%desc: AM335x PWM
dev.am335x_pwm.2.%driver: am335x_pwm
dev.am335x_pwm.2.%parent: simplebus0
dev.am335x_pwm.2.period: 1000
dev.am335x_pwm.2.dutyA: 0
dev.am335x_pwm.2.dutyB: 0

Jackpot! Let's try settings some values in these registers.

# sysctl dev.am335x_pwm.0.period=100
# sysctl dev.am335x_pwm.0.dutyA=50
# sysctl dev.am335x_pwm.0.dutyB=75
# sysctl dev.am335x_pwm.1.period=1000
# sysctl dev.am335x_pwm.1.dutyA=500
# sysctl dev.am335x_pwm.1.dutyB=50
# sysctl dev.am335x_pwm.2.period=250
# sysctl dev.am335x_pwm.2.dutyA=50
# sysctl dev.am335x_pwm.2.dutyB=150

That's it. Probing the pins confirms that the PWM work.

Pin mapping and muxing

Device Pin
sysctl dev.am335x_pwm.1.dutyA P9.14 (ehrpwm1A)
sysctl dev.am335x_pwm.1.dutyB P9.16 (ehrpwm1B)
sysctl dev.am335x_pwm.2.dutyA P8.19 (ehrpwm2A)
sysctl dev.am335x_pwm.2.dutyB P8.13 (ehrpwm2B)

ehrpwm0 is not muxed in the device tree file, so it's not accessible.

Reference and relevant information

nRF24L01 and STM8S microcontrollers

Not so frequently asked questions and stuff: 

Same article in French here.

RF24L01 et STM8S
Two RF24L01 and STM8S.

Introduction

It's very easy to buy on ebay or elsewhere some 2.4 GHz RF transceiver using the Nordic RF24L01 chip, ranging around $3. Let's test a couple of them with two STM8S microcontrollers.

We'll use some dev boards from STM: the STM8SVLDISCOVERY. It includes a STM8S003K3 controller with a USB programmer. That's everything we need to make the stuff work without any soldering.

Getting used to the RF module

Des trames SPI entre un STM8S et un RF42L01.
SPI signals between a STM8S and a RF24L01.

We interact with the RF24L01 using a standard SPI link. (CS/CLK/MISO/MOSI). One GPIO (CE) allows switching between the STANDBY and active SEND/RECEIVE modes. Another one (IRQ) allows us to know when something important happens (packet received, packet sent, packet sent but lost).

The module works with 1 to 32 byte packets. It automatically handles reassembling them on the reception side, and re-emit them when they are lost. It also includes some CRC code to be sure the data is valid. Many other options are available, so read the datasheet to get stars in your eyes.

The module is not full duplex, so you have to alternate between send and receive modes.

Wiring

RF24L01_module_pineout

We'll interface the module as following (see the application note in the datasheet):

Pin Signal Description?
1 (square) GND Ground
2 VCC 3.3V
3 CE Sends data or enable receiving
4 CSN SPI Chip Select
5 SCK SPI Clock
6 MOSI Master data
7 MISO Module Data
8 IRQ Module interruption flag

We connected the two component this way:

STM8S Side 24L01 Side
PC3 CE
PC4 CSN
PC7 MISO
PC6 MOSI
PC5 SCK
PC2 IRQ

Code example

The example code we wrote send two 32 bit integers from the master to the slave. Then the slave effectuates the basic math operations and sends the results.

This kind of example allows you to be sure that the byte stream is reassembled correctly (watch your byte sex is you use another platform), and that the packets are the right ones (i.e. that you get the latest and not the penultimate one or one stored something in a FIFO or a buffer).

The code was written using IAR workbench for STM 1.40.1.

It is available on GitHub here.

License: MIT.

Range testing

We tested the range of the module. We measured a range of about one hundred meters outside. The range inside is obviously less.

Conclusion: for their price, theses modules are great.

OLE: How to be sure Excel recalculates your cells after you did things to them

Not so frequently asked questions and stuff: 

Situation

If you edit cells in VBA/OLE, you might want to have the whole workbook recalculated, so that you can extract data from it. This is especially true if your cells include cross-sheet formulas.

Things to try

How to get ubuntu 8.04 working with the DigiPoS "Toccare" Bezel Free Touch Screen

Not so frequently asked questions and stuff: 

Situation

Trying to use a DigiPoS "Toccare" Bezel Free Touch Screen with ubuntu 8.04.

Elements:

  • The graphic chipset of the PC is an intel GMA 3150.
  • The intel driver is too recent for ubuntu 8.04, so the only driver that works is the old vesa.
  • The resolution is limited to 800x600, but both the chipset and the screen support 1024x768.

Configuration

Find the correct Modeline using gtf.

# gtf 1024 768 60

You will have to configure xorg manually.

Here are the relevant parts of xorg.conf

Section "Monitor"
        Identifier      "Configured Monitor"
        Vendorname      "Plug 'n' Play"
        Modelname       "Plug 'n' Play"
        HorizSync 31.47-60.02
        VertRefresh 56-75
       Modeline "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync
        Gamma   1.0
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "Configured Video Device"
        Monitor         "Configured Monitor"
        Defaultdepth    16
        SubSection "Display"
                Depth   16
                Virtual 1024    768
                Modes           "1024x768@60" "800x600@60" "640x480@60"
        EndSubSection
EndSection

You can find the synchronization frequencies in the screen datasheet.

Boot the BIOS update tools of Intel's D525MW using PXE

AttachmentSize
Package icon pxe-bios-intel-MWPNT10N.86A.zip1.97 MB

The system used here is a FreeBSD 9.1 Release.

Create the image:

You will need:

  • MWPNT10N.86A.0131.BI.ZIP (or newer)
  • FreeDOS
fetch ftp://ftp.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdboot.img
fetch http://downloadmirror.intel.com/22424/eng/MWPNT10N.86A.0131.BI.ZIP

Mount the FreeDOS image:

mkdir fdboot ourimage
mdconfig -a -t vnode -f fdboot.img -u 0
mount_msdosfs /dev/md0 fdboot

Create and mount a 3MB fat image:

dd if=/dev/zero of=ourimage.img bs=1M count=3
mdconfig -a -t vnode -f ourimage.img
newfs_msdos /dev/md1
mount_msdosfs /dev/md1 ourimage

Copy the FreeDOS files and the CD contents to the newly created image disk:

cp -r fdboot/* ourimage/
mkdir ourimage/intel
unzip -d ourimage/intel/ MWPNT10N.86A.0131.BI.ZIP

Umount eveything:

umount ourimage
umount fdboot
mdconfig -d -u 0
mdconfig -d -u 1

Copy the boot sector from the original FreeDOS image to ours:

dd if=fdboot.img of=ourimage.img bs=1 count=446 seek=62 skip=62 conv=notrunc

Boot the image:

What you need:

  • pxelinux.0
  • memdisk
  • pxelinux's config file (pxelinux.cfg/default):
    DEFAULT msi_bios
    
    LABEL msi_bios
      KERNEL memdisk
      INITRD ourimage.img
    

Boot your computer, start FreeDOS and run the BIOS update utility from the MSI folder.

Sources:

Pages

Subscribe to Front page feed