Add firmware packages

This commit is contained in:
Ettore Di Giacinto 2022-09-21 15:31:40 +00:00
parent 7242d840a2
commit 43eec1ef0f
4 changed files with 140 additions and 0 deletions

View File

@ -0,0 +1,9 @@
This package is part of elemental-toolkit.
Copyright (c) 2020-2021 SUSE, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

View File

@ -0,0 +1,49 @@
{{ if eq .Values.arch "noarch" }} # This makes the package available only on amd64 repo - as it's blobs doesn't matter
image: registry.opensuse.org/opensuse/leap:15.3
prelude:
- zypper in -y wget cpio
steps:
{{if eq .Values.name "odroid-c2"}}
- mkdir -p /data/boot
- wget https://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/OdroidC2/standard/aarch64/odroidc2-firmware-{{.Values.version}}.aarch64.rpm
- rpm2cpio odroidc2-firmware-{{.Values.version}}.aarch64.rpm | cpio -idmv
- mv boot/* /data/boot
package_dir: "/data/boot"
{{end}}
{{if eq .Values.name "u-boot-rpi64"}}
- mkdir -p /data/{boot,usr}
- wget https://download.opensuse.org/distribution/leap/15.3/repo/oss/aarch64/u-boot-rpiarm64-{{.Values.version}}.aarch64.rpm
- rpm2cpio u-boot-rpiarm64-{{.Values.version}}.aarch64.rpm | cpio -idmv
- mv usr/share/doc /data
- mv usr/share/licenses /data
- mv usr/* /data
- mv boot/vc/* /data
- rm -rf /data/boot
- rm -rf /data/usr
- rm -rf /data/share
package_dir: "/data"
{{end}}
{{if or (eq .Values.name "raspberrypi-firmware") (eq .Values.name
"raspberrypi-firmware-config") (eq .Values.name "raspberrypi-firmware-dt")}}
- mkdir -p /data/boot
- mkdir -p /data/usr
- wget -c https://download.opensuse.org/distribution/leap/15.3/repo/oss/noarch/{{.Values.name}}-{{.Values.version}}.noarch.rpm
- rpm2cpio {{.Values.name}}-{{.Values.version}}.noarch.rpm | cpio -idmv
{{if or (eq .Values.name "raspberrypi-firmware")}}
- mv usr/* /data
- rm -rfv /data/lib
{{end}}
- mv boot/vc/* /data
- rm -rfv /data/boot
- rm -rfv /data/usr
package_dir: "/data"
{{end}}
{{end}}

View File

@ -0,0 +1,73 @@
packages:
- name: "odroid-c2"
category: "firmware"
version: "20170419-5.197"
arch: "noarch"
- name: "u-boot-rpi64"
category: "firmware"
arch: "noarch"
version: "2021.01-5.1"
labels:
autobump.strategy: "custom"
autobump.string_replace: '{ "prefix": "" }'
autobump.prefix: "prefix"
autobump.hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="u-boot-rpiarm64") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
autobump.version_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="u-boot-rpiarm64") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
# We do assume that checksum is sha256
autobump.checksum_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="u-boot-rpiarm64") | select(.arch!="src").checksum."#text"' -r | tail -n1
package.version: "2021.01-5.1"
package.checksum: "21099ee7f721f8602c6cd446f9f73b47ef024deca1b373b21d36ca6d20ddc583"
- name: "raspberrypi-firmware"
category: "firmware"
arch: "noarch"
version: "2021.03.10-2.1"
labels:
autobump.strategy: "custom"
autobump.string_replace: '{ "prefix": "" }'
autobump.prefix: "prefix"
autobump.hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
autobump.version_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
# We do assume that checksum is sha256
autobump.checksum_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware") | select(.arch!="src").checksum."#text"' -r | tail -n1
package.version: "2021.03.10-2.1"
package.checksum: "0aeb375d28339cbb2560d7ac886c35cc816b61efe0908b4ad9d601b1d0ca7b17"
- name: "raspberrypi-firmware-config"
category: "firmware"
version: "2021.03.10-2.1"
arch: "noarch"
labels:
autobump.strategy: "custom"
autobump.string_replace: '{ "prefix": "" }'
autobump.prefix: "prefix"
autobump.hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware-config") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
autobump.version_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware-config") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
# We do assume that checksum is sha256
autobump.checksum_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware-config") | select(.arch!="src").checksum."#text"' -r | tail -n1
package.version: "2021.03.10-2.1"
package.checksum: "5700c13c6df1344115c9ae9cb3e31a99773d45ff6b5ad21d98f1e641a4549837"
- name: "raspberrypi-firmware-dt"
category: "firmware"
version: "2021.03.15-2.1"
arch: "noarch"
labels:
autobump.strategy: "custom"
autobump.string_replace: '{ "prefix": "" }'
autobump.prefix: "prefix"
autobump.hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware-dt") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
autobump.version_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware-dt") | select(.arch!="src").version | map(.)[2] + "-" + map(.)[1]' -r | tail -n1
# We do assume that checksum is sha256
autobump.checksum_hook: |
curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/$(curl -s -L https://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml | dasel select -p xml 'repomd.data.[0].location.-href') | gunzip | dasel -r xml -p json | jq '.metadata.package[] | select(.name=="raspberrypi-firmware-dt") | select(.arch!="src").checksum."#text"' -r | tail -n1
package.version: "2021.03.15-2.1"
package.checksum: "92839a142386c44c8b6e1a4b1daa839d56fa1282fc551a43ffd22a7a2d3cd487"

View File

@ -0,0 +1,9 @@
This package is part of elemental-toolkit.
Copyright (c) 2020-2021 SUSE, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.