Skip to content

Commit 065a37c

Browse files
committed
Merge remote-tracking branch 'origin/devel-armv8a-T743-tools' into devel-merge-armv8-t743
2 parents e6f7575 + 21541ff commit 065a37c

File tree

8 files changed

+63
-18
lines changed

8 files changed

+63
-18
lines changed

mugends/data/bootgen_config_full.ref

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
[destination_cpu = a53-1, exception_level = el-3, startup = 0x100000, load = 0x100000]kernel.bin-kernel_text.part
33
[load = 0xa0000]kernel_stack_0.fill
44
[load = 0xc0000]kernel_stack_1.fill
5-
[load = 0x110000]xilinxzcu104-core-0.pt
6-
[load = 0x120000]xilinxzcu104-core-1.pt
5+
[load = 0x110000]xilinxzcu104-core-0.bin
6+
[load = 0x120000]xilinxzcu104-core-1.bin
77
[load = 0x170000]kernel.bin-kernel_ro.part
88
[load = 0x182000]kernel.bin-kernel_data_0.part
99
[load = 0x184000]kernel_bss_0.fill

mugends/data/bootscript_cmd_full.ref

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ echo "Loading files from TFTP"
22
mw 0xa0000 0x0 0x20000
33
mw 0xc0000 0x0 0x20000
44
tftpboot 0x100000 kernel.bin-kernel_text.part || panic
5-
tftpboot 0x110000 xilinxzcu104-core-0.pt || panic
6-
tftpboot 0x120000 xilinxzcu104-core-1.pt || panic
5+
tftpboot 0x110000 xilinxzcu104-core-0.bin || panic
6+
tftpboot 0x120000 xilinxzcu104-core-1.bin || panic
77
tftpboot 0x170000 kernel.bin-kernel_ro.part || panic
88
tftpboot 0x182000 kernel.bin-kernel_data_0.part || panic
99
mw 0x184000 0x0 0x2000

mugends/data/gdbinit_config_full.ref

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ restore kernel.bin-kernel_global_data.part binary 0x186000
2525
restore kernel_bss_0.fill binary 0x184000
2626
restore kernel.bin-kernel_data_0.part binary 0x182000
2727
restore kernel.bin-kernel_ro.part binary 0x170000
28-
restore xilinxzcu104-core-1.pt binary 0x120000
29-
restore xilinxzcu104-core-0.pt binary 0x110000
28+
restore xilinxzcu104-core-1.bin binary 0x120000
29+
restore xilinxzcu104-core-0.bin binary 0x110000
3030
restore kernel.bin-kernel_text.part binary 0x100000
3131
restore kernel_stack_1.fill binary 0xc0000
3232
restore kernel_stack_0.fill binary 0xa0000

mugends/data/test_policy_full.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@
167167
<fill pattern="16#00#"/>
168168
</memory>
169169
<memory alignment="16#1000#" caching="WB" name="kernel_0|pt" physicalAddress="16#0011_0000#" size="16#8000#" type="system_pt">
170-
<file filename="xilinxzcu104-core-0.pt" offset="none"/>
170+
<file filename="xilinxzcu104-core-0" offset="none"/>
171171
</memory>
172172
<memory alignment="16#1000#" caching="WB" name="kernel_1|pt" physicalAddress="16#0012_0000#" size="16#8000#" type="system_pt">
173-
<file filename="xilinxzcu104-core-1.pt" offset="none"/>
173+
<file filename="xilinxzcu104-core-1" offset="none"/>
174174
</memory>
175175
<memory alignment="16#1000#" caching="WB" name="lnx1|pt" physicalAddress="16#0020_0000#" size="16#6000#" type="system_pt">
176176
<file filename="xilinxzcu104-lnx1.pt" offset="none"/>

mugends/data/xsct_tcl_full.ref

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ targets -set -nocase -filter {name =~ "*A53*0" && jtag_cable_name =~ "Xilinx HW-
4747
dow -data kernel_stack_0.fill 0xa0000
4848
dow -data kernel_stack_1.fill 0xc0000
4949
dow -data kernel.bin-kernel_text.part 0x100000
50-
dow -data xilinxzcu104-core-0.pt 0x110000
51-
dow -data xilinxzcu104-core-1.pt 0x120000
50+
dow -data xilinxzcu104-core-0.bin 0x110000
51+
dow -data xilinxzcu104-core-1.bin 0x120000
5252
dow -data kernel.bin-kernel_ro.part 0x170000
5353
dow -data kernel.bin-kernel_data_0.part 0x182000
5454
dow -data kernel_bss_0.fill 0x184000

mugends/src/ds-generator.adb

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--
2-
-- Copyright (C) 2023-2024 Tobias Brunner <tobias@codelabs.ch>
2+
-- Copyright (C) 2023-2025 Tobias Brunner <tobias@codelabs.ch>
33
--
44
-- This program is free software: you can redistribute it and/or modify
55
-- it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@ with DOM.Core.Elements;
2929
with McKae.XML.XPath.XIA;
3030

3131
with Interfaces;
32+
with Interfaces.C;
3233

3334
with Mulog;
3435
with Muxml.Utils;
@@ -81,6 +82,12 @@ is
8182
Used_Memory : in out String_Sets_Package.Set;
8283
Kernels : in out CPU_Kernel_Map_Package.Map);
8384

85+
-- Create a symlink.
86+
function Create_Symlink
87+
(Target_Path : Interfaces.C.char_array;
88+
Link_Path : Interfaces.C.char_array) return Interfaces.C.int;
89+
pragma Import (C, Create_Symlink, "symlink");
90+
8491
-------------------------------------------------------------------------
8592

8693
procedure Extract_File
@@ -403,6 +410,34 @@ is
403410
end;
404411
end if;
405412

413+
-- Make sure the name contains a file extension so bootgen can
414+
-- handle it.
415+
if Index (File.Filename, ".") = 0 then
416+
declare
417+
use Interfaces.C;
418+
419+
Ext_Name : constant Unbounded_String
420+
:= Filename & ".bin";
421+
Ext_Path : constant Unbounded_String
422+
:= Output_Dir & "/" & Ext_Name;
423+
begin
424+
File.Filename := Ext_Name;
425+
Mulog.Log (Msg => " symlink '"
426+
& To_String (Path)
427+
& "' to '"
428+
& To_String (Ext_Path) & "' for bootgen");
429+
if not Ada.Directories.Exists (To_String (Ext_Path)) and then
430+
Create_Symlink
431+
(Target_Path => To_C (To_String (Filename)),
432+
Link_Path => To_C (To_String (Ext_Path))) < 0
433+
then
434+
raise Generator_Error with "Unable to create symlink '"
435+
& To_String (Ext_Path) & "' to '"
436+
& To_String (Filename);
437+
end if;
438+
end;
439+
end if;
440+
406441
File_Backed_Memory.Include (Name, File);
407442
Files.Append (File);
408443
end;

mugends/tests/ds-generator-test_data-tests.adb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,21 @@ package body DS.Generator.Test_Data.Tests is
9090
Filename2 => "obj/kernel.bin-kernel_global_data.part"),
9191
Message => "obj/kernel.bin-kernel_global_data.part mismatch");
9292

93+
Assert (Condition => Test_Utils.Equal_Files
94+
(Filename1 => "obj/xilinxzcu104-core-0",
95+
Filename2 => "obj/xilinxzcu104-core-0.bin"),
96+
Message => "obj/xilinxzcu104-core-0.bin missing or mismatch");
97+
Assert (Condition => Test_Utils.Equal_Files
98+
(Filename1 => "obj/xilinxzcu104-core-1",
99+
Filename2 => "obj/xilinxzcu104-core-1.bin"),
100+
Message => "obj/xilinxzcu104-core-1.bin missing or mismatch");
93101
Assert (Condition => not Ada.Directories.Exists
94-
(Name => "obj/xilinxzcu104-core-0.pt-kernel_0_pt.pad"),
95-
Message => "obj/xilinxzcu104-core-0.pt should not get padded");
102+
(Name => "obj/xilinxzcu104-core-0-kernel_0.pad"),
103+
Message => "obj/xilinxzcu104-core-0 should not get padded");
96104
Assert (Condition => not Ada.Directories.Exists
97-
(Name => "obj/xilinxzcu104-core-1.pt-kernel_1_pt.pad"),
98-
Message => "obj/xilinxzcu104-core-1.pt should not get padded");
105+
(Name => "obj/xilinxzcu104-core-1-kernel_1.pad"),
106+
Message => "obj/xilinxzcu104-core-1 should not get padded");
107+
99108
Assert (Condition => not Ada.Directories.Exists
100109
(Name => "obj/xilinxzcu104-lnx1.pt-lnx1_pt.pad"),
101110
Message => "obj/xilinxzcu104-lnx1.pt should not get padded");

mugends/tests/ds-generator-test_data.adb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ package body DS.Generator.Test_Data is
128128
Pad_File ("obj/kernel.bin-kernel_stack", 16#0003_0000#,
129129
"obj/kernel.bin-kernel_stack.part.pad.ref");
130130

131-
-- These are correctly sized, so no padding.
132-
Generate_File ("obj/xilinxzcu104-core-0.pt", 16#8000#);
133-
Generate_File ("obj/xilinxzcu104-core-1.pt", 16#8000#);
131+
-- These are correctly sized, so no padding. First two without extension.
132+
Generate_File ("obj/xilinxzcu104-core-0", 16#8000#);
133+
Generate_File ("obj/xilinxzcu104-core-1", 16#8000#);
134+
134135
Generate_File ("obj/xilinxzcu104-lnx1.pt", 16#6000#);
135136
Generate_File ("obj/xilinxzcu104-string_reverser.pt", 16#3000#);
136137
Generate_File ("obj/xilinxzcu104-lnx2.pt", 16#6000#);

0 commit comments

Comments
 (0)