Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: keyboard layout



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Sep 22, 2010, at 4:03 PM, Catonano wrote:

2010/9/22 Michael <macallan%netbsd.org@localhost>

The kernel doesn't have an italian ADB keymap, someone with access to the right hardware needs to add one -

That should be me, right ? ;-)

Yes, I don't know anyone else who owns an iBook ( or any ADB keyboard for that matter ) with italian layout. Most of us have US, german, japanese or 'international' hardware, new layout variants are added whenever someone runs into them.

see src/sys/dev/adb/adb_keymap.h ( basically it's a table listing the differences to the US layout, probably not that much and there are a few examples in there )

yes, I saw that. It seems easy, I should be able to come up with a piece for my keyboard. The only thing is I'm a beginner, I don't know how to compile and test the thing.

That implies that you already have the kernel source ;)
The easiest way to compile a kernel is:
cd src/sys/arch/macppc/conf
config GENERIC
cd ../compile/GENERIC
make depend
make
That will build your kernel. Copy it to /
cp netbsd /netbsd.new
... and boot it.

To save time you'll probably want to make a copy of GENERIC and remove all the drivers and features you don't need ( use any name you want, ALL CAPITALS is just a convention which isn't enforced anywhere )
Alternatively you can:
cd src
./build.sh -O /usr/build/obj -T /usr/build/tools -m macppc tools
./build.sh -O /usr/build/obj -T /usr/build/tools -m macppc -u kernel=GENERIC
cp /usr/build/obj/sys/arch/macppc/compile/GENERIC/netbsd /netbsd.new

( assuming you'll use /usr/build/obj for temporary .o and related files and /usr/build/tools for build tools - which paths you use is entirely up to you )

The former uses the compiler that comes with the base system and therefore can build only native kernels, the latter builds its own tools and can be used to build a macppc kernel on - say - an x86 box running linux. So, if you have a machine at hand that's running some sort of unix- like OS or NetBSD ( Linux, FreeBSD, DragonflyBSD and Solaris work well, MacOS X has its quirks ) and is much faster than your iBook you'll probably want to use this method and save some more time ( I have a bunch of scripts that set parameters and call build.sh so I don't have to remember all the options all the time ). If you're running -current and want to build a -current kernel on the iBook itself there's not much point of building your own tools. Also, the ADB code didn't really change between 5.0 and -current so which branch you use is entirely up to you ( as in, whatever you have right now should do the job ) Also, have a look at the wskbd manpages ( both in 4 and 9 ) to get an idea how things are supposed to work.
You can specify a default layout in your kernel configuration:
options AKBD_LAYOUT KB_IT

I could try to set up X and then take my time to put me in line with the whole thing

If it's a G3 iBook it should have a Mobility Rage 128 graphics chip which may need additional xorg.conf hacking to get it going, if it's a G4 it has some sort of Radeon which should Just Work(tm). Just look at the cpu0: lines in your dmesg output if you're not sure what you've got. It always helps to set up sshd first so you have a way to control the iBook in case X messes with the graphics chip in a way that leaves the console unusable. Also, you'll definitely want to do tht when you're messing with the keyboard code.

Finally - never assume the kernel you just built will work properly, ALWAYS have a known working kernel sitting in / ready to boot.

have fun
Michael


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBTJp74MpnzkX8Yg2nAQI8Sgf9E2ioKD7HLn8IgTKntQEAG2eJP1RD/ibs
T+IT2n1aGFASZ+WYkx+6kDGf6zYHKRpC/iKBJ/kxEQb7IGg7aj8rCa6mLWbM0e+U
+e3fQUdHHYQTkyFMo24TpxhbwZye8wvT3VWmSbrQm1oZd2RVnC280gyNnQZNhpt6
udWIsnQOusEcCgPekIievGBPHNE8nlBFkDoqiKCvcipsVZe2CStgqoQ4XXSfAQtF
HFTBFdPFhnnrEHTsL5dqarYGGOgVj5604Q6IgOTV7CKUqmNWPB8ZytZeV8HyxTS6
5aldMX5rwlHBYwFZigtAW2TzDS/pMB/0/Tp8tBo0POWtvtLJcKEBTA==
=Vqnn
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index