[arch-releng] [archiso] [PATCH] Reintroduce the possibility to force an architecture
Among other things, 36459f3 ([archiso] Drop aitab support, 2014-06-28) removed the possibility to manually set a specific architecture by using kernel parameters. This, however, is useful, e.g. when installing Arch Linux on a device that reports itself as i586 but works fine with the i686 flavor. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- archiso/initcpio/hooks/archiso | 2 +- docs/README.bootparams | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 26bdedc..4c50566 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -101,7 +101,7 @@ _verify_checksum() { } run_hook() { - arch="$(uname -m)" + [[ -z "${arch}" ]] && arch="$(uname -m)" [[ -z "${cowspace_size}" ]] && cowspace_size="75%" [[ -z "${copytoram_size}" ]] && copytoram_size="75%" [[ -z "${archisobasedir}" ]] && archisobasedir="arch" diff --git a/docs/README.bootparams b/docs/README.bootparams index caee0c2..634cf44 100644 --- a/docs/README.bootparams +++ b/docs/README.bootparams @@ -57,6 +57,10 @@ INDEX Default: "75%" * dm_snap_prefix= Set a prefix for device-mapper snapshot node names. Default: "arch" +* arch= Force an architecture type (i686 | x86_64). + Do not set it for normal operations. + Useful for running a 64 bit kernel / 32 bit userspace. + Default: (architecture of running kernel) ** hooks/archiso_pxe_common -- 2.0.4
On 08/07/2014 01:05 PM, Lukas Fleischer wrote:
Among other things, 36459f3 ([archiso] Drop aitab support, 2014-06-28) removed the possibility to manually set a specific architecture by using kernel parameters. This, however, is useful, e.g. when installing Arch Linux on a device that reports itself as i586 but works fine with the i686 flavor.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- archiso/initcpio/hooks/archiso | 2 +- docs/README.bootparams | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 26bdedc..4c50566 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -101,7 +101,7 @@ _verify_checksum() { }
run_hook() { - arch="$(uname -m)" + [[ -z "${arch}" ]] && arch="$(uname -m)" [[ -z "${cowspace_size}" ]] && cowspace_size="75%" [[ -z "${copytoram_size}" ]] && copytoram_size="75%" [[ -z "${archisobasedir}" ]] && archisobasedir="arch" diff --git a/docs/README.bootparams b/docs/README.bootparams index caee0c2..634cf44 100644 --- a/docs/README.bootparams +++ b/docs/README.bootparams @@ -57,6 +57,10 @@ INDEX Default: "75%" * dm_snap_prefix= Set a prefix for device-mapper snapshot node names. Default: "arch" +* arch= Force an architecture type (i686 | x86_64). + Do not set it for normal operations. + Useful for running a 64 bit kernel / 32 bit userspace. + Default: (architecture of running kernel)
** hooks/archiso_pxe_common
OK. I will add it, but help message should be different, since aitab does not exist anymore, just remove "Useful for running a 64 bit kernel / 32 bit userspace." and maybe add message about these broken machines. This should be fixed at kernel level, there is a open/closed report about this? Thanks
On Fri, 08 Aug 2014 at 01:14:16, Gerardo Exequiel Pozzi wrote:
On 08/07/2014 01:05 PM, Lukas Fleischer wrote: [...]
+* arch= Force an architecture type (i686 | x86_64). + Do not set it for normal operations. + Useful for running a 64 bit kernel / 32 bit userspace. + Default: (architecture of running kernel)
** hooks/archiso_pxe_common
OK. I will add it, but help message should be different, since aitab does not exist anymore, just remove "Useful for running a 64 bit kernel / 32 bit userspace." and maybe add message about these broken machines.
Ok, will remove that part and resubmit.
This should be fixed at kernel level, there is a open/closed report about this?
It is a bit more complicated. There has been a lot of discussion on AMD Geode processors and i686. Just Google for "AMD Geode i686" or "AMD Geode NOPL". They are reported as i586 as of commit a7ef94e in the Linux kernel [1]. However, there were some binutils changes that result in the NOPL instruction (the only i686 instruction that isn't available on the AMD Geode) not being used in Arch packages, see [2], so everything works fine. There might be other similar (maybe exotic) architectures, so given the simplicity of this patch (~10 additional bytes and some documentation) and the gained flexibility, I think it should definitely be added.
Thanks
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a... [2] https://sourceware.org/bugzilla/show_bug.cgi?id=6957
Among other things, 36459f3 ([archiso] Drop aitab support, 2014-06-28) removed the possibility to manually set a specific architecture by using kernel parameters. This, however, is useful, e.g. when installing Arch Linux on a device that reports itself as i586 but works fine with the i686 flavor. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- archiso/initcpio/hooks/archiso | 2 +- docs/README.bootparams | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 26bdedc..4c50566 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -101,7 +101,7 @@ _verify_checksum() { } run_hook() { - arch="$(uname -m)" + [[ -z "${arch}" ]] && arch="$(uname -m)" [[ -z "${cowspace_size}" ]] && cowspace_size="75%" [[ -z "${copytoram_size}" ]] && copytoram_size="75%" [[ -z "${archisobasedir}" ]] && archisobasedir="arch" diff --git a/docs/README.bootparams b/docs/README.bootparams index caee0c2..08198cb 100644 --- a/docs/README.bootparams +++ b/docs/README.bootparams @@ -57,6 +57,9 @@ INDEX Default: "75%" * dm_snap_prefix= Set a prefix for device-mapper snapshot node names. Default: "arch" +* arch= Force an architecture type (i686 | x86_64). + Do not set it for normal operations. + Default: (architecture of running kernel) ** hooks/archiso_pxe_common -- 2.0.4
On 08/08/2014 04:13 AM, Lukas Fleischer wrote:
Among other things, 36459f3 ([archiso] Drop aitab support, 2014-06-28) removed the possibility to manually set a specific architecture by using kernel parameters. This, however, is useful, e.g. when installing Arch Linux on a device that reports itself as i586 but works fine with the i686 flavor.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- archiso/initcpio/hooks/archiso | 2 +- docs/README.bootparams | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 26bdedc..4c50566 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -101,7 +101,7 @@ _verify_checksum() { }
run_hook() { - arch="$(uname -m)" + [[ -z "${arch}" ]] && arch="$(uname -m)" [[ -z "${cowspace_size}" ]] && cowspace_size="75%" [[ -z "${copytoram_size}" ]] && copytoram_size="75%" [[ -z "${archisobasedir}" ]] && archisobasedir="arch" diff --git a/docs/README.bootparams b/docs/README.bootparams index caee0c2..08198cb 100644 --- a/docs/README.bootparams +++ b/docs/README.bootparams @@ -57,6 +57,9 @@ INDEX Default: "75%" * dm_snap_prefix= Set a prefix for device-mapper snapshot node names. Default: "arch" +* arch= Force an architecture type (i686 | x86_64). + Do not set it for normal operations. + Default: (architecture of running kernel)
** hooks/archiso_pxe_common
Thanks, Applied.
participants (2)
-
Gerardo Exequiel Pozzi
-
Lukas Fleischer