(21 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
== Simple HOWTO == | == Simple HOWTO == | ||
Lichee Pi 4A is a single board computer (SBC) powered by Alibaba T-Head TH1520 quad-core RISC-V Xuantie C920 processor @ 2.0 GHz with an Imagination GPU and a 4 TOPS NPU for AI. | Lichee Pi 4A is a single board computer (SBC) powered by Alibaba T-Head TH1520 quad-core RISC-V Xuantie C920 processor @ 2.0 GHz with an Imagination GPU and a 4 TOPS NPU for AI. | ||
[[File:th1520_lpi4a.png|512px|right]] | |||
=== Prebuild Image === | === Prebuild Image === | ||
Line 57: | Line 59: | ||
==== insert the SD card and power up ==== | ==== insert the SD card and power up ==== | ||
* default display is HDMI: | * default display is HDMI. | ||
[https://youtu.be/GQQiDCs-yeY Boot Fedora 38 on Sipeed Lichee Pi 4A] | * youtube video: [https://youtu.be/GQQiDCs-yeY Boot Fedora 38 on Sipeed Lichee Pi 4A] | ||
[[File:Boot_Fedora_38_on_Sipeed_Lichee_Pi_4A.png|center|1024px]] | |||
== Hardware info == | == Hardware info == | ||
Line 67: | Line 71: | ||
Available for licensing, the platform aims to aid global developers by reducing the development costs and shortening the design cycle of chips, making the mass production of RISC-V based high-performance SoCs a reality. | Available for licensing, the platform aims to aid global developers by reducing the development costs and shortening the design cycle of chips, making the mass production of RISC-V based high-performance SoCs a reality. | ||
* T-Head: [https://occ.t-head.cn/product/xuantie/4082464366237126656 玄铁 C920 RISC-V] | |||
== Soc & Development boardinfo == | |||
The Alibaba T-Head TH1520 quad-core Xuantie C920 processor clocked at up to 2.5GHz with a 4 TOPS NPU, and support for 64-bit DDR at up 4266 MT. | The Alibaba T-Head TH1520 quad-core Xuantie C920 processor clocked at up to 2.5GHz with a 4 TOPS NPU, and support for 64-bit DDR at up 4266 MT. | ||
Line 72: | Line 80: | ||
The TH1520 is born out of the Wujian 600 platform unveiled by Alibaba in August 2022, and is capable of running desktop-level applications such as Firefox browser and LibreOffice office suite on Fedora 37, 38 and more. | The TH1520 is born out of the Wujian 600 platform unveiled by Alibaba in August 2022, and is capable of running desktop-level applications such as Firefox browser and LibreOffice office suite on Fedora 37, 38 and more. | ||
[https://gitee.com/thead-yocto/documents T-Head Yeying 1520 documentation] | |||
* Sipeed: [https://wiki.sipeed.com/hardware/en/lichee/th1520/lpi4a/1_intro.html LicheePi 4A] | |||
* light-a-val:[https://gitee.com/thead-yocto/documents#machinetarget%E6%94%AF%E6%8C%81%E5%88%97%E8%A1%A8 TH1520-A EVB documentation] | |||
* beagleV-Ahead : [https://gitee.com/thead-yocto/documents#machinetarget%E6%94%AF%E6%8C%81%E5%88%97%E8%A1%A8 beagleV Ahead dev board] | |||
* MM : [https://gitee.com/thead-yocto/documents#machinetarget%E6%94%AF%E6%8C%81%E5%88%97%E8%A1%A8 M* M* dev board] | |||
== Software == | == Software == | ||
[[File:boot_order_linux_on_th1520.png|center|1024px]] | [[File:boot_order_linux_on_th1520.png|center|1024px]] | ||
=== Reference source code === | === Reference source code === | ||
==== Original source code ==== | ==== Original source code ==== | ||
* '''T-Head''': [https:// ]<br> | * '''T-Head u-boot''': [https://gitee.com/thead-yocto/u-boot u-boot.git]<br> | ||
* '' | * '''T-Head kernel''': [https://gitee.com/thead-yocto/kernel kernel.git]<br> | ||
==== Tekkaman's REPO ==== | ==== Tekkaman's REPO ==== | ||
* [https://github.com/tekkamanninja/opensbi OpenSBI] | * [https://github.com/tekkamanninja/opensbi OpenSBI] | ||
Line 91: | Line 100: | ||
* [https://github.com/tekkamanninja/linux Linux kernel] | * [https://github.com/tekkamanninja/linux Linux kernel] | ||
=== | === '''Fedora Image'''=== | ||
==== Firmware | * [http://openkoji.iscas.ac.cn/kojifiles/work/tasks/7991/1347991/fedora-disk-multi-desktops_thead_th1520-f38-20230516-002100.n.0-sda.raw.xz fedora-disk-multi-desktops_thead_th1520-f38-20230516-002100.n.0-sda.raw.xz] | ||
==== Firmware boot order ==== | |||
* [https://openkoji.iscas.ac.cn/pub/dl/riscv/T-Head/th1520_light/FW/ u-boot-with-spl.bin for Fedora auto boot] | |||
==== OpenSBI ==== | ==== OpenSBI ==== | ||
Line 140: | Line 152: | ||
* [https://] | * [https://] | ||
+-----+-----+ | |||
| | | | |||
+-----+-----+ | |||
===== Build Linux Kernel for TH1520 ===== | ===== Build Linux Kernel for TH1520 ===== | ||
Line 174: | Line 189: | ||
</pre> | </pre> | ||
Koji System: | |||
* [https://openkoji.iscas.ac.cn/koji/ Openkoji system] | |||
* [https://openkoji.iscas.ac.cn/koji/ | |||
Latest revision as of 07:20, 4 August 2023
This is a placeholder page to collect all information about running Fedora on T-Head platform.
- Note: Currently T-Head platform is not officially supported by Fedora community.
Simple HOWTO
Lichee Pi 4A is a single board computer (SBC) powered by Alibaba T-Head TH1520 quad-core RISC-V Xuantie C920 processor @ 2.0 GHz with an Imagination GPU and a 4 TOPS NPU for AI.
Prebuild Image
We have prebuild image for TH1520 platform.
You can download from here.
For booting it on TH1520 platform, what you need to do just:
Decompress
unxz fedora-disk-multi-desktops_thead_th1520-f38-20230516-002100.n.0-sda.raw.xz
Flash into a SD card (>= 16GB)
sudo wipefs -a /dev/sdX sudo dd if=fedora-disk-multi-desktops_thead_th1520-f38-20230516-002100.n.0-sda.raw of=/dev/sdX status=progress bs=4M
please use wipefs to clean GPT backup partition table, otherwise you may run into rootfs mounting issue like Architectures/RISC-V/Allwinner/zh-cn#内核无法访挂载rootfs
There is a good GUI tool balena-etcher-electron instead of dd command.
Flash u-boot for the specific board into the EMMC
Once you flash the Image into SD card, you can get the u-boot for the specific board in boot partition. For example, for Lichee Pi 4A, the u-boot binary path is <boot partition>/u-boot-with-spl_lpi4a.bin.
Plaese flash it into EMMC by the fastboot command of android-tools package:
sudo fastboot flash uboot /path/to/u-boot-with-spl_lpi4a.bin ;sudo fastboot reboot sleep 10 sudo fastboot flash uboot /path/to/u-boot-with-spl_lpi4a.bin ;sudo fastboot reboot
Note: the modified u-boot can boot Fedora Image from SD automatically by
- 1, import uboot_thead_th1520.env from efi partition
- 2, import uEnv_thead_th1520.txt from boot partition
- 3, sysboot with extlinux/extlinux.conf
insert the SD card and power up
- default display is HDMI.
- youtube video: Boot Fedora 38 on Sipeed Lichee Pi 4A
Hardware info
IP info
T-Head Wujian 600 has been tailored specifically for developing edge SoCs. With enhanced CPU capability and heterogeneous architecture for high-performance embedded and edge products, the platform facilitates the design of SoCs in embedded applications, including home robots, medical imaging and video conferencing. It also includes an optimised software stack to help speed up the rollout of products to the market.
Available for licensing, the platform aims to aid global developers by reducing the development costs and shortening the design cycle of chips, making the mass production of RISC-V based high-performance SoCs a reality.
- T-Head: 玄铁 C920 RISC-V
Soc & Development boardinfo
The Alibaba T-Head TH1520 quad-core Xuantie C920 processor clocked at up to 2.5GHz with a 4 TOPS NPU, and support for 64-bit DDR at up 4266 MT.
The TH1520 is born out of the Wujian 600 platform unveiled by Alibaba in August 2022, and is capable of running desktop-level applications such as Firefox browser and LibreOffice office suite on Fedora 37, 38 and more.
T-Head Yeying 1520 documentation
- Sipeed: LicheePi 4A
- light-a-val:TH1520-A EVB documentation
- beagleV-Ahead : beagleV Ahead dev board
- MM : M* M* dev board
Software
Reference source code
Original source code
- T-Head u-boot: u-boot.git
- T-Head kernel: kernel.git
Tekkaman's REPO
Fedora Image
Firmware boot order
OpenSBI
RISC-V Open Source Supervisor Binary Interface, like arm-TF
Build binary
git clone https://github.com/tekkamanninja/opensbi -b master pushd opensbi CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic BUILD_INFO=y make popd
The build/platform/generic/firmware/fw_dynamic.bin will be used to make u-boot.toc1 below.
U-boot
Build binary
git clone https://github.com/tekkamanninja/u-boot -b pushd u-boot make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv _defconfig make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv menuconfig make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv u-boot.bin u-boot.dtb popd
Flash u-boot.bin to EMMC
sudo fastboot flash uboot /path/to/u-boot-with-spl_lpi4a.bin ;sudo fastboot reboot sleep 10 sudo fastboot flash uboot /path/to/u-boot-with-spl_lpi4a.bin ;sudo fastboot reboot
Linux kernel from T-Head
[http://]
Linux kernel for upstream
Important reference
- [https://]
+-----+-----+ | | | +-----+-----+
Build Linux Kernel for TH1520
Checkout Source
git clone https://github.com/ pushd linux git checkout popd
Branches: * are all for TH1520
Config
pushd linux make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv _defconfig make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv menuconfig popd
Cross Build and install
# RISCV_ROOTFS_BOOT is the mount point of the boot partition in SD card # RISCV_ROOTFS_BOOT=/run/media/../boot # RISCV_ROOTFS is the mount point of the Fedora rootfs partition in SD card # RISCV_ROOTFS=/run/media/../rootfs pushd linux make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_PATH=${RISCV_ROOTFS_BOOT} zinstall make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv INSTALL_MOD_PATH=${RISCV_ROOTFS} modules_install popd
Koji System: