[SOLVED] eMMC and SD switch

Locked
istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

[SOLVED] eMMC and SD switch

Unread post by istanbulls » Tue May 14, 2019 10:37 pm

Hello,

I installed eMMC on Android. I installed Ubuntu on SD Card. how can I switch to Ubuntu without removing the eMMC card.
Thank,

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: eMMC and SD switch

Unread post by tobetter » Wed May 15, 2019 12:37 am

kardanadm wrote:
Tue May 14, 2019 10:37 pm
Hello,

I installed eMMC on Android. I installed Ubuntu on SD Card. how can I switch to Ubuntu without removing the eMMC card.
Thank,
It's a bit tricky, there is a boot select switch. If you locate to SPI, the Petitboot will come and you can select the Ubuntu on SD card. If you set to MMC then Android will come instead of Ubuntu. Please try this out and let me know if it works for you.

istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: eMMC and SD switch

Unread post by istanbulls » Wed May 15, 2019 1:19 am

Thanks for the quick response.

I tried it. I chose Petitboot, but the Sd card didn't open. No SD card in Petitboot settings.

I'm autoboot disabled, but it's enabled again.

istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: eMMC and SD switch

Unread post by istanbulls » Thu May 16, 2019 4:49 pm

I use jumper to switch between eMMC and CD Card on RockPro64 SBC.

The "spi boot select switch" on the N2 board is not working properly, it does not switch between eMMC and SD card.

English is not the main slice. I wrote this post with google translate, I'm sorry

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: eMMC and SD switch

Unread post by tobetter » Thu May 16, 2019 5:06 pm

kardanadm wrote:
Thu May 16, 2019 4:49 pm
I use jumper to switch between eMMC and CD Card on RockPro64 SBC.

The "spi boot select switch" on the N2 board is not working properly, it does not switch between eMMC and SD card.

English is not the main slice. I wrote this post with google translate, I'm sorry
The boot select switch is not intended to select between eMMC or SD card.
https://wiki.odroid.com/odroid-n2/softw ... ower_cycle

As of now, my suggestion is to resolve why Petitboot does not load SD card.
Would you try to reinsert your SD card after Petitboot up?
Can you share the boot.ini in your SD card?

Edit: I'm wondering if you are able to add a switch to GPIO headers. If so, another option is to add a toggle switch and modify the U-boot to detect it to select booting from eMMC or SD card. But this is the plan B.

istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: eMMC and SD switch

Unread post by istanbulls » Thu May 16, 2019 7:15 pm

Linux için bir çaylağım. sorry :)
tobetter wrote:
Thu May 16, 2019 5:06 pm
As of now, my suggestion is to resolve why Petitboot does not load SD card.
Thank, Ok.
tobetter wrote:
Thu May 16, 2019 5:06 pm
Would you try to reinsert your SD card after Petitboot up?
I've tried. unsuccessful
Image
tobetter wrote:
Thu May 16, 2019 5:06 pm
Can you share the boot.ini in your SD card?

Code: Select all

ODROIDN2-UBOOT-CONFIG

#------------------------------------------------------------------------------------------------------
#
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------

setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=1405-0337 disk=UUID=00346c31-ea65-4877-a4fa-2f30caa6c621"
setenv condev "console=ttyS0,115200 console=tty0"
setenv hdmimode "1080p60hz"
setenv bmp_width "1920"
setenv bmp_height "1080"
setenv vout_mode "hdmi"
setenv hdmioutput   "1"
setenv vpu          "1"
setenv coreelec "quiet"
setenv hdmi_cec "1"
setenv maxcpus "6"
setenv max_freq_a73 "1800"
setenv max_freq_a53 "1896"
setenv rtc_shield "0"
setenv emmc_timeout "0"
setenv wol "1"
setenv remotewakeup "0x23dc4db2"
setenv decode_type "0"

setenv loadaddr 0x11000000
setenv dtb_mem_addr 0x1000000
setenv uenv_addr 0x13000000

fatload mmc ${mmc_dev}:1 ${loadaddr} kernel.img
fatload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img

if fatload mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi

