MIPS64/Known Issues: Difference between revisions
m (MIPS is no longer supported as of Alpine 3.15.0. Security updates are NOT being backported for this platform) |
No edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Obsolete| | {{Obsolete|MIPS64 is no longer supported as of Alpine 3.14.3. Security updates are NOT being backported for this platform. New releases are not available for it.}} | ||
{{TOC right}} | {{TOC right}} | ||
Line 10: | Line 10: | ||
For those which do support named memory blocks, you can load an initramfs into one and then specify it as <code>rd_name=initramfs</code> on the kernel command line. | For those which do support named memory blocks, you can load an initramfs into one and then specify it as <code>rd_name=initramfs</code> on the kernel command line. | ||
Example for loading the initrd (from a SATA disk). | |||
The example is using the debian little endian kernel/initrd which apparently won't process "rd_name" adding this since there's no examples anywhere. | |||
rd_name seems to be implemented by Alpine in <pre>octeon-rd_name.patch</pre> | |||
The related kernel is linux-octeon which builds last on 3.14/3.15 due to some openssl dependency (openssl 3.x vs 1.x). | |||
<pre> | |||
# bring up sata host ports | |||
sata init | |||
# reserve memory starting at the default address $(loadaddr) and size based off the kernel's size (everything here is in hex) | |||
setenv octeon_reserved_mem_linux_base 0x2000000 | |||
setenv octeon_reserved_mem_linux_size 0x15B23B0 | |||
# create a named block named initramfs, | |||
# again the size given is the actual file size plus some rounding | |||
# like this it'll just pick free space and at the same time stay away from what the kernel uses | |||
namedalloc initramfs 0x19d8f00 | |||
# now load the files from ext2 partition (ext3/ext4 only supported if removing certain flags during mkfs) | |||
ext2load sata 0:1 initramfs initrd-6.1.0-35-octeon.gz | |||
ext2load sata 0:1 $(loadaddr) vmlinux-6.1.0-35-octeon | |||
</pre> | |||
For to use this with alpine you need to decide what you'll load here, apkovl or a normal initrd, then try passing it to the alpine kernel using rd_name. | |||
failure can be spotted by this error message: | |||
<pre> | |||
[ 0.000000] Initrd not found or empty - disabling initrd | |||
</pre> | |||
(for anyone who reads this far: the debian kernel crashes on the LiquidIO II NIC during PCIe init. This is not related to initramfs) | |||
== Floating Point == | == Floating Point == | ||
The MIPS64 port is soft-float, because many of the CPUs we are targeting have broken FPUs. This causes problems with math applications, such as those dependent on OpenBLAS. Similarly, binaries that are compiled with <code>-mhard-float</code> can't be linked on Alpine MIPS64. We may do a hard-float port later. | The MIPS64 port is soft-float, because many of the CPUs we are targeting have broken FPUs. This causes problems with math applications, such as those dependent on OpenBLAS. Similarly, binaries that are compiled with <code>-mhard-float</code> can't be linked on Alpine MIPS64. We may do a hard-float port later. | ||
If you attempt on your own you will find it easier to bootstrap a new port from a hardfloat OS so you can avoid any 'infection' via a softfloat linker. | |||
If you try in 3.14, make sure you tear out the soft float bits from the bootstrap env and do not continue if you end up with a soft-float linked 'ld'. | |||
== Go == | == Go == | ||
Line 22: | Line 58: | ||
The recommended kernel for most Octeon devices is the one in our <code>linux-octeon</code> package. However, this kernel does not have the drivers to support the Octeon 3 BGX networking features which are used on the higher-end Octeon SOCs. For those devices, you will need to use a vendor-supplied kernel for now until the driver is ported. | The recommended kernel for most Octeon devices is the one in our <code>linux-octeon</code> package. However, this kernel does not have the drivers to support the Octeon 3 BGX networking features which are used on the higher-end Octeon SOCs. For those devices, you will need to use a vendor-supplied kernel for now until the driver is ported. | ||
(Most of those drivers have been ported around 2022, but expect a lot of issues piecing it together) | |||
== Endianness == | == Endianness == |
Latest revision as of 22:07, 22 July 2025
![]() MIPS64 is no longer supported as of Alpine 3.14.3. Security updates are NOT being backported for this platform. New releases are not available for it. (Discuss) |
These are the known issues with the MIPS64 port.
Run from RAM
At present, not much work has been done on run from RAM, because many of the Octeon boards do not have named memory blocks support, which is necessary to use an initramfs under Cavium Executive.
For those which do support named memory blocks, you can load an initramfs into one and then specify it as rd_name=initramfs
on the kernel command line.
Example for loading the initrd (from a SATA disk). The example is using the debian little endian kernel/initrd which apparently won't process "rd_name" adding this since there's no examples anywhere.
rd_name seems to be implemented by Alpine in
octeon-rd_name.patch
The related kernel is linux-octeon which builds last on 3.14/3.15 due to some openssl dependency (openssl 3.x vs 1.x).
# bring up sata host ports sata init # reserve memory starting at the default address $(loadaddr) and size based off the kernel's size (everything here is in hex) setenv octeon_reserved_mem_linux_base 0x2000000 setenv octeon_reserved_mem_linux_size 0x15B23B0 # create a named block named initramfs, # again the size given is the actual file size plus some rounding # like this it'll just pick free space and at the same time stay away from what the kernel uses namedalloc initramfs 0x19d8f00 # now load the files from ext2 partition (ext3/ext4 only supported if removing certain flags during mkfs) ext2load sata 0:1 initramfs initrd-6.1.0-35-octeon.gz ext2load sata 0:1 $(loadaddr) vmlinux-6.1.0-35-octeon
For to use this with alpine you need to decide what you'll load here, apkovl or a normal initrd, then try passing it to the alpine kernel using rd_name.
failure can be spotted by this error message:
[ 0.000000] Initrd not found or empty - disabling initrd
(for anyone who reads this far: the debian kernel crashes on the LiquidIO II NIC during PCIe init. This is not related to initramfs)
Floating Point
The MIPS64 port is soft-float, because many of the CPUs we are targeting have broken FPUs. This causes problems with math applications, such as those dependent on OpenBLAS. Similarly, binaries that are compiled with -mhard-float
can't be linked on Alpine MIPS64. We may do a hard-float port later.
If you attempt on your own you will find it easier to bootstrap a new port from a hardfloat OS so you can avoid any 'infection' via a softfloat linker. If you try in 3.14, make sure you tear out the soft float bits from the bootstrap env and do not continue if you end up with a soft-float linked 'ld'.
Go
Go itself works fine on MIPS64, but many libraries which make syscalls directly either assume that MIPS environments are 32-bit or do not have code for making syscalls on MIPS at all. As such, many Go packages are presently blocked on MIPS64. The solution is to fix the Go libraries, unfortunately Go does not make this easy to do.
Octeon 3 BGX
The recommended kernel for most Octeon devices is the one in our linux-octeon
package. However, this kernel does not have the drivers to support the Octeon 3 BGX networking features which are used on the higher-end Octeon SOCs. For those devices, you will need to use a vendor-supplied kernel for now until the driver is ported.
(Most of those drivers have been ported around 2022, but expect a lot of issues piecing it together)
Endianness
The MIPS64 port is big-endian. This causes problems with some cryptographic and multimedia applications which either assume MIPS is little-endian or do not have any endian awareness at all. Such packages will have to either be fixed or blocked.
Rust
Rust is not yet bootstrapped on MIPS64.
Java
Java is not yet bootstrapped on MIPS64. To bootstrap Java, we would need to first fix the FTBFS issue in community/gcc6
so we have a functioning GCJ.