wget -c https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-linux-gnueabihf/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz tar xf gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz export CC=`pwd`/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
1
${CC}gcc --version
接下来编译U-boot
1 2 3 4 5
git clone -b v2019.07-rc4 https://github.com/u-boot/u-boot --depth=1 cd u-boot/ make ARCH=arm CROSS_COMPILE=${CC} distclean make ARCH=arm CROSS_COMPILE=${CC} pico-pi-imx7d_defconfig make ARCH=arm CROSS_COMPILE=${CC}
sudo mkdir -p /media/rootfs/boot/dtbs/${kernel_version}/ sudo tar xfv ./armv7-lpae-multiplatform/deploy/${kernel_version}-dtbs.tar.gz -C /media/rootfs/boot/dtbs/${kernel_version}/
sudo tar xfv ./armv7-lpae-multiplatform/deploy/${kernel_version}-modules.tar.gz -C /media/rootfs/
sudo sh -c "echo '/dev/mmcblk2p1 / auto errors=remount-ro 0 1' >> /media/rootfs/etc/fstab"
最后写入完成重启即可。
1 2
sync sudo umount /media/rootfs
串口Console端
1 2 3 4 5 6 7 8 9 10
Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: FEC0 Hit any key to stop autoboot: 0 => ums 0 mmc 0 UMS: LUN 0, dev0, hwpart 0, section 0x0, count 0x720000 Ctrl+C to exit ... => reset