# Copyright (C) Centec Inc # over ride default behaviour echo "Preparing for installation ... " demo_mnt=/mnt hw_load() { echo "ext4load mmc 0:2 \$loadaddr onie_uimage" } create_partition() { echo y | mkfs.ext4 -L CTC-SYSTEM /dev/mmcblk0p1 } mount_partition() { echo "mount flash" mount -t ext4 /dev/mmcblk0p1 $demo_mnt } bootloader_menu_config() { mkdir -p $demo_mnt/boot mount -t ext4 /dev/mmcblk0p2 $demo_mnt/boot rm $demo_mnt/boot/centec-e530.itb -rf cp $demo_mnt/$image_dir/boot/sonic_arm64.fit $demo_mnt/boot/centec-e530.itb cd $demo_mnt/boot rm onie_uimage -rf ln -s centec-e530.itb onie_uimage cd - sync umount -l $demo_mnt/boot hw_load_str="$(hw_load)" (cat < /tmp/env.txt fw_setenv -f -s /tmp/env.txt fw_setenv -f image_dir $image_dir }