Index ¦ Archives ¦ RSS > Tag: en

Fast clock

Estimated read time: 1 minutes

After upgrading kernel to 2.6.28 my clock measures about 70 mins in an hour, sigh. We are debugging the issue with crazy, but probably it's not a user error, so we'll need to mail the lkml.

I just tried qemu svn, and it's amazing.

qemu-system-ppc -prom-env 'boot-device=cd:,\boot\yaboot\yaboot' -prom-env 'boot-args=conf=cd:,\boot\yaboot\yaboot.conf' -cdrom frugalware-1.0pre2-ppc-net.iso -hda ~/documents/qemu/hda.img

can boot the 1.0pre2 ppc netinstall iso! :)

The current problem is that the network card the machine emulates is not supported by the installer, but that'll be tomorrow's problem.


PPC entry

Estimated read time: 1 minutes

I recently ported our Qemu package to PPC, and just tested that it really works. We have a Linux binary (compiled for i386) for some 'plan making' exercise (inside the AI course at the uni), and of course I wanted to run it on my iBook. And yes, just wrapping the command with qemu-i386 made it work! :)

The other problem I noticed is that building external modules on PPC does not work. It seem to be a known bug. PLD has a patch that changes the error message - to a permission problem. Given that on x86 building a kernel module is possible as a user - the goal would be the same on PPC as well. Not yet resolved...


sudo segfault

Estimated read time: 1 minutes

Quoting a mail I just sent to Miller:

,,It seems I hit a bug in sudo-1.7.0 (at least I can't reproduce it with 1.6.9p17):

$ sudo chown vmiklos /etc/sudoers $ sudo false sudo: /etc/sudoers is owned by uid 1003, should be 0 Segmentation fault

According to gdb, it seem to be a nullpointer-dereference bug, and given that it is reproducible only in case the permission and/or owner is wrong, I don't think it has a security impact. But who knows. ;)''

We'll see how does he handle the problem.


less(1) tweaks

Estimated read time: 1 minutes

First, to allow latin{1,2,whatever} accents in the pager to be non-escaped:

export LESSCHARSET="iso8859"

Second, I use:

# F: quit if input is less then one page
# M: no more-like short prompt
# R: accept colors
# X: don't throw away the output after quit under x
export LESS="FMRX"

Finally to send utf8 and other exotic chars in latin2 to stdout in git (OK, this is not strictly related):

git config i18n.logOutputEncoding latin2

Done!

Old:

Author: Andr??s V??r??sk?<91>i <voroskoi@frugalware.org>

New:

Author: András Vörösk?i <voroskoi@frugalware.org>

You can choose... ;-)


Ideal Git CFLAGS for development

Estimated read time: 1 minutes

This is always an interesting area. The avarage user needs a whole day to test a oneliner patch, just because she never built the software in question, etc. The other end of the line is a regular developer, she modifies the source and she is able to test in seconds.

Regarding git, the testing part is not that hard: I usually work on builtins, so I edit the source code, then type 'make git-foo', and run ./tnumber-desc.sh from the testsuite.

The other part is that you need special compiler flags, since you are interested in extra warnings, debug symbols and such.

The default CFLAGS is defined in the Makefile, which is a tracked file, so modifying that is a no-go. You need 'make configure', then ./configure, and then you can edit config.mak.autogen.

Junio a few days ago mentioned the CFLAGS he uses.

Here comes the interesting part:

CC = ccache cc
CFLAGS = -g -O2 -Wall -Werror -fno-inline -Wold-style-definition -Wdeclaration-after-statement

-Werror so that I'm forced not to ignore warnings, -fno-inline to be able to debug inline functions, and I just stole the two others from Junio.


More lilypond adventures

Estimated read time: 1 minutes

To expand my little lilypond knowledge, I just took an old song and tried to re-create in lilypond. Mostly finished, available here.

Now time to find a working printer to see how does it look like on a real paper. :)


W3C's css validator

Estimated read time: 1 minutes

I wasted almost 8 hours with trying to get it working from CVS, no luck so far.

OK, I'm not a Java wizard, but.. most buildtime and runtime errors can be solved by scanning the list archives, but finally the Apache template engine it uses really can't initialize itself.

I started to debug it, but working with CVS is really a pain, so I want to set up a git mirror first, then hopefully I can send my results till now to the w3c css list, and ask for help.

Sigh. Java is still a pain.


Lilypond and guitar chord arpeggios

Estimated read time: 1 minutes

Of course I have no idea if this is the right name of this stuff, to make long story short, I finally found a workaround to display this beast in lilypond. Yay!

This project is really addictive, you can spend a whole day reading its documentation and you still just say "wow, this and even that is possible with this stufff". ;-)


oprofile

Estimated read time: 2 minutes

I did not have to work with a profiling tool for C so far, so here is my first experience.

The kernel has to have oprofile support (the kernel in Frugalware-current does not have it, I'll add it after 1.0pre2). You'll need a kernel vmlinux file if you want to benchmark the syscalls as well (I did not need this one).

Then there are 3 levels of starting: opcontrol --init/--deinit, --start-daemon/--shutdown and --start/--stop. The first one prepares /dev/profile, the second one starts the deamon, finally the third one start profiling. Obviously the second part does the opposite.

Once you did a --stop, you can get the results. Example output:

$ opreport -l /home/vmiklos/git/git/git /usr/lib/libz.so.1|head
CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
samples  %        app name                 symbol name
22823    56.4898  libz.so.1.2.3            inflate_fast
6019     14.8978  libz.so.1.2.3            adler32
5975     14.7889  libz.so.1.2.3            inflate
4233     10.4772  libz.so.1.2.3            inflate_table
456       1.1287  libz.so.1.2.3            crc32
252       0.6237  git                      patch_delta
55        0.1361  git                      use_pack

which is pretty much what I expected - I did a 'git verify-pack' between --start/--stop, so the time spent with reading the compressed git object database.

TBH I miss a strace/sudo-like simple wrapper as well...


Preparing Frugalware 1.0pre2

Estimated read time: 1 minutes

From today it's "freeze" till 13th. Pootle is funny again, it forces converting the po files to UTF-8, while _not_ converting the headers, so they still say latin2 in case of Hungarian translations, grr.

A guy mailed me for help with my libwpd bindings, but it turned out he wants to use the C# part, so Fridrich just solved his problem in CVS.

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.