Transferring a Bootable Raspian SD card image to EMMC

Post Reply
rtjazz69
Posts: 4
Joined: Fri Nov 03, 2023 3:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Transferring a Bootable Raspian SD card image to EMMC

Post by rtjazz69 »

I am looking for a way to transfer a bootable SD card image to EMMC, Has anyone figured out how to do this on XU4, I have tried Flashing the SD card image to EMMC, But when I do this the EMMC will not boot with the image I have Flashed on it. What do I need to do in order to make this work. The image happens to be a Raspberry Pi image, When I Flash a UBUNTU image to EMMC, this Boots, It appears that when I flash the Raspian image to EMMC it"s wiping out the hidden boot partition on the EMMC which is preventing it from booting to the RASPIAN image I flashed on The EMMC.

User avatar
mad_ady
Posts: 11751
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 656 times
Been thanked: 1196 times
Contact:

Re: Transferring a Bootable Raspian SD card image to EMMC

Post by mad_ady »

xu4 will not boot a raspbian image. It only boots images built for xu4, because it needs a specific uboot/kernel.

rtjazz69
Posts: 4
Joined: Fri Nov 03, 2023 3:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Transferring a Bootable Raspian SD card image to EMMC

Post by rtjazz69 »

OK, The Raspian Image that I mention was built for XU4 but will only boot from SD card and not EMMC, I have been trying to find out what I need to Change in order to get that same image to boot from EMMC as it does from the SD CARD.

User avatar
mad_ady
Posts: 11751
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 656 times
Been thanked: 1196 times
Contact:

Re: Transferring a Bootable Raspian SD card image to EMMC

Post by mad_ady »

Ah, ok. Sorry, I thought you were trying to boot a rpi image.

In your case the problem is the bootloader on the emmc can't find/parse/boot the boot information for your os.
You can upgrade the bootloader in the hidden blocks on the emmc by flashing the desired os on an sd card, booting with both sd and emmc, but with boot switch on sd position, and running the following commands after boot:

Code: Select all

echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=/dev/mmcblk1 of=/dev/mmcblk0boot0 bs=512 skip=63 seek=62 count=1440
See the last comment here: https://github.com/home-assistant/opera ... issues/389

rtjazz69
Posts: 4
Joined: Fri Nov 03, 2023 3:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Transferring a Bootable Raspian SD card image to EMMC

Post by rtjazz69 »

I am getting Permission denied after entering the first command, what password do I need.

User avatar
mad_ady
Posts: 11751
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 656 times
Been thanked: 1196 times
Contact:

Re: Transferring a Bootable Raspian SD card image to EMMC

Post by mad_ady »

You should run the commands as root (sudo su -) as the first command.
Also check that the names for sd/emmc are correct. Do a ls -l /dev/mmcblk*. The emmc should have extra partitions.
Also, I made a mistake in my second command, which is now corrected in the previous post.

rtjazz69
Posts: 4
Joined: Fri Nov 03, 2023 3:43 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Transferring a Bootable Raspian SD card image to EMMC

Post by rtjazz69 »

I was able to make changes, But OS still will not boot, When does Boot.ini enter the boot process. I have attached a copy of Boot.ini
Attachments
boot copy.txt
XU4 boot.ini
(12.22 KiB) Downloaded 5 times

User avatar
mad_ady
Posts: 11751
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 656 times
Been thanked: 1196 times
Contact:

Re: Transferring a Bootable Raspian SD card image to EMMC

Post by mad_ady »

It depends on the bootloader. Stock uboot uses boot.scr instead of boot.ini.

Now, I'm not 100% sure on the offsets I gave you. They're for hassos' uboot build. You may need a 1.8V serial cable to see what's going on.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests