Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dd: /dev/md4: Invalid argument on u-boot installation for banana-pi #191

Closed
MoritzFago opened this issue Apr 11, 2017 · 10 comments
Closed

Comments

@MoritzFago
Copy link

During the image creation process the setup.sh burns the various boot loader files to the image.

Installing U-Boot files
+ dd if=/usr/local/share/u-boot/u-boot-bananapi/sunxi-spl.bin of=/dev/md4 bs=1024 seek=8
dd: /dev/md4: Invalid argument
486+1 records in
486+0 records out
497664 bytes transferred in 5.784579 secs (86033 bytes/sec)

I am building in a jail with the following flags allow.mount=true,enforce_statfs=1

@fjerhammer
Copy link

This is also happening for me. 11.0-STABLE, not using jails.

@arrowd
Copy link

arrowd commented May 3, 2017

And me too.

@alexey1234
Copy link

And me too

@swilde
Copy link

swilde commented Jun 2, 2017

Here too.

@arrowd
Copy link

arrowd commented Jun 18, 2017

So, is crochet completely unusable right now? The offending line is https://github.com/freebsd/crochet/blob/master/lib/disk.sh#L47 but I don't know what to do with it.

@arrowd
Copy link

arrowd commented Jun 18, 2017

Ah, no, that line has nothing to do with the problem.

@loos-br
Copy link
Contributor

loos-br commented Jul 6, 2017

IIRC conv=notrunc,sync should fix this issue

@kientzle
Copy link
Contributor

kientzle commented Jul 9, 2017

To debug this, you can (temporarily) edit board/BananaPi/setup.sh to print out more information at the top of the allwinner_partition_image() function. In particular, it would probably make sense to try ls -l /dev/${DISK_MD} to make sure the md device was created, and maybe mdconfig -l to list all the existing md devices.

@kientzle
Copy link
Contributor

kientzle commented Jul 9, 2017

@loos-br might be right. If /usr/local/share/u-boot/u-boot-bananapi/sunxi-spl.bin is not a multiple of the block size, then adding conv=sync to the dd command originally mentioned may fix it.

@kientzle
Copy link
Contributor

I believe #199 fixes this; please try and let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants