2013-10-11

Newcons international keyboard input.

Newcons international keyboard input.

Sorry for dirty screen, looks like ENODUSTCLEANER :)

So how?

Q: How can I type international characters?

A: You have to have keyboard mapping with Unicode character codes (Unicode code points) instead of codes between 127 and 255. If you have it, just do:
kbdcontrol -l ua.koi8-u.shift.alt.ukbd < /dev/ttyv0

Q: Where can I get those keyboard mapping files?

A: Do it yourself.
./uakbd2ukbd.pl ua.koi8-u.shift.alt.kbd KOI8-U > ua.koi8-u.shift.alt.ukbd  
Original .kbd located in /usr/share/syscons/keymaps/.

Thoughts.

Since, kbdcontrol have built-in suffix ".kbd", I think it would be better to not do ".ukbd" suffix in future. But files different and syscons still will be in distribution, at least some time. So we will do new folder for that, it will be  /usr/share/newcons/keymaps/.

Just for testing, you can get uakbd2ukbd.pl here:

~ray/newcons/newcons_kbd/

Happy testing!!! :)

2013-10-09

Continuation of Newcons project

Continuation of Newcons project

Newcons project aimed to replace old graphic virtual terminal named "syscons". Its main points is: support UTF characters and to move away dependence from fixed graphic modes (VGA, VESA) and from machine's built-in services like BIOS.
Project originally started by Ed Schouten, and in 2013 was already have:
  • UTF font with Latin, Cyrillic and some more simple character sets;
  • UTF output support;
  • Graphic mode support;
  • Text mode support;
  • Sysmouse (w/o copy-paste);
  • Many more ...

New implemented items:

  • History - ability to scroll via terminal history. Old, separate history buffer was removed;
  • History circle buffer - no buffer overflow, "unlimited scroll";
  • VT_PROCESS mode - Way to hold terminal from switching (f.e. Xorg use it to prevent terminal switching);
  • drm2/fb_helper driver - A.K.A. KMS driver. Bind Newcons to framebuffers "made by" drm2 covered video drivers (i915/radeon);
  • Dynamic VT driver attachment, vt_allocate(...) - allow to attach console video driver later, at point where framebuffer owner will be initializing. (KMS and devices w/o early graphics support).

Supported startup modes for KMS:

  • Start w/o VT graphics drivers, then load KMS (kldload i915kms or radeonkms);
  • Start w/ VGA, then load KMS;
  • Preload KMS, then KMS driver will be attached as output;
  • Preload KMS, start w/ VGA, then KMS driver will replace VGA output.

Any help on testing are welcomed!!!
This project is being sponsored by The FreeBSD Foundation.
Many thanks to Ed Schouten, who start Newcons project and did most work.

  • Generic Framebuffer interface - simple interface to give FB access to userland (/dev/fb*) and automatic handling by Newcons VT(9);
  • Mouse support - Copy/Paste using sysmouse;
  • Improve locking;
  • Bug fixes;
  • HEAD Integration;
  • 10.0 Integration;
  • Mapping non-ASCII characters to UTF on keyboard input;
  • Adapt existing screen savers.

TESTING

Please use project branch
http://svn.freebsd.org/base/user/ed/newcons/
it close enough to HEAD (at least now, 10 Oct 2013)
or HEAD with Patch to HEAD (r256148).

In case you want to play with KMS on ATI Radeon video, you have to apply Jean's patch too: Radeon KMS framebuffer patch


2013-08-17

Take the blue pill ... and I will show Matrix!

Take one Lenovo V580c laptop, it has:
  1. NVidea GPU;
  2. Intel SandyBridge GPU.
Then connect second LCD display to it with HDMI cable.

 And then kldload i915kms!
And voila!!! :)

P.S. Forget to say: it is not in HEAD yet :)

2013-04-01

Want to to free your SD card? Or put u-boot.imx to the internal flash.

No problem, copy u-boot.imx into some msdosfs slice, attach it, boot up to U-Boot prompt and do that:


ide reset
fatload ide 0:1 0x91000000 u-boot.imx
sf probe
sf erase 0x00000 0x70000
sf write 0x91000000 0x400 0x60000


