Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #83123 > unrolled thread

Is the sh7785lcr kernel still useful?

Started byBen Hutchings <ben@decadent.org.uk>
First post2024-07-20 00:40 +0200
Last post2024-09-15 18:30 +0200
Articles 14 — 2 participants

Back to article view | Back to linux.debian.kernel


Contents

  Is the sh7785lcr kernel still useful? Ben Hutchings <ben@decadent.org.uk> - 2024-07-20 00:40 +0200
    Re: Is the sh7785lcr kernel still useful? John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-07-20 21:50 +0200
      Re: Is the sh7785lcr kernel still useful? Ben Hutchings <ben@decadent.org.uk> - 2024-07-21 15:20 +0200
        Re: Is the sh7785lcr kernel still useful? John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-07-23 15:00 +0200
          Re: Is the sh7785lcr kernel still useful? Ben Hutchings <ben@decadent.org.uk> - 2024-09-10 21:20 +0200
            Re: Is the sh7785lcr kernel still useful? John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-09-10 21:30 +0200
              Re: Is the sh7785lcr kernel still useful? Ben Hutchings <ben@decadent.org.uk> - 2024-09-10 21:50 +0200
                Re: Is the sh7785lcr kernel still useful? John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-09-11 12:30 +0200
                  Re: Is the sh7785lcr kernel still useful? Ben Hutchings <ben@decadent.org.uk> - 2024-09-11 17:00 +0200
                    Re: Is the sh7785lcr kernel still useful? John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-09-11 17:20 +0200
                      Re: Is the sh7785lcr kernel still useful? John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-09-13 18:00 +0200
                        Re: Is the sh7785lcr kernel still useful? Ben Hutchings <ben@decadent.org.uk> - 2024-09-15 00:20 +0200
                          Re: Is the sh7785lcr kernel still useful? John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-09-15 08:10 +0200
                            Re: Is the sh7785lcr kernel still useful? Ben Hutchings <ben@decadent.org.uk> - 2024-09-15 18:30 +0200

#83123 — Is the sh7785lcr kernel still useful?

FromBen Hutchings <ben@decadent.org.uk>
Date2024-07-20 00:40 +0200
SubjectIs the sh7785lcr kernel still useful?
Message-ID<J247f-3hPw-7@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hello Super-H porters,

In revieweing Debian's kernel configuration for sh4, I realised that
the sh7785lcr board file not only has a small kernel partition but has
no initramfs partition.

Some time ago the compressed kernel image for sh7785lcr became larger
than its kernel partition.  This was caught by a build-time check.  In
version 6.3.2-1~exp1 I attempted to fix this by modularising some
drivers, on the assumption that an initramfs would be used (as is
normal for Debian packaged kernels).  But it seems like this won't work
- any initramfs would have to be appended to the kernel image, so it
would still be too large for the kernel partition.

**If this kernel flavour is no longer usable and no fix is proposed, I
intend to remove it.**

Before I do that:

- Does anyone still care about this board?
- Does anyone have it working with a recent (6.3 or later) Debian
  kernel package, and if so how?

Ben.

-- 
Ben Hutchings
When in doubt, use brute force. - Ken Thompson

[toc] | [next] | [standalone]


#83138

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-07-20 21:50 +0200
Message-ID<J2ofD-3xwL-7@gated-at.bofh.it>
In reply to#83123
Hi Ben,

On Sat, 2024-07-20 at 00:11 +0200, Ben Hutchings wrote:
> In revieweing Debian's kernel configuration for sh4, I realised that
> the sh7785lcr board file not only has a small kernel partition but has
> no initramfs partition.

OK.

> Some time ago the compressed kernel image for sh7785lcr became larger
> than its kernel partition.  This was caught by a build-time check.  In
> version 6.3.2-1~exp1 I attempted to fix this by modularising some
> drivers, on the assumption that an initramfs would be used (as is
> normal for Debian packaged kernels).  But it seems like this won't work
> - any initramfs would have to be appended to the kernel image, so it
> would still be too large for the kernel partition.
> 
> **If this kernel flavour is no longer usable and no fix is proposed, I
> intend to remove it.**
> 
> Before I do that:
> 
> - Does anyone still care about this board?

Yes, it's my primary development board, I have multiple of these boards.

> - Does anyone have it working with a recent (6.3 or later) Debian
>   kernel package, and if so how?

I am currently running a kernel built from git upstream, but I would love
to be able to boot a Debian kernel again. I have no clue how to reduce
the kernel image size at this point though.

I am currently not using an initrd with my custom kernel.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [next] | [standalone]


#83139

FromBen Hutchings <ben@decadent.org.uk>
Date2024-07-21 15:20 +0200
Message-ID<J2EDL-3HC8-1@gated-at.bofh.it>
In reply to#83138

[Multipart message — attachments visible in raw view] — view raw

On Sat, 2024-07-20 at 21:48 +0200, John Paul Adrian Glaubitz wrote:
[...]
> > - Does anyone have it working with a recent (6.3 or later) Debian
> >   kernel package, and if so how?
> 
> I am currently running a kernel built from git upstream, but I would love
> to be able to boot a Debian kernel again. I have no clue how to reduce
> the kernel image size at this point though.
> 
> I am currently not using an initrd with my custom kernel.

I made some config changes that bring the size back under the limit:
<https://salsa.debian.org/kernel-team/linux/-/merge_requests/1133>.

Can you test that this produces a working kernel?

Ben.

-- 
Ben Hutchings
One of the nice things about standards is that
there are so many of them.

[toc] | [prev] | [next] | [standalone]


#83144

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-07-23 15:00 +0200
Message-ID<J3nhv-48Hk-7@gated-at.bofh.it>
In reply to#83139
Hi Ben,

On Sun, 2024-07-21 at 15:16 +0200, Ben Hutchings wrote:
> On Sat, 2024-07-20 at 21:48 +0200, John Paul Adrian Glaubitz wrote:
> [...]
> > > - Does anyone have it working with a recent (6.3 or later) Debian
> > >   kernel package, and if so how?
> > 
> > I am currently running a kernel built from git upstream, but I would love
> > to be able to boot a Debian kernel again. I have no clue how to reduce
> > the kernel image size at this point though.
> > 
> > I am currently not using an initrd with my custom kernel.
> 
> I made some config changes that bring the size back under the limit:
> <https://salsa.debian.org/kernel-team/linux/-/merge_requests/1133>.
> 
> Can you test that this produces a working kernel?

I'll give it a try next week as I'm currently not at home and unable
to access the board for testing. While I can reach the board via SSH,
I don't have any kind of remote management.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [next] | [standalone]


#83899

FromBen Hutchings <ben@decadent.org.uk>
Date2024-09-10 21:20 +0200
Message-ID<Jlez8-bmMb-25@gated-at.bofh.it>
In reply to#83144

[Multipart message — attachments visible in raw view] — view raw

On Tue, 2024-07-23 at 14:57 +0200, John Paul Adrian Glaubitz wrote:
> Hi Ben,
> 
> On Sun, 2024-07-21 at 15:16 +0200, Ben Hutchings wrote:
> > On Sat, 2024-07-20 at 21:48 +0200, John Paul Adrian Glaubitz wrote:
> > [...]
> > > > - Does anyone have it working with a recent (6.3 or later) Debian
> > > >   kernel package, and if so how?
> > > 
> > > I am currently running a kernel built from git upstream, but I would love
> > > to be able to boot a Debian kernel again. I have no clue how to reduce
> > > the kernel image size at this point though.
> > > 
> > > I am currently not using an initrd with my custom kernel.
> > 
> > I made some config changes that bring the size back under the limit:
> > <https://salsa.debian.org/kernel-team/linux/-/merge_requests/1133>.
> > 
> > Can you test that this produces a working kernel?
> 
> I'll give it a try next week as I'm currently not at home and unable
> to access the board for testing. While I can reach the board via SSH,
> I don't have any kind of remote management.

Are you able to test now?

Ben.

-- 
Ben Hutchings
It is easier to write an incorrect program
than to understand a correct one.

[toc] | [prev] | [next] | [standalone]


#83900

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-09-10 21:30 +0200
Message-ID<JleIO-bmPF-27@gated-at.bofh.it>
In reply to#83899
On Tue, 2024-09-10 at 21:16 +0200, Ben Hutchings wrote:
> > I'll give it a try next week as I'm currently not at home and unable
> > to access the board for testing. While I can reach the board via SSH,
> > I don't have any kind of remote management.
> 
> Are you able to test now?

Yes, I can give it a try tomorrow. Can I just apply the changes from the
branch on top of the current kernel package and then just build the package
with "dpkg-buildpackage -B" or is there anything else I need to know?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [next] | [standalone]


#83901

FromBen Hutchings <ben@decadent.org.uk>
Date2024-09-10 21:50 +0200
Message-ID<Jlf29-bmW9-1@gated-at.bofh.it>
In reply to#83900

[Multipart message — attachments visible in raw view] — view raw

On Tue, 2024-09-10 at 21:28 +0200, John Paul Adrian Glaubitz wrote:
> On Tue, 2024-09-10 at 21:16 +0200, Ben Hutchings wrote:
> > > I'll give it a try next week as I'm currently not at home and unable
> > > to access the board for testing. While I can reach the board via SSH,
> > > I don't have any kind of remote management.
> > 
> > Are you able to test now?
> 
> Yes, I can give it a try tomorrow. Can I just apply the changes from the
> branch on top of the current kernel package and then just build the package
> with "dpkg-buildpackage -B" or is there anything else I need to know?

A few things (that you may know already):

- You can speed this up by deleting the other sh4 flavour definition in
  debian/config/sh4/defines.toml.
- Run "debian/rules debian/control-real" before building (and after
  deleting the other flavour).
- If you are cross building, use the "cross" build-profile.
- You can skip building user-space packages by using the
  "pkg.linux.notools" build profile.  (Without that, cross-build-
  dependencies may often be unsatisfiable due to version skew.)

Ben.

-- 
Ben Hutchings
It is easier to write an incorrect program
than to understand a correct one.

[toc] | [prev] | [next] | [standalone]


#83907

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-09-11 12:30 +0200
Message-ID<JlsLL-bvux-3@gated-at.bofh.it>
In reply to#83901
On Tue, 2024-09-10 at 21:43 +0200, Ben Hutchings wrote:
> > Yes, I can give it a try tomorrow. Can I just apply the changes from the
> > branch on top of the current kernel package and then just build the package
> > with "dpkg-buildpackage -B" or is there anything else I need to know?
> 
> A few things (that you may know already):
> 
> - You can speed this up by deleting the other sh4 flavour definition in
>   debian/config/sh4/defines.toml.
> - Run "debian/rules debian/control-real" before building (and after
>   deleting the other flavour).
> - If you are cross building, use the "cross" build-profile.
> - You can skip building user-space packages by using the
>   "pkg.linux.notools" build profile.  (Without that, cross-build-
>   dependencies may often be unsatisfiable due to version skew.)

OK, thanks a lot, this is very useful to know.

But just to clarify, can I just apply this to the current latest Debian
package, run debian/rules debian/control-real and build the package
normally?

Sorry, if that's too obvious, I just want to avoid producing noise.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [next] | [standalone]


#83909

FromBen Hutchings <ben@decadent.org.uk>
Date2024-09-11 17:00 +0200
Message-ID<JlwZ3-bxZB-11@gated-at.bofh.it>
In reply to#83907

[Multipart message — attachments visible in raw view] — view raw

On Wed, 2024-09-11 at 12:24 +0200, John Paul Adrian Glaubitz wrote:
> On Tue, 2024-09-10 at 21:43 +0200, Ben Hutchings wrote:
> > > Yes, I can give it a try tomorrow. Can I just apply the changes from the
> > > branch on top of the current kernel package and then just build the package
> > > with "dpkg-buildpackage -B" or is there anything else I need to know?
> > 
> > A few things (that you may know already):
> > 
> > - You can speed this up by deleting the other sh4 flavour definition in
> >   debian/config/sh4/defines.toml.
> > - Run "debian/rules debian/control-real" before building (and after
> >   deleting the other flavour).
> > - If you are cross building, use the "cross" build-profile.
> > - You can skip building user-space packages by using the
> >   "pkg.linux.notools" build profile.  (Without that, cross-build-
> >   dependencies may often be unsatisfiable due to version skew.)
> 
> OK, thanks a lot, this is very useful to know.
> 
> But just to clarify, can I just apply this to the current latest Debian
> package, run debian/rules debian/control-real and build the package
> normally?
> 
> Sorry, if that's too obvious, I just want to avoid producing noise.

You can apply it to the latest version in experimental, yes.

Ben.

-- 
Ben Hutchings
If more than one person is responsible for a bug, no one is at fault.

[toc] | [prev] | [next] | [standalone]


#83910

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-09-11 17:20 +0200
Message-ID<Jlxip-byq5-5@gated-at.bofh.it>
In reply to#83909
On Wed, 2024-09-11 at 16:55 +0200, Ben Hutchings wrote:
> > OK, thanks a lot, this is very useful to know.
> > 
> > But just to clarify, can I just apply this to the current latest Debian
> > package, run debian/rules debian/control-real and build the package
> > normally?
> > 
> > Sorry, if that's too obvious, I just want to avoid producing noise.
> 
> You can apply it to the latest version in experimental, yes.

Thanks! Will give it a try.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [next] | [standalone]


#83925

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-09-13 18:00 +0200
Message-ID<JmgSd-c0O8-7@gated-at.bofh.it>
In reply to#83910
Hi Ben,

On Wed, 2024-09-11 at 17:14 +0200, John Paul Adrian Glaubitz wrote:
> On Wed, 2024-09-11 at 16:55 +0200, Ben Hutchings wrote:
> > > OK, thanks a lot, this is very useful to know.
> > > 
> > > But just to clarify, can I just apply this to the current latest Debian
> > > package, run debian/rules debian/control-real and build the package
> > > normally?
> > > 
> > > Sorry, if that's too obvious, I just want to avoid producing noise.
> > 
> > You can apply it to the latest version in experimental, yes.
> 
> Thanks! Will give it a try.

