1. How to get Zoom slider on Microsoft keyboard recognized by X11

    If you are using Microsoft Natural Ergonomic Keyboard 4000 as I do you may wondered how to get that zoom slider in a middle to be useful. Thanks to Hans de Goede there is a solution.

    There is one new file and changes to other needed. First we need to instruct udev to remap some keys for us. Create /lib/udev/hwdb.d50-msoffice-keyboard-xorg.hwdb file with this content:

    # classic msoffice keyboard
    keyboard:usb:v045Ep0048d*dc*dsc*dp*ic*isc*ip*in01*
     KEYBOARD_KEY_0c0184=documents          # KEY_WORDPROCESSOR to KEY_DOCUMENTS
     KEYBOARD_KEY_0c0186=finance            # KEY_SPREADSHEET   to KEY_FINANCE
     KEYBOARD_KEY_0c018e=chat               # KEY_CALENDAR      to KEY_CHAT
     KEYBOARD_KEY_0c01a3=nextsong           # KEY_NEXT          to KEY_NEXTSONG
     KEYBOARD_KEY_0c01a4=previoussong       # KEY_PREVIOUS      to KEY_PREVIOUSSONG
     KEYBOARD_KEY_0c01ab=search             # KEY_SPELLCHECK    to KEY_SEARCH
    
    # Microsoft Natural Ergonomic Keyboard 4000
    keyboard:usb:v045Ep00DB*
     KEYBOARD_KEY_0c01ab=search             # KEY_SPELLCHECK    to KEY_SEARCH
     KEYBOARD_KEY_0c022d=scrollup           # KEY_ZOOMIN        to KEY_SCROLLUP
     KEYBOARD_KEY_0c022e=scrolldown         # KEY_ZOOMOUT       to KEY_SCROLLDOWN
    

    In Fedora rawhide I also needed to edit 60-keyboard.hwdb file (same directory) to disable some definitions:

    # Microsoft Natural Ergonomic Keyboard 4000
    #keyboard:usb:v045Ep00DB*
    # KEYBOARD_KEY_c022d=zoomin
    # KEYBOARD_KEY_c022e=zoomout
    

    Now update of hwdb is needed:

    sudo udevadm hwdb --update
    sudo udevadm control --reload
    

    And the only thing left is replugging the keyboard (or system reboot). As a bonus you get XF86Search button instead of non-working Spell (F10). Those who use Microsoft Office Keyboard (old one with scroller on left side) will get all keys working as well but they also need 3.14 kernel to get all recent fixes.

    And why all that is needed at all? Simple — Xorg is still sitting in 80s when it comes to handling keyboard and ignores all keycodes with >8bit values. I hope that Wayland does not follow that way and does/will just take whatever system under is telling about input devices.

    Written by Marcin Juszkiewicz on
  2. ARM7 != ARMv7

    ARM architecture is fun when it comes to names and numbers. And it is around 30 years old as well. So from time to time I have a discussion where I say something like in title…

    There are few sources of mistakes when it comes to ARM. Family names, instruction sets, core names and marketing. Hard to tell which makes biggest mess…

    Anything below ARMv7a is history — there is ARMology about it so please read it. But it does not mean that we have clear situation now :D

    ARMv7a (and higher) means Cortex-A family. But due to companies like AllWinner and Apple we have it more complicated:

    • A4 is Apple cpu with Cortex-A8 core
    • A5 is low-end Cortex-A5 core but also Apple cpu with Cortex-A9 cores (there was also A5X)
    • A6 is Apple cpu with their own core (also A6X)
    • A7 is Cortex-A7 core but also Apple cpu with 64-bit ARMv8 cores
    • A8 is Cortex-A8 core (the only single core Cortex-A)
    • A9 is Cortex-A9 core
    • A10 is AllWinner cpu with Cortex-A8 core (there was also A10s)
    • A12 is Cortex-A12 core
    • A13 is AllWinner cpu with Cortex-A8 core (stripped down A10)
    • A15 is Cortex-A15 core
    • A17 is Cortex-A17 core
    • A20 is AllWinner cpu with Cortex-A7 cores
    • A23 is AllWinner cpu with Cortex-A7 cores
    • A31 is AllWinner cpu with Cortex-A7 cores (also A31s)
    • A53 is Cortex-A53 core (64-bit ARMv8)
    • A57 is Cortex-A57 core (64-bit ARMv8)
    • A80 is AllWinner cpu with eight cores (4xA7 + 4xA15)

    There are also other Cortex cores but their name do not start with “A” :) But the good thing is that all ARMv7a cpus can run same code. ARMv8 ones can run own code — 32-bit support is optional. All all major distros like Debian, Fedora, OpenSUSE or Ubuntu work on support for both families.

    UPDATE: Arnd Bergmann wrote in comment (switch to Blog below article) there is also A2, which is the PowerPC core used in BlueGene. Further, AMD has x86 CPUs called A4, A6, A8 and A10, which are also not ARM. Fun, isn’t it?

    Written by Marcin Juszkiewicz on
  3. New project: Pandaboard based media player

    I need an offline media player to play movies from hard drive. And I did not managed to find something interesting on a market. So decided to take a look into my electronics trashcan and dig some parts from it.

    What did I found?

    • PandaBoard EA1
    • USB 3.0 to SATA adapter
    • 750GB 2.5” SATA hard drive
    • 2xUSB PC bracket
    • 3.5A 5V power supply
    • u.FL to RP-SMA cable

    Looks just fine for my needs. OMAP4430 ES2.0 cpu should be enough and with some libraries should decode everything I have. Just 1GB ram but hope to be enough, there is WiFi and Bluetooth on board with u.FL connector so I can get external RP-SMA antenna. HDMI with audio but no idea about CEC for remote control. And there are 4 USB ports (two at rear and two on pins) so internal hard drive is possible without any extra cables sticking outside.

    OK, hard disk will be over USB 2.0 which is quite slow compared to SATA. But that’s all what is available on board. Otherwise I would have to buy new one.

    Will have to find big enough plastic case to fit both boards and hard disk, cut some holes for power, HDMI and maybe also USB and RP-SMA antenna connector. Then solder J3 and J6 pins to get extra 2 USB ports, power and reset buttons and maybe even will do power LED.

    Then connect USB3 -> SATA adapter into internal USB port, wire power cables to charge it directly from Pandaboard power plug (for when USB would not be enough) and get it running.

    Have to check is there any good Android build for a board as this may give me more options than GNU/Linux distros with XBMC like apps. And have to solve remote control as well.

    UPDATE: I booted Android 4.3.1 Jellybean (Linaro 13.10) on the board. It is so slow (with HW acceleration) that I am unable to use it. So project gets postponed to unknown date.

    Written by Marcin Juszkiewicz on
  4. AArch64 can build OpenEmbedded

    In 2012 I was porting OpenEmbedded to target AArch64 so I can say that I did first OE builds for that architecture.

    But today I did kind of reverse thing:

    Build Configuration:
    BB_VERSION        = "1.21.1"
    BUILD_SYS         = "aarch64-linux"
    NATIVELSBSTRING   = "Fedora-21"
    TARGET_SYS        = "arm-oe-linux-gnueabi"
    MACHINE           = "genericarmv7a"
    DISTRO            = "nodistro"
    DISTRO_VERSION    = "nodistro.0"
    TUNE_FEATURES     = "armv7a vfp thumb neon callconvention-hard"
    TARGET_FPU        = "vfp-neon"
    

    Yes — I did build on AArch64 machine targeting ARMv7a system. Had to edit one patch (pseudo-native was set to use very old glibc symbols which are not available on 64-bit ARM) but after that build was running just fine.

    I did not tested resulting binaries.

    Written by Marcin Juszkiewicz on
  5. %patch should DIE

    I am not maintaining packages in Fedora. But my work is related to building them for AArch64 architecture. And this means editing patches and/or adding new ones…

    When I was doing AArch64 bootstrap in OpenEmbedded it was easy. Altering Debian/Ubuntu packages was also simple task. Why? Because in both situations patches are applied in developer friendly way so it is visible which ones are applied in which order and (as quilt is used) they are also easy to refresh and edit.

    But not in Fedora. Here we have %setup and %patch macros which use workflow from 80’s. Yes, patch <px file.patch is not modern way of handling patches which may need work. especially when you first fetch and install all build dependencies just to get build failed cause nth patch does not fully apply. or when your work requires to alter patches 3rd, 7th and 13th.< p>

    Sure, there is %autosetup macro which should solve a problem. But it does not. There are packages where some patches are reverse applied or with other patch level than 1. I saw also ones where there is extra directory change during applying diffs.

    So dear package maintainers — please migrate to %autosetup (with quilt or git) to make life of other developers easier. I think that there will be more people satisfied when this will happen than just me.

    Written by Marcin Juszkiewicz on
  6. It is 10 years of Linux on ARM for me

    It was somewhere between 7th and 11th February 2004 when I got package with my first Linux/ARM device. It was Sharp Zaurus SL-5500 (also named “collie”) and all started…

    At that time I had Palm M105 (still own) and Sony CLIE SJ30 (both running PalmOS/m68k) but wanted hackable device. But I did not have idea what this device will do with my life.

    Took me about three years to get to the point where I could abandon my daily work as PHP programmer and move to a bit risky business of embedded Linux consulting. But it was worth it. Not only from financial perspective (I paid more tax in first year then earned in previous) but also from my development. I met a lot of great hackers, people with knowledge which I did not have and I worked hard to be a part of that group.

    I was a developer in multiple distributions: OpenZaurus, Poky Linux, Ångström, Debian, Maemo, Ubuntu. My patches landed also in many other embedded and “normal” ones. I patched uncountable amount of software packages to get them built and working. Sure, not all of those changes were sent upstream, some were just ugly hacks but this started to change one day.

    Worked as distribution leader in OpenZaurus. My duties (still in free time only) were user support, maintaining repositories and images. I organized testing of pre-release images with over one hundred users — we had all supported devices covered. There was “updates” repository where we provided security fixes, kernel updates and other improvements. I also officially ended development of this distribution when we merged into Ångström.

    I worked as one of main developers of Poky Linux which later became Yocto Linux. Learnt about build automation, QA control, build-after-commit workflow and many other things. During my work with OpenedHand I also spent some time on learning differences between British and American versions of English.

    Worked with some companies based in USA. This allowed me to learn how to organize teamwork with people from quite far timezones (Vernier was based in Portland so 9 hours difference). It was useful then and still is as most of Red Hat ARM team is US based.

    I remember moments when I had to explain what I am doing at work to some people (including my mom). For last 1.5 year I used to say “building software for computers which do not exist” but this is slowly changing as AArch64 hardware exists but is not on a mass market yet.

    Now I got to a point when I am recognized at conferences by some random people when at FOSDEM 2007 I knew just few guys from OpenEmbedded (but connected many faces with names/nicknames there).

    Played with more hardware then wanted. I still have some devices which I never booted (FRI2 for example). There are boards/devices which I would like to get rid of but most of them is so outdated that may go to electronic trash only.

    But if I would have an option to move back that 10 years and think again about buying Sharp Zaurus SL-5500 I would not change it as it was one of the best things I did.

    Written by Marcin Juszkiewicz on
  7. Crazy ARM Server hack idea

    During break between talks I spoke with Rob Taylor and Andreia Gaita about lack of ARM powered servers. And then cute hack appeared in my head…

    Rockchip released RK3268 (if I got numbers correctly) which uses four Cortex-A12 cores. There are HDMI dongles with it and 2 GB of ram.

    So the idea is: we take 1U server case, glue as many dongles as we can and connect them with USB cables for power and network. Then put some OpenStack or other software to maintain a cloud and it may even work.

    The problems Rob noted would be heat and lack of bandwidth. But it would be cute embedded nonsense hack.

    Written by Marcin Juszkiewicz on
  8. Is being connected a need or a must?

    For all previous FOSDEM visits I was offline. You know: high roaming costs, not liking to use random open wifi networks etc. But not this time.

    I arrived yesterday morning at BRU airport. Planned to buy a simcard there but managed to skip whole shopping part without realising what I did.

    But when I arrived in a city centre I noticed a “free wifi” sign at the Novotel hotel so decided to make use of it. Flood of Google+ and Facebook notifications was what I got. Checked in on Foursquare and minute later met XorA with Anya. We took a coffee, discussed about work, life and then went for some walk.

    Half hour later I left some small shop with a BASE simcard in my Nexus 5 with 1GB of transfer available. My standard simcard went to the backup phone (Nokia 101 this time). Quick look at Foursquare, Google+ and Facebook and I saw where my friends are and could get in contact. Met Philip, Koen, Vladimir and several other guys, got invited to a dinner etc. Managed to take some portals down in Ingress game as well ;-)

    Not that I would not be able to survive without a local simcard. There are lot of open wireless networks in Brussels but how many of them are safe?

    Written by Marcin Juszkiewicz on
Page 28 / 106