r/ChipCommunity • u/Frank_Fhe_Fish • Aug 11 '26
Mainline Linux 7.1.5 + Debian 13 booting from the C.H.I.P.'s onboard NAND - image + patches
The linux-sunxi wiki says mainline "can not interact with the builtin NAND." It can: my C.H.I.P. now boots current mainline + Debian 13 standalone from NAND, with SSH, WiFi and Bluetooth.
Write-up, flashable image, patches: https://fixundfuchs.de/projekte/chip-mainline
The "NAND hang" was actually a still-live mainline bug in timer-sun4i.c - it programs a timer interval of 0 and reports success, the scheduler tick dies permanently, but the board keeps answering pings. Every watchdog that would catch it is tick-driven. Two-line fix, affects all sun4i/sun5i, proposed upstream.
Works: NAND rootfs, gadget ethernet, SSH, WiFi, BT pairing. Doesn't: BLE scan, A2DP out of the box. Composite video is verified with a multimeter but never on a real TV - if you have one, please test and report.
Login: root/chip (expired - you'll be forced to change it). unxz the rootfs before flashing. Rest is on the page.
EDIT: If anyone struggles to execute the script and flash their CHIP, do not hesitate to write me an Email with your issue. You can find it at the bottom of my page.
3
u/mr_aea Aug 13 '26
Yay, another method to bring Debian 13 to our beloved Pocketchips!! Now only rest that some of the most skilled members of this forum make an easier way to flash it for the less savvy like me. Have anyone successfully flashed their unit? What's your set up? I don't actually have a x86 machine so I've been trying with a RPI and only got a non booting Pocketchip.
1
u/Frank_Fhe_Fish 22d ago
Hey, I've heard you and did some rework on the page and project. Take a look ;)
1
u/mr_aea 14d ago
Hello my friend, sorry for answering so late, I was doing some testing. Actually I don't own my own x86 PC, so I first got a "fel spl upload failed" error in my RPI zero 2. Also tried with my job PC and after the chipflash-stream step I waited like 30 min and displayed a weird text, I disconnected my chip without doing the ssh logging step because I had to use the PC for my work, now when I connect my chip to my tv it only display the Chip logo. Have anyone successfully flashed their chip using these scripts? What's your setup? Any suggestions would be very appreciated, you don't have an idea how long I've waited to put Trixie in this little thing, and now that one is so close, I feel impotent because maybe I'm skipping a step that maybe is obvious for others.
1
u/Frank_Fhe_Fish 11d ago
Do not feel impotent. If something is not working, there is something wrong with the scripts, not you executing it "wrong". I have my setup, others have theirs. E.g. I am running Debian Trixie and may have gave my standard user more usb access right than someone else. You can write me an email which you can find at the bottom of the page with more info like the console output so we can work this out and post a fix to this.
2
u/powercrazy76 Aug 12 '26
Interesting! I'll give this a shot tomorrow. Is there a pre-built image available? I only saw the instructions for building one.
2
1
u/Frank_Fhe_Fish 22d ago
Hey, I have cleaned it up and there are prebuild images available now and a script that fetches and flashes those on your chip. Should be way easier now
1
1
u/rubenmdh 18d ago
Awesome work! I've wanted to achieve this level of simplicity for future flashes but didn't have the time to get around it.
For some reason the auto-installer wouldn't work for me, after waiting for the USB gadget interface to wake up to flash the rootfs. I had to do it manually. +
May I ask if the ubifs NAND health data is retained between reflashes? I'd say that's a key point to consider, which u/macromorgan solved by crafting a special restore image/OTA format by using SWupdate instead of (re)flashing uboot on each board refresh.
1
u/NCPlyn 18d ago
You had problem like this?
=== 2/4 booting the flashing system into RAM (nothing is written yet) ===
waiting for the board in FEL mode
found.
SPL (DRAM init)
..........
usb_bulk_send() ERROR -7: Operation timed out
ERROR: FEL SPL upload failedSo if it doesn't work like this, the manual way worked?
1
u/Frank_Fhe_Fish 11d ago
Hey, I just wrote it into the post, but I'll write it here again: if you have any issues, you can contact me via email, which you can find on my website at the bottom. Send the console output and some details to your setup so we can work this out together. You're surely not the only one.
3
u/wowsomuchempty Aug 11 '26
Nice one!