Skip to content

Commit 153d584

Browse files
memLayout() improvement Raspberry PI 5
1 parent e6f4fd8 commit 153d584

File tree

6 files changed

+19
-30
lines changed

6 files changed

+19
-30
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
9090

9191
| Version | Date | Comment |
9292
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
93+
| 5.25.9 | 2025-01-10 | `memLayout()` improvement Raspberry PI 5 |
9394
| 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI |
9495
| 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI |
9596
| 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved |

README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,6 @@
3030

3131
## The Systeminformation Project
3232

33-
```
34-
.''.
35-
.''. . *''* :_\/_:
36-
:_\/_: _\(/_ .:.*_\/_* : /\ :
37-
.''.: /\ : ./)\ ':'* /\ * : '..'.
38-
:_\/_:'.:::. ' *''* * '.\'/.' _\(/_
39-
: /\ : ::::: *_\/_* -= o =- /)\
40-
'..' ':::' * /\ * .'/.\'. '
41-
*..* :
42-
*
43-
* /.\ * * . *
44-
. /..'\ . . * .
45-
*/'.'\* . . . * *
46-
* /.''.'\ * . . . *
47-
. */.'.'.\*
48-
.........".""""/'.''.'.\""."."........".".".......................
49-
^^^[_]^^^*
50-
```
51-
52-
I wish you all a Merry Christmas and a peaceful New Year 2025.
53-
5433
This is amazing. Started as a small project just for myself, it now has > 17,000
5534
lines of code, > 650 versions published, up to 8 mio downloads per month, > 330
5635
mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who

docs/history.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ <h3>Full version history</h3>
5757
</tr>
5858
</thead>
5959
<tbody>
60+
<tr>
61+
<th scope="row">5.25.9</th>
62+
<td>2024-01-10</td>
63+
<td><span class="code">memLayout()</span> improvements Raspberry PI 5</td>
64+
</tr>
6065
<tr>
6166
<th scope="row">5.25.8</th>
6267
<td>2024-01-09</td>

docs/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
<img class="logo" src="assets/logo.png" alt="logo">
171171
<div class="title">systeminformation</div>
172172
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
173-
3<div class="version">New Version: <span id="version">5.25.8</span></div>
173+
3<div class="version">New Version: <span id="version">5.25.9</span></div>
174174
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
175175
</div>
176176
<div class="down">
@@ -204,15 +204,15 @@
204204
</div>
205205
<div class="row number-section">
206206
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
207-
<div class="numbers">18,440</div>
207+
<div class="numbers">18,452</div>
208208
<div class="title">Lines of code</div>
209209
</div>
210210
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
211211
<div id="downloads" class="numbers">...</div>
212212
<div class="title">Downloads last month</div>
213213
</div>
214214
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
215-
<div class="numbers">793</div>
215+
<div class="numbers">795</div>
216216
<div class="title">Dependents</div>
217217
</div>
218218
</div>

lib/memory.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,12 @@ function memLayout(callback) {
409409
'0': 400,
410410
'1': 450,
411411
'2': 450,
412-
'3': 3200
412+
'3': 3200,
413+
'4': 4267
413414
};
414415
result[0].type = 'LPDDR2';
415-
result[0].type = version && version[2] && version[2] === '3' ? 'LPDDR4' : result[0].type;
416+
result[0].type = version && version[2] && (version[2] === '3') ? 'LPDDR4' : result[0].type;
417+
result[0].type = version && version[2] && (version[2] === '4') ? 'LPDDR4X' : result[0].type;
416418
result[0].ecc = false;
417419
result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400;
418420
result[0].clockSpeed = version && version[4] && version[4] === 'd' ? 500 : result[0].clockSpeed;

lib/util.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,9 +1094,11 @@ function decodePiCpuinfo(lines) {
10941094
return result;
10951095
}
10961096

1097-
function getRpiGpu() {
1098-
let cpuinfo = null;
1099-
if (_rpi_cpuinfo !== null) {
1097+
function getRpiGpu(cpuinfo) {
1098+
1099+
if (_rpi_cpuinfo === null && cpuinfo !== undefined) {
1100+
_rpi_cpuinfo = cpuinfo;
1101+
} else if (cpuinfo === undefined && _rpi_cpuinfo !== null) {
11001102
cpuinfo = _rpi_cpuinfo;
11011103
} else {
11021104
try {
@@ -1109,7 +1111,7 @@ function getRpiGpu() {
11091111

11101112
const rpi = decodePiCpuinfo(cpuinfo);
11111113
if (rpi.type === '4B' || rpi.type === 'CM4' || rpi.type === 'CM4S' || rpi.type === '400') { return 'VideoCore VI'; }
1112-
if (rpi.type === '5') { return 'VideoCore VII'; }
1114+
if (rpi.type === '5' || rpi.type === '500') { return 'VideoCore VII'; }
11131115
return 'VideoCore IV';
11141116
}
11151117

0 commit comments

Comments
 (0)