I am trying to get arch to run on an OrangePi with the mainline kernel. I compile u-boot with support for the board (included in mainline u-boot) and installed arch following the instructions for pcDuino3 which is also based on the same Allwinner A20 CPU.
It worked well; u-boot and the kernel loaded correctly but then the boot process got hung waiting forever with "waiting for root device".
It turned out that the 'fdtfile' environment variable was pointing to the pcDuino3 dts file (sun7i-a20-pcduino3.dtb) instead of the OrangePi one (sun7i-a20-orangepi.dtb). After setting the environment variable to the correct value and saving it I could boot the board fully.
Question: how does the environment variables get set in the installation process?
I want to publish a detailed description of the process and this is the only missing piece of the puzzle.