Skip to content

Commit

Permalink
add scripts for bootstrapping sama5d27
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrake authored and kraj committed Feb 18, 2019
1 parent ab31757 commit fafb499
Showing 1 changed file with 45 additions and 1 deletion.
1 change: 0 additions & 1 deletion sama5d27-som1-ek-sd-envsetup.sh

This file was deleted.

45 changes: 45 additions & 0 deletions sama5d27-som1-ek-sd-envsetup.sh
@@ -0,0 +1,45 @@
export MACHINE=sama5d27-som1-ek-sd

. envsetup.sh

yoe_sam_build_bootstrap_tools() {
bitbake sam-ba
bitbake at91bootstrap-sam-ba
}

SAMBA=${OE_BASE}/build/tmp/sysroots-components/x86_64/sam-ba-native/usr/bin/sam-ba_cdc_linux/sam-ba
BOOT=${OE_DEPLOY_DIR}/at91bootstrap-sama5d27_som1_ek.bin-sam-ba
UBOOT=${OE_DEPLOY_DIR}/u-boot.bin

yoe_sam_load_uboot_via_samba() {
echo "lowlevel"
${SAMBA} -p serial:ttyACM0 -b sama5d27-som1-ek -t 5 -a lowlevel || exit 1
echo "extram"
${SAMBA} -p serial:ttyACM0 -b sama5d27-som1-ek -t 5 -a extram || exit 1
echo "download bootstrap"
${SAMBA} -p serial:ttyACM0 -b sama5d27-som1-ek -m write:${BOOT}:0x200000 || exit 1
echo "download u-boot"
${SAMBA} -p serial:ttyACM0 -b sama5d27-som1-ek -m write:${UBOOT}:0x23F00000 || exit 1
echo "jump to bootstrap"
${SAMBA} -p serial:ttyACM0 -b sama5d27-som1-ek -m execute:0x200000 || exit 1
screen /dev/ttyACM0 115200
}

yoe_sam_install_bootstrap_files() {
# this assumes you have bootstrapped the system over serial
# using the above script.

if [ -z "$1" ]; then
echo
echo "Usage: is_install_bootstrap_files <install dir>"
echo
return 1
fi

IMG_VERSION=$(yoe_get_image_version)
echo IMG_VERSION=$IMG_VERSION

cp ${OE_DEPLOY_DIR}/zImage-initramfs-${MACHINE}.bin $1/zImage
cp ${OE_DEPLOY_DIR}/at91-sama5d27_som1_ek.dtb $1
cp ${OE_BASE}/images/${MACHINE}_${IMG_VERSION}.upd $1
}

0 comments on commit fafb499

Please sign in to comment.