That one for FAT32 on first partition of internal SSD drive.

If you want to do that from usb flash stick, change ide to usb.

Every command have internal help. So if you forgot something, type
help
for full list
help cmd
for help about that cmd only.

Commands like sf have subcommand, so you can type
sf
and get list and format for subcommands.

P.S. Don't forget to switch back DIP switch (boot select) See here.

2013-02-23

"I hate to wait so much time while ports compiling" or easy Xorg on Efika MX with FreeBSD

Hope you already done everything I wrote in Easy way to do it (try FreeBSD on Efika MX), and now many lazy guys will say "How to start Xorg here without any movements?" 
Short answer will be "I'm not a Wizard and I don't have magic stick" :)
But I really have few hints for you on how to done it easy and fast.

We need to install packages and Xorg.conf.

Script for packages


#!/bin/sh

export PACKAGESITE=http://people.freebsd.org/~ray/armv6-pkgng/
export ASSUME_ALWAYS_YES=yes

# Install pkgng
pkg
# Update repo (index of packages)
pkg update -f
# Install pre-dependency (dunno why that both ordered wrong, but )
pkg install freetype2 inputproto
# Install everything we need (not we, but need)
pkg install gmake intltool libXaw libXfont libdrm libfontenc libiconv \
    libpciaccess libpthread-stubs libxcb libxkbfile pixman twm xauth \
    xcb-proto xclock xf86-input-keyboard xf86-input-mouse \
    xf86-video-fbdev xf86-video-scfb xinit xorg-fonts xterm

Now run it
sh script_name.sh


Xorg.conf

Location /etc/X11/xorg.conf
------------------------------------------------------------------------------------------------------------------
Section "Files"
EndSection

Section "Module"
    Load        "dbe"
    # We can't do that yet, so disable for now.
    Disable    "dri"
    Disable    "dri2"
    Disable    "glx"
    SubSection  "extmod"
        Option  "omit xfree86-dga"
    EndSubSection
EndSection

Section "ServerFlags"
    Option    "AIGLX"        "false"
    Option    "NoAccel"    "True"
    Option    "NoDRI"        "True"
    Option    "DRI"        "False"
    Option    "DRI2"        "False"
EndSection

Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"      "auto"
    Option      "Device"        "/dev/sysmouse"
EndSection

Section "Monitor"
    Identifier  "Monitor"
    Mode "1024x600"
        DotClock        25.175
        HTimings        1024 1048 1148 1200
        VTimings        600 610 620 700
    EndMode
EndSection

Section "Device"
    Identifier  "Generic FB"
    Driver      "scfb"
    Option    "NoAccel"    "True"
EndSection

Section "Screen"
    Identifier  "Screen"
    Device      "Generic FB"
    Monitor     "Monitor"
    DefaultDepth 16
    SubSection "Display"
        Depth           16
        Modes           "1024x600"
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier  "layout"
    Screen      0 "Screen" 0 0
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection
------------------------------------------------------------------------------------------------------------------

Testing :)

Now run:
startx
and you will have:
  1. Best window manager - twm
  2. Best X clock - xclock
  3. and 3 best xterms
Standard startx set :)

2013-02-22

pkgng-ing everything you done some time ago

Just to not forget :)
If you playing with new platform, build many ports and leave it not cleaned, some time later you may find it interesting to share that with other good guys or just to setup same on a different machine.

So how to done that:
1. Find what you build before:
find /usr/ports -name work | sed 's#/usr/ports/##; s#/work##' > ~/work.list

you will get list in format category/name.

2. Load it into shell variable (for /bin/sh)
LIST=$(cat ~/work.list)

3. create shell function (of course you can done it in one command, but it is unreadable)
create ()
{
        pkg=$1; # Only one arg - category/name

        echo "Make package ${pkg}";
        # cd to port dir
        cd "/usr/ports/${pkg}";

        # Remove install and package markers
        rm work/.install* work/.package*;

        # call make to do install and package (it will do build if it not done also)
        make FORCE_PKG_REGISTER=yes package;
}


