summaryrefslogtreecommitdiff
path: root/VC4.mdwn
diff options
context:
space:
mode:
authorEricAnholt <EricAnholt@web>2016-05-20 18:41:47 +0000
committerdri <iki-dri@freedesktop.org>2016-05-20 18:41:47 +0000
commit978d02d0d92a264f2607150bafc61daf277264cf (patch)
tree6020161d39deb25a6bb3b8057dbbff6035f6262d /VC4.mdwn
parentd65d9e17b4f91091b8aa472c9b52dcfa5ade890e (diff)
update kernel build instructions
Diffstat (limited to 'VC4.mdwn')
-rw-r--r--VC4.mdwn35
1 files changed, 27 insertions, 8 deletions
diff --git a/VC4.mdwn b/VC4.mdwn
index b621349..47df628 100644
--- a/VC4.mdwn
+++ b/VC4.mdwn
@@ -12,7 +12,7 @@ Other information:
The V3D kernel driver is now upstream in kernel 4.5, and the devicetree for it is being pulled into kernel 4.7. The merge of everything can be found in linux-next.
-The Raspberry Pi Foundation's [kernel tree](https://github.com/raspberrypi/linux) includes the driver in the current rpi-update 4.4 branch, but it's disabled until you choose the "new OpenGL driver" option in raspi-config.
+The Raspberry Pi Foundation's [kernel tree](https://github.com/raspberrypi/linux) includes the driver in the current rpi-update 4.4 branch, but it's disabled until you choose the "new OpenGL driver" option in raspi-config. Guides here will only cover upstream code; for downstream, the raspi-config is all you need.
## 3D driver status
@@ -28,24 +28,43 @@ Bugs are tracked on my github repositories. The [kernel](https://github.com/anh
Feel free to use bare "+1" comments on bugs that impact you, so that I can use participant count as a rough prioritization guide.
-## Building the kernel
+## Building the upstream kernel (bcm2835 architecture)
This is not a complete guide, just some details you'll definitely need.
-Get the kernel from [vc4-kms-v3d](https://github.com/anholt/linux/tree/vc4-kms-v3d) (upstream-based, bcm2835, Raspberry Pi 1 only) or [vc4-kms-v3d-rpi2](https://github.com/anholt/linux/tree/vc4-kms-v3d-rpi2) (Raspberry Pi foundation-based, bcm2708/9, Raspberry Pi 1/2).
+Get the kernel from [linux-next](https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/).
-Download the kernel .config for [upstream](http://people.freedesktop.org/~anholt/dotconfig-vc4-drm-next-2015-11-04.txt]) or [Pi foundation](http://people.freedesktop.org/~anholt/dotconfig-vc4-kms-v3d-rpi2-2015-11-04.txt) and then customize.
+ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
+ cd linux
+ git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
+ git fetch linux-next
+ git checkout next-TODAYSDATE
-If you're starting from your own .config, you need CONFIG_DRM_VC4=y (not m, or it won't load) and CONFIG_I2C_BCM2835=y. CONFIG_FB_BCM2708 must be unset.
+You need current firmware (2016-04-19) in order to use a plain upstream kernel without running magic scripts on it. You should reboot after this to make sure that you're fine with the new firmware and your new kernel isn't the problem.
-You have to add the following lines to /boot/config.txt:
+ sudo rpi-update
- avoid_warnings=2 # VPU shouldn't smash our display setup.
+Build the kernel with:
-Your kernel cmdline.txt needs "cma=256M@512M"
+ make multi_v7_defconfig # if you have rpi2 or 32-bit rpi3
+ make bcm2835_defconfig # if you have rpi0/1/cm
+ make
+ sudo make install
+
+The kernel will have installed under /boot with some version (make kernelversion tells you what it was). Update your config.txt to contain:
+
+ avoid_warnings=2 # VPU shouldn't smash our display setup.
+ kernel=vmlinuz-KERNELVERSION
+ device_tree=dtbs/KERNELVERSION/bcm2836-rpi-2-b.dtb
+
+(but replace bcm2836-rpi-2-b with the appropriate DT for your device present in that directory)
+
+Edit your cmdline.txt to add "cma=256M@256M"
## Building mesa
+Current Mesa releases include support for vc4, but to build it yourself:
+
sudo apt-get build-dep libgl1-mesa-dri
# Individual packages for Mesa, if build-dep isn't enough.