Page 1 of 1

Apple USB Keyboard not working during initrd phase

Posted: 27 Aug 2015, 07:23
by bastibasti
Hi,

I use an Apple Keyboard. However, my USB Memory is FAT32, so Porteus will point out "Press ENter to use Always Fresh mode" - thats fine with me.
However I cannot press Enter, as the Keyboard is inop.

here's my setup

Code: Select all

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4)
00:1f.0 ISA bridge: Intel Corporation C216 Series Chipset LPC Controller (rev 04)
00:1f.2 RAID bus controller: Intel Corporation SATA Controller [RAID mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GL [Quadro K600] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)

Code: Select all

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 002: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 003 Device 003: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 003 Device 004: ID 0424:2412 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 001 Device 004: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 003 Device 005: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 005: ID 046d:c404 Logitech, Inc. TrackMan Wheel
Bus 001 Device 006: ID 05ac:0221 Apple, Inc. Aluminum Keyboard (ISO)

Code: Select all

ipv6                  172604  26 
zram                    7640  1 
lz4_decompress          1248  1 zram
lz4_compress            1908  1 zram
snd_hda_codec_hdmi     24844  1 
snd_hda_codec_realtek    38668  1 
snd_hda_codec_generic    30208  1 snd_hda_codec_realtek
hid_apple               3492  0 
nouveau               752004  2 
i2c_i801                6864  0 
mxm_wmi                  824  1 nouveau
8250                   19500  0 
serial_core            11976  1 8250
thermal                 5900  0 
snd_hda_intel          13444  2 
wmi                     5104  2 mxm_wmi,nouveau
snd_hda_controller     11180  1 snd_hda_intel
snd_hda_codec          53224  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
ttm                    35812  1 nouveau
snd_hwdep               3084  1 snd_hda_codec
snd_pcm                39800  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
e1000e                105908  0 
drm_kms_helper         45524  1 nouveau
snd_timer              10296  1 snd_pcm
firmware_class          3864  3 drm_kms_helper,snd_hda_intel,nouveau
ptp                     6216  1 e1000e
pps_core                3888  1 ptp
As you can see, hid_apple is a module. It should be included in the ramdisk or compiled into the kernel

Re: Apple USB Keyboard not working during initrd phase

Posted: 27 Aug 2015, 19:09
by KnallKopf
hmm there was a guy with a equal problem, but i can not find the thread.
why not ? where is it ?

I thing you need the hid_apple kernelmodule in initrd.xz
Unpack the initrd.xz, add the kenelmodule and pack it.

/mnt/loop/boot/syslinux/initrd.xz is an example and can differ on our system.
run as root:

Code: Select all

# delete first if you repeat
rm -r ./initrd ; rm ./initrd.xz

mkdir -p ./initrd
cd ./initrd
xz -d < /mnt/loop/boot/syslinux/initrd.xz | cpio -i

# put the required kernelmodules to ./initrd/lib/modules/3.17.4-porteus/.....
mkdir -p ./initrd/lib/modules/3.17.4-porteus/kernel/drivers/hid
cp /lib/modules/3.17.4-porteus/kernel/drivers/hid/hid-apple.ko ./initrd/lib/modules/3.17.4-porteus/kernel/drivers/hid

depmod -b . $(uname -r)
find | cpio -H newc -o | xz --check=crc32 --x86 --lzma2 > ../initrd.xz
cd ..
replace the old initrd.xz with the new.