Skip to content
Snippets Groups Projects
Commit 0b9df8a1 authored by Luis Guzmán's avatar Luis Guzmán
Browse files

linux-hwe-5.19: add to aramo's release

parent 22137d2b
No related branches found
No related tags found
1 merge request!1040linux-hwe-5.19: add to aramo's release
Pipeline #965 passed
#!/bin/bash
WD=$(dirname $0)
files=`find -type f`
while read -r line
do
sh $WD/deblob-check --use-awk -C $line
./deblob-check $line
done <<< "$files"
Based on https://libreplanet.org/wiki/Group:Hardware/research/gpu/radeon
diff -ru source.orig/drivers/gpu/drm/radeon/btc_dpm.c source/drivers/gpu/drm/radeon/btc_dpm.c
--- source.orig/drivers/gpu/drm/radeon/btc_dpm.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/btc_dpm.c 2023-02-13 15:50:41.218608376 -0500
@@ -2437,7 +2437,6 @@
ret = rv770_upload_firmware(rdev);
if (ret) {
DRM_ERROR("rv770_upload_firmware failed\n");
- return ret;
}
ret = cypress_get_table_locations(rdev);
if (ret) {
diff -ru source.orig/drivers/gpu/drm/radeon/ci_dpm.c source/drivers/gpu/drm/radeon/ci_dpm.c
--- source.orig/drivers/gpu/drm/radeon/ci_dpm.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/ci_dpm.c 2023-02-13 15:53:38.591724496 -0500
@@ -5157,7 +5157,6 @@
ret = ci_upload_firmware(rdev);
if (ret) {
DRM_ERROR("ci_upload_firmware failed\n");
- return ret;
}
ret = ci_process_firmware_header(rdev);
if (ret) {
diff -ru source.orig/drivers/gpu/drm/radeon/cik.c source/drivers/gpu/drm/radeon/cik.c
--- source.orig/drivers/gpu/drm/radeon/cik.c 2023-02-13 15:21:35.174999782 -0500
+++ source/drivers/gpu/drm/radeon/cik.c 2023-02-13 15:47:37.149601121 -0500
@@ -8285,7 +8285,6 @@
r = ci_mc_load_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load MC firmware!\n");
- return r;
}
}
@@ -8591,7 +8590,6 @@
r = cik_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
} else {
@@ -8601,7 +8599,6 @@
r = cik_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
}
@@ -8668,7 +8665,6 @@
*/
if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) {
DRM_ERROR("radeon: MC ucode required for NI+.\n");
- return -EINVAL;
}
return 0;
diff -ru source.orig/drivers/gpu/drm/radeon/cypress_dpm.c source/drivers/gpu/drm/radeon/cypress_dpm.c
--- source.orig/drivers/gpu/drm/radeon/cypress_dpm.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/cypress_dpm.c 2023-02-13 15:50:25.130869935 -0500
@@ -1862,7 +1862,6 @@
ret = rv770_upload_firmware(rdev);
if (ret) {
DRM_ERROR("rv770_upload_firmware failed\n");
- return ret;
}
ret = cypress_get_table_locations(rdev);
diff -ru source.orig/drivers/gpu/drm/radeon/evergreen.c source/drivers/gpu/drm/radeon/evergreen.c
--- source.orig/drivers/gpu/drm/radeon/evergreen.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/evergreen.c 2023-02-13 15:47:50.457384749 -0500
@@ -5018,7 +5018,6 @@
r = ni_mc_load_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load MC firmware!\n");
- return r;
}
}
@@ -5235,7 +5234,6 @@
r = ni_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
} else {
@@ -5243,7 +5241,6 @@
r = r600_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
}
@@ -5289,7 +5286,6 @@
if (ASIC_IS_DCE5(rdev)) {
if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) {
DRM_ERROR("radeon: MC ucode required for NI+.\n");
- return -EINVAL;
}
}
diff -ru source.orig/drivers/gpu/drm/radeon/ni.c source/drivers/gpu/drm/radeon/ni.c
--- source.orig/drivers/gpu/drm/radeon/ni.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/ni.c 2023-02-13 15:46:45.402442454 -0500
@@ -2163,7 +2163,6 @@
r = ni_mc_load_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load MC firmware!\n");
- return r;
}
}
@@ -2390,7 +2389,6 @@
r = ni_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
} else {
@@ -2398,7 +2396,6 @@
r = ni_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
}
@@ -2453,7 +2450,6 @@
*/
if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) {
DRM_ERROR("radeon: MC ucode required for NI+.\n");
- return -EINVAL;
}
return 0;
diff -ru source.orig/drivers/gpu/drm/radeon/r100.c source/drivers/gpu/drm/radeon/r100.c
--- source.orig/drivers/gpu/drm/radeon/r100.c 2023-02-13 15:21:35.174999782 -0500
+++ source/drivers/gpu/drm/radeon/r100.c 2023-02-13 15:49:15.548001277 -0500
@@ -1134,7 +1134,6 @@
r = r100_cp_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
diff -ru source.orig/drivers/gpu/drm/radeon/r600.c source/drivers/gpu/drm/radeon/r600.c
--- source.orig/drivers/gpu/drm/radeon/r600.c 2023-02-13 15:21:35.174999782 -0500
+++ source/drivers/gpu/drm/radeon/r600.c 2023-02-13 15:46:07.291062125 -0500
@@ -3299,7 +3299,6 @@
r = r600_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
diff -ru source.orig/drivers/gpu/drm/radeon/rv770.c source/drivers/gpu/drm/radeon/rv770.c
--- source.orig/drivers/gpu/drm/radeon/rv770.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/rv770.c 2023-02-13 15:26:54.385808292 -0500
@@ -1966,7 +1966,6 @@
r = r600_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
diff -ru source.orig/drivers/gpu/drm/radeon/rv770_dpm.c source/drivers/gpu/drm/radeon/rv770_dpm.c
--- source.orig/drivers/gpu/drm/radeon/rv770_dpm.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/rv770_dpm.c 2023-02-13 15:50:13.591057564 -0500
@@ -1948,12 +1948,10 @@
ret = rv770_upload_firmware(rdev);
if (ret) {
DRM_ERROR("rv770_upload_firmware failed\n");
- return ret;
}
ret = rv770_init_smc_table(rdev, boot_ps);
if (ret) {
DRM_ERROR("rv770_init_smc_table failed\n");
- return ret;
}
rv770_program_response_times(rdev);
diff -ru source.orig/drivers/gpu/drm/radeon/si.c source/drivers/gpu/drm/radeon/si.c
--- source.orig/drivers/gpu/drm/radeon/si.c 2023-02-13 15:21:35.178999717 -0500
+++ source/drivers/gpu/drm/radeon/si.c 2023-02-13 15:47:00.042204445 -0500
@@ -6619,7 +6619,6 @@
r = si_mc_load_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load MC firmware!\n");
- return r;
}
}
@@ -6867,7 +6866,6 @@
r = si_init_microcode(rdev);
if (r) {
DRM_ERROR("Failed to load firmware!\n");
- return r;
}
}
@@ -6926,7 +6924,6 @@
*/
if (!rdev->mc_fw) {
DRM_ERROR("radeon: MC ucode required for NI+.\n");
- return -EINVAL;
}
return 0;
diff -ru source.orig/drivers/gpu/drm/radeon/si_dpm.c source/drivers/gpu/drm/radeon/si_dpm.c
--- source.orig/drivers/gpu/drm/radeon/si_dpm.c 2021-10-31 16:53:10.000000000 -0400
+++ source/drivers/gpu/drm/radeon/si_dpm.c 2023-02-13 15:53:00.844338238 -0500
@@ -6366,7 +6366,6 @@
ret = si_upload_firmware(rdev);
if (ret) {
DRM_ERROR("si_upload_firmware failed\n");
- return ret;
}
ret = si_process_firmware_header(rdev);
if (ret) {
reverts https://lore.kernel.org/all/iwlwifi.20211210110539.1f742f0eb58a.I1315f22f6aa632d94ae2069f85e1bca5e734dce0@changeid/
--- b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1597,8 +1597,15 @@
* else from proceeding if the module fails to load
* or hangs loading.
*/
+ if (load_module) {
- if (load_module)
request_module("%s", op->name);
+#ifdef CONFIG_IWLWIFI_OPMODE_MODULAR
+ if (err)
+ IWL_ERR(drv,
+ "failed to load module %s (error %d), is dynamic loading enabled?\n",
+ op->name, err);
+#endif
+ }
failure = false;
goto free;
reverts https://lore.kernel.org/all/iwlwifi.20211210110539.1f742f0eb58a.I1315f22f6aa632d94ae2069f85e1bca5e734dce0@changeid/
--- b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -130,9 +130,6 @@
for (i = 0; i < IWL_UCODE_TYPE_MAX; i++)
iwl_free_fw_img(drv, drv->fw.img + i);
-
- /* clear the data for the aborted load case */
- memset(&drv->fw, 0, sizeof(drv->fw));
}
static int iwl_alloc_fw_desc(struct iwl_drv *drv, struct fw_desc *desc,
@@ -1429,7 +1426,6 @@
int i;
bool load_module = false;
bool usniffer_images = false;
- bool failure = true;
fw->ucode_capa.max_probe_length = IWL_DEFAULT_MAX_PROBE_LENGTH;
fw->ucode_capa.standard_phy_calibration_size =
@@ -1699,7 +1695,6 @@
op->name, err);
#endif
}
- failure = false;
goto free;
try_again:
@@ -1715,9 +1710,6 @@
complete(&drv->request_firmware_complete);
device_release_driver(drv->trans->dev);
free:
- if (failure)
- iwl_dealloc_ucode(drv);
-
if (pieces) {
for (i = 0; i < ARRAY_SIZE(pieces->img); i++)
kfree(pieces->img[i].sec);
reverts https://lore.kernel.org/all/iwlwifi.20211210110539.1f742f0eb58a.I1315f22f6aa632d94ae2069f85e1bca5e734dce0@changeid/
diff -ru source.orig/drivers/net/wireless/intel/iwlwifi/iwl-drv.c source/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
--- source.orig/drivers/net/wireless/intel/iwlwifi/iwl-drv.c 2022-05-13 16:10:11.883295769 -0400
+++ source/drivers/net/wireless/intel/iwlwifi/iwl-drv.c 2022-05-13 20:13:06.568151229 -0400
@@ -1605,7 +1605,6 @@
complete(&drv->request_firmware_complete);
device_release_driver(drv->trans->dev);
/* drv has just been freed by the release */
- failure = false;
free:
if (pieces) {
for (i = 0; i < ARRAY_SIZE(pieces->img); i++)
#!/bin/sh
#
# Copyright (C) 2008-2022 Ruben Rodriguez <ruben@trisquel.info>
# Copyright (C) 2021 Luis Guzman <ark@switnet.org>
# Copyright (C) 2021 Pablo Correa Gómez <ablocorrea@hotmail.com>
# Copyright (C) 2023 Luis Guzman <ark@switnet.org>
# Copyright (C) 2008-2023 Ruben Rodriguez <ruben@trisquel.info>
# Copyright (C) 2019 David Trudgian <dave@trudgian.net>
#
# This program is free software; you can redistribute it and/or modify
......@@ -20,18 +19,13 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=3
VERSION=19
. ./config
for PATCH in $DATA/*.patch ; do
echo $PATCH
patch --no-backup-if-mismatch -p1 < $PATCH
done
PRESERVEDIRS='
drivers/bluetooth
drivers/gpu/drm/amd/amdgpu
drivers/gpu/drm/amd/pm/powerplay
drivers/gpu/drm/r128
drivers/gpu/drm/radeon
drivers/net/wireless/intel/ipw2x00
......@@ -48,7 +42,9 @@ drivers/net/wireless/realtek/rtlwifi/rtl8192se
drivers/net/wireless/realtek/rtlwifi/rtl8723ae
drivers/net/wireless/realtek/rtlwifi/rtl8723be
drivers/net/wireless/realtek/rtlwifi/rtl8821ae
drivers/net/wireless/broadcom/brcm80211
'
TMPDIR=$(mktemp -d preserve-XXXX)
PRESERVE=$(grep '^+++' $DATA/silent-accept-firmware.patch | /bin/sed 's/+++ //; s/\t.*//;' | cut -d/ -f2- | sort -u )
for FILE in $PRESERVE; do
......@@ -58,38 +54,63 @@ for DIR in $PRESERVEDIRS; do
cp $DIR $TMPDIR --parents -a
done
# Enable blobless activation - https://libreplanet.org/wiki/Group:Hardware/research/gpu/radeon
rm $TMPDIR/drivers/gpu/drm/radeon/ni.c
sh $DATA/deblob-5.13
sh $DATA/deblob-5.19
echo "Reverting deblobbing for files patched by silent-accept-firmware"
cp $TMPDIR/* . -av
rm -rf $TMPDIR
for PATCH in $DATA/*.patch ; do
echo $PATCH
patch --no-backup-if-mismatch -p1 < $PATCH
done
# Simple test for finding missing cases of silent_accept_firmware method
#for dir in $PRESERVEDIRS; do
# grep -i "load.*firmware.*%" $PRESERVEDIRS -r
# grep -i "load.*ucode.*%" $PRESERVEDIRS -r
#done
# Wipe dkms-versions
# lists zfs / nvidia versions
# lists zfs / v4l2loopback versions
echo > debian/dkms-versions
# Remove ZFS
rm zfs spl debian/scripts/misc/update-zfs.sh -rf
/bin/sed 's/spl-dkms, zfs-dkms//' -i debian/control debian.master/control.d/vars.generic debian.master/control.d/vars.*
/bin/sed '/^define build_zfs/,/^endef/d; /^define install_zfs/,/^endef/d; /zfs/d' -i debian/rules.d/2-binary-arch.mk
/bin/sed '/ifeq ($(do_zfs),false)/,/endif/d' -i debian/rules
/bin/sed '/zfs/d' -i debian.master/rules.d/* debian.master/d-i/modules/fs-core-modules debian.master/control.d/generic.inclusion-list debian.master/abi/*/*.modules debian/rules debian.master/control.d/vars.*
/bin/sed 's/spl-dkms, zfs-dkms//' -i debian/control \
debian.master/control.d/vars.generic \
debian.master/control.d/vars.*
/bin/sed -i '/ifeq ($(do_zfs),false)/,/endif$/d' debian/rules
/bin/sed -i '/zfs/d' debian.master/abi/*/*.modules \
debian/rules.d/2-binary-arch.mk \
debian.master/rules.d/* \
debian/rules
# debian.master/d-i/modules/fs-core-modules \
# debian.master/control.d/generic.inclusion-list \
# debian.master/control.d/vars.*
# Remove VBox
#sed -i '/vbox/s|true|false|' debian.master/rules.d/amd64.mk
# Remove v4l2loopback
/bin/sed -i '/ifeq ($(do_v4l2loopback),false)/,/endif$/d' debian/rules
/bin/sed -i '/v4l2loopback/d' debian/rules.d/2-binary-arch.mk \
debian/rules
/bin/sed -i '/do_v4l2loopback/d' debian.master/rules.d/*
# Remove nvidia
rm -rf debian/scripts/debian/scripts/dkms-build--nvidia-N
sed -i '/dkms-build--nvidia-N/d' debian.master/reconstruct
/bin/sed '/do_dkms_nvidia = true/d' -i debian/rules
/bin/sed '/do_dkms_nvidia/,/endif/d' -i debian/rules.d/2-binary-arch.mk
rm -rf debian/scripts/dkms-build--nvidia-N
grep -l dkms-build--nvidia-N debian.*/reconstruct|xargs sed -i '/dkms-build--nvidia-N/d'
# Remove VBox
/bin/sed '/do_dkms_vbox/d' -i debian.*/rules.d/* debian.hwe-*/scripts/helpers/local-mangle
#/bin/sed '/do_dkms_nvidia = true/d' -i debian.master/abi/*/*/*.modules \
# debian/rules \
# debian.master/control.d/vars.*
# Remove wireguard
/bin/sed '/ifeq ($(do_dkms_wireguard),false)/,/endif$/d' -i debian/rules
#sed '/do_dkms_wireguard/d' -i debian/rules.d/2-binary-arch.mk
/bin/sed '/do_dkms_wireguard/d' -i debian.master/rules.d/*
#/bin/sed '/do_dkms_wireguard/d' -i debian.master/rules.d/*
# Compile with less modules and avoid abi check
echo 'skipmodule = true' >> debian.master/rules.d/0-common-vars.mk
......@@ -107,29 +128,48 @@ sed 's/.unsigned//' -i debian/scripts/control-create
line=$(grep -n ')-Ubuntu' debian/rules.d/0-common-vars.mk|cut -d: -f1)
sed $(expr $line - 1 ),$(expr $line + 1 )d debian/rules.d/0-common-vars.mk -i
sed 's/family=ubuntu/family=trisquel/' -i debian/rules.d/0-common-vars.mk
sed 's/ubuntu/trisquel/1' -i debian.*/etc/kernelconfig
#sed s/family=ubuntu/family=trisquel/ -i debian/rules.d/0-common-vars.mk
cat << EOF > debian.master/etc/kernelconfig
archs="amd64 i386 armhf arm64 ppc64el"
family='trisquel'
EOF
rename s/ubuntu/trisquel/ debian.*/config/config.common.ubuntu
grep -lr config.common.ubuntu debian*/ | xargs sed -i 's|config.common.ubuntu|config.common.trisquel|g'
find debian* -type f -name *control* -exec sed 's/ with Ubuntu patches//; s/Linux/Linux-libre/g' -i {} \;
# Descriptions should not change based on the build arch
sed 's/on DESC//; s/PKGVER on/PKGVER/; /^ DESC.$/d;' debian*/control.d/flavour-control.stub -i
sed '/^firmware/d' debian.master/abi/fwinfo debian.hwe-*/abi/fwinfo -i
echo > ./debian.master/d-i/firmware/nic-modules
echo > ./debian.master/d-i/firmware/scsi-modules
sed '/^firmware/d' ./debian*/abi/fwinfo -i
#echo > ./debian.master/d-i/firmware/nic-modules
#echo > ./debian.master/d-i/firmware/scsi-modules
# Disable using udev as a fallback for firmware loading
replace "CONFIG_FW_LOADER_USER_HELPER=y" "CONFIG_FW_LOADER_USER_HELPER=n" debian.master/config
cp debian.master/config debian.hwe -a
# Fix ports build
sed -i "/CONFIG_FW_LOADER_USER_HELPER/s|'armhf': 'y',|'armhf': 'n',|g" debian.master/config/annotations
sed -i "/CONFIG_FW_LOADER_USER_HELPER/s|'arm64': 'y',|'arm64': 'n',|g" debian.master/config/annotations
sed -i "/CONFIG_FW_LOADER_USER_HELPER/s|'ppc64el': 'y',|'ppc64el': 'n',|g" debian.master/config/annotations
sed -i "/CONFIG_FW_LOADER_USER_HELPER_FALLBACK/s|'armhf': 'n',|'armhf': '-',|g" debian.master/config/annotations
sed -i "/CONFIG_FW_LOADER_USER_HELPER_FALLBACK/s|'arm64': 'n',|'arm64': '-',|g" debian.master/config/annotations
sed -i "/CONFIG_FW_LOADER_USER_HELPER_FALLBACK/s|'ppc64el': 'n',|'ppc64el': '-',|g" debian.master/config/annotations
# Disable aaeon.
sed -i "/AAEON/d" debian.master/config/annotations
# Aramo using gcc-11 requires to disbale the following anottations,
# see more at: debian.hwe-5.19/scripts/helpers/local-mangle
sed -i '/CONFIG_INIT_STACK_ALL_ZERO/s|y|-|g' debian.master/config/annotations
sed -i '/CONFIG_SHADOW_CALL_STACK/s|y|-|g' debian.master/config/annotations
cp debian.master/config debian.hwe-5.19 -a
changelog "Removed non-free bits"
cp debian/changelog debian.master/changelog
cp debian/changelog debian.hwe/changelog
cp debian/changelog debian.hwe-5.13/changelog
cp debian/changelog debian.hwe-5.19/changelog
compile
#!/bin/sh
#
# Copyright (C) 2017-2020 Ruben Rodriguez <ruben@trisquel.info>
# Copyright (C) 2021 Luis Guzman <ark@switnet.org>
# Copyright (C) 2017-2018 Ruben Rodriguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -18,22 +17,18 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=1
VERSION=6
. ./config
find debian/control.d/ -type f | grep -v -e '/generic$' -e '/lowlatency$' -e '/virtual$' |xargs rm
cat debian/control.d/* >> debian/control
sed 's/${variant:suffix}/-20.04/' -i debian/control
/bin/sed 's/linux-firmware/firmware-linux-free/' -i debian/control ./debian/control.d/*
sed 's/22.04/11.0/g' -i debian/control
sed 's/20.04/10.0/g' -i debian/control
#sed 's/Xenial/Flidas/; s/Bionic/Etiona/' -i debian/control
sed 's/linux-firmware/firmware-linux-free/' -i debian/control ./debian/control.d/generic*
sed 's/Ubuntu/upstream/' -i debian/control
sed 's/Linux/Linux-libre/g' -i debian/control ./debian/control.d/generic debian/control.d/lowlatency
sed 's/, intel-microcode \[amd64\]//; s/, amd64-microcode \[amd64\]//;' debian/control debian/control.d/generic debian/control.d/lowlatency -i
sed 's/Linux/Linux-libre/g' -i debian/control ./debian/control.d/generic*
sed 's/, intel-microcode \[amd64\]//; s/, amd64-microcode \[amd64\]//;' -i debian/control debian/control.d/generic
echo '-hwe-20.04' > debian/variants
changelog "Removed nonfree kernel variants, renamed release for Trisquel"
changelog "Removed linux-firmware dependency, renamed release for Trisquel"
compile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment