1. Extracting diffs from vendor kernels

    From time to time there is situation when you need to use kernel sent to you by vendor which you support (or use device which they made). The problem is that often all you can get is one big tarball with “our current code” which means Linux upstream + extra patch(es). How to get something usable from it?

    First step is checking version of vendor kernel (if unknown). If you are lucky then main Makefile contain informations such as “2.6.19-rc3” which is a sign what to get as clean base.

    Then clean sources — simple make mrproper will remove all results of compilation so diff will have less work to do.

    Third phase is taking first diff:

    diff -Naurpw linux-original/ linux-vendor/ >vendor.diff
    

    Result will be probably very big but often can be made slower by looking inside of it. Check for backup files, extra log files etc crap — here I usually use Midnight Commander due to it’s “patchfs” which allow to go inside of patch and work on “per-file” changes.

    Next step can contain searching for popular kernel patchsets which can be in vendor kernel. This is hardest part as there are many of them and often only parts of them are applied.

    Same rules apply to other code from vendors — toolchains, libraries and other forks.

    Written by Marcin Juszkiewicz on
  2. Forcing own MAC address under OpenWrt ‘WhiteRussian’

    Today I had to remove my favourite network card to fit other PCI card (microATX board has only 2 PCI slots). And then I got my old problem — desktop card MAC was same as router one so wrt54gs refused to work with it.

    I tried to set wan_hwaddr, def_hwaddr NVRAM entries to other MAC but it was ignored each reboot (even after nvram save). Finally I found a way to resolve/workaround it.

    As OpenWrt use simple init from BusyBox I added one script into /etc/init.d/ directory — S07-hrw-set-nvram:

    nvram set wan_hwaddr=C0:FF:EE:C0:FF:EE
    nvram set def_hwaddr=C0:FF:EE:C0:FF:EE
    nvram set il0macaddr=C0:FF:EE:C0:FF:EE
    

    So as result MAC of router card is set to my value and do not conflict with my desktop network card.

    Written by Marcin Juszkiewicz on
  3. The Star Wars marathon

    I just came back home from the Star Wars marathon. We started at 12 and decided to end after 5th episode (we became too tired).

    Did you know that cutting hands using light sabers was quite popular? Each episode results in few hands cut and Anakin Skywalker/Lord Vader had worst luck — right hand cut twice (episode II during fight with Count Douku and episode VI during fight with Luke Skywalker), left hand cut in episode III (by Obi-Wan this time).

    Such long marathon is exhausting but also fun — lot of discussions during some scenes, between movies etc. And it is important to have big screen — we were using video projector so the picture was big enough to watch. 5.1 sound would be also nice to have but stereo sound (like we had) can be also good.

    Written by Marcin Juszkiewicz on
  4. Small does not mean powerless

    Koen’s post about AVR32 Network Gateway and few posts on usenet reminded me that many people still think that small devices are crap and lack power to do anything.

    Do they? I think that not. Here I use two small embedded devices:

    • Linksys NSLU2 as NFS server (plans are to add TFTP, Samba, CUPS and Bluetooth AP)
    • Linksys WRT54GS as router/firewall

    Both do their work without any problems, both runs Linux and opensource distributions (OpenSlug and OpenWRT).

    Soon will add something based on one of AT91 devboards but more to experiment with software then normal usage. And as I have 20 pin header soldered to OpenMoko debug board it can even be bricked (JTAG port was already tested with other device then Neo1973).

    Great thing is that systems like AT91SAM9263EK, Gateway or STK1000 (another AVR32 devboard from Atmel) can be used to produce many different devices — I remember talk with one guy who shown his developer board (about A4 size) and final device (small rugged mobile device with barcode scanner) and told that this devboard was used to create about 10 misc models.

    My friend made a project of own device based on AT91 ARM cpu with few peripherials. Total cost was less then 100 EUR and it can be used to different tasks and also give possibility to learn how to write kernel code (to handle all addons).

    As Cliff Brake wrote:

    you cannot afford to not use Linux in your own projects. There are too many drivers and ready to use code to not make use of them. You can even get nice modules for less then 100 dollars (ARM, AVR32, x86 based) if you do not want to design own one. Then next step is OpenEmbedded and you have problem which software to choose as there is too much to choose :)

    Written by Marcin Juszkiewicz on
  5. Goodbye handhelds.org

    I read thread about opie trademark on opie ML, read posts about GPE situation months ago and now and decided that handhelds.org is not my community.

    OPIE was my favorite environment since I bought Zaurus SL-5500 over 3 years ago. I was one of persons which added OPIE recipes into OpenEmbedded and spent lot of time to get it working properly. When I got Zaurus C760 I concentrated on fixing OPIE for working better with hires displays (most of them are landed in 1.2.2 release).

    After those three years (2 as official developer with r/w access to CVS) I decided that it is time to say goodbye. None of my devices run OPIE and no plans that they will ever run it — time pass and show that most of software for it is not maintained and I lost faith in new OPIE/Qtopia 2.x applications over year ago. It does not even allow to connect my PDAs to my home network…

    So goodbye and thanks — it was good time.

    Written by Marcin Juszkiewicz on
  6. British rail

    Fear leads to anger, anger leads to hate, hate… leads to suffering.

    If Yoda would live today he would say something similar after trying to buy tickets for British trains. There are few (8 or more?) train companies and over 10 types of tickets. If you go to National Rail site you can check trips, prices but if you want to buy you will be presented with list of companies and moved to their websites where you have to repeat whole track.

    I was suggested to use Time TrainLine service. It allow to search for trip, select prices in easier way then NR did. But each reload can mean other prices. And even if you select one and then register (what for?) then you are presented with nice thing — you can live in ANY country in the world as long it use UK postcodes. Who coded that website?

    Hopefully I will be able to buy those tickets with help of UK citizens.

    Written by Marcin Juszkiewicz on
  7. How to check does GSM modem works

    Sometimes you can think that Neo1973 does not want to recognize your SIM card. Werner Almesberger sent informations how to check it to framework-devel list. I want to extend it a bit.

    • First GSM daemon need to be stopped as we want to have total control over modem.

      /etc/init.d/gsmd stop

    • Power On GSM modem:

      echo 1 >/sys/bus/platform/devices/gta01-pm-gsm.0/power_on

    • Start cu terminal to talk with modem:

      cu -E @ -l /dev/ttySAC0 Connected. AT-Command Interpreter Ready

    (do not panic if you will get other line after ‘Connected’)

    • Enable echo:

      ATE1

    • Enable error reporting with texts instead of numbers:

      AT+CMEE=2

    • Enable modem functionality:

      AT+CFUN=1

    here you can get +CME ERROR: SIM PIN required message so you need to enter PIN

    • Pass PIN:

      AT+CPIN=”1234” AT+CFUN=1

    replace 1234 with proper PIN of course - Select network operator (register to network)

    AT+COPS
    
    • Dial someone

      ATD123456789;

    semicolon is needed to mark that this will be voice call — my SE k750i phone recognize both form but also give me information does it is voice or data call.

    If this sequence does not work on your phone then write to mailing list.

    Written by Marcin Juszkiewicz on
  8. 30 years of StarWars

    Yesterday was 30 years since “A New Hope” (aka “Star Wars episode IV”). I checked cinemas offer but there was no Star Wars night anywhere ;(

    But I found that Lucasfilm released first three episodes on DVD again. This time each one is sold separately and contain bonus — original release from 1977/80/83 like it was in cinemas. Will have to think about buying those and see how Jabba was looking before 199x remastering etc..

    Written by Marcin Juszkiewicz on
Page 81 / 105