memLayout() improvement Raspberry PI 5

This commit is contained in:
Sebastian Hildebrandt 2025-01-10 06:22:39 +01:00
parent e6f4fd8899
commit 153d584cf3
6 changed files with 19 additions and 30 deletions

View File

@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment | | Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- | | ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.25.9 | 2025-01-10 | `memLayout()` improvement Raspberry PI 5 |
| 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI | | 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI |
| 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI | | 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI |
| 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved | | 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved |

View File

@ -30,27 +30,6 @@
## The Systeminformation Project ## The Systeminformation Project
```
.''.
.''. . *''* :_\/_:
:_\/_: _\(/_ .:.*_\/_* : /\ :
.''.: /\ : ./)\ ':'* /\ * : '..'.
:_\/_:'.:::. ' *''* * '.\'/.' _\(/_
: /\ : ::::: *_\/_* -= o =- /)\
'..' ':::' * /\ * .'/.\'. '
*..* :
*
* /.\ * * . *
. /..'\ . . * .
*/'.'\* . . . * *
* /.''.'\ * . . . *
. */.'.'.\*
.........".""""/'.''.'.\""."."........".".".......................
^^^[_]^^^*
```
I wish you all a Merry Christmas and a peaceful New Year 2025.
This is amazing. Started as a small project just for myself, it now has > 17,000 This is amazing. Started as a small project just for myself, it now has > 17,000
lines of code, > 650 versions published, up to 8 mio downloads per month, > 330 lines of code, > 650 versions published, up to 8 mio downloads per month, > 330
mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who

View File

@ -57,6 +57,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">5.25.9</th>
<td>2024-01-10</td>
<td><span class="code">memLayout()</span> improvements Raspberry PI 5</td>
</tr>
<tr> <tr>
<th scope="row">5.25.8</th> <th scope="row">5.25.8</th>
<td>2024-01-09</td> <td>2024-01-09</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo"> <img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div> <div class="subtitle"><span id="typed"></span>&nbsp;</div>
3<div class="version">New Version: <span id="version">5.25.8</span></div> 3<div class="version">New Version: <span id="version">5.25.9</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button> <button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div> </div>
<div class="down"> <div class="down">
@ -204,7 +204,7 @@
</div> </div>
<div class="row number-section"> <div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">18,440</div> <div class="numbers">18,452</div>
<div class="title">Lines of code</div> <div class="title">Lines of code</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
@ -212,7 +212,7 @@
<div class="title">Downloads last month</div> <div class="title">Downloads last month</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">793</div> <div class="numbers">795</div>
<div class="title">Dependents</div> <div class="title">Dependents</div>
</div> </div>
</div> </div>

View File

@ -409,10 +409,12 @@ function memLayout(callback) {
'0': 400, '0': 400,
'1': 450, '1': 450,
'2': 450, '2': 450,
'3': 3200 '3': 3200,
'4': 4267
}; };
result[0].type = 'LPDDR2'; result[0].type = 'LPDDR2';
result[0].type = version && version[2] && version[2] === '3' ? 'LPDDR4' : result[0].type; result[0].type = version && version[2] && (version[2] === '3') ? 'LPDDR4' : result[0].type;
result[0].type = version && version[2] && (version[2] === '4') ? 'LPDDR4X' : result[0].type;
result[0].ecc = false; result[0].ecc = false;
result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400; result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400;
result[0].clockSpeed = version && version[4] && version[4] === 'd' ? 500 : result[0].clockSpeed; result[0].clockSpeed = version && version[4] && version[4] === 'd' ? 500 : result[0].clockSpeed;

View File

@ -1094,9 +1094,11 @@ function decodePiCpuinfo(lines) {
return result; return result;
} }
function getRpiGpu() { function getRpiGpu(cpuinfo) {
let cpuinfo = null;
if (_rpi_cpuinfo !== null) { if (_rpi_cpuinfo === null && cpuinfo !== undefined) {
_rpi_cpuinfo = cpuinfo;
} else if (cpuinfo === undefined && _rpi_cpuinfo !== null) {
cpuinfo = _rpi_cpuinfo; cpuinfo = _rpi_cpuinfo;
} else { } else {
try { try {
@ -1109,7 +1111,7 @@ function getRpiGpu() {
const rpi = decodePiCpuinfo(cpuinfo); const rpi = decodePiCpuinfo(cpuinfo);
if (rpi.type === '4B' || rpi.type === 'CM4' || rpi.type === 'CM4S' || rpi.type === '400') { return 'VideoCore VI'; } if (rpi.type === '4B' || rpi.type === 'CM4' || rpi.type === 'CM4S' || rpi.type === '400') { return 'VideoCore VI'; }
if (rpi.type === '5') { return 'VideoCore VII'; } if (rpi.type === '5' || rpi.type === '500') { return 'VideoCore VII'; }
return 'VideoCore IV'; return 'VideoCore IV';
} }