Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: pek on May 05, 2023, 05:17:33 AM

Title: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 05, 2023, 05:17:33 AM
Hi all,
I created a usb stick to load TinyCorePure64 14.0 using UEFI and successfully booted to the desktop on the Macbook Pro.
However, the
- keyboard not working and
- mouse not working.

I also booted on a Dell laptop with UEFI with similar result:
- keyboard working  :)
- mouse not working

Can anyone please guide me how to make the keyboard and mouse work?
Thank you..
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 05, 2023, 05:34:55 AM
I boot a Dell laptop from usb stick using uefi without problems - are you using the built-in keyboard/mouse?

Which boot loader are you using - grub, syslinux or?
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 05, 2023, 05:49:55 AM
Hi, yes I'm using built-in keyboard/mouse.
I don't remember the Dell model number though. It's not with me now.
I booted UEFI using grub.

So, the usb actually will boot to bios by syslinux and to UEFI by grub.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 05, 2023, 06:09:21 AM
Did you check the bios settings for uefi boot and boot security?
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 05, 2023, 06:58:23 AM
No i did not.
But when I boot using other distro (one of arch based) everything works.
Both in Dell and Macbook Pro.
Btw, there's no bios settings in Macbook anyway and one of my intention is to make it work with Macbook as well.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: curaga on May 05, 2023, 11:30:37 AM
You'd need to start with checking dmesg, if they are even detected. For the macbook, perhaps with external usb mouse and keyboard.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 06, 2023, 05:59:58 AM
Hi Curaga, I don't have usb c keyboard for the macbook.
But I did dmesg on the Dell 7490
And here's what i got for keyboard, mouse and usb
https://pasteboard.co/bx34koKHX6c1.jpg (https://pasteboard.co/bx34koKHX6c1.jpg)
and here's for ps/2
https://pasteboard.co/Wq4Z3PyJrXFG.jpg (https://pasteboard.co/Wq4Z3PyJrXFG.jpg)

But I don't understand what those output mean though  ::)
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Rich on May 06, 2023, 08:06:49 AM
Hi pek
Try adding the boot code:
Code: [Select]
i8042.nopnpand see if the  AUX port disabled  message goes away.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Rich on May 06, 2023, 08:54:21 AM
Hi pek
Add the  i2c-KERNEL.tcz  extension to  onboot.

Run this command:
Code: [Select]
dmesg | grep -Ei "keyb|mouse|ps/2|i8042|touch" > dmesg.txtand then post the contents of  dmesg.txt.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 06, 2023, 11:38:15 PM
Hi Rich, thanks for your suggestions.

In summary, by loading i2c-KERNEL.tcz onboot, makes
* Keyboard and Mouse work on Dell (with or without i8042.nopnp boot code)
* Keyboard and Mouse still not work on Macbook Pro (with or without i8042.nopnp boot code)


Here are the dmesg output in reply to your questions:

1. Adding i8042.nopnp boot code without loading i2c-KERNEL.tcz
Code: [Select]
[    0.000000] Command line: BOOT_IMAGE=/boot/14/64/vmlinuz64 i8042.nopnp
[    0.045165] Kernel command line: BOOT_IMAGE=/boot/14/64/vmlinuz64 i8042.nopnp
[    0.766362] usbcore: registered new interface driver ums-onetouch
[    0.766415] i8042: PNP detection disabled
[    0.766690] i8042: Warning: Keylock active
[    0.768400] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.768410] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.768477] mousedev: PS/2 mouse device common for all mice
[    0.768572] usbcore: registered new interface driver appletouch
[    0.770578] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[    1.494704] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input6


