freebsd / crochet

Build FreeBSD images for RaspberryPi, BeagleBone, PandaBoard, and others.
BSD 2-Clause "Simplified" License
612 stars 189 forks source link

wrong u-boot filename for banana-pi if installed from ports #190

Closed MoritzFago closed 7 years ago

MoritzFago commented 7 years ago

I tried to create a banana-pi image with crochet and installed the u-boot for banana-pi from the ports tree. The setup.sh looks for sunxi-spl.bin, but there is only a u-boot-sunxi-with-spl.bin file.

kientzle commented 7 years ago

Can you please submit a Pull Request with the fix? Thanks.

kientzle commented 7 years ago

I believe this is fixed by #199.

MoritzFago commented 7 years ago

wouldn't it be easier to understand/debug if you would specify the u-boot file name somewhere depending on what was found, log that and then use dd once? As far as i can see, in the merged pull request #199 you use dd twice, what could case the boot loader to be written twice, if for example the package and the port are installed.

kientzle commented 7 years ago

... if you would specify the u-boot file name somewhere depending on what was found, log that and then use...

Could you send us a pull request showing exactly how you think that could be implemented?

... you use dd twice ...

I'm not sure I understand. Are you talking about these two lines?

dd if=${UBOOT_PATH}/u-boot-sunxi-with-spl.bin conv=notrunc,sync of=/dev/${DISK_MD} bs=1024 seek=8
dd if=${UBOOT_PATH}/u-boot.img conv=notrunc,sync of=/dev/${DISK_MD} bs=1024 seek=40

Those are installing different things to different places in the image.