lxc launch images:ubuntu/bionic/amd64 ubuntu-uboot-compilation lxc exec ubuntu-uboot-compilation bash apt-get update apt-get upgrade apt install bc nano mc build-essential autoconf libtool cmake pkg-config git python-dev swig3.0 libpcre3-dev nodejs-dev gawk wget diffstat bison flex device-tree-compiler libncurses5-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binfmt-support mkdir u-boot_dev cd u-boot_dev git clone --depth 1 https://github.com/u-boot/u-boot -b master cd u-boot export ARCH=arm export CROSS_COMPILE=aarch64-linux-gnu- make libretech-cc_defconfig make cd .. mkdir blobs cd blobs dpkg --add-architecture i386 apt update apt install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH git clone --depth 1 https://github.com/BayLibre/u-boot.git -b libretech-cc amlogic-u-boot cd amlogic-u-boot sed -i 's/aarch64-linux-gnu-/aarch64-none-elf-/' Makefile sed -i 's/arm-linux-/arm-none-eabi-/' arch/arm/cpu/armv8/gxb/firmware/scp_task/Makefile make libretech_cc_defconfig make export FIPDIR=$PWD/fip cd ../../u-boot mkdir fip cp $FIPDIR/gxl/bl2.bin fip/ cp $FIPDIR/gxl/acs.bin fip/ cp $FIPDIR/gxl/bl21.bin fip/ cp $FIPDIR/gxl/bl30.bin fip/ cp $FIPDIR/gxl/bl301.bin fip/ cp $FIPDIR/gxl/bl31.img fip/ cp u-boot.bin fip/bl33.bin $FIPDIR/blx_fix.sh fip/bl30.bin fip/zero_tmp fip/bl30_zero.bin fip/bl301.bin fip/bl301_zero.bin fip/bl30_new.bin bl30 # if running the acs_tool.pyc file directly does not work, try running it with the python interpreter ("python $FIPDIR/acs_tool.pyc ...") $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 $FIPDIR/blx_fix.sh fip/bl2_acs.bin fip/zero_tmp fip/bl2_zero.bin fip/bl21.bin fip/bl21_zero.bin fip/bl2_new.bin bl2 $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig $FIPDIR/gxl/aml_encrypt_gxl --bootmk --output fip/u-boot.bin --bl2 fip/bl2.n.bin.sig --bl30 fip/bl30_new.bin.enc --bl31 fip/bl31.img.enc --bl33 fip/bl33.bin.enc exit lxc file pull ubuntu-uboot-compilation/root/u-boot_dev/u-boot/fip/u-boot.bin.sd.bin . lxc stop ubuntu-uboot-compilation lxc delete ubuntu-uboot-compilation