Created
December 16, 2020 08:42
-
-
Save KunYi/906546b652b8e607696d4e1070a97292 to your computer and use it in GitHub Desktop.
imx8mm develop just update kernel/u-boot for sdcard booting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update_tar.sh | |
#!/bin/bash | |
origin="/home/kunyi/srgmx8mm" | |
mkdir -p ${origin}/rootfs | |
mkdir -p ${origin}/rootfs/boot | |
cd /home/kunyi/srgmx8mm/linux-srgmx8/ | |
sudo -H cp ./arch/arm64/boot/Image.gz ${origin}/rootfs/boot -vf | |
if [ -f ./arch/arm64/boot/dts/freescale/srg-mx8mm.dtb ] ; then | |
sudo -H cp ./arch/arm64/boot/dts/freescale/srg-mx8mm.dtb ${origin}/rootfs/boot -vf | |
fi | |
if [ -f ./arch/arm64/boot/dts/freescale/imx8mm-bse.dtb ] ; then | |
sudo -H cp ./arch/arm64/boot/dts/freescale/imx8mm-bse.dtb ${origin}/rootfs/boot -vf | |
fi | |
if [ -f /home/kunyi/srgmx8mm/uboot-srgmx8/flash.bin ] ; then | |
sudo -H cp /home/kunyi/srgmx8mm/uboot-srgmx8/flash.bin ${origin}/rootfs/boot/bootloader -vf | |
fi | |
sudo -H make modules_install INSTALL_MOD_PATH=${origin}/rootfs | |
# | |
# sudo -H make headers_install INSTALL_HDR_PATH=${origin}/rootfs | |
# to check the below | |
# https://github.com/balena-os/module-headers | |
cd ${origin} | |
tar -cvpzf update.tar.gz ${origin}/rootfs | |
echo -e "restore tar -xvpzf update.tar.gz -C /" | |
echo -e "update bootloader" | |
echo -e "sudo dd if=/boot/bootloader of=/dev/mmcblk? bs=1K seek=33 conv=fsync status=progress" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment