public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tegrarcm] rawhide: Add patches
@ 2026-08-03 15:19 Nicolas Chauvet
0 siblings, 0 replies; only message in thread
From: Nicolas Chauvet @ 2026-08-03 15:19 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/tegrarcm
Branch : rawhide
Commit : 6059daa17aab351c1f2ffa27f213686af9a69813
Author : Nicolas Chauvet <kwizart@gmail.com>
Date : 2026-08-03T15:39:21+02:00
Stats : +164/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/tegrarcm/c/6059daa17aab351c1f2ffa27f213686af9a69813?branch=rawhide
Log:
Add patches
---
diff --git a/0001-Disable-pre-built-miniloader-support.patch b/0001-Disable-pre-built-miniloader-support.patch
new file mode 100644
index 0000000..ea56e37
--- /dev/null
+++ b/0001-Disable-pre-built-miniloader-support.patch
@@ -0,0 +1,129 @@
+From f8b4960e72dbd1253cf3ce8d94bf1ed15ce6a0ab Mon Sep 17 00:00:00 2001
+From: Nicolas Chauvet <kwizart@gmail.com>
+Date: Thu, 9 Jul 2026 17:17:28 +0200
+Subject: [PATCH] Disable pre-built miniloader support
+
+---
+ configure.ac | 7 +++++++
+ src/Makefile.am | 5 +----
+ src/entries.h | 22 ++++++++++++++++++++++
+ src/main.c | 14 ++++++++++++++
+ 4 files changed, 44 insertions(+), 4 deletions(-)
+ create mode 100644 src/entries.h
+
+diff --git a/configure.ac b/configure.ac
+index 68a1f06b37cf..f4a0c0e90382 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,6 +53,13 @@ AC_FUNC_ERROR_AT_LINE
+ AC_FUNC_MALLOC
+ AC_CHECK_FUNCS([memset])
+
++# Option ML_BUNDLED : activée par défaut (1)
++AC_ARG_ENABLE([tegra-miniloader-bundled],
++ [AS_HELP_STRING([--disable-tegra-miniloader-bundled], [Disable miniloader bundled mode (default : enabled)])],
++ [TEGRA_MINILOADER_BUNDLED="$enableval"],
++ [TEGRA_MINILOADER_BUNDLED="1"])
++AC_SUBST([TEGRA_MINILOADER_BUNDLED])
++
+ AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 65d555bcbb68..bcf8c59b62c4 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -16,10 +16,7 @@ tegrarcm_SOURCES = \
+ nv3p.h \
+ nv3p_status.h \
+ rcm.h \
+- miniloader/tegra20-miniloader.h \
+- miniloader/tegra30-miniloader.h \
+- miniloader/tegra114-miniloader.h \
+- miniloader/tegra124-miniloader.h \
++ entries.h \
+ usb.h
+
+ man_MANS = tegrarcm.1
+diff --git a/src/entries.h b/src/entries.h
+new file mode 100644
+index 000000000000..30da85ea2093
+--- /dev/null
++++ b/src/entries.h
+@@ -0,0 +1,22 @@
++/*
++ * Copyright (c) 2011 NVIDIA CORPORATION. All Rights Reserved.
++ *
++ * NVIDIA CORPORATION and its licensors retain all intellectual property
++ * and proprietary rights in and to this software, related documentation
++ * and any modifications thereto. Any use, reproduction, disclosure or
++ * distribution of this software and related documentation without an express
++ * license agreement from NVIDIA CORPORATION is strictly prohibited.
++ *
++ * Refer to License For Customer Use of NVIDIA Software in the LICENSE file in
++ * this project for applicable license terms for this software.
++ */
++
++#define TEGRA20_MINILOADER_ENTRY 0x40008000
++#define TEGRA30_MINILOADER_ENTRY 0x4000a000
++#define TEGRA114_MINILOADER_ENTRY 0x4000e000
++#define TEGRA124_MINILOADER_ENTRY 0x4000e000
++
++uint8_t miniloader_tegra20[] = {};
++uint8_t miniloader_tegra30[] = {};
++uint8_t miniloader_tegra114[] = {};
++uint8_t miniloader_tegra124[] = {};
+diff --git a/src/main.c b/src/main.c
+index aeeb74d46501..75f921fa105f 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -49,6 +49,7 @@
+ #include "debug.h"
+ #include "config.h"
+
++#ifdef TEGRARCM_MINILOADER_BUNDLED
+ // tegra20 miniloader
+ #include "miniloader/tegra20-miniloader.h"
+
+@@ -61,6 +62,15 @@
+ // tegra124 miniloader
+ #include "miniloader/tegra124-miniloader.h"
+
++#else
++#include "entries.h"
++#endif
++
++// Default path for tegrarcm miniloader files
++#ifndef TEGRARCM_MINILOADER_PATH
++#define TEGRARCM_MINILOADER_PATH "/usr/local/tegrarcm/miniloader"
++#endif
++
+ static int initialize_rcm(uint16_t devid, usb_device_t *usb,
+ const char *pkc_keyfile, const char *signed_msgs_file,
+ bool download_signed_msgs);
+@@ -794,18 +804,22 @@ static int initialize_miniloader(uint16_t devid, usb_device_t *usb,
+ miniloader = miniloader_tegra20;
+ miniloader_size = sizeof(miniloader_tegra20);
+ miniloader_entry = TEGRA20_MINILOADER_ENTRY;
++ filename = "tegra20-miniloader.bin";
+ } else if ((devid & 0xff) == USB_DEVID_NVIDIA_TEGRA30) {
+ miniloader = miniloader_tegra30;
+ miniloader_size = sizeof(miniloader_tegra30);
+ miniloader_entry = TEGRA30_MINILOADER_ENTRY;
++ filename = "tegra30-miniloader.bin";
+ } else if ((devid & 0xff) == USB_DEVID_NVIDIA_TEGRA114) {
+ miniloader = miniloader_tegra114;
+ miniloader_size = sizeof(miniloader_tegra114);
+ miniloader_entry = TEGRA114_MINILOADER_ENTRY;
++ filename = "tegra114-miniloader.bin";
+ } else if ((devid & 0xff) == USB_DEVID_NVIDIA_TEGRA124) {
+ miniloader = miniloader_tegra124;
+ miniloader_size = sizeof(miniloader_tegra124);
+ miniloader_entry = TEGRA124_MINILOADER_ENTRY;
++ filename = "tegra124-miniloader.bin";
+ } else {
+ fprintf(stderr, "unknown tegra device: 0x%x\n", devid);
+ return ENODEV;
+--
+2.55.0
+
diff --git a/0001-Fix-warning-comparison-of-integer-expressions-of-dif.patch b/0001-Fix-warning-comparison-of-integer-expressions-of-dif.patch
new file mode 100644
index 0000000..5d96b1b
--- /dev/null
+++ b/0001-Fix-warning-comparison-of-integer-expressions-of-dif.patch
@@ -0,0 +1,35 @@
+From f5c22c120e7b0c73fccdf20a6d2bdd122786ea4a Mon Sep 17 00:00:00 2001
+From: Nicolas Chauvet <kwizart@gmail.com>
+Date: Sun, 8 Feb 2026 12:31:17 +0100
+Subject: [PATCH] Fix warning comparison of integer expressions of different
+ signedness
+
+---
+ src/rsa-pss.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/rsa-pss.cpp b/src/rsa-pss.cpp
+index 78d87d19b202..116685bfd704 100644
+--- a/src/rsa-pss.cpp
++++ b/src/rsa-pss.cpp
+@@ -101,7 +101,7 @@ extern "C" int rsa_pss_sign(const char *key_file, const uint8_t *msg,
+ // error check
+ if (mod.ByteCount() != RCM_RSA_MODULUS_SIZE)
+ throw std::length_error("incorrect rsa key modulus length");
+- for (int i = 0; i < mod.ByteCount(); i++)
++ for (unsigned int i = 0; i < mod.ByteCount(); i++)
+ modulus_buf[i] = mod.GetByte(i);
+
+ // Sign the message
+@@ -112,7 +112,7 @@ extern "C" int rsa_pss_sign(const char *key_file, const uint8_t *msg,
+ length = signer.SignMessage(rng, msg, len, signature);
+
+ // Copy in reverse order
+- for (int i = 0; i < length; i++)
++ for (size_t i = 0; i < length; i++)
+ sig_buf[length - i - 1] = signature[i];
+ }
+ catch(const CryptoPP::Exception& e) {
+--
+2.53.0
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-03 15:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-03 15:19 [rpms/tegrarcm] rawhide: Add patches Nicolas Chauvet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox