public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@redhat.com>
To: Francisco Javier Trujillo Mata <fjtrujy@gmail.com>
Cc: newlib@sourceware.org
Subject: Re: PlayStation 2 newlib port
Date: Tue, 19 Sep 2023 16:42:20 -0400	[thread overview]
Message-ID: <CAOox84vZG4bOQTWVy_SbjUxV+b-HDGiNMS92nU_D_GqHs3A0zw@mail.gmail.com> (raw)
In-Reply-To: <CANdri-iBcLdi+iBD+1CJeDVjiMZQnLkyZTnPPbwQqfZhOiDjww@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5956 bytes --]

Hi Francisco,

There were issues with the previous patch which did not have copyright
headers.  I don't see an updated patch in my mail logs.  Did you submit one?

-- Jeff J.

On Tue, Sep 19, 2023 at 12:38 PM Francisco Javier Trujillo Mata <
fjtrujy@gmail.com> wrote:

> Any update here?
>
> I'm really interested in this, I would like to mainstream PS2 and PSP, and
> I'm also aware that the Dreamcast community is also preparing it for
> mainstreaming it.
>
> Cheers
>
> El mar, 20 jun 2023 a las 9:05, Francisco Javier Trujillo Mata (<
> fjtrujy@gmail.com>) escribió:
>
>> Hello Jeff,
>>
>> First of all thanks for replying and paying attention to my message.
>>
>> To install the proper PS2 Environment to be able to compile and generate
>> PS2 binaries, you require to follow the steps given here:
>> https://github.com/ps2dev/ps2dev
>>
>> The PS2 is a complex machine, (it has 3 main CPUs DVP, IOP, and EE, which
>> means 3 toolchains...) so the whole PS2 development environment is not an
>> easy thing, there are plenty of tools and repositories involved, and as
>> part of this set of tools, and we also have Newlib, as you can see in the
>> next link (which is using a fork with our specific changes).
>> https://github.com/ps2dev/ps2toolchain-ee/blob/main/scripts/003-newlib.sh
>>
>> However, if we just want to check if Newlib compiles for this PS2 port we
>> are creating, we just need to pay attention to the EE CPU, which is the
>> next repo:
>> https://github.com/ps2dev/ps2toolchain-ee
>> There under the "scripts" folder, you can see how Newlib is the 3rd step,
>> so if we want to check if Newlib is compiling, you just need to have proper
>> binutils and GCC installed previously (first and second steps).
>>
>> Additionally, to make easier the usage of the whole PS2 toolchain, we are
>> offering some precompiled toolchains:
>> https://github.com/ps2dev/ps2dev/releases/tag/latest
>> And also the possibility of using dockers:
>>
>> https://hub.docker.com/layers/ps2dev/ps2dev/latest/images/sha256-e6000652581b4d43d135f1862ecccabe4b11dd2afa3edb667b48736d815b59c1?context=explore
>>
>> For executing the generated binaries, you will require either a PS2 that
>> allows you to execute homebrews or a PS2 emulator.
>>
>> Regarding the changes I have made, all the files have been created from
>> scratch for me, anyway, I'm part of the PS2Dev community, so I will add the
>> PS2DEV license to these files.
>>
>>
>> Finally, regarding my original request, I was suffering issues when
>> compiling Newlib after adding the specific PS2 changes, I have found a
>> workaround to make it work, that probably will tell you more about the
>> actual issue.
>> When adding a new "sys" to the Newlib, in our case "newlib/libc/sys/ps2",
>> if you just add the crt0 file (it doesn't matter if it is .S, .s or .c),
>> which means that you "Makefile.inc" is going to be empty, you will suffer
>> the compilations issues that I previously mentioned.
>> fatal error: opening dependency file libc/sys/ps2/.deps/crt0.Tpo: No such
>> file or directory
>>
>> However, if you add an extra file in the sys/ps2 directory, like a
>> dummy.c empty, and obviously, add the reference of this file into the
>> "Makefile.inc", then the library compiles properly generating the expected
>> ".a" and ".o" files.
>>
>> I suppose that the same issue that I'm speaking about most probably is
>> also being suffered with the tic80 system.
>> https://github.com/bminor/newlib/tree/master/newlib/libc/sys/tic80
>>
>> Finally, I'm going to attach the compilation log.
>>
>>
>> Regards,
>> Francisco.
>>
>> El lun, 19 jun 2023 a las 22:42, Jeff Johnston (<jjohnstn@redhat.com>)
>> escribió:
>>
>>> Hi Francisco,
>>>
>>> If you would like help, I would suggest you tell others where they can
>>> get a proper toolset to build with or at least
>>> attach your build log which may provide more info.  I certainly don't
>>> have a Playstation 2 toolset hanging around.
>>>
>>> In addition, looking at your patches, you are missing
>>> copyright/licensing info for the new files you are adding
>>> (as opposed to existing files you are modifying).  If you are taking
>>> code from another location, you cannot change
>>> their license/copyright.  If you wrote these from scratch you should
>>> indicate this but you still need to add the licensing/copyright
>>> info.
>>>
>>> Regards,
>>>
>>> -- Jeff J.
>>>
>>> On Tue, Jun 13, 2023 at 2:31 PM Francisco Javier Trujillo Mata <
>>> fjtrujy@gmail.com> wrote:
>>>
>>>> Hi there!
>>>> I would like to mainstream the PS2 newlib port. So far the PS2 has had
>>>> newlib ports for years, however, it was never intended to be merged into
>>>> the mainstream.
>>>>
>>>> I'm now trying to port to the latest release 4.3.0, however, I'm
>>>> suffering
>>>> some errors during the compilation process.
>>>>
>>>> I have attached the changes that I have done so far.
>>>> Then I just rerun the command `autoreconf` using the proper autoconf and
>>>> automake versions
>>>>
>>>> I execute `configure` with:
>>>>
>>>> PROC_NR=$(getconf _NPROCESSORS_ONLN)
>>>>
>>>> TARGET="mips64r5900el-ps2-elf"
>>>> TARGET_ALIAS="ee"
>>>>
>>>> ## Create and enter the toolchain/build directory
>>>> rm -rf "build-$TARGET"
>>>> mkdir "build-$TARGET"
>>>> cd "build-$TARGET"
>>>>
>>>> ## Configure the build.
>>>> CFLAGS_FOR_TARGET="-O2" ../configure \
>>>> --prefix="$PS2DEV/$TARGET_ALIAS" \
>>>> --target="$TARGET" \
>>>> --enable-newlib-retargetable-locking \
>>>> $TARG_XTRA_OPTS
>>>>
>>>> ## Compile and install.
>>>> make -j "$PROC_NR" all
>>>>
>>>>
>>>> And then it always fails with this error,
>>>>
>>>> fatal error: opening dependency file libc/sys/ps2/.deps/crt0.Tpo: No
>>>> such
>>>> file or directory
>>>>
>>>> Could you help me to identify where the issue is?
>>>>
>>>> Cheers.
>>>>
>>>

      reply	other threads:[~2023-09-19 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 18:31 Francisco Javier Trujillo Mata
2023-06-19 20:41 ` Jeff Johnston
2023-06-20  7:05   ` Francisco Javier Trujillo Mata
2023-09-19 16:38     ` Francisco Javier Trujillo Mata
2023-09-19 20:42       ` Jeff Johnston [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=CAOox84vZG4bOQTWVy_SbjUxV+b-HDGiNMS92nU_D_GqHs3A0zw@mail.gmail.com \
    --to=jjohnstn@redhat.com \
    --cc=fjtrujy@gmail.com \
    --cc=newlib@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).