Hi again everyone,
While I figure out how to build a snapshot NETINST ISO, I decided to
give a try to the "nativehd" initrd. This is a interesting one, as it
brings up network on the very first stage of the d-i and download
installer components from the network. I wonder why is called
"nativehd" and not "netinstall" or something like that.
Anyway, on this initrd, the image is also broken because is missing
the Amiga (and Atari) network drivers [1], provided by "nic-modules-${kernel:Version}", so I added that line to the cfg file
and built a new initrd. After booting the image on the real hardware,
d-i goes directly to network setup, but is not able to detect my
NE2000 PCMCIA cards [2]. If I manually select "apne" the kernel says
it has not found any PCMCIA card.
I have tested it with the following cards:
D-Link DE660+ 10 MBit Fiberline FL-4680 10 MBit
Both of them working fine on AmigaOS cnet.device and NetBSD/amiga
9.2; reported as compatible on [3]. I don't think the driver is
broken in current kernels as I am experiencing the very same on
Debian Sarge install with kernel 2.4. Maybe something is wrong with
my setup? Any ideas?
[1] https://salsa.debian.org/installer-team/debian-installer/-/blob/master/build/pkg-lists/nativehd/m68k.cfg
[3] http://www.g-mb.de/pcmcia_e.html
Carlos Milán Figueredo HispaMSX System Operator -
http://www.hispamsx.org - telnet://bbs.hispamsx.org -
https://calnus.com
Merry Christmas! I could finally make the tests.
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: lunes, 13 de diciembre de 2021 7:52
Look for a line containing "Looking for PCMCIA ethernet card : " in the
kernel log messages.
FL-4680
=======
Looking for PCMCIA ethernet card: ethernet PCMCIA card inserted
(unnamed net_device) (uninitialized): PCMCIA NE**00 ethercard probe not found
modprobe: ERROR: could not insert 'apne': No such device or address ethdetect: insmod /lib/modules/5.15.0-2-m68k/kernel/drviers/net/ethernet/8390/8390.ko
ethdetect: insmod /lib/modules/5.15.0-2-m68k/kernel/drviers/net/ethernet/8390/apne.ko
main-menu[205]: INFO: Menu item 'ethdetect' succeeded but requested to be left unconfigured
D-Link D660+ (same messages as FL-4680)
============
Looking for PCMCIA ethernet card: ethernet PCMCIA card inserted
(unnamed net_device) (uninitialized): PCMCIA NE**00 ethercard probe not found modprobe: ERROR: could not insert 'apne': No such device or address ethdetect: insmod /lib/modules/5.15.0-2-m68k/kernel/drviers/net/ethernet/8390/8390.ko
ethdetect: insmod /lib/modules/5.15.0-2-m68k/kernel/drviers/net/ethernet/8390/apne.ko
main-menu[205]: INFO: Menu item 'ethdetect' succeeded but requested to be left unconfigured
Regards,
Carlos
Carlos Milán Figueredo | HispaMSX System Operator | http://www.hispamsx.org | telnet://bbs.hispamsx.org | https://calnus.com
Am 26.12.2021 um 09:34 schrieb Carlos Milán Figueredo:
Merry Christmas! I could finally make the tests.
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: lunes, 13 de diciembre de 2021 7:52
Look for a line containing "Looking for PCMCIA ethernet card : " in the
kernel log messages.
FL-4680
=======
Looking for PCMCIA ethernet card: ethernet PCMCIA card inserted
(unnamed net_device) (uninitialized): PCMCIA NE**00 ethercard probe
not found
That's from apne_probe1 - the MAC address prefix does not match what is expected (NE2000 or Ctron).
If you can tell me your cards' MAC addresses, I can add those prefixes
to the ones known to the driver, and send a patch for you to test. Might
need some more adjustments though (start and end address of ring buffer).
You said the cards are supported by BSD? There might be information
about the ring buffer in the source there.
Hello Michael,
On 29/12/2021 21:31, Michael Schmitz wrote:
Am 26.12.2021 um 09:34 schrieb Carlos Milán Figueredo:
Merry Christmas! I could finally make the tests.
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: lunes, 13 de diciembre de 2021 7:52
Look for a line containing "Looking for PCMCIA ethernet card : " in the >>>> kernel log messages.
FL-4680
=======
Looking for PCMCIA ethernet card: ethernet PCMCIA card inserted
(unnamed net_device) (uninitialized): PCMCIA NE**00 ethercard probe
not found
That's from apne_probe1 - the MAC address prefix does not match what
is expected (NE2000 or Ctron).
If you can tell me your cards' MAC addresses, I can add those prefixes
to the ones known to the driver, and send a patch for you to test.
Might need some more adjustments though (start and end address of ring
buffer).
You said the cards are supported by BSD? There might be information
about the ring buffer in the source there.
oh, where the Gayle memory map issues on the Amiga 1200 addressed, or is
this still not 16-bit, but 8-bit access?
This feels very familiar to where I got stuck like two years ago or so,
and then stopped pushing further because I'm still building an Amiga
4000 as proper development machine to also address other Amiga/A1200
issues while I'm at it ...
I'd be happy to hear that was redone already!
Have a good start into the new year, all of you on the list!
count
Hi Michael,
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: miércoles, 29 de diciembre de 2021 21:31
Looking for PCMCIA ethernet card: ethernet PCMCIA card inserted
(unnamed net_device) (uninitialized): PCMCIA NE**00 ethercard probe
not found
That's from apne_probe1 - the MAC address prefix does not match what is
expected (NE2000 or Ctron).
If you can tell me your cards' MAC addresses, I can add those prefixes
to the ones known to the driver, and send a patch for you to test. Might
need some more adjustments though (start and end address of ring
buffer).
Sure:
- D-Link DE-660+: 00:50:BA:87:C9:27
- FL-4680: 00:E0:98:34:07:DA
You said the cards are supported by BSD? There might be information
about the ring buffer in the source there.
Yes, I have both of them working nicely on a NetBSD/amiga 9.2 install. The kernel messages at bootup are:
==== D-Link DE-660+
pccard0 at mainbus0
pcmcia0 at pccard0
ne0 at pcmcia0 function 0: <D-Link, DE-660+, A, 0004743118001>
ne0: Ethernet address 00:50:ba:87:c9:27
==== FL-4680
pccard0 at mainbus0
pcmcia0 at pccard0
ne0 at pcmcia0 function 0: <Ethernet, Adapter, 2.0>
ne0: Ethernet address 00:e0:98:34:07:dA
Regards,
Carlos
Carlos Milán Figueredo | HispaMSX System Operator | http://www.hispamsx.org | telnet://bbs.hispamsx.org | https://calnus.com
Hi Michael, happy new year!
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: viernes, 31 de diciembre de 2021 8:51
Thanks, I'll check the prefix size and send a patch by PM.
I will need also some help for testing it, as I do not have a Linux working install on my Amiga because I need hd-media initrd and network support :) I am able to boot a kernel with an initrd.
Doesn't print the ring buffer addresses - might need a patch to the BSD
source to do that (I haven't looked at BSD source in over 20 years). Or
maybe some equivalent of ethtool reports the addresses, or they show up
in ifconfig output?
I am afraid ifconfig doesn't print anything about the ring buffer, and -to my knowledge- there is not equivalent ethtool.
But what I meant is to check whether the ne driver source hard-codes the
ring buffer addresses for these cards?
Maybe we can know by taking a look to the NetBSD driver source code? I think it is located on the following files:
1. Gayle PCMCIA driver [1].
2. ne2000.c [2], ne2000reg.h [3], ne2000var.h [4]
3. dp8390reg.h [5], dp8390var.h [6]
I don't have the needed knowledge about the NE2000 driver or the kernel, but to my untrained eye it doesn't look like there is anything hardcoded for these cards.
There's a patch of mine floating around that uses CIS data to figure out
8 or 16 bit IO width (submitted to linux-m68k and netdev a while ago).
With that one applied, dumping the CIS data and hand-parsing the result
might be one way to obtain the necessary data.
In [2] there is a function called ne2000_detect_8bit() that is used for that. It looks like it reads the card ROM to figure out. I don't know if the CIS is considered a ROM or not.
[1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/amiga/dev/gayle_pcmcia.c?rev=1.34&content-type=text/x-cvsweb-markup
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/ne2000.c?rev=1.77&content-type=text/x-cvsweb-markup
[3] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/ne2000reg.h?rev=1.3.8.1&content-type=text/x-cvsweb-markup
[4] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/ne2000var.h?rev=1.27.30.1&content-type=text/x-cvsweb-markup
[5] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/dp8390reg.h?rev=1.8.116.1&content-type=text/x-cvsweb-markup
[6] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/dp8390var.h?rev=1.36&content-type=text/x-cvsweb-markup
Regards,
Carlos
Carlos Milán Figueredo | HispaMSX System Operator | http://www.hispamsx.org | telnet://bbs.hispamsx.org | https://calnus.com
Hi Michael,
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: sábado, 1 de enero de 2022 23:36
I was under the impression that you could (cross-)build your own kernel
and initrd? If that's not an option, testing is going to be much harder.
I am afraid not, I am building Debian Installer kernel images and initrd from Aranym following the building instructions here [1]. If there is documentation for installing a cross-compiler toolchain I will gladly give a try.
In [2] there is a function called ne2000_detect_8bit() that is usedfor that. It looks like it reads the card ROM to figure out. I don't
know if the CIS is considered a ROM or not.
No, that only figures out what mode is set in the 8390 chip - AFAIK
needed to support NE1000 type cards. With 16 bit NE2000 type cards, you
can still use 8 bit IO to access the chip, which is what the 10 Mbit
cards supported by the apne driver do. 100 Mbit cards need 16 bit IO.
I see. I seemed to me that useword var controlled the IO size and there was a part on the code where it assumed 16 bit, but later call the ne2000_detect_8bit() to determine if useword should be kept to 8 bit. Again, I am not familiar with this :)
---------------
/* not an NE1000 - try NE2000 */
/* try 16 bit mode first */
useword = 1;
#ifdef NE2000_DETECT_8BIT
/*
* Check bus type in EEPROM first because some NE2000 compatible wedges
* on 16 bit DMA access if the chip is configured in 8 bit mode.
*/
if (ne2000_detect_8bit(nict, nich, asict, asich))
useword = 0;
#endif
---------------
I'll have to create another patch to look for mem resources in the CIS
data, and get that tested on the already supported cards. Then use that
for new cards.
I will be glad to test on real hardware, provided I have some means to build a kernel and an initrd that allows me at least to boot a BusyBox :)
Regards,
Carlos
[1] https://salsa.debian.org/installer-team/debian-installer/
Carlos Milán Figueredo | HispaMSX System Operator | http://www.hispamsx.org | telnet://bbs.hispamsx.org | https://calnus.com
From 3cd805e7d76164376dbc728075108a02cb95d573 Mon Sep 17 00:00:00 2001From: Michael Schmitz <schmitzmic@gmail.com>
Hi Michael,d-i build process; but I don't know how to do that. Maybe someone highly familiar with Debian can shed a bit of light? Adrian? It would be ideal to try the patch with the nativehd initrd, as the first thing the Debian Installer does in that image is to
Many thanks for the patch! Let see if I can test on my Amiga somehow.
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: lunes, 3 de enero de 2022 8:24
ARAnyM should work, too. You just need to add the attached patch to the
list of patches applied (compile tested on 5.16-rc2) on top of the
mainstream kernel source - as far as I remember, Debian applies any
number of patches, and there is a file in the kernel image source
package that describes which patches are needed for a given
architecture. Haven't built a Debian kernel package in many years, so
can't be more specific than that, sorry.
It looks the Debian Installer build process retrieves the kernel from the Debian repository itself, but I don't find any documentation reference to apply a patch to it, maybe it is just not possible so I have to build my own kernel and inject it in the
Regards,
Carlos
Carlos Milán Figueredo | HispaMSX System Operator | http://www.hispamsx.org | telnet://bbs.hispamsx.org | https://calnus.com
Hi Michael,missing the deb-src repo:
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: miércoles, 5 de enero de 2022 7:39
You'll have to build your own kernel image binary package with the patch
included, and override the repository debian-installer uses for the
kernel image. As I've said, my exposure to building debian-installer is
minimal, and someone else (perhaps Adrian) would know a lot more about
this process.
I found this documentation [1] about how to build a custom kernel including patches into a Debian package, fairly simple and straightforward. But I am not able to "apt-get build-dep" in my Aranym Debian m68k install since it looks like m68k port is
-----
aranym:~# apt-get update
Get:1 http://deb.debian.org/debian-ports sid InRelease [65.8 kB]
Get:2 http://deb.debian.org/debian-ports unreleased InRelease [47.1 kB]
Get:3 http://deb.debian.org/debian-ports sid/main m68k Packages [22.1 MB] Fetched 22.2 MB in 3min 35s (103 kB/s)
Reading package lists... Done
W: Skipping acquire of configured file 'main/source/Sources' as repository 'http://deb.debian.org/debian-ports sid InRelease' does not seem to provide it (sources.list entry misspelt?)
-----
My /etc/apt/sources.list looks like:
-----
deb http://deb.debian.org/debian-ports/ sid main
deb http://deb.debian.org/debian-ports/ unreleased main
deb-src http://deb.debian.org/debian-ports/ sid main
# 'unreleased' does not support sources yet
# deb-src http://deb.debian.org/debian-ports/ unreleased main
-----
Is there a valid deb-src source for sid in Debian Ports? Where should my deb-src in sources.list point to?
Regards,
Carlos
[1] https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official
Carlos Milán Figueredo | HispaMSX System Operator | http://www.hispamsx.org | | telnet://bbs.hispamsx.org | https://calnus.com
I wanted to make a quick update on this.wouldn't be fun at all without networking.
From: Michael Schmitz <schmitzmic@gmail.com>
Sent: domingo, 9 de enero de 2022 0:43
Try
deb-src http://deb.debian.org/debian/ sid main
While this worked nicely, I were not able to build a custom kernel with the patch following the steps at [1], "4.2.2. Simple patching and building". As I didn't have enough time for further research, I had to halt at this step.
If there is any other way such as a cross-compiler toolchain that would allow me to patch the kernel and build it for m68k along with the d-i initrd, I will be more than glad to test it. I really appreciate the patch, Linux on Amiga (or on ANY platform)
Hi,
From: Eero Tamminen <oak@helsinkinet.fi> Sent: sábado, 5 de febrero
de 2022 0:20
This is how I build m68k kernels from upstream relases (for Atari
emulator) on my Debian PC:
Thanks for the clear steps, they worked nicely. I cloned the 5.15
branch instead of 5.16 to match my Aranym install which I also used
to get a .config for the kernel source (/boot/config-5.15.0-2-m68k).
However, after compiling I get a 114 MB vmlinux (or 63 MB if gziped),
that is way too big for the Amiga. The kernel images I use in Aranym
are just about 7 MB uncompressed. In kernel configuration, CONFIG_CC_OPTIMIZE_FOR_SIZE is already enabled. Am I missing
something?
Carlos Milán Figueredo | HispaMSX System Operator |
http://www.hispamsx.org | telnet://bbs.hispamsx.org |
https://calnus.com
Hi Carlos,
even 7 MB uncompressed seems a little big to me (if using modules for anything not essential to boot).
If you can send me your .config (or a link to download the kernel image package), I'll compare with what I've used for v5.15.
The tricky part might be generating the initrd image in the cross build
setup - the script does not have an option to search for kernel image
and modules outside the cross build hosts' root fs AFAICS. You may have
to hack mkinitramfs or manually extract an existing initrd (cpio
archiive format) and repack after replacing the modules directory.
On Sun, 6 Feb 2022, Michael Schmitz wrote:
Hi Carlos,
even 7 MB uncompressed seems a little big to me (if using modules for
anything not essential to boot).
Maybe CONFIG_DEBUG_INFO needs to be disabled:
$ ./scripts/config -d CONFIG_DEBUG_INFO
An alternative approach would be,
$ make ARCH=m68k amiga_defconfig
If you can send me your .config (or a link to download the kernel image
package), I'll compare with what I've used for v5.15.
The tricky part might be generating the initrd image in the cross build
setup - the script does not have an option to search for kernel image
and modules outside the cross build hosts' root fs AFAICS. You may have
to hack mkinitramfs or manually extract an existing initrd (cpio
archiive format) and repack after replacing the modules directory.
If you're building your own, you can arrange to have the critical drivers built-in i.e. just what's necessary to mount the rootfs. After that
modules can be loaded automatically.
Hi Finn,
Am 06.02.2022 um 17:02 schrieb Finn Thain:
On Sun, 6 Feb 2022, Michael Schmitz wrote:
Hi Carlos,
even 7 MB uncompressed seems a little big to me (if using modules for
anything not essential to boot).
Maybe CONFIG_DEBUG_INFO needs to be disabled:
$ ./scripts/config -d CONFIG_DEBUG_INFO
That appears to be the cause, yes.
The installer will attempt to load modules from the initrd to get to a
known sane system state before beginning the install AFAIR, so replacing
the modules on the initrd very likely will still be required.
I'll try replacing modules on an old initrd image using cpio to see how
far that gets me ...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 185 |
Nodes: | 16 (1 / 15) |
Uptime: | 86:50:30 |
Calls: | 3,750 |
Files: | 11,172 |
Messages: | 3,462,162 |