Compiler: Setup linux kernel for beaglebone black

Hi

I’m Nazri.I’m new to beaglebone.I want to do cross compile for beaglebone black.For my understanding,I need to install linux compiler at Pc and create boot and rfs at SD card and install at beaglebone black.I’m confuse in beagleboard getting started note that need to download the Debian image.It still need to do download the Debian image if I plan to apply cross compiler?

Rgds

Nazri

I'm Nazri.I'm new to beaglebone.I want to do cross compile for beaglebone
black.For my understanding,I need to install linux compiler at Pc and
create boot and rfs at SD card and install at beaglebone black.I'm confuse
in beagleboard getting started note that need to download the Debian
image.It still need to do download the Debian image if I plan to apply
cross compiler?

  {Please... some white space... paragraphs, space after punctuation,
etc. That tight packed text reads like a transcription of Pinkie Pie [My
Little Pony: Friendship is Magic]}

  The recommendation in the "Getting Started" page is to ensure the
Beagle has an up-to-date operating system. One may have received a unit
that was sitting on a shelf for a few months and could even be a major
version behind (that is, it might have shipped with Debian 9/Stretch where
Debian 10/Buster is the currently supported release).

  I'd also suggest using an SD card during development phases, as a
corrupted SD card can easily be removed, allowing the Beagle to boot from
the eMMC.

  Second thing is: WHAT are you intending to "cross-compile"?
Applications? Your mention of "create boot and <something I don't

" sounds like you are trying to build a complete bootable OS --

or are planning on a bare-board system with no OS, just a fixed executable
(if the latter, I'd suggest you might want to look into microcontroller
boards first: TIVA C series, Arduino DUE, Adafruit Metro series -- maybe
with FreeRTOS [or TI-RTOS for the TIVA]).

  The best information I've seen for setting up just a cross-compiler
environment is in "Exploring Beaglebone" (2nd edition, Derek Molloy,
chapter 7).

  It may be possible to set up a cross development environment on Windows
(there isn't enough information in your message headers to determine what
system you are using), the recommendation seems to be to install something
like VirtualBox, and install a Linux OS inside the virtual machine. THEN
install the cross development system (besides the required cross compiler,
the book recommends QEMU and ECLIPSE). That gives you enough to build C/C++
programs that can be copied to the Beagle and will run. It is not enough to
build a bootable image from scratch.

If you search the Beagleboard forums you’ll find this question has been answered a few times fairly recently. As far as QEMU is concerned, that is not needed unless you are looking to set up an emulation environment on the host system to test code before deploying it.

Ex:
https://mail.google.com/mail/u/0/?tab=rm&ogbl#all/FMfcgxwJXVJDNpwqgTFZtTcgKNcksqrP

The main thing you need is the Toolchain for the BB.
https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/

The best cross-platform option I have found is to use Eclipse, but you could use Visual Studio Code as well. For Windows specific, you could use Visual Studio but you may be limited to having to build on that target (BB) remotely which defeats the purpose of cross-compiling. The best bet for Windows and Visual Studio is to use VisualGDB but that is at an extra cost.
https://visualgdb.com/

There are some pre-build BB toolchains listed at the following link for Windows dev but this is a bit dated.

https://gnutoolchains.com/beaglebone/

Good luck,

Jon