Difference between revisions of "PineNote Development/Building Kernel"

From PINE64
Jump to navigation Jump to search
(create a new page to talk about how to build the kernel, combining other dev's steps)
 
Line 1: Line 1:
WIP!!!
WIP!!!


# What I'm Doing
What I'm Doing
1. Clone mw's stuff and parse out his scripts
 
1.1 Start clone_and_prepare_git.sh
# Clone mw's stuff and parse out his scripts
1.1.1 We can just run this as is. Note whatever dir we run it in will have smaeul's linux kernel cloned into it (as well as patches. aka make this a clean directory to work in)
## Start clone_and_prepare_git.sh
1.2 compile.sh
### We can just run this as is. Note whatever dir we run it in will have smaeul's linux kernel cloned into it (as well as patches. aka make this a clean directory to work in)
1.2.1 Run this in the same directory. I started at 12:32 (finished within 15 mins)
### I recommend looking through the patches to see what they do. Worth noting that the patch mentioned in Dorian's notes for GPU is already here, in `rk3566-pinenote_dtsi.patch`
1.3 install_to_pn.sh
## compile.sh
1.3.1 send dtb into `/boot/dtbs/rockchip/` (note that I don't have v1.2 yet this is new) `scp rk3566-pinenote-v1.2.dtb root@pinenote:/boot/dtbs/rockchip/`
### Run this in the same directory. I started at 12:32 (finished within 15 mins)
1.3.2 update extlinux.conf to point to this new dtb
## install_to_pn.sh
1.3.3 send over image to /boot
### send dtb into `/boot/dtbs/rockchip/` (note that I don't have v1.2 yet this is new) `scp rk3566-pinenote-v1.2.dtb root@pinenote:/boot/dtbs/rockchip/`
1.3.4 send modules to overwrite what's in /lib/modules : `rsync --delete -avh --progress lib/modules/5.17.0-rc6-next-20220304-* root@pinenote:/lib/modules/`
### update extlinux.conf to point to this new dtb
1.3.4.1 I didn't have rsync installed on pinenote (it needs to be on client and server). Installation failed because i had new dtb "existing in filesystem" so I moved it to /root for now.
### send over image to /boot
1.4 compile mesa
### send modules to overwrite what's in /lib/modules : `rsync --delete -avh --progress lib/modules/5.17.0-rc6-next-20220304-* root@pinenote:/lib/modules/`
1.4.1 get mesa from here: https://github.com/0cc4m/pinenote-misc/releases (I can't install since I am deving on debian, not arch).
#### I didn't have rsync installed on pinenote (it needs to be on client and server). Installation failed because i had new dtb "existing in filesystem" so I moved it to /root for now.
1.4.2 Try to run dpkg-buildpackage gives me an error saying it can't open debian/changelog. I think this is because the mesa prebuilt isn't a debian package...unsure
## compile mesa
### get mesa from here: https://github.com/0cc4m/pinenote-misc/releases (I can't install since I am deving on debian, not arch).
### Try to run dpkg-buildpackage gives me an error saying it can't open debian/changelog. This is because I don't have the debian package, which can be obtained here (I think) : https://salsa.debian.org/xorg-team/lib/mesa/-/tree/mesa-22.1.3-1.
### Install devscripts, run `mk-build-deps --install --root-cmd sudo --remove` to install build dependencies, then run dpkg-buildpackage.
### This spat out a ton of files into ../ (but not libmutter-9-0_41.4-1_arm64.deb as indicated in the install script. Worse, I didn't cross compile, it's all amd64 deb! I'm so dumb because it comes prebuilt in 0cc4m's stuff: https://github.com/0cc4m/pinenote-misc/releases lol
### Send that stuff over to the pinenote!!
### Untar it and install the packages like this: https://wiki.archlinux.org/title/offline_installation_of_packages
# At this point everything should be installed. Let's restart and see what happens.
## Kernel panic: https://pastebin.com/4Z0aJgHz
## Looking back to see if I missed anything. Mutter? Similar to mesa, but I actually have to build it. Build script has commands needed. Ah shit but I'm on debian, meaning I can only build for debian. I could do a chroot thing...but it's probably not mutter.

Revision as of 22:48, 17 August 2022

WIP!!!

What I'm Doing

  1. Clone mw's stuff and parse out his scripts
    1. Start clone_and_prepare_git.sh
      1. We can just run this as is. Note whatever dir we run it in will have smaeul's linux kernel cloned into it (as well as patches. aka make this a clean directory to work in)
      2. I recommend looking through the patches to see what they do. Worth noting that the patch mentioned in Dorian's notes for GPU is already here, in `rk3566-pinenote_dtsi.patch`
    2. compile.sh
      1. Run this in the same directory. I started at 12:32 (finished within 15 mins)
    3. install_to_pn.sh
      1. send dtb into `/boot/dtbs/rockchip/` (note that I don't have v1.2 yet this is new) `scp rk3566-pinenote-v1.2.dtb root@pinenote:/boot/dtbs/rockchip/`
      2. update extlinux.conf to point to this new dtb
      3. send over image to /boot
      4. send modules to overwrite what's in /lib/modules : `rsync --delete -avh --progress lib/modules/5.17.0-rc6-next-20220304-* root@pinenote:/lib/modules/`
        1. I didn't have rsync installed on pinenote (it needs to be on client and server). Installation failed because i had new dtb "existing in filesystem" so I moved it to /root for now.
    4. compile mesa
      1. get mesa from here: https://github.com/0cc4m/pinenote-misc/releases (I can't install since I am deving on debian, not arch).
      2. Try to run dpkg-buildpackage gives me an error saying it can't open debian/changelog. This is because I don't have the debian package, which can be obtained here (I think) : https://salsa.debian.org/xorg-team/lib/mesa/-/tree/mesa-22.1.3-1.
      3. Install devscripts, run `mk-build-deps --install --root-cmd sudo --remove` to install build dependencies, then run dpkg-buildpackage.
      4. This spat out a ton of files into ../ (but not libmutter-9-0_41.4-1_arm64.deb as indicated in the install script. Worse, I didn't cross compile, it's all amd64 deb! I'm so dumb because it comes prebuilt in 0cc4m's stuff: https://github.com/0cc4m/pinenote-misc/releases lol
      5. Send that stuff over to the pinenote!!
      6. Untar it and install the packages like this: https://wiki.archlinux.org/title/offline_installation_of_packages
  2. At this point everything should be installed. Let's restart and see what happens.
    1. Kernel panic: https://pastebin.com/4Z0aJgHz
    2. Looking back to see if I missed anything. Mutter? Similar to mesa, but I actually have to build it. Build script has commands needed. Ah shit but I'm on debian, meaning I can only build for debian. I could do a chroot thing...but it's probably not mutter.