Notes about booting linux on MStar Kronus MIPS SoCs
- Although kernel configured for MSD7816, the manufacturer says in the user manual that the processor is MSD5043 (they are almost same, read more here).
This was tested on a Strong SRT8500 STB.
To gain access to the serial console you need to disassemble the device. In my case, the UART connector was already on the board.
To use it in an assembled case, I'd advise soldering 2 wires (to RX and TX) and mark them.
This will be used for U-Boot console
Just split the usb stick into 2 partitions: FAT32 for the kernel (100M will be fine), the remaining space as ext4 for rootfs
- 6.1 - https://gist.github.com/maniekx86/4ac546aad6ea88463644182d95f5b10f
- 6.7 - https://gist.github.com/maniekx86/abbbdef38c84eae7efed8118df665ca3
- 6.8 - https://gist.github.com/wctrl/8c1516199a944ab8c999840481dc2f7d
- 6.9 - https://gist.github.com/wctrl/defdc05aabacf68eba8fb62fd113d465
Install mipsel gcc and build kernel using make ARCH=mips uImage -j4
Select MSD7816 128M test device tree if device supports 128M ram (~100M will be available)
Copy arch/mips/boot/uImage.bin
to FAT32 partition
- Buildroot config: https://gist.github.com/wctrl/b2834553b76ef07f5c86182ac1ced981 (wip)
- Debian is the only distribution what I know that supports mipsel (OpenWrt and Gentoo are not suitable). I was advised to use this builder (it is designed for Debian/Ubuntu/dpkg-based). Don't forget to add the necessary packages inside the script and run with
-a mipsel
flag
Unpack produced tar.gz to ext4 partition
Insert usb stick and stop U-Boot by holding any key when device booting.
- To init usb enter
usb start
orusb reset 1
- To read uImage enter
fatload usb 0 0x81000000 uImage.bin
- To fix framebuffer enter
osd_create 1 1
(not necessary if you using serial console) - To disable watchdog enter
setenv disablewatchdog mw.w 0xBF006040 0 1\;mw.w 0xBF006010 0 1\;mw.w 0xBF006014 0 1\;
andrun disablewatchdog
(not necessary, enter only if linux not booting) - To jump to linux enter
bootm 0x81000000
If something goes wrong do force shutdown (unplug power cable) and try again.
- Can't override U-Boot bootcmd variable (hardcoded? spi flash is ro?)
- DO NOT USE LLVM due performance issue (seems since 6.9-rc1)
- Figure about ram issues (more info here)
Thanks to https://github.com/maniekx86 who helped me with that