Linux kernel scripts

Robert,
My hard drive failed. I am working on getting my development computer back to where it was. I had a backup of most of my project files like .dts, .dtsi, u-boot 2019.04 config and kernel 4.19.106 config. I keep a copy of the cross-compiler, u-boot and BB-DT tarballs, but I didn’t expect I needed to keep a copy of your git repository or the linux kernel because I thought I would be able to re-clone your repository. I had created instructions which referred to your BeagleBone Black - Linux on ARM - eewiki instructions, to the Linux Kernel Mainline section. I had previously cloned and checked out am33x.4.19x which contained 4.19.106-bone49 scripts. After running the scripts, I ended up with linux kernel 4.19.106-bone49 and that is what is running on my project board.
I notice today that am33x.4.19x contains 4.19.165-bone59. I am guessing that the .165 script will download the 4.19.165 kernel source files.
Can I use the 4.19.106 kernel config file with the 4.19.165 menuconfig?
Would I be better off using the 4.19.106-bone49?
If yes, where can I git the 4.19.106-bone49?

When the build_kernel.sh runs, does it clone the linux git repository or just download the kernel source files that the 4.19.x needs?

Thank you,

Each release is tagged, so you can just checkout that branch:

voodoo@hestia:~/tmp/bb-kernel$ git checkout 4.19.106-bone49 -b tmp
Switched to a new branch 'tmp'
voodoo@hestia:~/tmp/bb-kernel$ cat version.sh | grep 106
KERNEL_TAG=${KERNEL_REL}.106
kernel_rt=".106-rt45"
voodoo@hestia:~/tmp/bb-kernel$ cat version.sh | grep 49
BUILD=${build_prefix}49

it’s up to you, for the BeagleBone Black you shouldn’t see any issues with the later kernel. the scripts run “make menuconfig oldconfig” so any config changes will be pointed out to you if you use the old config with a new version…

it clones a local copy under a new “ignore” directory. It uses git to checkout the base kernel version, thus once built once, it’s really easy to switch versions…

Regards,

Robert,
Thank you for how to use the tag to checkout a specific version. That got me where I needed to be.

FYI, the https://github.com/RobertCNelson/bb-kernel/tree/4.19.106-bone49/readme.md states ‘By default this script will clone the linux-stable tree’. When I executed the script I received this output from the script,
scripts/git: LINUX_GIT not defined in system.sh
cloning kernel/git/torvalds/linux.git - Linux kernel source tree into default location: /home/user/projects/linuxonarm/bb-kernel/ignore/linux-src
Cloning into ‘/home/user/projects/linuxonarm/bb-kernel/ignore/linux-src’…

I don’t think it cloned the stable repository. However, it did build the 4.19.106-bone49.

I have my kernel .config file that I want to use when I run tools/rebuild.sh but I don’t know which folder to put it in or what name to give it.

What name do I give my .config file?
Which folder to I put it in for rebuild/sh to use it?

Thank you again

The initial Clone is Linus’ branch, then we pull Greg’s stable repo on top if we need those stable tag’s

If we were to clone Greg’s repo directly, there is more risk of network reset, as today Greg’s repo is about 1GB bigger then Linus’…

Copy it too ./KERNEL/.config

then run

./tools/rebuild.sh

Regards,

Robert,
I understand better now.

Cross compiler question.
The BeagleBone Black - Linux on ARM - eewiki Cross Compiler section says to download the gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz tarball. I used the 6.5.0-2018 cross compiler to build u-boot.
Later in the Linux Kernel section, the build_kernel.sh downloads the gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz. The script then builds the kernel using 8.3-2019 cross compiler.

Why are different cross compilers used for the same target?
Can u-boot 2019.04 be built using 8.3 instead of 6.5?

Thank you,

Our 2019.04 version of U-Boot is well tested with that version of gcc 6.5… The 4.19.x linux version you selected is well tested with that branch of gcc 8.3…

Feel free to use different versions, but if you run into problems, I will recommend you use our recommendations.

Regards,

1 Like

Robert,
I should have titled this topic ‘Hard drive crashed - help me recover’.
To date, I can build u-boot 2019.04 and kernel 4.19.106-bone49. I will be using the supplied Debian rootfs. Now I am working on recovering my device tree rebuilder. Back June 2020, you mentioned to me “PS, dtb-rebuilder has been replaced with: GitHub - beagleboard/BeagleBoard-DeviceTrees: Linux kernel device trees and device tree overlays for BeagleBoard.org open hardware single board computers and add-on boards.”. At that time I made a copy of the BeagleBoard-DeviceTrees-4.19.x-ti.zip. My custom .dts and.dtsi file build with BB-DT 4.19.x-ti.
I noticed today that there are newer versions of dt-rebuilder and BB-DT.

Do you recommend I stay with the BB-DT 4.19.x-ti?

Thank you,

You should move on to the NEW repo…

The old repo stopped around 4.19.5…

The new repo started around 4.19.90:

Regards,