WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro  (Read 7719 times)

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #15 on: May 07, 2023, 09:34:09 AM »
Hopefully, it's not this:
Code: [Select]
# CONFIG_SPI is not set

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #16 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  :(

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #17 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?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #18 on: May 07, 2023, 09:59:18 AM »
If you search these forums on “prepare kernel source” someone asked the same question last week.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #19 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

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #20 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

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)

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #21 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?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1268
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #22 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.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 723
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #23 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,

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #24 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.







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??
« Last Edit: May 10, 2023, 10:24:45 PM by pek »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #25 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

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #26 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.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #27 on: May 11, 2023, 01:30:40 AM »
Now you need “make”.

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #28 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.. ::)

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: TinyCorePure64 14.0 Mouse and Keyboard Not Working on Macbook Pro
« Reply #29 on: May 11, 2023, 08:06:29 AM »
The file is called vmlinuz with a z at the end.