[BeagleBoard][Debian] How to download kernel source packages.

Now that my BeagleBoard is working and accessing the Internet, I want to download the sources for the various kernels:

root@arm:/var/lib/dpkg# apt-get source linux-image-5.7.19-armv7-x28
. Reading package lists... Done
Picking 'linux-upstream' as source package instead of 'linux-image-5.7.19-armv7-x28
E: Unable to find a source package for linux-upstream
root@arm:/var/lib/dpkg#

I think Robert’s scripts https://github.com/RobertCNelson/linux-dev do something similar, but was looking for a method that would allow the usage of apt-get instead of another set of external scripts.

-Nevets

The Generic Script is:

git clone https://github.com/RobertCNelson/linux-stable-rcn-ee
cd ./linux-stable-rcn-ee
git checkout `uname -r` -b tmp

So for linux-image-5.7.19-armv7-x28

git clone https://github.com/RobertCNelson/linux-stable-rcn-ee
cd ./linux-stable-rcn-ee
git checkout 5.7.19-armv7-x28 -b tmp

or Even:

git clone -b 5.7.19-armv7-x28 https://github.com/RobertCNelson/linux-stable-rcn-ee --depth=100

To cut down on bandwidth…

So above would download 191 MiB:

Cloning into 'linux-stable-rcn-ee'...
remote: Enumerating objects: 73061, done.
remote: Counting objects: 100% (73061/73061), done.
remote: Compressing objects: 100% (68243/68243), done.
remote: Total 73061 (delta 6999), reused 13908 (delta 4083), pack-reused 0
Receiving objects: 100% (73061/73061), 191.07 MiB | 6.49 MiB/s, done.
Resolving deltas: 100% (6999/6999), done.
Note: switching to '4297340c0106d34ff017ad9f8984065d7bc19b47'.

Regards,

What are the commands to build the *.deb from this source, replicating the l files shipped with my BBB as much as possible? I am trying to replicate the original build, so that I can work up from that - I’ve got some bugs to track down.

in general we use: make bindeb-pkg

So for 5.10.168-ti-r74

git clone -b 5.10.168-ti-r74 https://github.com/RobertCNelson/linux-stable-rcn-ee --depth=100
make ARCH=arm rcn-ee_defconfig
make -j4 ARCH=arm  LOCALVERSION=-ti-r74 CROSS_COMPILE=  KDEB_PKGVERSION=1bullseye KDEB_SOURCENAME=linux-upstream KDEB_COMPRESS=xz KBUILD_DEBARCH=armhf DEBEMAIL=robertcnelson@gmail.com DEBFULLNAME=rcn-ee bindeb-pkg

Regards,