/* link-d1.ld (RISC-V, Allwinner D1 / Lichee RV) — bare-metal via xfel. * * The D1 boot ROM (FEL) leaves us free to load into DRAM. xfel initialises * DRAM ('xfel ddr d1') then writes/execs at 0x40000000 (start of the 512MB+ * DDR). 'xfel exec' jumps here still in M-mode, which is what minos expects. * (QEMU 'virt' uses 0x80000000 instead — see link.ld.) */ OUTPUT_ARCH(riscv) ENTRY(_start) SECTIONS { . = 0x40000000; /* DRAM base on D1 */ .text : { KEEP(*(.text.boot)) /* _start must be first */ *(.text .text.*) } .rodata : { *(.rodata .rodata.*) } .data : { *(.data .data.*) } . = ALIGN(8); __bss_start = .; .bss : { *(.bss .bss.*) *(COMMON) } . = ALIGN(8); __bss_end = .; . = ALIGN(16); . += 0x4000; /* 16 KiB boot stack */ _stack_top = .; }