linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Cc: linux-m68k@lists.linux-m68k.org, Michael Schmitz <schmitzmic@gmail.com>
Subject: Re: m54418: ELF execution issues
Date: Fri, 7 Jun 2024 08:57:20 +0200	[thread overview]
Message-ID: <CAMuHMdV7Tjs86UoyDBsj44dwPwXdRb_gPEH2jFmWA_PLP+-B9A@mail.gmail.com> (raw)
In-Reply-To: <82ba7ea3-d290-494c-b3e3-93d9dc7c6c0d@yoseli.org>

Hi Jean-Michel,

On Mon, Jun 3, 2024 at 12:54 PM Jean-Michel Hautbois
<jeanmichel.hautbois@yoseli.org> wrote:
> I managed to get really far in my boot process, as I can now try to
> execute bash. I had to change the elf.h file because if I don't do that,
> it is not working.
>
> Here is the diff (on v6.9.1):
> diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h
> index 2def06a99b08..38acb928fa81 100644
> --- a/arch/m68k/include/asm/elf.h
> +++ b/arch/m68k/include/asm/elf.h
> @@ -78,8 +78,10 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
>      the loader.  We need to make sure that it is out of the way of the
> program
>      that it will "exec", and that there is sufficient room for the brk.  */
>
> -#ifndef CONFIG_SUN3
> +#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
>   #define ELF_ET_DYN_BASE         0xD0000000UL
> +#elif defined(CONFIG_COLDFIRE)
> +#define ELF_ET_DYN_BASE                (TASK_UNMAPPED_BASE + 0x10000000)
>   #else
>   #define ELF_ET_DYN_BASE         0x0D800000UL
>   #endif

If you end up needing to make a change here, please reshuffle the logic,
so it becomes more streamlined:

    #ifdef CONFIG_COLDFIRE
    ...
    #elif defined(CONFIG_SUN3)
    ...
    #else
    ...
    #endif

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      parent reply	other threads:[~2024-06-07  6:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14 19:11 Kernel Image Format Issue - Coldfire mcf54418 CPU Failing to Boot Jean-Michel Hautbois
2024-05-14 20:16 ` Michael Schmitz
2024-05-15  7:56   ` Jean-Michel Hautbois
2024-05-15 10:29     ` Greg Ungerer
2024-05-15 11:10       ` Jean-Michel Hautbois
2024-05-16 12:43         ` Greg Ungerer
2024-05-16 13:31           ` Jean-Michel Hautbois
2024-05-21 13:46             ` Greg Ungerer
2024-05-27 13:19               ` Jean-Michel Hautbois
2024-05-28  6:32                 ` Jean-Michel Hautbois
2024-05-28  7:47                   ` John Paul Adrian Glaubitz
2024-05-28  8:04                     ` Jean-Michel Hautbois
2024-05-28 13:59                   ` Greg Ungerer
2024-06-03 10:54     ` m54418: ELF execution issues Jean-Michel Hautbois
2024-06-06 14:33       ` Greg Ungerer
2024-06-07  5:27         ` Jean-Michel Hautbois
2024-06-08  2:15           ` Michael Schmitz
2024-06-08  6:58             ` Jean-Michel Hautbois
2024-06-08  7:37             ` Andreas Schwab
2024-06-07  6:57       ` Geert Uytterhoeven [this message]

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=CAMuHMdV7Tjs86UoyDBsj44dwPwXdRb_gPEH2jFmWA_PLP+-B9A@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=jeanmichel.hautbois@yoseli.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=schmitzmic@gmail.com \
    /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).