Just as a heads-up: I need a few more days as my sh4 builder is currently busy
with some GCC test builds ahead of the GCC SH LRA transition. I will test your
patch set as soon as possible and definitely before the end of next week.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [next] | [standalone]


#83993

FromBen Hutchings <ben@decadent.org.uk>
Date2024-09-15 00:20 +0200
Message-ID<JmJhv-ciev-1@gated-at.bofh.it>
In reply to#83925

[Multipart message — attachments visible in raw view] — view raw

On Fri, 2024-09-13 at 17:59 +0200, John Paul Adrian Glaubitz wrote:
> Hi Ben,
> 
> On Wed, 2024-09-11 at 17:14 +0200, John Paul Adrian Glaubitz wrote:
> > On Wed, 2024-09-11 at 16:55 +0200, Ben Hutchings wrote:
> > > > OK, thanks a lot, this is very useful to know.
> > > > 
> > > > But just to clarify, can I just apply this to the current latest Debian
> > > > package, run debian/rules debian/control-real and build the package
> > > > normally?
> > > > 
> > > > Sorry, if that's too obvious, I just want to avoid producing noise.
> > > 
> > > You can apply it to the latest version in experimental, yes.
> > 
> > Thanks! Will give it a try.
> 
> Just as a heads-up: I need a few more days as my sh4 builder is currently busy
> with some GCC test builds ahead of the GCC SH LRA transition. I will test your
> patch set as soon as possible and definitely before the end of next week.

I've done a new cross-build here, so you can test the packages from:
https://people.debian.org/~benh/packages/linux-sh4/

Ben.

-- 
Ben Hutchings
If the facts do not conform to your theory, they must be disposed of.

[toc] | [prev] | [next] | [standalone]


#83995

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-09-15 08:10 +0200
Message-ID<JmQCl-cmJD-1@gated-at.bofh.it>
In reply to#83993
On Sun, 2024-09-15 at 00:10 +0200, Ben Hutchings wrote:
> I've done a new cross-build here, so you can test the packages from:
> https://people.debian.org/~benh/packages/linux-sh4/

Thanks a lot.

I installed the new kernel package and it seems it won't work as it's not
an U-Boot image as required but just a plain compressed kernel image:

root@tirpitz:~> file /boot/vmlinuz-6.11-rc5+unreleased-sh7785lcr 
/boot/vmlinuz-6.11-rc5+unreleased-sh7785lcr: Linux kernel
root@tirpitz:~>

My working custom kernel looks like this:

root@tirpitz:~> file /mnt/uImage-6.5.gz 
/mnt/uImage-6.5.gz: u-boot legacy uImage, Linux-6.5.0, Linux/SuperH, OS Kernel Image (gzip), 4421099 bytes, Fri May  3 11:48:38 2024, Load Address: 0X80001000, Entry Point: 0X80002000, Header CRC:
0X98EEB114, Data CRC: 0X2F5A3D34
root@tirpitz:~>

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

[toc] | [prev] | [next] | [standalone]


#84003

FromBen Hutchings <ben@decadent.org.uk>
Date2024-09-15 18:30 +0200
Message-ID<Jn0il-csWk-3@gated-at.bofh.it>
In reply to#83995

[Multipart message — attachments visible in raw view] — view raw

On Sun, 2024-09-15 at 08:00 +0200, John Paul Adrian Glaubitz wrote:
> On Sun, 2024-09-15 at 00:10 +0200, Ben Hutchings wrote:
> > I've done a new cross-build here, so you can test the packages from:
> > https://people.debian.org/~benh/packages/linux-sh4/
> 
> Thanks a lot.
> 
> I installed the new kernel package and it seems it won't work as it's not
> an U-Boot image as required but just a plain compressed kernel image:
[...]

We never install a uImage as /boot/vmlinu[xz]-*.  From the very
beginning of the sh4 port in <https://bugs.debian.org/569034>, we've
built a zImage for this flavour even though the upstream default is a
uImage.

If it's necessary to install a uImage somewhere then that tends to be
done by flash-kernel, but I don't see any sign of sh4 support there. 
It rather seems like this board was never properly supported in Debian.

If you're interested in fixing that, then please:

- Do the uImage conversion and installation manually and test the
result.
- If it works, add a configuration for this board to flash-kernel.

Otherwise, let me know and I can delete this flavour.

Ben.


-- 
Ben Hutchings
If the facts do not conform to your theory, they must be disposed of.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web