1. Coreboot is awesome

    Two weeks ago I was updating Award BIOS on Alix.1c board and failed — computer bricked :(

    But there was a way to get it to working state again — PC Engines (vendor or Alix boards) has LPC1a adapter with extra BIOS chip. I contacted them and few days later it arrived here (I will send it back as it is loaned).

    Use is simple: plug into LPC connector, boot machine, reprogram on-board flash chip, power off, unplug lpc1a, power on. But I decided to make a use of it and decided to migrate from Award BIOS to coreboot with some extra payload.

    As I use only Linux on Alix I tried FILO first. It booted to prompt but refused to see files on CompactFlash card. GRUB v2 supports coreboot but did not run so I tried SeaBIOS instead. And that was it — clean, fast boot to GRUB from CF card.

    There is one problem which I did not solved yet: VGA BIOS rom does not work for me. But I will rather do not spend time on it as framebuffer under Linux works without it and I do not plan to run FreeDOS or other systems which would do VGA BIOS calls. Other option is to use SGABIOS which redirects input/output from video card to serial port — works fine.

    But the nicest moment was still before me. When I disabled all debug output in coreboot and SeaBIOS I got HUGE improvement in boot time. Linux was loading in a time which previously was needed for Award BIOS to make a beep sound…

    Written by Marcin Juszkiewicz on
  2. I am not a filesystem expert

    Dear fsck

    I am not a filesystem expert so when you said to me “filesystem has errors, please run me without -a -p options” I did that. But then you gave me some numbers asked question which I did not had a chance to understand (even Google query did not helped) so I dig for my dusted normal user hat and pressed “Enter” key. Then again and again and again and then I just looked for something heavy and put it on keyboard so you will stop interrupting and just do your work.

    So can you just do what you can next time instead of asking me to keep “Enter” key like any other monkey? That heavy object was hedgehog made by my lovely daughter and I prefer to not use for things like that.

    Sincerely yours, Marcin

    Written by Marcin Juszkiewicz on
  3. Is designing UI simple with Qt?

    I use Qt on my devices since my first LinuxPDA: Sharp Zaurus SL5000 on which I used OpenZaurus with OPIE as primary environment. It was based on Qt/Embedded 2.3.x and was looking ok. UI of most applications work properly in both portrait and landscape modes, adapted to size of fonts (I used smaller then default ones).

    Then Zaurus c760 arrived at my place and I did some UI code tweaks to make everything looking better on VGA screen (not that it looked wrong — I just improved few things). At that time I had nearly every Zaurus model in hands and took care to make all looks proper in both orientations.

    From time to time I was also playing with 3rdparty applications to adapt them to resolutions higher then QVGA (which was sort of standard in palmtops of that era). Usually loading UI files into Qt Designer and reordering them or adding layouts helped. One of them was Mileage which required adding huge amount of layout elements just to make it look properly (all elements were put as X,Y positions originally).

    Some time later I moved to GTK/X11 based environments on portable devices and later my cellphones took PDA place.

    But with Nokia N900 I decided to go back to programming with Qt - 4.6 version this time. First was my module player (which I probably never end) and some time later I decided to play a bit with Vexed released by Paul Romanchenko (rmrfchik on #maemo) where I reorganized UI a bit, added portrait support and did few other tweaks.

    But then I switched to ApMeFo and while idea of application is good the UI is disaster:

    • tabs in main window
    • lack of portrait support
    • unusable UI when forced to portrait mode
    • use of non standard button sizes
    • use of non standard font sizes

    And sources lacked UI files… So one day I decided that it will be good occasion to learn something new. Author was not responding to my sources request so I launched Qt Designer and started to recreate UI from scratch — using existing sources as information what kind of widgets were used. Took me some time but I got new, a bit improved UI which even worked in portrait mode:

    UI in portrait mode
    UI in portrait mode

    But it still was not what I wanted. It still had tabs and small buttons… First I got rid of tabs:

    UI without tabs
    UI without tabs

    Rest of functionality was moved to menu and separate window:

    separate window
    separate window

    I was not too proud of it. OK, it looked better, I even changed some non-UI code but it still was not what I wanted to achieve. But at least I had something what I could give to users for testing.

    How does it look now? Let me show not yet published version:

    First main window — all buttons are finger friendly. I also grouped them a bit — it is visible in portrait mode which is also great when user want to re-order items.

    Main window
    Main window
    Main window in portrait
    Main window in portrait

    Dialog to select applications to add got some changes too. It is maybe not conform with UI style guide (OK not under but on right) but it gave me extra line in list widget. Think of multi selection…

    Add application dialog
    Add application dialog

    As you see (de)activation and folders are now in menu. (De)Activation has also Yes/No requesters :)


    Folders window is place which needs lot of work. Only delete works now (also with Yes/No requester).

    Folders window
    Folders window
    Folders window in portrait
    Folders window in portrait

    List of things to do is long as users suggested many things. I probably will not add most of them because so far I did not checked how exactly ApMeFo works but once I will read rest of source code I think that something good will come from it.

    And is designing UI simple with Qt? I think that it is — developer does not have to worry what kind of paddings are needed to be used, how to place widgets to make UI conform to style guide rules etc. Once you do design with layout elements application adapts itself to what is available.

    Written by Marcin Juszkiewicz on
  4. Few hints for chroot users

    During last months I used chroot functionality many times — mostly to test my cross compilers in clean environment. In that time I collected list of hints for having less work.

    • Use APT proxy. I am using APT-Cacher NG for all my machines and chroots. This allows for APT lines like http://localhost:3142/pl.archive.ubuntu.com/ubuntu and gives 30MB/s download speed when I need to install something.
    • Disable installing of recommended packages. Most of time I do not need those and installing “texlive-extra-doc” takes precious megabytes. Just create /etc/apt/apt.conf.d/99-no-extra file with:

    APT::Install-Recommends “0”; APT::Install-Suggests “0”;

    • Mount /proc, /dev, /dev/pts filesystems — some packages depend on them during installation.
    • Set locale to “C” — simple export LC_ALL=C is enough. Otherwise applications will complain about missing l18n informations.
    • Create user with same UID/GID as your host one and use it for any work — will allow to use editors from host system to edit files.
    • Kill each daemon which started after installation — who needs several Samba daemons on one machine?
    Written by Marcin Juszkiewicz on
  5. Ubuntu cross compilers - part 2

    Two months ago I wrote about cross compilers for Ubuntu. Lot of things changes since then:

    1. I am able to bootstrap ARM targeting cross compiler using Ubuntu build machines (so no manual steps).
    2. Packages are now available in my Armel cross compilers PPA repository. My repository at people.canonical.com is still operational but will not be updated anymore.
    3. Source of my packages with whole history is available in GIT repository.
    4. Bug was filled to get those packages imported into Ubuntu archive. And it got accepted by Ubuntu Release Team! So expect ARM cross compiler packages soon in Maverick :)

    What next? Improvements of course. Recently Al Viro got Debian/Ubuntu gcc packages working for biarch/triarch architectures (think: powerpc, mips, s390) so in free time I will take a look to make powerpc cross compiler (require some work).

    Other thing will be merging my packages into Debian. This will take more time because kernel recipes needs to be changed for it and Debian is not only Linux…

    UPDATE: armel cross-compiler packages are available in Ubuntu 10.10 ‘maverick’ and newer. To install them you need to run apt-get install gcc-arm-linux-gnueabi (substitute ‘gcc’ with ‘g‘ or ‘gfortran’ or ‘gobjc’ or ‘gobcj‘ if needed). Other repositories were taken down and will not return.

    Written by Marcin Juszkiewicz on
  6. Switched from Catorise to ApMeFo

    Maemo5 (which is running on Nokia N900) has application launcher which by default lists all entries in some kind of order. There is a way to move icons but when you have too many of them it becomes not comfortable enough to use.

    There are few ways of dealing with it. First was MyMenu application, then Catorise got born and some time later ApMeFo arrived on scene. Few months ago I installed Catorise, hacked it a bit (and got my changes merged) and it was fine. Automatic sorting of applications worked fine, there was a way to force icons to be placed in other categories then default given. Someone even wrote GUI for moving icons from folder to another.

    But there was also thing which I started to miss one day — no way to create own categories. Or at least I did not found such one. So I asked on IRC one day and got suggestion to try ApMeFo.

    Installed, started GUI and WTF!?! Interface was (still is) disaster. Uninstalled it but promised to get back to it after vacations. And I did. I even keep it installed and use it. But let’s start from beginning.

    How did I moved from Catorise to ApMeFo? First made a backup of setup so I could check which application was in which category. Then used ApMeFo to create basic folders and added one app into each of them. Next step was in ViM where I edited all sub menu files to contain entries from Catorise setup, edited order, moved some into other categories.

    Now I am waiting for ApMeFo author to return from his vacations as I would like to improve UI a bit but sources present in ‘Extras’ repository are not complete (files are generated from *.ui files saved by Qt Designer).

    Written by Marcin Juszkiewicz on
  7. Today is GPRS day

    I wake up quarter past 6 in the morning. Some time later went to my desktop to check does something happened during night. Usually it means IRC highlights or new emails but today it was something other: network outage.

    OK, I told — there are other things to do like buying train tickets, making few calls, breakfast etc. But I returned home 2 hours later and situation did not changed. Cable modem still blinks with “DS” led… After call to isp (UPC) I got information that there are some modernization works in progress and will be ended at the end of hour. But hour later it was still “at the end of current hour”…

    As I had to be at work I took my Nokia N900 from pocket and launched X-Chat to give network outage information to my coworkers. And started to think how to fix situation…

    Lack of sleeping seats in train forced me to change train so I will take my laptop with me to be in contact during trip. So I had to learn how to use N900 as modem anyway.

    So how to do it? Thanks to blog post by Marius Gedminas I had easy way. As I prefer to not have cables hanging and like to have more battery power I had to limit myself to BlueTooth.

    Nokia N900 side: installed “bluetooth-dun” package which starts “dund” so “Dial-Up Networking” appears in list of offered services.

    Desktop side: BlueDevil detected phone but handles only OBEX and Audio profile ;( Thanks to one of comments on Marius’s blog post I installed “blueman” and used it to connect to N900/DUN service. This allowed me to use NetworkManager to connect to internet.

    Laptop side: Also BlueDevil and “blueman” are installed but I did not used them. Instead I altered default routing and got crazy setup: laptop -wifi-> router -ethernet-> desktop -bluetooth-> n900 -gprs-> internet.

    Setup works properly. Modem still blinks with “DS” led…

    Written by Marcin Juszkiewicz on
  8. 25th anniversary of Commodore Amiga

    When I was walking though Prague with my beloved wife the world was celebrating 25th anniversary of Commodore Amiga.

    First time I met Amiga in early 90’s. My friends had Amiga 500/500+ models and another one (Rafał Kotyński) just bought Amiga 1200 to replace ageing Commodore 64. And due to him I got impressed by power of AmigaOS and how much things could be done on limited resources.

    In September 1995 I bought Amiga 600. It was old at that time but allowed to connect hard drive which I bought on 10th October same year. Why I remember that date? My A600 lacked RTC so each time I booted system it set date of creation of system partition as current one. With 1MB of RAM and ~400MB of storage it was nice platform to learn programming.

    My first application was written in High Speed Pascal and it was very simple antivirus as lot of my files was infected with “Happy New Year 1996” crap. I remember that I compared clean and infected file, disassembled both and removed all entries to virus code. Some time later I got Virus-Z and it cured whole system.

    After few years I sold a bit upgraded version (2MB ram) and kept hard drive for Amiga 1200 model. New hardware, new possibilities. Faster cpu, more graphics capabilities which I did not used because my primary display was still 12” green monitor which I used with my 8bit Atari 65XE in a past. 704x260 resolution was not so great so when something got broken again I bought “new” display for my machine: 14” vga mono monitor. Move to 720x480 in 16 shades of grey was big change.


    I selected all shades to follow MagicWB colour scheme as much as it was possible and converted wallpapers using script in ADPro. Effect was nice and usable.

    For most of time I used this computer for programming, entertainment and many others but games (which for many people were main reason to buy Amiga) never took most of my time. There were two exceptions: Civilisation and Angband (including variants). Those took me hours and hours.

    What I liked in Amiga was operating system. When it appeared on market there was MacOS, Atari TOS and Microsoft did not yet had usable Windows released. Many things were great:

    • multitasking — before it was only in Unix systems
    • DataTypes (think “codecs” for any kind of data — open/save files in different formats without having to use lot of libraries)
    • localisation — currently *.po files shows that idea was right
    • flexible partitioning scheme - no /dev/sdaX, no C: but partitions which could have own names (DH0: by default, SH0: on my system) and filesystem labels (Boocik:, Szafa: were what I used)
    • Magic User Interface toolkit — user could configure look & feel at a level which no other UI toolkit ever provided
    • assigns — all fonts resided in Fonts: but this could be a list of directories (something like $PATH but more advanced)
    • ability to replace any library call with own code — this gave a possibility to improve system behaviour in a ways which authors never thought about
    • screens — hard to describe for those which never used — extra desktops for use with applications does not even give half of it
    • RAM disk which took only required amount of memory
    • Reset proof fixed size RAM disk (which could be used as system boot drive)
    • two stage icons with application configuration stored inside (in tooltypes)
    • comment field in filesystem for any object
    • XPK and XFD libraries which allowed to (de)compress any kind of data with any available method

    And lot more.

    I wrote few applications for AmigaOS. Some of them became popular and I was able to expand my computer with addons with money which I got from registrations (yes, I wrote shareware program). It started with 68000/1MB ram when I had to close code editor (great CygnusEd) to be able to compile to 68040 cpu with 64+2MB of memory at the end. AmigaE was language which was both easy to use and powerful to write programs never mind how complex. Add few libraries to it and you can do anything. Today even ‘hello world’ takes few kilobytes on my Linux system ;(

    I could buy 386sx instead of Amiga 600 but then all I would learn would be how to do things in MS DOS or MS Windows 3.x as there was no x86 people around which would use Linux, BSD or OS/2. This would be lost years as now after few years of using AmigaOS I know what good operating system can give to hardware when resources are very limited.

    A dla tych, co dotarli do końca polecam także post napisany przez Opiego.

    Written by Marcin Juszkiewicz on
Page 48 / 105