-
Notifications
You must be signed in to change notification settings - Fork 193
Bump bootgen to upstream Xilinx/bootgen xilinx_v2026.1, drop the jgmelber fork #3329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
71186bd
Bump bootgen submodule fork to upstream xilinx_v2026.1
jgmelber 47e5963
Add bootgen before aiecc so AIECC_HAS_BOOTGEN_LIBRARY actually gets set
jgmelber 29a993c
Address review feedback on the bootgen 2026.1 CMake rewrite
jgmelber 99400cb
Trim verbose comments in the bootgen CMake rewrite
jgmelber 922cd30
Fix clang-format violation in hss_thread_single.c
jgmelber acb0451
Fix two real CI failures in the bootgen 2026.1 build
jgmelber 2f05fb5
Drop the jgmelber/bootgen fork; track Xilinx/bootgen upstream directly
jgmelber 7d039c1
Fix license headers and clang-format on bootgen_c_api.cpp/.h
jgmelber 8e13646
Fix aiecc/library_integration.mlir PDI check for the library path
jgmelber 980215d
Address remaining Copilot review comments on bootgen 2026.1 bump
jgmelber c36f800
Force PIE on bootgen with explicit compiler/linker flags, not just th…
jgmelber 9e069f1
Address Copilot review on the bootgen PIE fix
jgmelber 8ab00c6
Clean up comments in CMakeLists.txt
jgmelber 571ec95
Merge branch 'main' into bump-bootgen-2026.1
jgmelber 4f18f48
Merge branch 'main' into bump-bootgen-2026.1
jgmelber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| /****************************************************************************** | ||
| * Copyright 2024-2026 Advanced Micro Devices, Inc. | ||
| * | ||
| * 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. | ||
| ******************************************************************************/ | ||
|
|
||
| #include "bootgen_c_api.h" | ||
| #include "bootimage.h" | ||
|
jgmelber marked this conversation as resolved.
|
||
| #include "options.h" | ||
| #include "bootgenexception.h" | ||
|
jgmelber marked this conversation as resolved.
Outdated
|
||
|
|
||
| #include <cstring> | ||
| #include <string> | ||
|
|
||
| // Helper to safely copy error message to output buffer | ||
| static void copy_error_message(char *error_msg, int error_msg_size, | ||
| const char *msg) { | ||
| if (error_msg && error_msg_size > 0) { | ||
| std::strncpy(error_msg, msg, error_msg_size - 1); | ||
| error_msg[error_msg_size - 1] = '\0'; | ||
| } | ||
| } | ||
|
|
||
| int bootgen_generate_pdi(const char *bif_path, const char *pdi_path, | ||
| enum bootgen_arch_type arch, int overwrite, | ||
| char *error_msg, int error_msg_size) { | ||
| // Validate inputs | ||
| if (!bif_path || !pdi_path) { | ||
| copy_error_message(error_msg, error_msg_size, | ||
| "Invalid NULL path argument"); | ||
|
jgmelber marked this conversation as resolved.
Outdated
|
||
| return BOOTGEN_ERROR_INVALID_BIF; | ||
| } | ||
|
jgmelber marked this conversation as resolved.
|
||
|
|
||
| // Map C enum to C++ enum | ||
| Arch::Type cppArch; | ||
| switch (arch) { | ||
| case BOOTGEN_ARCH_ZYNQ: | ||
| cppArch = Arch::ZYNQ; | ||
| break; | ||
| case BOOTGEN_ARCH_ZYNQMP: | ||
| cppArch = Arch::ZYNQMP; | ||
| break; | ||
| case BOOTGEN_ARCH_FPGA: | ||
| cppArch = Arch::FPGA; | ||
| break; | ||
| case BOOTGEN_ARCH_VERSAL: | ||
| cppArch = Arch::VERSAL; | ||
| break; | ||
| case BOOTGEN_ARCH_VERSALNET: | ||
| cppArch = Arch::VERSALNET; | ||
| break; | ||
| default: | ||
| copy_error_message(error_msg, error_msg_size, "Invalid architecture type"); | ||
| return BOOTGEN_ERROR_INVALID_ARCH; | ||
| } | ||
|
|
||
| try { | ||
| Options options; | ||
| options.SetArchType(cppArch); | ||
| options.SetBifFilename(std::string(bif_path)); | ||
| options.InsertOutputFileNames(std::string(pdi_path)); | ||
| if (overwrite) { | ||
| options.SetOverwrite(true); | ||
| } | ||
|
|
||
| std::string bifStr(bif_path); | ||
| BIF_File bif(bifStr); | ||
| bif.Process(options); | ||
|
|
||
| return BOOTGEN_SUCCESS; | ||
| } catch (const BootGenExceptionClass &e) { | ||
| copy_error_message(error_msg, error_msg_size, e.what()); | ||
| return BOOTGEN_ERROR_PROCESSING_FAILED; | ||
| } catch (const std::exception &e) { | ||
| copy_error_message(error_msg, error_msg_size, e.what()); | ||
| return BOOTGEN_ERROR_INTERNAL; | ||
| } catch (...) { | ||
| copy_error_message(error_msg, error_msg_size, "Unknown error occurred"); | ||
| return BOOTGEN_ERROR_INTERNAL; | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.