This document assumes that you've already written some code (like your A0 solution) that you have been booting and testing using u-boot. You need to make a few changes to your code so that you can direct-boot it, without using u-boot. This document will walk you through those steps.
CFLAGS:=-g -pipe -static $(WARNINGS) -ffreestanding -nostartfiles -ffunction-sections\with this line
CFLAGS:=-g -pipe -static $(WARNINGS) -ffreestanding -nostartfiles\That is, remove the -ffunction-sections flag.
void uart_init() { setup_gpio(4, GPIO_ALTFN4, GPIO_NONE); setup_gpio(5, GPIO_ALTFN4, GPIO_NONE); setup_gpio(6, GPIO_ALTFN4, GPIO_NONE); setup_gpio(7, GPIO_ALTFN4, GPIO_NONE); }with this one
void uart_init() { setup_gpio(4, GPIO_ALTFN4, GPIO_NONE); setup_gpio(5, GPIO_ALTFN4, GPIO_NONE); setup_gpio(6, GPIO_ALTFN4, GPIO_NONE); setup_gpio(7, GPIO_ALTFN4, GPIO_NONE); setup_gpio(14, GPIO_ALTFN0, GPIO_NONE); setup_gpio(15, GPIO_ALTFN0, GPIO_NONE); }This just does some extra GPIO configuration that we can no longer rely on u-boot to handle (since we're not using u-boot any more).
That's it. You should now be able to make your program as usual to generate an image file. You can then follow the new deployment instructions to deploy and boot your image.