warpme / minimyth2

Distro to make disk-less MythTV appliance
https://github.com/warpme/minimyth2/wiki
69 stars 20 forks source link

compile kernel and uboot only #16

Closed tm4dev closed 2 years ago

tm4dev commented 2 years ago

Hello, I've just found your image MiniMyth2-armv8-master-11.23.0.r2941-board-h616.tanix_tx6s-SD-Image.img.xz could be bootable on my tvbox - x96 mate (h616), no error on serial console.

I want to compile kernel and uboot to run ubuntu (or armbian) on it, could you give me some hints? I know this is off-topic and taking your time, but I'm new on compiling kernel and really need your help, please :smile:

tm4dev commented 2 years ago

I've tried uboot trees from https://github.com/u-boot/u-boot and https://github.com/jernejsk/linux-1/tree/h616-full, but it stuck, here is log

U-Boot SPL 2021.01-g4de1753d12-dirty (Nov 07 2021 - 17:41:37 +0700)
DRAM: 4096 MiB
Trying to boot from MMC1
NOTICE: BL31: v2.4(debug):v1.2-7312-gbdcbf04f3
NOTICE: BL31: Built : 17:16:28, Nov 7 2021
NOTICE: BL31: Detected Allwinner H616 SoC (1823)
NOTICE: BL31: Found U-Boot DTB at 0x4a08bc48, model: X96 Mate
INFO: ARM GICv2 driver initialized
INFO: Configuring SPC Controller
INFO: PMIC: Probing AXP305 on I2C
INFO: PMIC: aldo1 voltage: 3.300V
INFO: PMIC: aldo2 voltage: 3.300V
INFO: PMIC: aldo3 voltage: 3.300V
INFO: PMIC: bldo1 voltage: 1.800V
INFO: PMIC: bldo2 voltage: 1.800V
INFO: PMIC: dcdcd voltage: 1.360V
INFO: PMIC: dcdce voltage: 3.300V
INFO: Changed devicetree to reserve BL31 memory.
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for 855873 was applied
INFO: BL31: cortex_a53: CPU workaround for 1530924 was applied
NOTICE: PSCI: System suspend is unavailable
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9

U-Boot 2021.01-g4de1753d12-dirty (Nov 07 2021 - 17:41:37 +0700) Allwinner Tecy

CPU: Allwinner H616 (SUN50I)
Model: X96 Mate
I2C: ready
DRAM: 4 GiB

warpme commented 2 years ago

Hi, This might be a bit more tricky.... 1.kernel:

2.bootloader: Generally You need compile ATF & Uboot then install in correct way on SD card. Probably easier will be do DD bootloader from MiniMyth2 sdcard image to yours SD card + ask uboot to use DTB for x96 Mate

sudo dd if=/dev/<SD_card> of=tanix-tx6s-bootloader.img bs=1048576 count=16

tm4dev commented 2 years ago

omg, thank you so much! I don't think you reply :smile: I'll follow your guide, still need your help then :smiley: thanks!!

warpme commented 2 years ago

btw: i'm fan of archlinux & https://endeavouros.com you may look on https://github.com/warpme/archlinuxarm

tm4dev commented 2 years ago

hmm, if I go for archlinux with your "ArchLinux ARM TanixTX6 image, 5.11 kernel" on my tvbox, what I need are:

  1. write ArchLinux-TanixTX6.img to SD card
  2. put x96mate dtb on boot partition
  3. edit boot.scr to load x96mate dtb
  4. compile 5.14 (or 5.15) kernel then replace those binary onto sdcard

Did I miss something? so what about uboot? Do I need compile it (with x96mate config, dts...) then dd to sdcard ?

warpme commented 2 years ago

Oh - i put links to archlinux etc just FYI. For h616 tx6s you need build archlinux kernel with current patches. You need any aarch64 box with running archlinuxarm to compile 5.14 kernel with my patches...

tm4dev commented 2 years ago

bro, thank you a lot! I followed your guide and this https://github.com/hexdump0815/linux-mainline-and-mali-allwinner-h6-kernel with this tree https://github.com/jernejsk/linux-1 Compiled 5.15.0 kernel and it just work :smile: thank you for the very detailed guide :smile: