# fs-mp1a **Repository Path**: hekun11/fs-mp1a ## Basic Information - **Project Name**: fs-mp1a - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-27 - **Last Updated**: 2024-10-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # fs-mp1a #### src https://www.st.com.cn/zh/embedded-software/stm32mp1dev.html src version: v2.0.0 (en.SOURCES-stm32mp1-openstlinux-5-4-dunfell-mp1-20-06-24.tar.xz) #### tf card ```shell #del sudo parted -s /dev/sdb mklabel msdos sudo sgdisk --resize-table=128 -a 1 -n 1:34:545 -c 1:fsbl1 -n 2:546:1057 -c 2:fsbl2 -n 3:1058:5153 -c 3:ssbl -n 4:5154:136225 -c 4:bootfs -n 5:136226 -c 5:rootfs -A 4:set:2 -p /dev/sdb -g ``` #### tools ```shell git clone https://github.com/STMicroelectronics/stm32wrapper4dbg cd stm32wrapper4dbg make sudo cp stm32wrapper4dbg /usr/bin ``` #### TF-A 源码编译 ```shell cd trusted-firmware/fsmp1a-trusted-firmware-2.2 make ARCH=arm -f ../Makefile.sdk all #成功如下 # /bin/sh: 22: stm32wrapper4dbg: not found #在源码顶层生成一个build目录 ```` #### OPTEE源码编译 ```shell sudo apt-get install python3-pyelftools sudo apt-get install build-essential python3-dev sudo apt install python-pip pip3 install pycryptodomex -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple some-package cd optee-os/fsmp1a-optee_os-3.9.0 make ARCH=arm -f ../Makefile.sdk all # 编译成功: # make[1]: Leaving directory '/home/linux/source_code/fs-mp1a/optee-os/fsmp1a-optee_os-3.9.0' ``` #### U-Boot源码编译 ```shell cd u-boot/u-boot-fsmp1a-2020.01 make ARCH=arm CROSS_COMPILE=arm-fsmp1x-linux-gnueabihf- -f ../Makefile.sdk all ``` #### Linux 内核源码编译 ```shell cd linux/fsmp1a-linux-5.4.31 make ARCH=arm stm32_fsmp1a_defconfig make ARCH=arm menuconfig make -j8 ARCH=arm CROSS_COMPILE=arm-fsmp1x-linux-gnueabihf- uImage vmlinux LOADADDR=0xC2000040 # 编译成功后,在arch/arm/boot下生成uImage文件 #编译设备树 make -j8 ARCH=arm CROSS_COMPILE=arm-fsmp1x-linux-gnueabihf- dtbs # 编译成功后,在arch/arm/boot/dts目录下生成设备树文件 #编译内核模块 make -j8 ARCH=arm CROSS_COMPILE=arm-fsmp1x-linux-gnueabihf- modules #编译的内核模块安装 make -j8 ARCH=arm INSTALL_MOD_PATH="$PWD/../build/install_artifact" modules_install ```