Skip to content

Kernel boots on Surface Laptop 3 #17

Closed

Description

@mistay
  1. cloned this repro https://github.com/qzed/linux-surface-kernel/
  2. copied https://github.com/qzed/linux-surface-kernel-configs/debian-5.3-x86_64.config to .config in 1.
  3. built w/ gcc (Ubuntu 9.2.1-0ubuntu2)
  4. installed kernel and kernel modules, rebooted into new kernel
  5. machine stalls at loading ramdisk

running Ubuntu 19.10

microcode version 0x38 (/proc/cpuinfo), kernel dmesg: microcode: sig=0x706e5, pf=0x80, revision=0x38; Microcode Update Driver: v2.2

@qzed is this the way to go? any additional steps required?

Activity

  1. mistay commented on Nov 13, 2019

    @mistay
    Author

    even tried to (referred from https://github.com/qzed/linux-surface#compiling-the-kernel-from-source, slightly adapted)

    1. git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git ~/linux-stable
    2. cd ~/linux-stable
    3. git checkout v5.3.y
    4. for i in ~/linux-surface/patches/5.3/*.patch; do patch -p1 < $i; done 
    5. curl https://raw.githubusercontent.com/qzed/linux-surface-kernel-configs/v5.3/debian-5.3-x86_64.config > .config
    5.1. make oldconfig
    5.2. make menuconfig -> (no changes) -> EXIT
    6. make -j `getconf _NPROCESSORS_ONLN`
    7. sudo make install modules_install
    8. reboot into new kernel
    

    --> kernel is unable to mount rootfs after timeout of about 30seconds

    @qzed, @archseer any ideas to build or run a kernel (config) on a surface laptop 3 to get a system that is capable of insmod'ing the surface_sam.ko to enable a surface laptop 3 keyboard?

  2. archseer commented on Nov 13, 2019

    @archseer
    Member

    The ram disk failure sounds like you need to rebuild the initial ramdisk that's used before the kernel boots. I'm not sure how you do that on your system, but on Arch that's done by using mkinitcpio.

  3. mistay commented on Nov 13, 2019

    @mistay
    Author

    finally i managed it to compile a vanilla kernel, patched by https://github.com/qzed/linux-surface/tree/master/patches/5.3

    and the following steps:

    2. cd ~/linux-stable
    3. git checkout v5.3.y
    4. for i in ~/linux-surface/patches/5.3/*.patch; do patch -p1 < $i; done 
    5. curl https://raw.githubusercontent.com/qzed/linux-surface-kernel-configs/v5.3/debian-5.3-x86_64.config > .config
    5.1. make oldconfig
    5.2. make menuconfig -> (no changes) -> EXIT
    6. make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-linux-surface
    7. sudo dpkg -i linux-headers-5.3.11-linux-surface_5.3.11-linux-surface-1_amd64.deb linux-image-5.3.11-linux-surface_5.3.11-linux-surface-1_amd64.deb linux-image-5.3.11-linux-surface-dbg_5.3.11-linux-surface-1_amd64.deb linux-libc-dev_5.3.11-linux-surface-1_amd64.deb
    8. reboot into new kernel
    
    Linux ysurfacelinux 5.3.11-linux-surface #1 SMP Wed Nov 13 21:47:32 CET 2019 x86_64 x86_64 x86_64 GNU/Linux
    
  4. changed the title [-]Kernel does not boot on Surface Laptop 3[/-] [+]Kernel boots on Surface Laptop 3[/+] on Nov 14, 2019
  5. added
    C: questionCategory: Some information is requested
    C: miscCategory: Other (e.g. build issue, ...)
    and removed
    C: questionCategory: Some information is requested
    on Dec 2, 2019
  6. added a commit that references this issue on Jun 1, 2020
  7. 57 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: miscCategory: Other (e.g. build issue, ...)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions