efi_loader: add more sources to Sphinx documentation
[oweals/u-boot.git] / board / sunxi / mksunxi_fit_atf.sh
index b1d6e0e16a56e14a6efa1c87a8602fc497990602..88ad71974706614014619d0f1cb08fa16e68f0ab 100755 (executable)
@@ -13,6 +13,12 @@ if [ ! -f $BL31 ]; then
        BL31=/dev/null
 fi
 
+if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then
+       BL31_ADDR=0x104000
+else
+       BL31_ADDR=0x44000
+fi
+
 cat << __HEADER_EOF
 /dts-v1/;
 
@@ -21,7 +27,7 @@ cat << __HEADER_EOF
        #address-cells = <1>;
 
        images {
-               uboot@1 {
+               uboot {
                        description = "U-Boot (64-bit)";
                        data = /incbin/("u-boot-nodtb.bin");
                        type = "standalone";
@@ -29,14 +35,14 @@ cat << __HEADER_EOF
                        compression = "none";
                        load = <0x4a000000>;
                };
-               atf@1 {
+               atf {
                        description = "ARM Trusted Firmware";
                        data = /incbin/("$BL31");
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
-                       load = <0x44000>;
-                       entry = <0x44000>;
+                       load = <$BL31_ADDR>;
+                       entry = <$BL31_ADDR>;
                };
 __HEADER_EOF
 
@@ -44,7 +50,7 @@ cnt=1
 for dtname in $*
 do
        cat << __FDT_IMAGE_EOF
-               fdt@$cnt {
+               fdt_$cnt {
                        description = "$(basename $dtname .dtb)";
                        data = /incbin/("$dtname");
                        type = "flat_dt";
@@ -57,7 +63,7 @@ done
 cat << __CONF_HEADER_EOF
        };
        configurations {
-               default = "config@1";
+               default = "config_1";
 
 __CONF_HEADER_EOF
 
@@ -65,11 +71,11 @@ cnt=1
 for dtname in $*
 do
        cat << __CONF_SECTION_EOF
-               config@$cnt {
+               config_$cnt {
                        description = "$(basename $dtname .dtb)";
-                       firmware = "uboot@1";
-                       loadables = "atf@1";
-                       fdt = "fdt@$cnt";
+                       firmware = "uboot";
+                       loadables = "atf";
+                       fdt = "fdt_$cnt";
                };
 __CONF_SECTION_EOF
        cnt=$((cnt+1))