Closed iAnyKey closed 4 years ago
Here is the correct command to run the alpine*.sh
scripts:
sudo sh scripts/alpine.sh
I'd say that the step 5 isn't needed. The .zip file contains all the required files and directories.
For an example of a script building an image with a single application have a look at build-scanner.sh and alpine-scanner.sh. The following command works for me:
source helpers/build-scanner.sh
Thanks, sh with root lets alpine be built properly! I took a look into helper scripts, and as far I understand, you are doing with your scripts following:
led_blinker
completely to use it as bootloader/media/mmcblk0p1/apps/...
So if I'm right you are always booting up with led_blinker as initial bitstream and using its devicetree for any other bitstreams, which you can "start" from linux using cat path/to/project/bitstream.bit > /dev/xdevcfg
I would like to generate a bootable linux with some different Project.
It seems like I almost figured it out:
make NAME=led_blinker xpr
./tmp
as _custom_ledtest2./tmp/custom_led_test2.bit
./tmp/custom_led_test2.xsa
make NAME=led_blinker_test all
to generate a bootloader
right here I`m facing a trouble with generation of the device tree:
patch -d tmp/custom_led_test2.tree < patches/devicetree.patch
patching file pcw.dtsi
Hunk #3 FAILED at 72.
1 out of 3 hunks FAILED -- saving rejects to file pcw.dtsi.rej
patching file system-top.dts
make: *** [Makefile:162: tmp/custom_led_test2.tree/system-top.dts] Error 1
For the first test project _custom_ledtest, where i just changed a number of led_o bits I was able to perform next steps as follow:
sudo sh scripts/alpine.sh
There are 2 sections of Makefile
I not really understand yet:
161 sed -i 's|#include|/include/|' $@
162 patch -d $(@D) < patches/devicetree.patch
What purpose do this patching have? Is the generated device tree not enough to get a correct bootloader inkluding all stuff like xadc and memory mapping?
131 echo "img:{[bootloader] tmp/$(NAME).fsbl/executable.elf tmp/$(NAME).bit
[load=0x4000000,startup=0x4000000] $(UBOOT_DIR)/u-boot.bin}" > tmp/boot.bif
132 bootgen -image tmp/boot.bif -w -o i $@
Why do you need to offset uBoot to 0x4000000?
I'm not sure how to answer the questions in point 1. Of course, if there is a patch, it is necessary. The device tree is used to configure various subsystems and Linux modules. Some parts of the device tree generated by the device tree generator do not work for me without patching. If you have a better solution, please share.
The question from point 2 should be addressed to the Xilinx and/or U-Boot developers.
CONFIG_SYS_TEXT_BASE is set to 0x4000000 in almost all the ZYNQ configuration files: https://github.com/Xilinx/u-boot-xlnx/blob/xilinx-v2019.2/configs/zynq_zc702_defconfig#L3 https://github.com/Xilinx/u-boot-xlnx/blob/xilinx-v2019.2/configs/zynq_zed_defconfig#L3
I've just copied this value.
If I'm not mistaken, bootgen can read the address from u-boot.elf
. So, when using u-boot.elf
, no address has to be specified in the BIF file. However, when using u-boot.bin
, the load
and startup
addresses must be specified. For more information about bootgen, u-boot.elf
and u-boot.bin
, please see the bootgen and U-Boot documentation.
Description of the setup:
Description of the problem:
Hi,
A prebuilt alpine image, which you have provided works and boots. I am trying now to build alpine linux by myself using provided scripts. I would like to compile some simple custom vivado-project (like changing the number of blinking leds in your led_blinker) and flash it to the SD card with Alpine linux on top of it. Following procedure allows me only to boot FSBL (while Zynq accepts the bitstream of the custom project from bootloader), but alpine linux itself will not boot afterwards. Or it boots only with default led_blink project on startup and stuck during startup (see debug output below) Unfortunately I'm stuck lloking for reason, why. Debug output looks as follows:
So I would like to know how I can build bootable alpine with my project using your scripts.
regards, Dimitrii
Steps to reproduce the problem:
make NAME=led_blinker all
make NAME=adc_test all
source .\scripts\alpine.sh
boot.bin
,devicetree.dtb
,uImage
and provideduEnv.txt
to SD Card