Comments (9)
I think I may need to add a configuration menu to the mainline u-boot, but I don't know much about that, would anyone do that.
from dietpi.
This u-boot seems to have a lot of problems with "dram_init".
In the "mctl_calc_size" method body.
both values have the potential to occur.
u8 width = config->bus_full_width ? 4 : 2;
// Sometimes it's 2, sometimes it's 4
When the memory size is incorrectly recognized, the system may crash if the memory usage exceeds the actual amount available.
from dietpi.
I have the 1.5GiB board
I found out the difference by comparing the source code.
source code: u-boot/arch/arm/mach-sunxi/dram_sun50i_h616.c
static unsigned long mctl_calc_size(const struct dram_config *config)
{
u8 width = config->bus_full_width ? 4 : 2;
/* 8 banks */
unsigned long size;
size = (1ULL << (config->cols + config->rows + 3)) * width * config->ranks;
// ----- CONFIG_DRAM_SUN50I_H616_TRIM_SIZE=y -----
size = (size * 3) / 4;
// ------------------------ END -----------------------
return size;
}
from dietpi.
Ah nice, you just nees to add size = (size * 3) / 4;
and this works for U-Boot and also the final Linux system booted?
This looks so easy and obvious, I wonder whether iuncuim did not find that.
Also not sure how to implement into mainline U-Boot. Since this is not done in the device tree, I also have no other idea than basically adding this very same flag. At least it can potentially serve other H616/H618 boards as well.
EDIT: Ah, I think he does the very same for H616 boards like Zero 2. I am currently in China where gist.github.com is blocked, but based on snippets, he edits the same function. The problem IIRC was that the physical RAM size could not be checked the same way on H618, hence he aimed to do it without flag but dynamically bases on hardware. I could imagine that U-Boot is not happy to accept such SoC specific flags in the main config, but not sure whether anyone asked.
EDIT2: Not the SoC is the difference, but LPDDR3 vs LPDDR4. However, this means we can use mainline U-Boot, only applying a one-line patch.
I will ask at Armbian whether they would accept an additional build target for this, otherwise we can do with a fork, hosting the build on our server, so the issue is solved for the 1.5G variant as well.
from dietpi.
Hello!
I've tried different kernels and found that they all have the wrong temperature information, which makes them unbootable
One problem has been identified so far:
[ 2.143164] thermal thermal_zone0: gpu-thermal: critical temperature reached, shutting down
[ 2.151581] reboot: HARDWARE PROTECTION shutdown (Temperature too high)
[ 2.185438] reboot: Power down
My old kernel could boot fine because I removed the temperature module.
from dietpi.
However there doesn't seem to be anything else I can do about this problem. :(
from dietpi.
Next week I can generate a U-Boot build which matches the one we use for the 1/2/4 GB variants, just with this patch added. That one (using the Armbian build system), does have the right temperatures.
from dietpi.
Hmm, one would expect that config->bus_full_width
is the correct condition for width
to result in the correct memory size?
from dietpi.
Fixed with: #7064
Armbian just added a patch to fix the 1.5 GB RAM detection in mainline U-Boot. I compiled a new package and added it to our APT repository, to be installed on the 1.5 GB RAM variant as well. If you want to test it now:
apt purge linux-u-boot-orangepizero3-next
apt install linux-u-boot-orangepizero3-current
source /usr/lib/u-boot/platform_install.sh
# To show progress and errors, in case
eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')"
write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")"
Works well, with correct RAM size, and Ethernet adapter remains on reboot:
root@OrangePiZero3:~# free -m
total used free shared buff/cache available
Mem: 1420 142 1254 2 91 1278
Swap: 0 0 0
root@OrangePiZero3:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether <MAC> brd ff:ff:ff:ff:ff:ff
altname end0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
link/ether <MAC> brd ff:ff:ff:ff:ff:ff
from dietpi.
Related Issues (20)
- DietPi-Installer | Add support for Amlogic S9xx TV boxes HOT 7
- DietPi-Software | NZBGet: Move to DEB packages?
- Dietpi-VPN IPVanish installation - Possible bugs with IpVanish's configs.zip and also "keysize" in .ovpn file HOT 6
- Dietpi connecting to Chinese sites? HOT 1
- Camera Led not working HOT 7
- Pi-hole setup fails after applying workaround from #6592 / bond0 interface HOT 2
- Unable to install Wazuh agent on Pi 5 HOT 3
- HTTP(S) connections (without DNS) to certain hosts are blocked (by ISP?) HOT 81
- Image | ROCK 3C HOT 1
- Open Beta v9.4 | Please help testing and hardening our upcoming release HOT 14
- Error when updating to 9.4 HOT 1
- Bare minimum backup and Better explanation of the backup process HOT 3
- dietpi-software: snapweb snapcast server invalid web root HOT 6
- Iteration v9.5 (2024-06-08)
- dietpi-letsencrypt installation HOT 3
- DietPi-Software | Add desktop selection to main menu
- Can't update Jellyfin HOT 4
- Motioneye Telegram notification error
- Radxa Rock 3B
- Errors were encountered while processing: raspi-firmware E: Sub-process /usr/bin/dpkg returned an error code (1) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dietpi.