@@ -5,24 +5,22 @@ These are the scripts used to compile the ev3dev kernel. Originally it also
55included scripts to bootstrap a root file system and create a disk image.
66Those scripts have evolved into the [ brickstrap] package.
77
8- ** NOTE:** The instructions below are for ev3dev-buster . If you want to build
8+ ** NOTE:** The instructions below are for ev3dev-trixie . If you want to build
99a kernel for ev3dev-stretch, please use the [ ev3dev-stretch branch] .
1010
1111[ ev3dev-stretch branch ] : https://github.com/ev3dev/ev3dev-buildscripts/tree/ev3dev-stretch
1212
1313System Requirements
1414-------------------
1515* Ubuntu LTS (can be run in a [ virtual machine] ( https://www.virtualbox.org/ )
16- or with [ Windows Subsystem for Linux] ( https://msdn .microsoft.com/en-us/commandline /wsl/install_guide ) )
16+ or with [ Windows Subsystem for Linux] ( https://learn .microsoft.com/en-us/windows /wsl/install ) )
1717* User account with ` sudo ` enabled
1818* Packages:
1919
20- # If you haven't already added the ev3dev.org repository...
21- sudo apt-add-repository ppa:ev3dev/tools
2220 sudo apt-get update
2321 # then install required packages
2422 sudo apt-get install git build-essential ncurses-dev fakeroot bc \
25- u-boot-tools lzop flex bison libssl-dev gcc-arm-linux-gnueabihf-8.3
23+ u-boot-tools lzop flex bison libssl-dev gcc-arm-linux-gnueabi
2624
2725
2826Scripts
@@ -52,11 +50,8 @@ First time kernel build
5250 update the submodule commit in the kernel repo, so you have to pull manually
5351 to get the most recent commits).
5452
55- ~/work $ git clone git://github.com/ev3dev/ev3dev-buildscripts
56- ~/work $ git clone --recursive --depth 150 git://github.com/ev3dev/ev3-kernel
57- ~/work $ cd ev3-kernel/drivers/lego
58- ~/work/ev3-kernel/drivers/lego $ git pull origin ev3dev-buster
59- ~/work/ev3-kernel/drivers/lego $ cd -
53+ ~/work $ git clone https://github.com/ev3dev/ev3dev-buildscripts
54+ ~/work $ git clone --recursive --depth 25 -b ev3dev-trixie https://github.com/ev3dev/ev3-kernel
6055
61563 . Change to the ` ev3dev-buildscripts ` directory and have a look around.
6257
@@ -84,14 +79,19 @@ First time kernel build
8479 # BeagleBoard
8580 EV3DEV_KERNEL_FLAVOR=bb.org ./build-kernel
8681
87- 6 . That's it!
88-
89- TODO: add instructions on how to modify uEnv.txt to use uImage file.
90-
91- For now, see [ Sharing Your Kernel] ( #sharing-your-kernel ) for how to create
92- a debian package to install the kernel you just built.
82+ 6 . That's it! The uImage and kernel modules you just built are saved in
83+ ` ./build-area ` . You just need to copy the files to your
84+ already formatted SD card. For an easier way of getting the kernel on
85+ your EV3, see [ Sharing Your Kernel] ( #sharing-your-kernel ) . Starting with
86+ ev3dev-stretch images dated 2018-05 or later, the uImage file is no longer
87+ used. Create a Debian package as described in the * Sharing Your Kernel*
88+ section.
9389
90+ ~/work/ev3dev-buildscripts $ cd ./build-area/linux-ev3dev-ev3-dist
91+ ~/work/ev3dev-buildscripts/build-area/linux-ev3dev-ev3-dist $ cp uImage <path-to-boot-partition>/uImage
92+ ~/work/ev3dev-buildscripts/build-area/linux-ev3dev-ev3-dist $ sudo cp -r lib/ <path-to-file-system-partition>
9493
94+
9595Faster Builds and Custom Locations
9696----------------------------------
9797
@@ -161,6 +161,12 @@ Sharing Your Kernel
161161Want to send your custom kernel to someone so that they can use it? Never fear,
162162there is an easy way to do that - using Debian packaging.
163163
164+ Make sure to install debhelper with:
165+
166+ ``` bash
167+ sudo apt-get install debhelper
168+ ```
169+
164170First, we want to set a kernel option so that our friends will know what kernel
165171they are running. Run ` ./menuconfig ` and set this option:
166172
@@ -226,3 +232,23 @@ Common Errors
226232
227233[ brickstrap ] : https://github.com/ev3dev/brickstrap
228234[ wiki ] : https://github.com/ev3dev/ev3dev/wiki
235+
236+ Rebasing
237+ --------
238+
239+ If you want to update your kernel, rebase!
240+
241+ ``` bash
242+ git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
243+ git fetch stable tag v6.12.y # with 'y' being the latest version
244+ git rebase v6.12.y
245+ ```
246+
247+ Updating Submodules
248+ -------------------
249+
250+ If you want to update the submodules in the ev3-kernel (or you forgot to initialize them):
251+
252+ ``` bash
253+ git submodule update --init --recursive --remote
254+ ```
0 commit comments