4. Run over list
for pkg in ${LIST} ; do
        NAME=${pkg##*/};
        # Check if we have such package
        if [ ! -f "/usr/ports/packages/Latest/${NAME}.txz" ]; then
                create "${pkg}";
        fi;
done

5. Time to drink something (coffee, beer, vodka, etc.)

P.S. If you have not broken pkgng database, you may try to just run:
pkg create -a

:)

Good luck with pkgng-ing

2013-02-18

Easy way to do it (try FreeBSD on Efika MX)


I wrote script, just to make your life a bit easy, in case you want to try FreeBSD on Genesi Efika MX of course :)
MAKE_EFIKA_MX.sh                    - script itself
__MAKE_EFIKA_MX_IMAGE.sh    - wrapper to run script on md(memory disk) devices instead of real SD and USB flash.

And here is results:
Efika_MX_SD_card.img.xz        - image for SD (just only U-Boot, but already aligned by 0x1000 for IMX format)
Efika_MX_USB_Flash.img.xz    - full world for 2G+ USB stick (surprisingly small, only 71M in xz)

To make efika mx bootable USB flash (with U-Boot on SD) just run:
./MAKE_EFIKA_MX.sh da0 da4 smartbook

where
    da0    - SD dev
    da4    - USB dev
    smartbook - model (smartbook/smarttop, both have only different
U-Boot binaries)

Let me know anything you have done with that :)

Many thanks to Genesi for hardware and help!
And Genesi's Powerdeveloper program!

2013-01-13

Hope you like it :-)

XOrg on Efika MX Smartbook.


Xpdf with huge i.MX51 development manual (22MB)

I hope you already run FreeBSD on your Efika MX Smartbook :) (read here

So, you have FreeBSD on Smartbook and want to run Xorg.
You need two not standard items:
1. Patched Xorg port. Extract it over original /usr/ports/x11-servers/xorg-server.
2. Port of new xf86-video-scfb driver. Extract it into /usr/ports/x11-drivers/

Then build/install both.
cd /usr/ports/..../
make install clean

It will take some time, maybe next morning you will find that some port from dependency list asking you some question and it was happen right after you went to sleep last night :))))
To not have such situation, better to read man ports first about BATCH and INTERACTIVE modes. It's good idea to build xinit port also, since project branch still not ready to test ARM EABI and with old ARM ABI I found problems with build gobject-introspection which makes impossible to build many parts of Gnome (maybe not only Gnome apps). IIRC, same happen with KDE/Qt parts. So, don't be so fast, and try xinit with xterm and xclock :)
And xpdf :) (See image in header).

What next?! Ahh! Yeah, /etc/X11/xorg.conf, I make small Xorg.conf, because Xorg fail to autodetect things (maybe it's already fixed by some my fix, but I've not checked it again yet).

Section "Files"
EndSection

Section "Module"
    Load        "dbe"
    Disable    "dri"
    Disable    "dri2"
    Disable    "glx"
    SubSection  "extmod"
        Option  "omit xfree86-dga"
    EndSubSection
EndSection

Section "ServerFlags"
    Option    "AIGLX"        "false"
    Option    "NoAccel"    "True"
    Option    "NoDRI"        "True"
    Option    "DRI"        "False"
    Option    "DRI2"        "False"
EndSection

Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"      "auto"
    Option      "Device"        "/dev/sysmouse"
EndSection

Section "Monitor"
    Identifier  "Monitor"
    Mode "1024x600"
        DotClock        25.175
        HTimings        1024 1048 1148 1200
        VTimings        600 610 620 700
    EndMode
EndSection

Section "Device"
    Identifier  "Generic FB"
    Driver      "scfb"
    Option    "NoAccel"    "True"
EndSection

Section "Screen"
    Identifier  "Screen"
    Device      "Generic FB"
    Monitor     "Monitor"
    DefaultDepth 16
    SubSection "Display"
        Depth           16
        Modes           "1024x600"
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier  "layout"
    Screen      0 "Screen" 0 0
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

Now just do:
startx

Done!

It will be very nice if you will get everything working after first attempt :)
Anyway, glad to hear any opinions! (ray@... )

Thank you very much!


Поиск по этому блогу

Readers