linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Thomas <pthomas8589@gmail.com>
To: Dick Hollenbeck <dick@softplc.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: Need help building for aarch64 kernel 5.2
Date: Tue, 12 Nov 2019 15:33:46 -0500	[thread overview]
Message-ID: <CAD56B7cgt704nWrowch8KrcT7e6ASr5Hi9FQ8-xmgztYcdceyA@mail.gmail.com> (raw)
In-Reply-To: <a0a64a18-5805-de3b-c4f7-537de8fa0508@softplc.com>

On Tue, Nov 12, 2019 at 2:27 PM Dick Hollenbeck <dick@softplc.com> wrote:
>
> Hi Experts,
>
> I really need some help please.
>
> Here is the result of my first build attempt on a tree made from pristine
> Linux 5.2.21
>
> and the corresponding RT patch, which applied cleanly:
>
>
>
> $ /i/runtime/arm64/kernel/build-arm64-rt.sh
> make[1]: Entering directory '/ssd/build/linux-5.2.y'
>   GEN     Makefile
> scripts/kconfig/conf  --syncconfig Kconfig
>   GEN     Makefile
>   Using /ssd/linux-5.2.y as source for kernel
>   CALL    /ssd/linux-5.2.y/scripts/atomic/check-atomics.sh
>   CALL    /ssd/linux-5.2.y/scripts/checksyscalls.sh
>   CHK     include/generated/compile.h
>   GZIP    kernel/config_data.gz
>   CC      kernel/configs.o
>   AR      kernel/built-in.a
>   GEN     .version
>   CHK     include/generated/compile.h
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   AR      init/built-in.a
>   LD      vmlinux.o
>   MODPOST vmlinux.o
>   MODINFO modules.builtin.modinfo
> kernel/sched/core.o: In function `migrate_enable':
> core.c:(.text+0x3750): undefined reference to `takedown_cpu_task'
> core.c:(.text+0x3750): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against
> undefined symbol `takedown_cpu_task'
> core.c:(.text+0x3754): undefined reference to `takedown_cpu_task'
> /ssd/linux-5.2.y/Makefile:1054: recipe for target 'vmlinux' failed
> make[1]: *** [vmlinux] Error 1
> make[1]: Leaving directory '/ssd/build/linux-5.2.y'
> Makefile:179: recipe for target 'sub-make' failed
> make: *** [sub-make] Error 2
>
>
> Am I right to think that this pointer, takedown_cpu_task, is more that some maximum
> distance away from object file "core.o" in the link image for the build setup?
>
>
> How are other globals avoiding this same problem, what't the best fix?


Hi Dick,

I've been building for arm64 for some time without issue. I generally
use git, but using the patch is fine too. Here are the general steps.

1. Download the base version. It's not on the kernel.org home page but
you can find it here (https://cdn.kernel.org/pub/linux/kernel/v5.x/)
 wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz

2. Extract the kernel
 tar -xf linux-5.2.21.tar.xz

3. Change into the directory
 cd linux-5.2.21

4. Pull the patch. The main git devel page is a nice reference:
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
If you look for the Commit messages with an [ANNOUNCE] prefix and
click on that such as "[ANNOUNCE] v5.2.21-rt13" then this brings up a
nice write-up Sebastian does with the URL of the RT patch. So in this
case the following command works:
wget https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-5.2.21-rt13.patch.xz

5. Extract the patch
 unxz patch-5.2.21-rt13.patch.xz

6. Apply the patch
 patch -p1 < patch-5.2.21-rt13.patch

7. Make the default config. This is where you customize the config to
turn on things like CONFIG_PREEMPT_RT_FULL. This is done with 'make
ARCH=arm64 menuconfig' or 'make ARCH=arm64 xconfig'
 make ARCH=arm64 defconfig

8. Check that you have a proper arm64 cross compiler in your PATH, the
exact prefix of your compiler may be different, but this is a good
test to see that we have the prefix correct for the next command.
 aarch64-linux-gnu-gcc --version

9. Build the Image (actual u-boot binary for arm64 kernels). The Image
file is located in arch/arm64/boot/
  make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image

I hope this helps. Good luck!

-Paul

  reply	other threads:[~2019-11-12 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 19:21 Need help building for aarch64 kernel 5.2 Dick Hollenbeck
2019-11-12 20:33 ` Paul Thomas [this message]
2019-11-13 18:02   ` Dick Hollenbeck
2019-11-13 21:29     ` Paul Thomas
2019-11-29 16:43       ` [PATCH] sched/core: migrate_enable() must access takedown_cpu_task on !HOTPLUG_CPU Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD56B7cgt704nWrowch8KrcT7e6ASr5Hi9FQ8-xmgztYcdceyA@mail.gmail.com \
    --to=pthomas8589@gmail.com \
    --cc=dick@softplc.com \
    --cc=linux-rt-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).