From 15f1dd4b46b28e434e695f3a77e01eaedf51aba5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= <jsmoeller@linuxfoundation.org>
Date: Mon, 17 Jan 2011 06:41:17 -0700
Subject: [PATCH] Add armv7hl scheduler for armv7 + hardfloat builds. Beside armv7hl, there's also armv7nhl als compatible subarch with additional (neon) flags turned on.

---
 dist/sysconfig.obs-server                        |    2 +-
 docs/api/api/obs.rng                             |    1 +
 src/api/db/migrate/20110117000000_add_armv7hl.rb |   17 +++++++++++++++++
 src/api/db/seeds.rb                              |    1 +
 src/backend/BSConfig.pm.template                 |    1 +
 src/backend/Meta/Rpmmd.pm                        |    1 +
 src/backend/Meta/Susetagsmd.pm                   |    1 +
 src/backend/bs_dispatch                          |   15 ++++++++-------
 src/backend/bs_publish                           |    1 +
 src/backend/bs_worker                            |   15 ++++++++-------
 src/webui/config/options.yml                     |    2 +-
 11 files changed, 41 insertions(+), 16 deletions(-)
 create mode 100644 src/api/db/migrate/20110117000000_add_armv7hl.rb

diff --git a/dist/sysconfig.obs-server b/dist/sysconfig.obs-server
index 04c6165..de3fc15 100644
--- a/dist/sysconfig.obs-server
+++ b/dist/sysconfig.obs-server
@@ -1,6 +1,6 @@
 ## Path:        Applications/OBS
 ## Description: define for which architectures the packages should get build
-## Type:        regexp((i586|x86_64|ppc|ppc64|s390|s390x|ia64|sparc|sparcv8|sparcv9|sparcv9v|sparc64|sparc64v|mips|mips64|mipsel|mips64el|armv4l|armv5el|armv6el|armv7el|armv8el|sh4)+)
+## Type:        regexp((i586|x86_64|ppc|ppc64|s390|s390x|ia64|sparc|sparcv8|sparcv9|sparcv9v|sparc64|sparc64v|mips|mips64|mipsel|mips64el|armv4l|armv5el|armv6el|armv7el|armv7hl|armv8el|sh4)+)
 ## Default:     "i586 x86_64"
 ## Config:      OBS
 #
diff --git a/docs/api/api/obs.rng b/docs/api/api/obs.rng
index b567417..1898b48 100644
--- a/docs/api/api/obs.rng
+++ b/docs/api/api/obs.rng
@@ -14,6 +14,7 @@
       <value>armv5el</value>
       <value>armv6el</value>
       <value>armv7el</value>
+      <value>armv7hl</value>
       <value>armv8el</value>
       <value>hppa</value>
       <value>i386</value>
diff --git a/src/api/db/migrate/20110117000000_add_armv7hl.rb b/src/api/db/migrate/20110117000000_add_armv7hl.rb
new file mode 100644
index 0000000..126dd2b
--- /dev/null
+++ b/src/api/db/migrate/20110117000000_add_armv7hl.rb
@@ -0,0 +1,17 @@
+class AddArchs3  < ActiveRecord::Migration
+
+
+  def self.up
+    Architecture.create :name => "armv7hl"
+  end
+
+
+  def self.down
+    arch = Architecture.find_by_name("armv7hl")
+    if arch
+       arch.destroy
+    end
+  end
+
+
+end
diff --git a/src/api/db/seeds.rb b/src/api/db/seeds.rb
index cc5fb05..1fe984c 100644
--- a/src/api/db/seeds.rb
+++ b/src/api/db/seeds.rb
@@ -2,6 +2,7 @@
     Architecture.create :name => "armv5el"
     Architecture.create :name => "armv6el"
     Architecture.create :name => "armv7el"
+    Architecture.create :name => "armv7hl"
     Architecture.create :name => "armv8el"
     Architecture.create :name => "hppa"
     Architecture.create :name => "i586"
diff --git a/src/backend/BSConfig.pm.template b/src/backend/BSConfig.pm.template
index f539110..3ae2b4e 100644
--- a/src/backend/BSConfig.pm.template
+++ b/src/backend/BSConfig.pm.template
@@ -94,6 +94,7 @@ our $relsync_pool = {
  "armv5el" => "armv5el",
  "armv6el" => "armv6el",
  "armv7el" => "armv7el",
+ "armv7hl" => "armv7hl",
  "armv8el" => "armv8el",
  "sparcv9" => "sparcv9",
  "sparc64" => "sparcv9",
diff --git a/src/backend/Meta/Rpmmd.pm b/src/backend/Meta/Rpmmd.pm
index 24d9860..8299133 100644
--- a/src/backend/Meta/Rpmmd.pm
+++ b/src/backend/Meta/Rpmmd.pm
@@ -114,6 +114,7 @@ sub end_handler {
 	'armv4l'  => ['arm', 'armel',                                                 'noarch'],
 	'armv5el' => ['arm', 'armel', 'armv5el', 'armv5tel', 'armv5tevl' ,            'noarch'],
 	'armv7el' => ['arm', 'armel', 'armv5el', 'armv5tel', 'armv5tevl' , 'armv7el', 'noarch'],
+	'armv7hl' => ['armhf', 'armv7hl', 'armv7nhl',                                 'noarch'],
 	'ppc'     => ['ppc',                                                          'noarch'],
 	'ppc64'   => ['ppc', 'ppc64',                                                 'noarch'],
 	'sh4'     => ['sh4',                                                          'noarch'],
diff --git a/src/backend/Meta/Susetagsmd.pm b/src/backend/Meta/Susetagsmd.pm
index a78b8be..9f2fe96 100644
--- a/src/backend/Meta/Susetagsmd.pm
+++ b/src/backend/Meta/Susetagsmd.pm
@@ -10,6 +10,7 @@ sub parse {
 	'armv4l'  => ['arm', 'armel',                                   'noarch'],
 	'armv5el' => ['arm', 'armel', 'armv5el',                        'noarch'],
 	'armv7el' => ['arm', 'armel', 'armv5el', 'armv7el',             'noarch'],
+	'armv7hl' => ['armhf', 'armv7hl', 'armv7nhl',                   'noarch'],
 	'ppc'     => ['ppc',                                            'noarch'],
 	'ppc64'   => ['ppc', 'ppc64',                                   'noarch'],
 	'sh4'     => ['sh4',                                            'noarch'],
diff --git a/src/backend/bs_dispatch b/src/backend/bs_dispatch
index 0c45404..764da53 100755
--- a/src/backend/bs_dispatch
+++ b/src/backend/bs_dispatch
@@ -69,13 +69,13 @@ $port = $1 if $BSConfig::reposerver =~ /:(\d+)$/;
 my %cando = (
 # this code sucks and is on the list to be rewritten
 # switch on next 3 lines if you want arm, mips, ppc and sh4 qemu emulated builds on a x86 worker
-#  'i586'    => [          'i586',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4'],
-#  'i686'    => [          'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4'],
-#  'x86_64'  => ['x86_64', 'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4'],
+#  'i586'    => [          'i586',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4'],
+#  'i686'    => [          'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4'],
+#  'x86_64'  => ['x86_64', 'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4'],
 # switch on next 3 lines if you want only arm qemu emulated builds on a x86 worker
-  'i586'    => [          'i586',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel',       'sh4'],
-  'i686'    => [          'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel',       'sh4'],
-  'x86_64'  => ['x86_64', 'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel',       'sh4'],
+  'i586'    => [          'i586',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel',       'sh4'],
+  'i686'    => [          'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel',       'sh4'],
+  'x86_64'  => ['x86_64', 'i586', 'i686', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel',       'sh4'],
 #
   'ppc'     => [                                                                                        'ppc'                ],
   'ppc64'   => [                                                                                        'ppc', 'ppc64',      ],
@@ -83,7 +83,8 @@ my %cando = (
   'armv5el' => [                          'armv4l', 'armv5el',                                                               ],
   'armv6el' => [                          'armv4l', 'armv5el', 'armv6el'                                                     ],
   'armv7el' => [                          'armv4l', 'armv5el', 'armv6el', 'armv7el'                                          ],
-  'armv8el' => [                          'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el'                               ],
+  'armv7hl' => [                                                                     'armv7hl'                               ],
+  'armv8el' => [                          'armv4l', 'armv5el', 'armv6el', 'armv7el',            'armv8el'                    ],
   'sh4'     => [                                                                                                        'sh4'],
   'parisc'  => ['hppa', 'hppa64:linux64'],
   'parisc64'=> ['hppa64', 'hppa:linux32'],
diff --git a/src/backend/bs_publish b/src/backend/bs_publish
index 855db96..3a4ee80 100755
--- a/src/backend/bs_publish
+++ b/src/backend/bs_publish
@@ -381,6 +381,7 @@ ARCH.armv4l  arm       armv4l noarch
 ARCH.armv5el arm armel armv4l armv5el armv5tel noarch
 ARCH.armv6el arm armel armv4l armv5el armv5tel armv6el armv6l armv6vl noarch
 ARCH.armv7el arm armel armv4l armv5el armv5tel armv6el armv6l armv6vl armv7el armv7l armv7vl noarch
+ARCH.armv7hl armhf armv7hl armv7nhl noarch
 ARCH.armv8el arm armel armv4l armv5el armv5tel armv6el armv6l armv6vl armv7el armv7l armv7vl armv8el armv8l armv8vl noarch
 ARCH.i686 i686 i586 i486 i386 noarch
 ARCH.i586 i586 i486 i386 noarch
diff --git a/src/backend/bs_worker b/src/backend/bs_worker
index d1795df..d528863 100755
--- a/src/backend/bs_worker
+++ b/src/backend/bs_worker
@@ -89,17 +89,18 @@ my %cando = (
   'armv5el' => [                                          'armv4l', 'armv5el'                                                                 ],
   'armv6el' => [                                          'armv4l', 'armv5el', 'armv6el'                                                      ],
   'armv7el' => [                                          'armv4l', 'armv5el', 'armv6el', 'armv7el'                                           ],
-  'armv8el' => [                                          'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el'                                ],
+  'armv7hl' => [                                                                                     'armv7hl'                                ],
+  'armv8el' => [                                          'armv4l', 'armv5el', 'armv6el', 'armv7el',            'armv8el'                     ],
   'sh4'     => [                                                                                                                        'sh4' ],
 # this code sucks and is on the list to be rewritten
 # switch on next 3 lines if you want arm, mips, ppc and sh4 qemu emulated builds on a x86 worker
-#  'i586'    => [          'i586',                         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4' ],
-#  'i686'    => [          'i586',         'i686',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4' ],
-#  'x86_64'  => ['x86_64', 'i586:linux32', 'i686:linux32', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4' ],
+#  'i586'    => [          'i586',                         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4' ],
+#  'i686'    => [          'i586',         'i686',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4' ],
+#  'x86_64'  => ['x86_64', 'i586:linux32', 'i686:linux32', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc', 'ppc64', 'sh4' ],
 # switch on next 3 lines if you want only arm qemu emulated builds on a x86 worker
- 'i586'    => [          'i586',                         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'sh4' ],
- 'i686'    => [          'i586',         'i686',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'sh4' ],
- 'x86_64'  => ['x86_64', 'i586:linux32', 'i686:linux32', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el', 'mips', 'mipsel', 'sh4' ],
+ 'i586'    => [          'i586',                         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'sh4' ],
+ 'i686'    => [          'i586',         'i686',         'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'sh4' ],
+ 'x86_64'  => ['x86_64', 'i586:linux32', 'i686:linux32', 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'mips', 'mipsel', 'sh4' ],
 #
   'parisc'  => ['hppa', 'hppa64:linux64'],
   'parisc64'=> ['hppa64', 'hppa:linux32'],
diff --git a/src/webui/config/options.yml b/src/webui/config/options.yml
index 4de0e83..af9989b 100644
--- a/src/webui/config/options.yml
+++ b/src/webui/config/options.yml
@@ -23,7 +23,7 @@ exception_recipients: []
 # hide_private_options: true
 
 # List or architectures, which are visible by default in the webui
-visible_architectures: [ "i586", "x86_64", "ppc", "ppc64", "armv4l", "armv5el", "armv7el", "sh4", "sparcv9", "sparc64", "ia64", "s390", "s390x", "hppa" ]
+visible_architectures: [ "i586", "x86_64", "ppc", "ppc64", "armv4l", "armv5el", "armv7el", "armv7hl", "sh4", "sparcv9", "sparc64", "ia64", "s390", "s390x", "hppa" ]
 default_enabled_architectures: [ "i586", "x86_64" ]
 
 # make use of http://blog.lighttpd.net/articles/2006/07/22/x-sendfiles-new-friend-x-rewrite
-- 
1.7.1

