[opensuse-kernel] [PATCH] Add ARM support
Aloha, I was wondering if people could review my attempt at adding ARM support to openSUSE's Kernel, please? I'm not professing to be an expert or anything, but I think I've listened to the help and advice that I've received - thanks very much for all the help. I didn't create the .configs by hand as I genuinely don't know/understand the options to make valid choices. I did however "borrow" them from other distros, whether that's a good idea or not I can't say. The imx.conf is from Ubuntu, whilst the omap.conf, tegra.conf and generic.conf are from Fedora. I am open to being skooled, but try and be gentle please :-) My next step is to try and workout how to get perl-Bootloader to support ARM (any tips?). Thanks, Andy -- Andrew Wafaa IRC: FunkyPenguin GPG: 0x3A36312F
On Fri, Oct 28, 2011 at 04:31:56PM +0100, Andrew Wafaa wrote:
Aloha,
I was wondering if people could review my attempt at adding ARM support to openSUSE's Kernel, please? I'm not professing to be an expert or anything, but I think I've listened to the help and advice that I've received - thanks very much for all the help.
I didn't create the .configs by hand as I genuinely don't know/understand the options to make valid choices. I did however "borrow" them from other distros, whether that's a good idea or not I can't say. The imx.conf is from Ubuntu, whilst the omap.conf, tegra.conf and generic.conf are from Fedora.
I am open to being skooled, but try and be gentle please :-) My next step is to try and workout how to get perl-Bootloader to support ARM (any tips?).
At first glance, this looks fine to me, nice job. What's the generic config for, the quemu image? And I don't think that perl-Bootloader makes much sense for ARM as you are using uboot, right? Any one object to me committing this to the tree? greg k-h -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Fri, 2011-10-28 at 18:40 +0200, Greg KH wrote:
On Fri, Oct 28, 2011 at 04:31:56PM +0100, Andrew Wafaa wrote:
Aloha,
I was wondering if people could review my attempt at adding ARM support to openSUSE's Kernel, please? I'm not professing to be an expert or anything, but I think I've listened to the help and advice that I've received - thanks very much for all the help.
I didn't create the .configs by hand as I genuinely don't know/understand the options to make valid choices. I did however "borrow" them from other distros, whether that's a good idea or not I can't say. The imx.conf is from Ubuntu, whilst the omap.conf, tegra.conf and generic.conf are from Fedora.
I am open to being skooled, but try and be gentle please :-) My next step is to try and workout how to get perl-Bootloader to support ARM (any tips?).
At first glance, this looks fine to me, nice job.
Thanks, although I think I noticed a formating issue with the configs (I need to remove the .config from the file names)
What's the generic config for, the quemu image?
Yes, mostly for that and for some automatic testing.
And I don't think that perl-Bootloader makes much sense for ARM as you are using uboot, right?
I wasn't sure if I needed to have perl-Bootloader as well as uboot. So that answers that one, thanks.
Any one object to me committing this to the tree?
I think the attached patch is better, although I am having issues actually building any of the ARM kernels. Whenever I try I end up with: tar: config/armv7l/generic: Not found in archive tar: Exiting with failure status due to previous errors error: Architecture is not included: armv7l Does this mean I need to actually have armv7l in config.conf and config/ instead of arm or in addition? Thanks, Andy -- Andrew Wafaa IRC: FunkyPenguin GPG: 0x3A36312F
On Fri, Oct 28, 2011 at 09:30:08PM +0100, Andrew Wafaa wrote:
I think the attached patch is better, although I am having issues actually building any of the ARM kernels. Whenever I try I end up with:
tar: config/armv7l/generic: Not found in archive tar: Exiting with failure status due to previous errors error: Architecture is not included: armv7l
Does this mean I need to actually have armv7l in config.conf and config/ instead of arm or in addition?
Try this patch:
From b4d9e3fe740f327bd7d915813696140a56c465a0 Mon Sep 17 00:00:00 2001 From: Michal Marek <mmarek@suse.cz> Date: Sun, 30 Oct 2011 12:47:38 +0100 Subject: [PATCH] rpm/arch-symbols: Add support for ARM
--- rpm/arch-symbols | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/rpm/arch-symbols b/rpm/arch-symbols index 47c100a..f714e67 100755 --- a/rpm/arch-symbols +++ b/rpm/arch-symbols @@ -25,7 +25,7 @@ if [ "$1" = "--list" ]; then # List all known architectures - echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc + echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc arm exit 0 fi @@ -39,6 +39,9 @@ case "$ARCH" in i?86 | pentium3 | pentium4 | athlon | geode) echo i386 ;; + arm*) + echo arm + ;; *) echo "$ARCH" ;; -- 1.7.6.1 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Sun, 2011-10-30 at 12:49 +0100, Michal Marek wrote:
On Fri, Oct 28, 2011 at 09:30:08PM +0100, Andrew Wafaa wrote:
I think the attached patch is better, although I am having issues actually building any of the ARM kernels. Whenever I try I end up with:
tar: config/armv7l/generic: Not found in archive tar: Exiting with failure status due to previous errors error: Architecture is not included: armv7l
Does this mean I need to actually have armv7l in config.conf and config/ instead of arm or in addition?
Try this patch:
From b4d9e3fe740f327bd7d915813696140a56c465a0 Mon Sep 17 00:00:00 2001 From: Michal Marek <mmarek@suse.cz> Date: Sun, 30 Oct 2011 12:47:38 +0100 Subject: [PATCH] rpm/arch-symbols: Add support for ARM
--- rpm/arch-symbols | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/rpm/arch-symbols b/rpm/arch-symbols index 47c100a..f714e67 100755 --- a/rpm/arch-symbols +++ b/rpm/arch-symbols @@ -25,7 +25,7 @@
if [ "$1" = "--list" ]; then # List all known architectures - echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc + echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc arm exit 0 fi
@@ -39,6 +39,9 @@ case "$ARCH" in i?86 | pentium3 | pentium4 | athlon | geode) echo i386 ;; + arm*) + echo arm + ;; *) echo "$ARCH" ;;
This doesn't quite work. Reason being the resulting spec file ends up with "ExclusiveArch: arm", when in fact it needs to be "ExclusiveArch: %arm". I've tested the two by manually editing the resulting spec files, and can confirm the only way it picks up the different ARM arch is by using %arm (much in the same way as %ix86). Any ideas on how I get it to work? I have tried the patch and also tried replacing "arm*)" with the output of "rpm --eval '%arm'" like i386, but no joy. Thanks, Andy -- Andrew Wafaa IRC: FunkyPenguin GPG: 0x3A36312F -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
The various ARM families need similar handling like i?86. --- rpm/arch-symbols | 5 ++++- rpm/mkspec | 1 + 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/rpm/arch-symbols b/rpm/arch-symbols index 47c100a..f714e67 100755 --- a/rpm/arch-symbols +++ b/rpm/arch-symbols @@ -25,7 +25,7 @@ if [ "$1" = "--list" ]; then # List all known architectures - echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc + echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc arm exit 0 fi @@ -39,6 +39,9 @@ case "$ARCH" in i?86 | pentium3 | pentium4 | athlon | geode) echo i386 ;; + arm*) + echo arm + ;; *) echo "$ARCH" ;; diff --git a/rpm/mkspec b/rpm/mkspec index 5815137..5a27c99 100755 --- a/rpm/mkspec +++ b/rpm/mkspec @@ -248,6 +248,7 @@ sub arch2rpm { sub _arch2rpm { my $arch = shift; return "\%ix86" if $arch eq "i386"; + return "\%arm" if $arch eq "arm"; return $arch; } -- 1.7.6.1 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Tue, 2011-11-01 at 14:47 +0100, Michal Marek wrote:
The various ARM families need similar handling like i?86. --- rpm/arch-symbols | 5 ++++- rpm/mkspec | 1 + 2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/rpm/arch-symbols b/rpm/arch-symbols index 47c100a..f714e67 100755 --- a/rpm/arch-symbols +++ b/rpm/arch-symbols @@ -25,7 +25,7 @@
if [ "$1" = "--list" ]; then # List all known architectures - echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc + echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc arm exit 0 fi
@@ -39,6 +39,9 @@ case "$ARCH" in i?86 | pentium3 | pentium4 | athlon | geode) echo i386 ;; + arm*) + echo arm + ;; *) echo "$ARCH" ;; diff --git a/rpm/mkspec b/rpm/mkspec index 5815137..5a27c99 100755 --- a/rpm/mkspec +++ b/rpm/mkspec @@ -248,6 +248,7 @@ sub arch2rpm { sub _arch2rpm { my $arch = shift; return "\%ix86" if $arch eq "i386"; + return "\%arm" if $arch eq "arm"; return $arch; }
Ah excellent, that looks like it does the job. Now to test the builds and make anymore changes before I resubmit the patch. Thanks again, Andy -- Andrew Wafaa IRC: FunkyPenguin GPG: 0x3A36312F -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 1.11.2011 15:34, Andrew Wafaa wrote:
On Tue, 2011-11-01 at 14:47 +0100, Michal Marek wrote:
The various ARM families need similar handling like i?86. --- rpm/arch-symbols | 5 ++++- rpm/mkspec | 1 + 2 files changed, 5 insertions(+), 1 deletions(-)
Ah excellent, that looks like it does the job. Now to test the builds and make anymore changes before I resubmit the patch.
I pushed this patch to the repository now, so you can rebase on top of that. Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 28.10.2011 22:30, Andrew Wafaa wrote:
On Fri, 2011-10-28 at 18:40 +0200, Greg KH wrote:
And I don't think that perl-Bootloader makes much sense for ARM as you are using uboot, right?
I wasn't sure if I needed to have perl-Bootloader as well as uboot. So that answers that one, thanks.
It depends on what you actually want to do. perl-Bootloader is a script that takes care of updating the bootloader configuration after the kernel or initrd have been changed. For instance, on x86, it updates /boot/grub/menu.lst. So if you want to install the kernel rpms on a running arm system, you need support in perl-Bootloader. If you are only going to extract the vmlinuz image from the built rpm and install it onto the system yourself, you don't need to touch perl-Bootloader. Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Dne 28.10.2011 17:31, Andrew Wafaa napsal(a):
create mode 100644 config/arm/generic.config create mode 100644 config/arm/imx.config create mode 100644 config/arm/omap.config create mode 100644 config/arm/tegra.config
The .config suffix is superfluous, the files need to be named config/$arch/$flavor. Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Sat, 2011-10-29 at 15:22 +0200, Michal Marek wrote:
Dne 28.10.2011 17:31, Andrew Wafaa napsal(a):
create mode 100644 config/arm/generic.config create mode 100644 config/arm/imx.config create mode 100644 config/arm/omap.config create mode 100644 config/arm/tegra.config
The .config suffix is superfluous, the files need to be named config/$arch/$flavor.
Michal
Yup, I noticed that which is one reason I sent the revised patch. I'm just not 100% sure the $arch = arm, I think it should but.... Regards, Andy -- Andrew Wafaa IRC: FunkyPenguin GPG: 0x3A36312F -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
participants (4)
-
Andrew Wafaa
-
Greg KH
-
Michal Marek
-
Michal Marek