Skip to content

Commit 3fb0593

Browse files
authored
ev3dev-trixie (#8)
Update README and scripts for ev3dev-trixie.
1 parent 050f586 commit 3fb0593

File tree

4 files changed

+49
-21
lines changed

4 files changed

+49
-21
lines changed

README.md

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,22 @@ These are the scripts used to compile the ev3dev kernel. Originally it also
55
included scripts to bootstrap a root file system and create a disk image.
66
Those 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
99
a 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

1313
System 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

2826
Scripts
@@ -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

6156
3. 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+
9595
Faster Builds and Custom Locations
9696
----------------------------------
9797

@@ -161,6 +161,12 @@ Sharing Your Kernel
161161
Want to send your custom kernel to someone so that they can use it? Never fear,
162162
there 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+
164170
First, we want to set a kernel option so that our friends will know what kernel
165171
they 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+
```

build-kernel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dtbs_install_path="$EV3DEV_INSTALL_DTBS"
2121
make_args="$EV3DEV_MAKE_ARGS -C ${kernel_src_path}
2222
KBUILD_OUTPUT=${obj_path}
2323
ARCH=arm
24-
CROSS_COMPILE=$EV3DEV_TOOLCHAIN/$EV3DEV_ABI"
24+
CROSS_COMPILE=${EV3DEV_TOOLCHAIN}${EV3DEV_ABI}"
2525
extra_default_targets="$EV3DEV_EXTRA_DEFAULT_TARGETS"
2626
uenv_txt_install_path="$EV3DEV_INSTALL_UENV_TXT"
2727

defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
kernel_src_path="$EV3DEV_KERNEL"
88
obj_path="$EV3DEV_OBJ"
99
make_args="$EV3DEV_MAKE_ARGS -C ${kernel_src_path} KBUILD_OUTPUT=${obj_path} \
10-
ARCH=arm CROSS_COMPILE=$EV3DEV_TOOLCHAIN/$EV3DEV_ABI"
10+
ARCH=arm CROSS_COMPILE=${EV3DEV_TOOLCHAIN}${EV3DEV_ABI}"
1111

1212
show_usage ()
1313
{

setup-env

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# EV3DEV_INSTALL_MODULES: Where the kernel modules will be installed.
2121
# EV3DEV_INSTALL_DTBS: Where the device tree blocks will be installed.
2222
# EV3DEV_INSTALL_UENV_TXT: Where the uEnv.txt file is installed (BeagleBoard only).
23-
# EV3DEV_TOOLCHAIN: Where to find the cross-compiler toolchain.
23+
# EV3DEV_TOOLCHAIN: Where to find the cross-compiler toolchain (be sure to include trailing /).
2424
# EV3DEV_MERGE_CMD: The command that the defconfig script uses to merge files.
2525
#
2626
# Advanced/internal variables variables are:
@@ -53,8 +53,10 @@ fi
5353
export EV3DEV_KERNEL_FLAVOR=${EV3DEV_KERNEL_FLAVOR-"ev3"}
5454
export EV3DEV_BUILD_AREA=${EV3DEV_BUILD_AREA-"$(pwd)/build-area"}
5555
export EV3DEV_MERGE_CMD=${EV3DEV_MERGE_CMD-"vimdiff \$file1 \$file2"}
56-
export EV3DEV_TOOLCHAIN=${EV3DEV_TOOLCHAIN-"/usr/lib/x86_64-linux-gnu/gcc-arm-linux-gnueabihf-8.3/bin"}
57-
export EV3DEV_ABI=${EV3DEV_ABI-"arm-linux-gnueabihf-"}
56+
57+
export EV3DEV_TOOLCHAIN=${EV3DEV_TOOLCHAIN-"/usr/bin/"}
58+
export EV3DEV_ABI=${EV3DEV_ABI-"arm-linux-gnueabi-"}
59+
5860

5961
if [ "$EV3DEV_KERNEL_FLAVOR" = "ev3" ]; then
6062
export EV3DEV_KERNEL=${EV3DEV_KERNEL-"$(pwd)/../ev3-kernel"}

0 commit comments

Comments
 (0)