2. Adding i8042.nopnp boot code and loading i2c-KERNEL.tcz
Code: [Select]
[    0.000000] Command line: BOOT_IMAGE=/boot/14/64/vmlinuz64 cde i8042.nopnp
[    0.046548] Kernel command line: BOOT_IMAGE=/boot/14/64/vmlinuz64 cde i8042.nopnp
[    0.751693] usbcore: registered new interface driver ums-onetouch
[    0.751738] i8042: PNP detection disabled
[    0.752011] i8042: Warning: Keylock active
[    0.753670] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.753686] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.753757] mousedev: PS/2 mouse device common for all mice
[    0.753847] usbcore: registered new interface driver appletouch
[    0.755593] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[    1.520119] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input6
[   12.398843] input: MELF0410:00 1FD2:7007 Touchscreen as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-MELF0410:00/0018:1FD2:7007.0001/input/input11
[   12.429264] input: DELL081C:00 044E:121F Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-DELL081C:00/0018:044E:121F.0002/input/input13
[   12.429340] input: DELL081C:00 044E:121F Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-DELL081C:00/0018:044E:121F.0002/input/input14
[   12.429449] hid-generic 0018:044E:121F.0002: input,hidraw1: I2C HID v1.00 Mouse [DELL081C:00 044E:121F] on i2c-DELL081C:00


3. Without i8042.nopnp boot code and loading i2c-KERNEL.tcz
Code: [Select]
[    0.756297] usbcore: registered new interface driver ums-onetouch
[    0.756378] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
[    0.756382] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[    0.756648] i8042: Warning: Keylock active
[    0.756892] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.756993] mousedev: PS/2 mouse device common for all mice
[    0.757100] usbcore: registered new interface driver appletouch
[    0.758381] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[   12.097105] input: MELF0410:00 1FD2:7007 Touchscreen as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-MELF0410:00/0018:1FD2:7007.0001/input/input9
[   12.130813] input: DELL081C:00 044E:121F Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-DELL081C:00/0018:044E:121F.0002/input/input11
[   12.130880] input: DELL081C:00 044E:121F Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-DELL081C:00/0018:044E:121F.0002/input/input12
[   12.130980] hid-generic 0018:044E:121F.0002: input,hidraw1: I2C HID v1.00 Mouse [DELL081C:00 044E:121F] on i2c-DELL081C:00


I will try to dmesg on macbook later when I have access to usb-c keyboard or adapter.

So, what is this i2c-KERNEL.tcz ?
Why it makes mouse works on Dell 7490?
Thanks.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: curaga on May 07, 2023, 01:56:37 AM
i2c is an internal device technology/communication bus. Your Dell's mouse is an i2c device apparently, which is fairly rare.

Apple on the other hand does custom everything, needing Apple-specific drivers usually. It's possible we don't have something enabled in the kernel for your MBP.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 07, 2023, 02:46:11 AM
Thanks for the explanation Curaga.

Btw, when i said "mouse", what i actually meant was the "touchpad". Sorry for that.

Quote
Apple on the other hand does custom everything, needing Apple-specific drivers usually. It's possible we don't have something enabled in the kernel for your MBP.
I booted other live distro on the MBP and keyboard/touchpad worked.
Don't you think there's a generic/common driver for this?
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 07, 2023, 05:58:48 AM
You can check which drivers are being loaded on the other distro using "lsmod" and "dmesg" and compare with tinycore to see what's missing.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 07, 2023, 09:09:30 AM
That's a great idea Juanito. Thanks.

Since I don't have usb-c keyboard yet for Tinycore,
I would just paste outputs from the other distro with working keyboard and touchpad here.
Just incase anyone can spot something before I can paste the comparison.

lsmod
https://pastebin.com/najnLdyY (https://pastebin.com/najnLdyY)

dmesg
https://pastebin.com/p14uiEdG (https://pastebin.com/p14uiEdG)
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 07, 2023, 09:23:57 AM
This:
Code: [Select]
[   71.363403] input: Apple SPI Keyboard as /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.5/spi_master/spi2/spi-APP000D:00/input/input5
[   71.365129] input: Apple SPI Touchpad as /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.5/spi_master/spi2/spi-APP000D:00/input/input6
[   71.367448] applespi spi-APP000D:00: modeswitch done.

..would tend to indicate you need to look at the spi_pxa2xx_platform and applespi divers
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 07, 2023, 09:34:09 AM
Hopefully, it's not this:
Code: [Select]
# CONFIG_SPI is not set
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 07, 2023, 09:36:28 AM
Code: [Select]
The Linux kernel configuration item CONFIG_KEYBOARD_APPLESPI:

    prompt: Apple SPI keyboard and trackpad
    type: tristate
    depends on: ( CONFIG_ACPI && CONFIG_EFI ) && ( CONFIG_SPI ) && ( CONFIG_X86 || CONFIG_COMPILE_TEST ) && ( CONFIG_LEDS_CLASS )
    defined in drivers/input/keyboard/Kconfig
    found in Linux kernels: 5.3–5.19, 6.0–6.3
    modules built: applespi