if test "${emmc_timeout}" = "1"; then showlogo ${hdmimode} ${bmp_width} ${bmp_height} timeout-logo-${bmp_height}.bmp.gz; sleep 30; mmc dev 1; mmc dev 0; fi

setenv irsetup "hk-lirc-helper.remotewakeup=${remotewakeup} hk-lirc-helper.decode_type=${decode_type}"
setenv device "no_console_suspend logo=osd0,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable voutmode=${vout_mode} hdmimode=${hdmimode} cvbsmode=nocvbs mac=${ethaddr} consoleblank=0 max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} enable_wol=${wol}"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec3f"; fi
setenv bootargs "${condev} ${bootrootfs} ${device} ${cec} ${coreelec} ${irsetup}"

# Device tree modifications
bootm start
bootm loados
bootm fdt
if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
# Remove aml partition layout from device tree (required for eMMC boot)
fdt rm /partitions
bootm prep

# Boot the board
bootm go
tobetter wrote:
Thu May 16, 2019 5:06 pm
Edit: I'm wondering if you are able to add a switch to GPIO headers. If so, another option is to add a toggle switch and modify the U-boot to detect it to select booting from eMMC or SD card. But this is the plan B.
this may be the easiest option for me ;) :)

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: eMMC and SD switch

Unread post by tobetter » Thu May 16, 2019 7:46 pm

@kardanadm, I'm wondering what's the OS version installed on your SD card? Your boot.ini is not familiar to me.
Since you must be familiar to use hardware switch for the plan B, please let me know which switch you can use and how do you want to connect to GPIO pin header. I would think of how the switch can work for you to select the boot media between eMMC and SD card. But again, the plan B is very customization work probably not officially released. Let's talk later if plan A - using Petitboot - does not work.

istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: eMMC and SD switch

Unread post by istanbulls » Thu May 16, 2019 8:03 pm

tobetter wrote:
Thu May 16, 2019 7:46 pm
@kardanadm, I'm wondering what's the OS version installed on your SD card? Your boot.ini is not familiar to me.
I have shared the Boot.ini code for CoreELEC.
"ubuntu-18.04.2-4.9-mate-odroid- n2 - 20190325 .img.xz" I have tried the same result.
I tried the "Armbian" got the same result.
They all failed.

Image

skeetre
Posts: 67
Joined: Mon Apr 29, 2019 11:27 am
languages_spoken: english
ODROIDs: Odroid-N2
Location: FL, USA
Has thanked: 15 times
Been thanked: 11 times
Contact:

Re: eMMC and SD switch

Unread post by skeetre » Thu May 16, 2019 9:40 pm

I'm also interested in this. I'd like an easier wait to switch between linux on the eMMC and android on the sd card. I haven't tried petitboot to see if it detects both. I'd like to see it actually autoboot after a timeout period. From my understanding this doesn't happen (yet?)
Friends don't let friends use Spectre/Meltdown/Zombieload mitigations.

istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: eMMC and SD switch

Unread post by istanbulls » Thu May 16, 2019 9:42 pm

Thank you again for your help :)

I tried Ubuntu again, ok.
I removed the sd card and inserted it again. now works well.

With ODROID-N2 Case, this process will be difficult to do. not a practical application.
ODROID N2 power button no restart button. It is not practical to switch between eMMC and SD Card. Is there a clue I don't know?

Is there a way to work with CoreELEC "spi boot select switch"?
Thank,

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: eMMC and SD switch

Unread post by tobetter » Thu May 16, 2019 9:52 pm

skeetre wrote:I'm also interested in this. I'd like an easier wait to switch between linux on the eMMC and android on the sd card. I haven't tried petitboot to see if it detects both. I'd like to see it actually autoboot after a timeout period. From my understanding this doesn't happen (yet?)
Your understanding is correct unfortunately.

"Tapatalk wishes you to have fun with ODROID"


everlasting
Posts: 47
Joined: Thu Mar 28, 2019 7:10 am
languages_spoken: english
ODROIDs: N2
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: eMMC and SD switch

Unread post by everlasting » Thu May 16, 2019 10:44 pm

