Andy Yan | 43273f5 | 2024-11-04 20:23:00 +0800 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | GenBook |
| 4 | ======= |
| 5 | Cool Pi GenBook is a laptop powered by RK3588, it works with a |
| 6 | carrier board connect with CM5. |
| 7 | |
| 8 | Specification: |
| 9 | * Rockchip RK3588 |
| 10 | * LPDDR5X 8/32 GB |
| 11 | * eMMC 64 GB |
| 12 | * SPI Nor 8 MB |
| 13 | * HDMI Type A out x 1 |
| 14 | * USB 3.0 Host x 1 |
| 15 | * USB-C 3.0 with DisplayPort AltMode |
| 16 | * PCIE M.2 E Key for RTL8852BE Wireless connection |
| 17 | * PCIE M.2 M Key for NVME connection |
| 18 | * eDP panel with 1920x1080 |
| 19 | |
| 20 | Here is the step-by-step to compile and boot to U-Boot on GenBook. |
| 21 | |
| 22 | Get the TF-A and DDR init (TPL) binaries |
| 23 | ---------------------------------------- |
| 24 | |
| 25 | .. prompt:: bash |
| 26 | |
| 27 | > cd u-boot |
| 28 | > export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.17.bin |
| 29 | > export BL31=../rkbin/bin/rk35/rk3588_bl31_v1.46.elf |
| 30 | > make coolpi-genbook-cm5-rk3588_defconfig |
| 31 | > make CROSS_COMPILE=aarch64-linux-gnu- |
| 32 | |
| 33 | This will build ``u-boot-rockchip.bin`` for eMMC and ``u-boot-rockchip-spi.bin`` for SPI Nor. |
| 34 | |
| 35 | Write u-boot to eMMC or SPI Nor from a Linux system on the laptop |
| 36 | ----------------------------------------------------------------- |
| 37 | |
| 38 | Copy ``u-boot-rockchip.bin`` and ``u-boot-rockchip-spi.bin`` to the laptop. |
| 39 | |
| 40 | eMMC |
| 41 | ~~~~ |
| 42 | |
| 43 | .. prompt:: bash |
| 44 | |
| 45 | dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=512 seek=64 |
| 46 | |
| 47 | SPI Nor |
| 48 | ~~~~~~~ |
| 49 | |
| 50 | .. prompt:: bash |
| 51 | |
| 52 | dd if=u-boot-rockchip-spi.bin of=/dev/mtdblock0 |
| 53 | |
| 54 | ``upgrade_tool`` allows to flash the on-board SPI Nor via the USB TypeC interface |
| 55 | with help of the Rockchip loader binary. |
| 56 | |
| 57 | To enter the USB flashing mode, connect the laptop and your HOST PC with a USB-C |
| 58 | cable, reset the laptop with ``Loader Key`` pressed. |
| 59 | On your PC, check with ``lsusb -d 2207:350b``). |
| 60 | |
| 61 | To flash U-Boot on the SPI Nor with ``upgrade_tool``: |
| 62 | |
| 63 | .. prompt:: bash |
| 64 | |
| 65 | upgrade_tool db rk3588/MiniLoaderAll.bin |
| 66 | upgrade_tool ssd // Input 5 for SPINOR download mode |
| 67 | upgrade_tool wl 0 u-boot-rockchip-spi.bin |
| 68 | upgrade_tool rd |