...looks like it is and you'll need to recompile the kernel  :(
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 07, 2023, 09:51:03 AM
Thank you very much Juanito for looking into this.
Although I already lost since this :o
Quote
..would tend to indicate you need to look at the spi_pxa2xx_platform and applespi divers

So.. can you please show me link of howto recompile kernel? (I will need to learn a lot before actually doing it)
And what "things" should I recompile into the kernel?
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 07, 2023, 09:59:18 AM
If you search these forums on “prepare kernel source” someone asked the same question last week.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 07, 2023, 10:04:45 AM
You may also need this:
Code: [Select]
The Linux kernel configuration item CONFIG_SPI_PXA2XX:

    prompt: PXA2xx SSP SPI master
    type: tristate
    depends on: CONFIG_ARCH_PXA || CONFIG_ARCH_MMP || CONFIG_PCI || CONFIG_ACPI || CONFIG_COMPILE_TEST
    defined in drivers/spi/Kconfig
    found in Linux kernels: 2.6.17–2.6.39, 3.0–3.19, 4.0–4.20, 5.0–5.19, 6.0–6.3
    modules built: pxa2xx_spi, spi-pxa2xx-platform, spi-pxa2xx
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 07, 2023, 10:23:34 AM
Thanks for the hints.

I'm guessing this is the link
http://forum.tinycorelinux.net/index.php/topic,26236.msg168802.html#msg168802 (http://forum.tinycorelinux.net/index.php/topic,26236.msg168802.html#msg168802)

So far, I don't understand any of that yet..  ;D and it's getting very late now.
I'll come back and learn it bit by bit later and possibly one day I'll comeback to actually do it.  8)
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 10, 2023, 10:04:15 AM
Hi Juanito,
I think this is the key part to get started
Quote
To prepare the CorePure64-14.x kernel source:
Code: [Select]
tce-load -i compiletc perl5 elfutils-dev ncursesw-dev bc
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/linux-6.1.2-patched.txz
tar xf linux-6.1.2-patched.txz
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/config-6.1.2-tinycore64
cd linux-6.1.2
make mrproper
cp ../config-6.1.2-tinycore64 .config
make oldconfig
make prepare
make modules_prepare

So I did all of that and gets these bunch of files
Code: [Select]
rwxr-xr-x   26 tc       staff       4.0K May 10 13:47 ./
drwxr-xr-x    3 tc       staff       4.0K May 10 13:41 ../
-rw-r--r--    1 tc       staff        460 May 10 13:44 ..checked-atomic-arch-fallback.h.cmd
-rw-r--r--    1 tc       staff        455 May 10 13:44 ..checked-atomic-instrumented.h.cmd
-rw-r--r--    1 tc       staff        415 May 10 13:44 ..checked-atomic-long.h.cmd
-rw-r--r--    1 tc       staff          0 May 10 13:44 .checked-atomic-arch-fallback.h
-rw-r--r--    1 tc       staff          0 May 10 13:44 .checked-atomic-instrumented.h
-rw-r--r--    1 tc       staff          0 May 10 13:44 .checked-atomic-long.h
-rw-r--r--    1 tc       staff      19.9K Dec 31 12:33 .clang-format
-rw-r--r--    1 tc       staff         59 Dec 31 12:33 .cocciconfig
-rw-r--r--    1 tc       staff     194.9K May 10 13:44 .config
-rw-r--r--    1 tc       staff        151 Dec 31 12:33 .get_maintainer.ignore
-rw-r--r--    1 tc       staff         62 Dec 31 12:33 .gitattributes
-rw-r--r--    1 tc       staff       2.0K Dec 31 12:33 .gitignore
-rw-r--r--    1 tc       staff      24.6K Dec 31 12:33 .mailmap
-rw-r--r--    1 tc       staff        683 May 10 13:45 .missing-syscalls.d
-rw-r--r--    1 tc       staff        369 Dec 31 12:33 .rustfmt.toml
-rw-r--r--    1 tc       staff        496 Dec 31 12:33 COPYING
-rw-r--r--    1 tc       staff      99.3K Dec 31 12:33 CREDITS
drwxr-xr-x   86 tc       staff       4.0K May 10 13:41 Documentation/
-rw-r--r--    1 tc       staff       2.5K Dec 31 12:33 Kbuild
-rw-r--r--    1 tc       staff        555 Dec 31 12:33 Kconfig
drwxr-xr-x    6 tc       staff       4.0K May 10 13:41 LICENSES/
-rw-r--r--    1 tc       staff     672.3K Dec 31 12:33 MAINTAINERS
-rw-r--r--    1 tc       staff      69.0K Dec 31 12:33 Makefile
-rw-r--r--    1 tc       staff        727 Dec 31 12:33 README
drwxr-xr-x   24 tc       staff       4.0K May 10 13:41 arch/
drwxr-xr-x    3 tc       staff       4.0K May 10 13:41 block/
drwxr-xr-x    2 tc       staff       4.0K May 10 13:41 certs/
drwxr-xr-x    4 tc       staff       4.0K May 10 13:41 crypto/
drwxr-xr-x  139 tc       staff       4.0K May 10 13:41 drivers/
drwxr-xr-x   83 tc       staff       4.0K May 10 13:41 fs/
drwxr-xr-x   33 tc       staff       4.0K May 10 13:44 include/
drwxr-xr-x    2 tc       staff       4.0K May 10 13:41 init/
drwxr-xr-x    2 tc       staff       4.0K May 10 13:41 io_uring/
drwxr-xr-x    2 tc       staff       4.0K May 10 13:41 ipc/
drwxr-xr-x   22 tc       staff       4.0K May 10 13:44 kernel/
drwxr-xr-x   22 tc       staff      12.0K May 10 13:41 lib/
drwxr-xr-x    6 tc       staff       4.0K May 10 13:41 mm/
drwxr-xr-x   71 tc       staff       4.0K May 10 13:41 net/
drwxr-xr-x    6 tc       staff       4.0K May 10 13:41 rust/
drwxr-xr-x   39 tc       staff       4.0K May 10 13:41 samples/
drwxr-xr-x   17 tc       staff       4.0K May 10 13:45 scripts/
drwxr-xr-x   14 tc       staff       4.0K May 10 13:41 security/
drwxr-xr-x   27 tc       staff       4.0K May 10 13:41 sound/
drwxr-xr-x   41 tc       staff       4.0K May 10 13:41 tools/
drwxr-xr-x    4 tc       staff       4.0K May 10 13:41 usr/
drwxr-xr-x    4 tc       staff       4.0K May 10 13:41 virt/

Somehow I think I need to connect that files with this.. correct?
Quote
You may also need this:
Code: [Select]
The Linux kernel configuration item CONFIG_SPI_PXA2XX:

    prompt: PXA2xx SSP SPI master
    type: tristate
    depends on: CONFIG_ARCH_PXA || CONFIG_ARCH_MMP || CONFIG_PCI || CONFIG_ACPI || CONFIG_COMPILE_TEST
    defined in drivers/spi/Kconfig
    found in Linux kernels: 2.6.17–2.6.39, 3.0–3.19, 4.0–4.20, 5.0–5.19, 6.0–6.3
    modules built: pxa2xx_spi, spi-pxa2xx-platform, spi-pxa2xx

The problem is I don't know what to do from here. No Idea. Sorry..
Can you guide me please?
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Paul_123 on May 10, 2023, 12:54:33 PM
After this step

Code: [Select]
cp ../config-6.1.2-tinycore64 .config

You can either edit the .config file and change the line that looks like
# CONFIG_KEYBOARD_APPLESPI is not set
to
CONFIG_KEYBOARD_APPLESPI=m

Be sure to check the dependencies.   It is probably easier for you would be to run
Code: [Select]
make menuconfig

Then find the config options and set them to m.   The reason to use menuconfig, is that it will automatically enable the needed dependencies for you.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: patrikg on May 10, 2023, 01:14:07 PM
And when in menuconfig program you can press "/" the slash key, to get search of the CONFIG that you want.
Enable it with "M" so you get a module, and you also get the dependency's checked in,
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 10, 2023, 10:16:12 PM
Thank you Paul_123 and patrikg

