CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
README: add fixup.dat to part1 file list
[kernel/raspberrypi2.git] / README
CommitLineData
e0384e72
JV
1Crux-arm RaspberryPi2 Linux Kernel
2
70f63995
JV
3NOTE: This README is wip. Some instructions are either vague or missing.
4
f885aa39 5upstream sources:
e0384e72
JV
6 https://www.kernel.org/pub/linux/kernel/v4.x
7 git://git.kernel.org/pub/scm/linux/kernel/git/statble/linux-stable.git
f885aa39 8 https://github.com/raspberrypi/linux
e0384e72 9
70f63995
JV
10Type make or make all to build kernel image, the device tree files/overlays,
11modules and related files. You may also find some of the other targets useful;
12either for rebuilding only a certain target or possibly downloading files for
13later offline build. These currently include:
14
15all: build all targets
16clean: clean out built files/directories
17distclean: clean, plus remove even downloaded files also
18files: download all remote files
19config: unpatch the kernel and copy the default config into the kernel tree
20image: build zImage and rpi2 prep'd kernel image files
21dtb: build device tree database/overlay files, tarball
22modules: build kernel modules, tarball
23menuconfig: run menuconfig for kernel, starting with default kernel config
24
25For booting the kernel, you will also need to download these addition files:
26bootcode.bin: https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin
27start.elf: https://github.com/raspberrypi/firmware/raw/master/boot/start.elf
23c365d9
JV
28fixup.dat: https://github.com/raspberrypi/firmware/raw/master/boot/start.elf
29
30(Two other files are needed in the boot partition: config.txt and cmdline.txt.
31 I will add more about these files next edit, as well as provide links to
32 existing official/semi-official documentation for this files)
70f63995 33
241545a6
JV
34my current config.txt:
35disable_splash=1
36gpu_mem=256
37kernel=kernel7-4.5.4.img
38avoid_warnings=2
39dtoverlay=vc4-kms-v3d
40
41my current cmdline.txt:
42dwg_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty root=/dev/mmcblk0p3 rootfstype=ext4 rootwait
43
44For the above two files, bare in mind that my sd card partition layout is as follows:
45mmcblk0p1: fat32, boot files (mounted to /boot in fstab)
46mmcblk0p2: swap
47mmcblk0p3: ext4, root filesystem
48
49Sd card layout (as found on most howtos in the wild):
70f63995
JV
50
51first partition, boot (fat32):
6c30d911
JV
52kernel-$version.img, System.map-$version, bootcode.bin, start.elf, fixup.dat,
53 config.txt, and cmdline.txt
70f63995
JV
54Untar the dtb tarball (dtb-$version.tar.*) to the boot partition.
55
56second partition, root (ext{2,3,4}, xfs, btrfs, etc):
57Untar the modules tarball (modules-$version.tar.*) to the root partition.
58Untar all the package files created by crossrootfs and raspberrypi2-arm to
6c30d911 59 the root partition.
e0384e72
JV
60
61Generating the kernel patch:
62
63This is a stripped down description of how I generated the kernel patch.
64It is based on how I thought it might have been done by Alpine Linux for
65there raspberrypi kernel.
66
67git clone -b rpi-4.5.y https://github.com/raspberrypi/linux.git linux-rpi
68cd linux-rpi
69git remote add -b linux-4.5.y stable-4.5 \
70 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
71git pull stable-4.5
3365836d 72git diff linux-4.5.y..rpi-4.5.y > ../linux-4.5.y-rpi-$(date +%Y%m%d).patch