Jump to content

Orange Pi PC Plus: directly write image to emmc


Micha

Recommended Posts

Hi all,

 

first of all, I really like the dev-tools! I successfully developed my own Image (incl. patches etc.) and it's running great. But now I want to "burn" it to the Orange Pi's emmc directly, without using nand-sata-install ... it's necessary, because the target-image does not allow shell- and/or ssh-access (for purpose). So I flashed a "normal" armbian-image to my sd-card, copied my own image-file to the card, booted the card and wanted to 'dd' my image to /dev/mmcblk1. Everything went fine till now ... after rebooting w/o the sd-card plugged in, the loader hangs in a loop (Rebooting within 10 seconds) :/

 

I looked into the nand-sata-install-script and found nothing special in there, so I'm missing something? I even tried to flash the bootloader after flashing the image (as done in the nand-sata-install-script), without success, too.

 

I don't have a serial console right now, so if someone maybe knows what to do ... I'm really stuck right now :/

 

-- Micha

Link to comment
Share on other sites

Hi there,

 

I did, and it worked. Well ... exactly one time.

I tried to dd a new image some days later, but now the device refuses to boot. I removed the old partition at first, dd'ed the new image, cleared the bootloader, dd'ed the new u-boot-sunxi-with-spl.bin and tweaked the /boot/armbianEnv.txt ans /etc/fstab (as before).

 

If you have any further hints ... ;)

 

-- Micha

Link to comment
Share on other sites

31 minutes ago, Micha said:

dd'ed the new u-boot-sunxi-with-spl.bin

Did you have done the dd with bs=1024 and seek=8 ?

What does the Serial Debug port shows as log ?

Is the U-Boot started ? where is it hanging while booting kernel ?

 

Link to comment
Share on other sites

7 minutes ago, martinayotte said:

Did you have done the dd with bs=1024 and seek=8 ?

 

Yes:

dd if=/usr/src/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8 status=noxfer

Don't wonder about the path, the image I try to install is newer than the image on the sdcard I'm running for install ;)

Unfortunately I don't have a serial console right now, so I can't see anything. I checked /boot after dd'ing and it seems that the files are corrupted there, they all only consists of "^@^@" ... :/

Link to comment
Share on other sites

35 minutes ago, Micha said:

Unfortunately I don't have a serial console

When playing with any SoC boards, it is very useful to have such USB-Serial dongle, they are cheap, about $0.99, I've more then 10 around so I don't have to unplug one somewhere to use it elsewhere ...

 

35 minutes ago, Micha said:

files are corrupted there, they all only consists of "^@^@" ...

Maybe the corruptions are already present in the image ...

Do "fdisk -l TheImage.img" to determine first sector of rootfs, then do "sudo mount -o loop,offset=$((start_sector*sector_size)) TheImage.img /mnt", the check files in /mnt/boot if corruptions are already present ...

Link to comment
Share on other sites

Nevermind ... I completely rebuild the image and now it works. Don't ask, I changed nothing ...

 

Btw.: is there any way to create a new partition while building an image? I did not found any option for this ...

 

-- Micha

Link to comment
Share on other sites

4 hours ago, Micha said:

Btw.: is there any way to create a new partition while building an image?

I don't think so, at least not easily, since at first boot, the rootfs is expanded.

But after that first boot, maybe you can reshrinking rootfs at a desired size with parted and use the freed space for a second partition

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines