Page MenuHomeFreeBSD

Build VERSATILEPB kernel image with external DTB support
ActivePublic

Authored by sylvain_sylvaingarrigues.com on Mar 24 2016, 3:06 PM.
set -e -x
WORKDIR=/tmp
VERSATILEPB_FLASH=versatile.flash
rm -f $VERSATILEPB_FLASH
rm -f ${WORKDIR}/first_commands
#/usr/bin/printf "\0\0\240\343" > ${WORKDIR}/first_commands
#/usr/bin/printf "\0\020\240\343" >> ${WORKDIR}/first_commands
#/usr/bin/printf "\0\040\240\343" >> ${WORKDIR}/first_commands
#/usr/bin/printf "\0\060\240\343" >> ${WORKDIR}/first_commands
/usr/bin/printf "\001\366\240\343" >> ${WORKDIR}/first_commands
dd of=$VERSATILEPB_FLASH bs=1M count=4 if=/dev/zero
dd of=$VERSATILEPB_FLASH bs=1 conv=notrunc if=${WORKDIR}/first_commands
dd of=$VERSATILEPB_FLASH bs=64k oseek=15 conv=notrunc if=/usr/obj/arm.armv6/usr/src/sys/VERSATILEPB/kernel.bin
qemu-system-arm -M versatilepb -m 128M -kernel versatile.flash -cpu arm1176 -dtb versatilepb.dtb -nographic