I actually think this is not a problem of petitboot but instead the OS. Only certain OS i tried are detected by petitboot. Core elec wasnt one of them. So im using batocera for its built in kodi as a replacement. batocera is detected by petitboot.
This will become unnecessary once desktop images have acceleration for video. I just wonder how long we will wait though.

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: eMMC and SD switch

Unread post by tobetter » Thu May 16, 2019 11:37 pm

everlasting wrote:
Thu May 16, 2019 10:44 pm
I actually think this is not a problem of petitboot but instead the OS. Only certain OS i tried are detected by petitboot. Core elec wasnt one of them. So im using batocera for its built in kodi as a replacement. batocera is detected by petitboot.
This will become unnecessary once desktop images have acceleration for video. I just wonder how long we will wait though.
Actually, CoreElec was not be tested with Petitboot yet and @kardanadm had posted the boot.ini which is a bit different way to run with other OS. Will need some time to parse them if it works with Petitboot.

EDIT: I've quickly tried to parse the boot.ini of CoreElec and seems their OS may have some modification of U-boot command in which I am not familiar with yet. I've needed to what's different with official U-boot and how they manage a few boot command in U-boot.
These users thanked the author tobetter for the post:
istanbulls (Fri May 17, 2019 12:44 am)

istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: eMMC and SD switch

Unread post by istanbulls » Tue Jul 16, 2019 8:56 pm

Will there be any progress on this issue? We cannot switch between eMMC and SDcart.
Linux doesn't have x11, it's not good for desktop use, and it's also a problem with these uboot migrations. I regretted taking this board. Not enough solutions are produced, I am disappointed. Before the N2 went on sale, I was told it was highly praised but now it is a disappointment.

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: eMMC and SD switch

Unread post by tobetter » Tue Jul 16, 2019 9:10 pm


kardanadm wrote:Will there be any progress on this issue? We cannot switch between eMMC and SDcart.
Linux doesn't have x11, it's not good for desktop use, and it's also a problem with these uboot migrations. I regretted taking this board. Not enough solutions are produced, I am disappointed. Before the N2 went on sale, I was told it was highly praised but now it is a disappointment.
What issue is not working for you? If you are meaning the boot select between SD and eMMC, you can update Petitboot in SPI flash memory.
viewtopic.php?f=182&t=33873&p=262384&hi ... ot#p261451

What do you mean by Uboot migration?

"Tapatalk wishes you to have fun with ODROID"

These users thanked the author tobetter for the post:
istanbulls (Wed Jul 17, 2019 9:09 pm)

istanbulls
Posts: 84
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: eMMC and SD switch

Unread post by istanbulls » Wed Jul 17, 2019 9:04 pm

tobetter wrote:
Tue Jul 16, 2019 9:10 pm

What issue is not working for you? If you are meaning the boot select between SD and eMMC, you can update Petitboot in SPI flash memory.
viewtopic.php?f=182&t=33873&p=262384&hi ... ot#p261451
it would be more understandable if you update the petitboot version on your wiki
tobetter wrote:
Tue Jul 16, 2019 9:10 pm
What do you mean by Uboot migration?
English is not the main language, I'm sorry I wrote it wrong.

Updated with 201907-RC1 works perfectly.
Thank you for the improvements and thank you very much for your help

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: eMMC and SD switch

Unread post by tobetter » Wed Jul 17, 2019 9:09 pm

kardanadm wrote:
tobetter wrote:
Tue Jul 16, 2019 9:10 pm

What issue is not working for you? If you are meaning the boot select between SD and eMMC, you can update Petitboot in SPI flash memory.
viewtopic.php?f=182&t=33873&p=262384&hi ... ot#p261451
it would be more understandable if you update the petitboot version on your wiki
tobetter wrote:
Tue Jul 16, 2019 9:10 pm
What do you mean by Uboot migration?
English is not the main language, I'm sorry I wrote it wrong.

Updated with 201907-RC1 works perfectly.
Thank you for the improvements and thank you very much for your help
Glad to know it works for you. :)

"Tapatalk wishes you to have fun with ODROID"


Locked

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest