

chinhhut
-
Posts
45 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by chinhhut
-
-
10 hours ago, OttawaHacker said:
My solution has been stable - wondering if you possibly have some other network settings that might interfere. You could just put this script into one of the network init scripts to apply it on every boot.
I used the latest build of Orange pi 5b. The strange point is our ethernet inteface is "end1" while normally it should be "eth0".
By the way, I tried other solution by editting the file /etc/network/interfaces and it seems to work well up to now.
Quoteallow-hotplug eth0
no-auto-down eth0
iface eth0 inet dhcp
hwaddress 12:34:56:78:90:ab -
@OttawaHacker Thank you for sharing the solution. I just followed your guide and it worked after first reboot.
By the way, later on, after several other reboot, the mac is reset again.
Do you have any other suggesstion to fix?
Thank you.
-
-
-
3 minutes ago, fabiobassa said:
@chinhhut
home assistant is a great project but at the same time is very hard disk intensive and resource eating. In special mode if you even have motion plug-in or other pugins that extensively use the hard disk and/or internal emmc
And it also coul be a defective emmc since many chinese tvboxes are badly assembled with faulty components@fabiobassa Yes. I'm thinking about the defective emmc issue because I have several 3318 boxes and 1 box get this kernel panic issue, an other box get crashed after several hours running, other ones work well over time.
-
9 hours ago, jock said:
No idea. From the "screen shot" (literally :D) it seems to happen right during startup or does it happen during regular runtime too?
Sometimes, I got this error after running the "shutdown now" command. Sometimes, the box shutdown normally using this command.
During regular runtime or start up, I have not found this error.
Note: because of the LCD screen resolution so there are some text on the left are missing then you may feel this is starting up state.
I just got this error again today:
-
On 3/8/2022 at 6:40 PM, jock said:
If the kernel crashes then you have no other way than attach a serial adapter to the board UART to log continously, in the hope the kernel says something before the freeze happens.
@jock Sometimes I got the kernel panic as below. Do you think this error is related to hardware or armbian kernel?
-
4 hours ago, fabiobassa said:
What services/app have installed?
Did kernel crashed before new installation or crashes even with unloaded system ?
As @jockexplained me, no user space applications should ever freeze/panic the kernel , unless drivers are involved.
And if kernel crashes I am afraid you Will not have any log either
I install Home Assisstant Supervisor, Docker on this box.
>Did kernel crashed before new installation or crashes even with unloaded system ?
It works normally after finishing all the installation, only crashes after several hours of working (10-24 hours).
I have 2 boxes of 3318 and only 1 box got this issue.
If this issue related to hardware, I still confused how to see the log of the system to see the root cause.
Thank you.
-
Hello @jock
Sometimes, my 3318 box (T9 4GB memory + 32GB flash) stop working (there is no network, no signal on HDMI etc).
If I unplug the power and plug the power again, it works again but repeat this error after 1-2 days.
There is no heavy service on this box. The CPU temperature is around 50-55 degres.
I just confused which command should I check once booting the box again to find out the root cause of this issue.
Thank you.
-
if you want to install fresh updated Armbian, you can try rkdeveloptool from pinned topic off RK322X. Try to clock pin and follow the guide similar to the way to unbrick the board.
-
@jock For my RK3318 box, everything works well but recently there is always error message during starting up.
The message is "[FAILED] Failed to start Resets System Activity Logs.",
Here is the detail status of this service:
root@mybox:~# systemctl status sysstat.service ● sysstat.service - Resets System Activity Logs Loaded: loaded (/lib/systemd/system/sysstat.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2021-11-25 12:10:54 +07; 26min ago Docs: man:sa1(8) man:sadc(8) man:sar(1) Process: 698 ExecStart=/usr/lib/sysstat/sa1 --boot (code=exited, status=2) Main PID: 698 (code=exited, status=2) CPU: 38ms Warning: journal has been rotated since unit was started, output may be incomplete.
So I just confused how to fix this one.
Thank you.
-
https://github.com/home-assistant/os-agent/tree/main#using-home-assistant-supervised-on-debian
@tv4you2016you can try this tutorial.Please note you should run the following command to see the detail log of installing process:
journalctl -f -u hassio-supervisor.service
You can post the log of your problem and others can suggest you more detail solution.
-
1 hour ago, jock said:
@chinhhut Actually armbian provides a way to introduce user-level patch files which can modify the behaviour of the installed system.
It means that you can, to some extent, launch sudo ./compile.sh and finally produce an image customized for your needs.
Armbian documentation will help you further.
I will study more how to patch some additional files but could you share the source code to build RK3318 image?
Thank you so much for your support.
-
7 hours ago, curse said:
Wouldn't it be easier to modify Armbian as you want it before installing it in the first place? I don't know how to do it, but example. Download @jock's Armbian, or compile your own. Modify the files on the .iso. write it to the SD card and install it on box 1 without the need to modify it later. Then do it on box 2, box 3, etc.
That's good idea but I don't know how to modify the .iso file while keep the files system consistency. I need to install a lot of applications and library such as docker etc.
-
On 11/14/2021 at 1:09 AM, jock said:
Doing an erase with blkdiscard and then restoring the backup skipping the blank parts now becomes sensible!
There is an issue though: discarding pages does not fill them with 0x00 bytes, but with 0xff bytes, so the real blank parts now are not those which contains string of 0x00s but those which contains strings of 0xff bytes. Those may or may be not so common. Surely they are common in non-programmed sectors, but results may vary.
As a conclusion: restoring the whole count of eMMC sectors, despite being slower, is surely the simplest and most reliable way!
I have an idea as follow to clone an Armbian box to new one and will try this weekend if reasonable.
For instance, we have H96 max with 64GB flash. If making full backup of 64G flash and restore, it takes a lot of time.
Here are major steps:
Step 1: Install the Armbian according to your guide from page 1 (only take 1 minute to finish) to the box 1.
Step 2: Boot Armbian from box 1 and using partition tool to divide the eMMC flash into 2 partitions,: partition 1 from beginning to 5GB. Partition 2 is remaining space
Step 3: Make the backup of partition 1 by rkdeveloptool or similar partition tool to the PC
Step 4: Install the fresh armbian to the box 2 like Step 1(only take 1 minute to finish)
Step 5: boot the box 2 and make 2 partitions like Step 2.
Step 6: using rkdevelopetool or similar to to restore the backup from Step 3 to partition 1 of box 2
I don't have much experience with partition tool on Linux and this is just idea. Please give us your any comments if any.
Thank you.
-
On 11/4/2021 at 10:01 PM, jock said:
Maybe with another USB stick or drive it may work. Also consider to use all the USB ports of the board, since they are not all the same. u-boot is picky.
About the backup, indeed you can burn the multitool backup with rkdeveloptool. You just need to decompress it first.
I've tried your way by decompressing the backup.gz file first then the extracted file is very big (the size is 16GB equal to the original eMMC size) and it takes much time to fully restoring.
So is there a way to reduce the size of extracted image to save the restoring time?
For example, the original size of eMMC is 16GB then the extracted image is also 16GB but the actual data size is only around 2-3GB. My idea is how to keep the data size only in the image and remove the blank data of the backup image. That might help to reduce the backup image even after decompressing.
-
23 hours ago, jock said:
All kind of regular images (armbian, multitool, libreelec if available too...) can be burnt on USB stick or USB external hard drive: u-boot should prefer booting from there (if the buggy code doesn't kick in).
@jockI've tried but not success, may be I'm not lucky man :D.
By the way, is there a way to restore the backup.gz from multitool to new box using "rkdeveloptool wl 0X0 yourimage.img" command? I mean change yourimage.img file with backup.gz.
-
1 hour ago, curse said:
Just one question. How did you "burn" the iso to the SD-card? did you use dd, rufus, etc? Just in case the error is there and not with the box or the iso?
I used Etcher to flash the Armbian image to the SD card as usual but it is unable to boot from SD card.
-
20 minutes ago, fabiobassa said:
@chinhhut
Will try to explain you what loader is with an analogy: in normal pc you have bios and master boot record. Well, maskrom is bios and is contained in the soc itself, loader is a sort of master boot record and it enables the emmc and ddr.
You can have a look here
http://opensource.rock-chips.com/wiki_Boot_option
I did extract it by a working firmware using a tool that unpacked the whole firmware. Try to google for RK3xxx_firmware_tools_5.23.1_by_SergioPoverony.zip and leave alone that github since it is just one piece of the puzzle. The detailed infos how to get a working loader are in the rockchip instructionsThank you for detail explanation in a basic way. I can understand the logic of booting process now.
QuoteBut if you are lucky that works multitool, well that is the easiest way to clone and clone back
After booting from eMMC successfully, I try to boot from SD card again to try the multitool but not success. At current, my box still only can boot from eMMC.
QuoteOf course and the command would be rkdeveloptoo rl 0x0 etc etc etc ( try rkdeveloptool -h to get the help)
I guess using rkdevelopertool to backup will create the .img file that could be restored using "rkdeveloptool wl 0X0 yourimage.img" command, right?
I will try to backup the entire eMMC using rkdevelopetool and report the result later.
-
@jockI have one more question. Is there a way to dump the whole eMMC to .img file then using "./rkdeveloptool wl 0X0 file.img" to clone to new box. It looks similar to the backup and restore function from your Multitool.
That's great if we can use some function of Multitool under Linux.
THank you.
-
6 hours ago, fabiobassa said:
Glad you got success .
Don't forget to put a like that helps @jock and myself in community reputation
@fabiobassa @jock @hexdump
Thank you once again for your support.
By the way, I still confused how to get the MiniLoaderAll.bin as you suggested.
That file is built by yourself or pick up from here:
https://github.com/rockchip-linux/rkbin/tree/master/bin/rk33
As I checked, from the official Rockchip repo, there are several boodloader files related to RK3328 and I don't know how to choose the correct one.
-
6 hours ago, fabiobassa said:
Try these steps:
1) push the little switch inside the hole while inserting a male-male cable into the otg
2) on another linux machine you should have now a new device (lsusb will help you) and you can run rkdeveloptool
3) rkdeveloptool ld should List Device
4) rkdeveloptool rd 3 should Reset Device into mode 3 ( maskrom )
5) rkdeveloptool db MiniLoaderAll.bin ( of course from your path) should upload a temporary loader to recognize the internal emmc
6) if all is successfull until now you can rkdeveloptool wl 0X0 yourimage.img . This should flash the internal emmc .
DISCLAIMER: very " dangerous" approach , be ready to have the opportunity to short the emmc clock pin to ground to go back into mask rom
@fabiobassa @jock I've followed your guide and got success. Thank you so much.
root@mybox:~/rkdeveloptool# ls 99-rk-rockusb.rules Makefile.in RKComm.h RKImage.h RKScan.h cfg configure.ac main.cpp CMakeLists.txt Property.hpp RKComm.o RKImage.o RKScan.o config.h.in crc.cpp main.o DefineHeader.h RKBoot.cpp RKDevice.cpp RKLog.cpp Readme.txt config.ini crc.o parameter_gpt.txt Endian.h RKBoot.h RKDevice.h RKLog.h aclocal.m4 config.log gpt.h rkdeveloptool Makefile RKBoot.o RKDevice.o RKLog.o autom4te.cache config.status license.txt Makefile.am RKComm.cpp RKImage.cpp RKScan.cpp boot_merger.h configure log root@mybox:~/rkdeveloptool# ./rkdeveloptool ld DevNo=1 Vid=0x2207,Pid=0x320c,LocationID=101 Loader root@mybox:~/rkdeveloptool# ./rkdeveloptool rd 3 Reset Device OK. root@mybox:~/rkdeveloptool# ./rkdeveloptool db MiniLoaderAll.bin Opening loader failed, exiting download boot! root@mybox:~/rkdeveloptool# ./rkdeveloptool db /root/MiniLoaderAll.bin Downloading bootloader succeeded. root@mybox:~/rkdeveloptool# ./rkdeveloptool wl 0X0 /root/Armbian_21.11.0-trunk_Rk3318-box_bullseye_edge_5.14.14_minimal.img Write LBA from file (100%) root@mybox:~/rkdeveloptool# ./rkdeveloptool ---------------------Tool Usage --------------------- Help: -h or --help Version: -v or --version ListDevice: ld DownloadBoot: db <Loader> UpgradeLoader: ul <Loader> ReadLBA: rl <BeginSec> <SectorLen> <File> WriteLBA: wl <BeginSec> <File> WriteLBA: wlx <PartitionName> <File> WriteGPT: gpt <gpt partition table> WriteParameter: prm <parameter> PrintPartition: ppt EraseFlash: ef TestDevice: td ResetDevice: rd [subcode] ReadFlashID: rid ReadFlashInfo: rfi ReadChipInfo: rci ReadCapability: rcb PackBootLoader: pack UnpackBootLoader: unpack <boot loader> TagSPL: tagspl <tag> <U-Boot SPL> ------------------------------------------------------- root@mybox:~/rkdeveloptool# ./rkdeveloptool ld DevNo=1 Vid=0x2207,Pid=0x320c,LocationID=101 Maskrom
-
2 hours ago, fabiobassa said:
@chinhhut
Try these steps:
1) push the little switch inside the hole while inserting a male-male cable into the otg
2) on another linux machine you should have now a new device (lsusb will help you) and you can run rkdeveloptool
3) rkdeveloptool ld should List Device
4) rkdeveloptool rd 3 should Reset Device into mode 3 ( maskrom )
5) rkdeveloptool db MiniLoaderAll.bin ( of course from your path) should upload a temporary loader to recognize the internal emmc
6) if all is successfull until now you can rkdeveloptool wl 0X0 yourimage.img . This should flash the internal emmc .
DISCLAIMER: very " dangerous" approach , be ready to have the opportunity to short the emmc clock pin to ground to go back into mask rom
I'm going to follow your guide but I just want to confirm about the whole story from your idea.
According to your guide, the MiniLoaderAll.zip contain the u-boot of the box? After flashing it to the eMMC successfully, the box may support to boot from USB and unable to boot from Android anymore?
One more question, how to get the MiniLoaderAll.zip as your attachment? You extract it from similar Rk3328 box or that's built manually by yourself.
Thank you once again for detail suggestion.
-
3 hours ago, jock said:
Normally no, you don't need to push the reset button to boot the multitool.
But I totally forgot about the reset button: stock u-boot will put itself in "rockusb" mode, which is a sort of maintenance mode.
@chinhhut may connect the USB OTG port of the box to a computer (usually with a male-to-male cable). The box will show up in lsusb as in "maskrom mode".
More instructions will follow later...
I already tried to push reset button in the AV hole while plugging the power but got same issue.
Actually I've upload new firmware (android 9) to the box via Male to male cable using Rkdevtool 2.5.8 on windows 10. But the box is stucked at the splash screen after flashing (may be the Android firmware is not compatible).
I will try to to connect the box with Ubuntu PC .
mac adress change everyboot orange 5
in Orange Pi 5
Posted
could you help me how to do the u-boot patch according to your source code? I guess it may require to build the u-boot file again manually?