When I do make menuconfig and search for applespi,
it shows at search result but i can not find it at the said location.
Please see attached screenshots.
(https://i.ibb.co/PD82WPm/screenshot-0510164219.png)

(https://i.ibb.co/BjmmwV4/screenshot-0510164708.png)

(https://i.ibb.co/GPdzgC0/screenshot-0510164630.png)


Quote
You can either edit the .config file and change the line that looks like
# CONFIG_KEYBOARD_APPLESPI is not set
to
CONFIG_KEYBOARD_APPLESPI=m
what i did was appended this line, because it's not originally in the .config

I also changed this
Quote
# CONFIG_SPI is not set
to
# CONFIG_SPI=m
but still can not find the checkbox.

Did i miss something??
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Rich on May 11, 2023, 12:08:19 AM
Hi pek
Don't edit the config file manually. It's too easy to get it wrong.

Run these commands:
Code: [Select]
cd linux-6.1.2
make mrproper
cp ../config-6.1.2-tinycore64 .config
make oldconfig
make menuconfig

Then:
select  Device Drivers
scroll down to  SPI support  and hit the  y  key
Hit  Enter
scroll down to  PXA2xx SSP SPI master  and hit  m
select  Exit  using the  right arrow  key and hit enter
scroll up 4 lines to  Input device support  and hit  Enter
scroll down to  Keyboards  and hit  Enter
scroll down 3 lines to  Apple SPI keyboard and trackpad  and hit  m

If you are done, select  Save  using the  right arrow  key and hit enter enter enter
select  Exit  using the  right arrow  key and hit enter enter
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 11, 2023, 01:16:51 AM
Hi Rich, thanks for very comprehensive clarification.
I successfully did that. And proceed with
Code: [Select]
make prepare
make modules_prepare

Then I ended up with these bunch of files
Code: [Select]
drwxr-xr-x   26 tc       staff       4.0K May 10 20:49 ./
drwxr-xr-x    3 tc       staff       4.0K May 10 20:36 ../
-rw-r--r--    1 tc       staff        460 May 10 20:45 ..checked-atomic-arch-fallback.h.cmd
-rw-r--r--    1 tc       staff        455 May 10 20:45 ..checked-atomic-instrumented.h.cmd
-rw-r--r--    1 tc       staff        415 May 10 20:45 ..checked-atomic-long.h.cmd
-rw-r--r--    1 tc       staff          0 May 10 20:45 .checked-atomic-arch-fallback.h
-rw-r--r--    1 tc       staff          0 May 10 20:45 .checked-atomic-instrumented.h
-rw-r--r--    1 tc       staff          0 May 10 20:45 .checked-atomic-long.h
-rw-r--r--    1 tc       staff      19.9K Dec 31 12:33 .clang-format
-rw-r--r--    1 tc       staff         59 Dec 31 12:33 .cocciconfig
-rw-r--r--    1 tc       staff     199.9K May 10 20:43 .config
-rw-r--r--    1 tc       staff     194.9K May 10 20:38 .config.old
-rw-r--r--    1 tc       staff        151 Dec 31 12:33 .get_maintainer.ignore
-rw-r--r--    1 tc       staff         62 Dec 31 12:33 .gitattributes
-rw-r--r--    1 tc       staff       2.0K Dec 31 12:33 .gitignore
-rw-r--r--    1 tc       staff      24.6K Dec 31 12:33 .mailmap
-rw-r--r--    1 tc       staff        683 May 10 20:46 .missing-syscalls.d
-rw-r--r--    1 tc       staff        369 Dec 31 12:33 .rustfmt.toml
-rw-r--r--    1 tc       staff        496 Dec 31 12:33 COPYING
-rw-r--r--    1 tc       staff      99.3K Dec 31 12:33 CREDITS
drwxr-xr-x   86 tc       staff       4.0K May 10 20:36 Documentation/
-rw-r--r--    1 tc       staff       2.5K Dec 31 12:33 Kbuild
-rw-r--r--    1 tc       staff        555 Dec 31 12:33 Kconfig
drwxr-xr-x    6 tc       staff       4.0K May 10 20:36 LICENSES/
-rw-r--r--    1 tc       staff     672.3K Dec 31 12:33 MAINTAINERS
-rw-r--r--    1 tc       staff      69.0K Dec 31 12:33 Makefile
-rw-r--r--    1 tc       staff        727 Dec 31 12:33 README
drwxr-xr-x   24 tc       staff       4.0K May 10 20:36 arch/
drwxr-xr-x    3 tc       staff       4.0K May 10 20:36 block/
drwxr-xr-x    2 tc       staff       4.0K May 10 20:36 certs/
drwxr-xr-x    4 tc       staff       4.0K May 10 20:36 crypto/
drwxr-xr-x  139 tc       staff       4.0K May 10 20:36 drivers/
drwxr-xr-x   83 tc       staff       4.0K May 10 20:36 fs/
drwxr-xr-x   33 tc       staff       4.0K May 10 20:39 include/
drwxr-xr-x    2 tc       staff       4.0K May 10 20:36 init/
drwxr-xr-x    2 tc       staff       4.0K May 10 20:36 io_uring/
drwxr-xr-x    2 tc       staff       4.0K May 10 20:36 ipc/
drwxr-xr-x   22 tc       staff       4.0K May 10 20:45 kernel/
drwxr-xr-x   22 tc       staff      12.0K May 10 20:36 lib/
drwxr-xr-x    6 tc       staff       4.0K May 10 20:36 mm/
drwxr-xr-x   71 tc       staff       4.0K May 10 20:36 net/
drwxr-xr-x    6 tc       staff       4.0K May 10 20:36 rust/
drwxr-xr-x   39 tc       staff       4.0K May 10 20:36 samples/
drwxr-xr-x   17 tc       staff       4.0K May 10 20:46 scripts/
drwxr-xr-x   14 tc       staff       4.0K May 10 20:36 security/
drwxr-xr-x   27 tc       staff       4.0K May 10 20:36 sound/
drwxr-xr-x   41 tc       staff       4.0K May 10 20:36 tools/
drwxr-xr-x    4 tc       staff       4.0K May 10 20:36 usr/
drwxr-xr-x    4 tc       staff       4.0K May 10 20:36 virt/
which one is the one i need? And how to use it?
Sorry for super noob questions.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 11, 2023, 01:30:40 AM
Now you need “make”.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 11, 2023, 07:17:03 AM
wow.. it took forever to finish  :o

Now I have vmlinux file.

So, I just replace stock vmlinuz64 with this vmlinux and boot it up with grub, but i got this

error: invalid magic number
error: you have to load the kernel first


my grub entry is
Code: [Select]
menuentry "tinycore64 apple" {
  linux /boot/vmlinux quiet
  initrd /boot/corepure64.gz
}

Help please.. ::)
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 11, 2023, 08:06:29 AM
The file is called vmlinuz with a z at the end.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 11, 2023, 08:17:11 AM
No, there's no vmlinuz file

Code: [Select]
ls vmlin*gave me
vmlinux
vmlinux.a
vmlinux.o
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Juanito on May 11, 2023, 08:20:01 AM
How about bzImage?

Note you will also need the new modules.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Rich on May 11, 2023, 08:43:16 AM
Hi pek
Try looking for  bzImage  in  arch/x86/boot
Copy it to your  boot  directory and name it vmlinuz64Mac
Change the grub entry from  vmlinux  to  vmlinuz64Mac
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 11, 2023, 06:05:57 PM
Hi Juanito and Rich

I found the bzimage and renamed it into vmlinuz64Mac and booted
Code: [Select]
menuentry "tinycore64 apple" {
  linux /boot/vmlinuz64Mac quiet
  initrd /boot/corepure64.gz
}
It boots in successfully, but the keyboard and mouse still not working.


So, I searched for more "possible files" and tried adding vmlinux.bin.gz
Code: [Select]
menuentry "tinycore64 apple" {
  linux /boot/vmlinuz64Mac quiet
  initrd /boot/corepure64.gz /boot/vmlinux.bin.gz
}
It boots into cli


Then I tried
Code: [Select]
menuentry "tinycore64 apple" {
  linux /boot/vmlinuz64Mac quiet
  initrd /boot/vmlinux.bin.gz
}
It can not boot.. Kernel panic


I guess I'm not that smart to figure out things myself  ;D
Help again pleasee..??
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Rich on May 11, 2023, 09:23:20 PM
Hi pek
You left out this step:
... Note you will also need the new modules.

Let's create an extension. First create a destination to copy the modules to:
Code: [Select]
mkdir -p package/usr/local/lib/modules/6.1.2-tinycore64/kernel/drivers/MacBook
Copy the following files from your build directory to the destination:
Code: [Select]
drivers/input/keyboard/applespi.ko
drivers/spi/spi-pxa2xx-pci.ko
drivers/spi/spi-pxa2xx.ko

You'll need  squashfs-tools.tcz:
Code: [Select]
tce-load -wil squashfs-tools.tcz
Now create the extension:
Code: [Select]
mksquashfs package MacBook.tcz -noappend
Copy  MacBook.tcz  to your  tce/optional  directory.
Add  MacBook.tcz  to your  tce/onboot.lst  file.

Go back to this configuration:
I found the bzimage and renamed it into vmlinuz64Mac and booted
Code: [Select]
menuentry "tinycore64 apple" {
  linux /boot/vmlinuz64Mac quiet
  initrd /boot/corepure64.gz
}
It boots in successfully, but the keyboard and mouse still not working. ...

Reboot and see if it works.

If it doesn't, we need the results of  lsmod  and  dmesg  adain.

    [EDIT]: Incorrect version number in path. Changed 5.15.10 to 6.1.2.  Rich
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 12, 2023, 12:38:16 AM
Thanks Rich..

Yes I know, I must left out many steps  ;D
Because I'm not entirely familiar with all the terms, like modules, prepare, config, make.. etc

But thanks to everyone's help and patients, I can gain more knowledge and experiences. :)

Now, back to business...
Code: [Select]
drivers/input/keyboard/applespi.ko
drivers/spi/spi-pxa2xx-pci.ko
drivers/spi/spi-pxa2xx.ko  <--- this one is not there
drivers/spi/spi-pxa2xx-platform.ko  <--- i found and used this one instead
Successfully made and load it as tcz.
However the keyboard and touchpad still not working.

So I removed "drivers/spi/spi-pxa2xx-platform.ko" remade and reload tcz.
But same result.

Quote
If it doesn't, we need the results of  lsmod  and  dmesg  adain.
Well.. I guess I need to wait until I have access to USB-C keyboard to find out exactly what output from Tinycore64.
If I boot from Archbang, and do lsmod and dmesg, possibly it gives different output?? (as posted earlier).

Meanwhile, I'm quite happy learning to compile kernel and creating module.
So in short, the module is actually the files with .ko extensions.
And the new kernel is bzimage.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: patrikg on May 12, 2023, 01:04:57 AM
You should be very happy and proud to create your own kernel and kernel modules.

Now you can take you Linux hat on, and say to your self that your are a Linux hacker and developer.

Happy hacking :)

Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 12, 2023, 01:24:07 AM
...
Now you can take you Linux hat on, and say to your self that your are a Linux hacker and developer.
Happy hacking :)
;D ;D I'm still at a wannabe stage this time. Soo much more to learn..
Thanks for everything guys!!  ;)
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: pek on May 12, 2023, 04:22:08 AM
UPDATE..!!
I got it working..!!  8)

Apparently the path was wrong..
mkdir -p package/usr/local/lib/modules/5.15.10-tinycore64/kernel/drivers/MacBook
It supposed to be:
mkdir -p package/usr/local/lib/modules/6.1.2-tinycore64/kernel/drivers/MacBook

All good.. Keyboard & Touchpad now works on MBP.
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: gadget42 on May 12, 2023, 07:52:14 AM
thanks for letting us know what the problem was!
Title: Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
Post by: Rich on May 12, 2023, 09:38:27 AM
Hi pek
... Apparently the path was wrong.. ...
I copied the version number used in the path from the TC14 source
package I downloaded
, or so I thought. Turns out I downloaded from
the TC13 repository by mistake.

Thank you for pointing out my error. Reply #34 has been updated to show
the correct path.