Bug 89421 - systemd: Please add architecture support for Renesas SuperH (Debian sh4)
Summary: systemd: Please add architecture support for Renesas SuperH (Debian sh4)
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium major
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-04 10:36 UTC by John Paul Adrian Glaubitz
Modified: 2015-03-05 01:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Use correct uname identifiers in arch_map for SuperH architecture. (1.28 KB, patch)
2015-03-04 23:13 UTC, John Paul Adrian Glaubitz
Details | Splinter Review

Description John Paul Adrian Glaubitz 2015-03-04 10:36:48 UTC
Hello!

I just upgraded my Renesas SH7785LCR board to a newer Debian version that ships systemd. Unfortunately, the machine won't boot in this configuration as systemd doesn't detect the host architecture:

[    2.724000] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[    2.740000] systemd[1]: Code should not be reached 'Couldn't identify architecture. You need to patch systemd.' at ../src/shared/architecture.c:137, function uname_architecture(). Aborting.
[    2.760000] systemd[1]: Caught <ABRT>, core dump failed.
[    2.764000] systemd[1]: Freezing execution.

The related Debian bug report can be found in [1].

Cheers,
Adrian

> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779710
Comment 1 Lennart Poettering 2015-03-04 11:28:13 UTC
We kinda rely on patches for this, as we don't have access to such machines.

Most likely all that is required is a new entry in the first big table here:

http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/architecture.c

It maps the uname machine value (as shown by uname -m) to an architecture identifier.

What does "uname -m" return on your machine?
Comment 2 John Paul Adrian Glaubitz 2015-03-04 22:33:41 UTC
(In reply to Lennart Poettering from comment #1)
> We kinda rely on patches for this, as we don't have access to such machines.

Ah, I thought it would be a matter of looking at the kernel sources which could contain a list with the possible values for "uname -m" on SuperH boards. I'll look into that myself and create a patch, so I can have my first true contribution to systemd :).

> Most likely all that is required is a new entry in the first big table here:
> 
> http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/architecture.c

Will look into that tomorrow. I want to make sure that we add all subtypes of the SuperH architecture and not just the one that I have.

> It maps the uname machine value (as shown by uname -m) to an architecture
> identifier.
> 
> What does "uname -m" return on your machine?

root@debian-sh4:~> uname -m
sh4a
root@debian-sh4:~>

Thanks for your quick reply! Hopefully be back with a patch tomorrow!

Adrian
Comment 3 John Paul Adrian Glaubitz 2015-03-04 23:13:00 UTC
Created attachment 114010 [details] [review]
Use correct uname identifiers in arch_map for SuperH architecture.

Proposed patch that fixes the uname identifiers for all SuperH CPU families supported by the Linux kernel.

Cheers,
Adrian
Comment 4 Zbigniew Jedrzejewski-Szmek 2015-03-05 01:34:21 UTC
Applied in http://cgit.freedesktop.org/systemd/systemd/commit/?id=3a867c6a23.
Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.