Debian Customizing Linux kernel AM62
This page is using the default release am62-debian-bookworm-6.1.83_09.02.01.10-v1.0.
To view this page for a specific Variscite SoM and software release, please follow these steps:
- Visit variwiki.com
- Select your SoM
- Select the software release
Introduction
The kernel is deployed as a Debian package during the build process. If there are changes to the kernel source code or configurations, the kernel must be recompiled with the updated changes using the ti-debian repository. Once recompiled, the updated Debian package for the kernel should be uploaded to the Debian package server.
- var-debian package sever - Variscite debian package server
- ti-debian-repos - Contains ti-packages and variscite package to compile and create .deb packages
- ti-linux-kernel - Linux kernel for VAR-SOM-AM62
Use your own remote repository on GitHub
Create your own GitHub account and fork the three repo to a new repository:
For example, you can fork our repository to your own account by visiting the following link and clicking on "Fork" at the top right of the screen.
Alternatively, you can clone our repository to your local machine, and push it later to your own account.
https://github.com/varigit/ti-linux-kernel/tree/ti-linux-6.1.y_09.02.01.10_var01
https://github.com/varigit/ti-debian-repos/tree/bookworm-09.02.01.10-var01
https://github.com/varigit/var-debpkgs/tree/master
After forking the repository to your account, clone the kernel source code from your fork. Then, create a build directory:
$ mkdir ~/am62_debian_kernel $ cd ~/am62_debian_kernel $ git clone https://github.com/xxxx/ti-linux-kernel -b your_branch_name $ cd ti-linux-kernel
edit any file or modify kernel configuration and save it.
$ git add "modified_file_path" $ git commit -a -m "my_am62x_var_som_changes" $ git push origin your_branch_name
Get the latest commit hash: $ git rev-parse HEAD
Assume the latest commit hash is a1fcfd378e2364c15981945cca609c3a5fc12386.
$ cd ~/am62_debian_kernel $ git clone https://github.com/xxxx/var-debpkgs -b your_branch_name $ git clone https://github.com/xxxx/ti-debian-repos -b your_branch_name $ cd ti-debian-repos $ ./ti-linux-kernel-variscite/update-commit.py ./ti-linux-kernel-variscite/suite/Bookworm/debian/ 6.1.83 a1fcfd378e2364c15981945cca609c3a5fc12386 "Author Name <author_name@xxx.com>"
Build Kernel
Before building the kernel, follow the steps in Build the Debian image. As part of building the image, the root filesystem (rootfs) needs to be extracted into a folder and used as the target for the chroot command.
$ mkdir -p ~/rootfs $ sudo tar -xvf ~/debian_am62x_var_som/ti-bdebstrap/build/am62-bookworm-09.02.01.010_var01/tisdk-am62-bookworm-variscite-am62xx-var-som-rootfs.tar.xz -C ~/rootfs $ . ~/am62_debian_kernel/ti-debian-repos/chroot.sh -r ~/rootfs
this will enter into another terminal
$ apt update && apt install git build-essential linux-source bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison devscripts $ cd /workdir $ DEB_SUITE=bookworm ./run.sh ti-linux-kernel-variscite/build $ exit; $ cp ~/am62_debian_kernel/ti-debian-repos/build/Bookworm/ti-linux-kernel-variscite/*.deb ~/am62_debian_kernel/var-debpkgs/var-ti/pool/bookworm/l/ $ cd ../var-debpkgs $ ./update-ppa.sh