Page 1 of 1

Multi-app installer/multi-boot loader (odroid-go-multi-firmware)

Posted: Sun Jun 02, 2019 8:26 am
by ducalex
Hello!

This is a mod/fork of the stock odroid-go-firmware by @crashoverride that allows to install multiple applications in the flash and switch between them very quickly.

There are more details on the github so I'll keep it short.

The recommended installation method is to follow these instructions: https://wiki.odroid.com/odroid_go/firmware_update but use the .img provided here. Then to access the boot menu / firmware you hold **B** while booting, as you normally would.

Here's a demonstration (older version shown):



I'd very much appreciate any feedback and bug reports!


The source code:
https://github.com/ducalex/odroid-go-multi-firmware


Recommended companion applications:
Web SD File Browser (Up/Download) by ripper121

.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Sun Jun 02, 2019 2:05 pm
by mad_ady
Wow! It's a great feature! Will make tinkering on the go easier :)
Should reduce flash wear too

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Sun Jun 02, 2019 2:46 pm
by pmprog
That does look pretty handy, will have to download it later.

How come nobody uses holding Menu button to open the flash menu? ;-)

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Jun 03, 2019 3:58 am
by ducalex
pmprog wrote:
Sun Jun 02, 2019 2:46 pm
That does look pretty handy, will have to download it later.

How come nobody uses holding Menu button to open the flash menu? ;-)
I'm open to changing the button but I think maintaining the behavior of the stock firmware might be more intuitive!
It is not possible to change the button if you choose the .fw install method, as the bootloader is part of the .img.

One thing I'd like is to have an option to get rid of the button holding and be asked what app to boot directly on power up. I've tried many methods but they all had problems so I've put that plan on hold for now.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Jun 03, 2019 4:30 am
by Nemo1984
This is so great, it should be pinned and the default firmware from now on! Thanks! That's perfect!

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Jun 03, 2019 4:53 am
by pmprog
ducalex wrote:
Mon Jun 03, 2019 3:58 am
I'm open to changing the button but I think maintaining the behavior of the stock firmware might be more intuitive!
I'm not really that bothered, it was just more an observation than a request ;-)
ducalex wrote:
Mon Jun 03, 2019 3:58 am
It is not possible to change the button if you choose the .fw install method, as the bootloader is part of the .img.
Could you hot-patch the bootloader when you read it from SD for flashing? I don't know if it's as simple as that

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Jun 03, 2019 5:31 am
by ducalex
pmprog wrote:
Mon Jun 03, 2019 4:53 am
Could you hot-patch the bootloader when you read it from SD for flashing? I don't know if it's as simple as that
That is certainly possible. Hell the .fw version could have an option to overwrite the default firmware, essentially becoming the .img version but without the trouble of using the flashing tool.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Jun 03, 2019 9:05 am
by odroid
Very impressive idea indeed. :o

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 12:28 am
by surpryse
Great job.
In my case it's enough to launch 3 apps.
I'm looking forward to a new version.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 3:55 am
by mameise
Looks good :) However i have Trouble installing it.
I put the .fw into Firmware Folder and try to install via normal Firmware (Pressing B etc) - i also get that boot error you Mention.
So i Restart the device but it just starts into normal "old" Firmware. Pressing A seems to have no effect at all. When i press Menu i get a boot set error blinking blue led but after Restart still old Firmware.
Can you help me what i do wrong?

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 4:27 am
by ducalex
mameise wrote:
Tue Jun 04, 2019 3:55 am
Looks good :) However i have Trouble installing it.
I put the .fw into Firmware Folder and try to install via normal Firmware (Pressing B etc) - i also get that boot error you Mention.
So i Restart the device but it just starts into normal "old" Firmware. Pressing A seems to have no effect at all. When i press Menu i get a boot set error blinking blue led but after Restart still old Firmware.
Can you help me what i do wrong?
When you power on the device, are you holding A? You need to hold A *while powering on*. It should start the modified firmware or show a black screen if it fails but it should not boot the stock firmware.

Otherwise perhaps you have an older stock firmware with test mode not enabled, I have only tested on the latest :(.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 4:36 am
by mameise
Well i thought i had the last installed. Yes i was holding A on power on - same like B in normal firmware i assume ;) it got stuck on writing 2 with the boot error. Nevermind i have installed it now as firmware and it works like a charm. Really impressive! Should be the new official firmware if i could vote :)

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 5:31 am
by ducalex
mameise wrote:
Tue Jun 04, 2019 4:36 am
Well i thought i had the last installed. Yes i was holding A on power on - same like B in normal firmware i assume ;) it got stuck on writing 2 with the boot error. Nevermind i have installed it now as firmware and it works like a charm. Really impressive! Should be the new official firmware if i could vote :)
Thanks for the report! I'll do more testing on the .fw version and I added a notice in my post that it might not work for everybody.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 12:53 pm
by mameise
One thing i noticed (not sure if fixed already with your latest release):

Let‘s say i install an app in 0x10000000
When i then install the next app there is still the old installation address shown as new installation path.
So i have to go back to the installed apps overview and enter the menu again, then the next free slot is chosen. No big deal at all but maybe something you can fix.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 2:41 pm
by ducalex
mameise wrote:
Tue Jun 04, 2019 12:53 pm
One thing i noticed (not sure if fixed already with your latest release):

Let‘s say i install an app in 0x10000000
When i then install the next app there is still the old installation address shown as new installation path.
So i have to go back to the installed apps overview and enter the menu again, then the next free slot is chosen. No big deal at all but maybe something you can fix.
That was fixed in the most recent release :) . I'll try to make a changelog in the future releases.

You will have to reflash all your applications after upgrading the firmware. I've tried a few things to avoid that but so far no luck.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Tue Jun 04, 2019 3:22 pm
by mad_ady
There might be problems for apps (if there are any left) that have an additional data partition - like micropython and old doom.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Wed Jun 05, 2019 12:49 am
by ducalex
mad_ady wrote:
Tue Jun 04, 2019 3:22 pm
There might be problems for apps (if there are any left) that have an additional data partition - like micropython and old doom.
They both work fine. (But Old doom needs an additional reboot because the LCD isn't initialized correctly for some reason.)

Edit: I did manage to package a .fw that would be corrupted by my firmware. I think it is now fixed, the firmware is no longer aligning partitions (except the first) and it respects the .fw layout like the official firmware does.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Jun 06, 2019 3:11 am
by Nemo1984
I have been testing it and the interface looks more robust. Last version, sometimes after multiple "app" installs, when I went to install the next one I had an error. This seems fixed in this one.

Thanks!

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Jun 06, 2019 5:57 am
by ducalex
I've just added a new release. I have achieved all my main goals so it will be the last for a while (unless there is a bug, I will fix that quickly).

There isn't any bugfix from 20190604, so update only if you want to help me test or if you want one of those features:

Changes in the new version:
- Defrag happens only when running out of space, meaning instant deletes
- MENU key now opens the menu instead of START

Note: Applications are sorted by the order they appear in flash. So if you flash something and the firmware finds a free space between two apps, it will appear there instead of at the end of the list. If it's too annoying please tell me, otherwise I planned sorting options for later on. (SubNote: To mitigate that you can press SELECT after deleting an app. It will defrag and preserve the list order as it is on screen and install the next app at the end).

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Jun 06, 2019 2:11 pm
by pmprog
Finally just tried to flash this, and my odroid just gives me a gray blacklit display. I tried the 04 and 05 img files, and even crashoverride's original...

So I guess for now I've got a soft-bricked unit :(

Edit: Ignore that... Perhaps somebody can update the wiki to say that you need to disconnect the GO from USB as well as power cycling. I was leaving it connected, and thus I think it was remaining in the upload stub

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Fri Jun 07, 2019 5:06 am
by ducalex
pmprog wrote:
Thu Jun 06, 2019 2:11 pm
Finally just tried to flash this, and my odroid just gives me a gray blacklit display. I tried the 04 and 05 img files, and even crashoverride's original...

So I guess for now I've got a soft-bricked unit :(

Edit: Ignore that... Perhaps somebody can update the wiki to say that you need to disconnect the GO from USB as well as power cycling. I was leaving it connected, and thus I think it was remaining in the upload stub
Have you resolved your issue? Do you think I should add clearer instructions? I don't think it's possible to brick the GO but I got scared at my first black screen too ;).

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Fri Jun 07, 2019 3:41 pm
by pmprog
Yes, everything's running, thanks. Though I've not really touched it since i flashed your firmware. What i did play with all looked good though. Nice work!

I think the wiki page on flashing firmware should probably note that you won't see the new firmware until the USB cable is unplugged.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Sat Jun 15, 2019 3:13 am
by ducalex
New release day!

Nothing groundbreaking but some nice features:
  • Sorting. Press SELECT to cycle through the modes
  • Battery and page indicators in the top bar.
  • Press B twice to reboot to last active app (if any)
  • Improved detection of corrupted firmware files
  • No longer locks up if you don't have an SD Card
  • Experimental build to always show the firmware on power up
The experimental build will boot applications only once, then on next boot it will be in firmware. No more holding B. It can cause compatibility issues with some applications and the flash read/writes haven't been optimized as much as they could be yet, hence experimental.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Fri Jul 05, 2019 6:47 am
by pelle7
Awesome! I have installed multi-boot loader and I have installed different emulators and programs'

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Fri Jul 12, 2019 4:31 pm
by tmihai20
I just flashed odroid-go-firmware-20190614.fw on my oDroid GO using the internal method and I cannot see the firmware (I keep A key pressed and I am booting it). Am I doing something wrong?

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Fri Jul 12, 2019 11:14 pm
by mameise
Do you have latest main firmware for go? Did not work for me also in first try so i directly flashed it via PC as permanent firmware and am more than happy with it. Higly recommended as main firmware.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Sun Jul 28, 2019 12:51 am
by Cralex
Really loving this for how fast you can switch between firmwares. (I actually found this on YouTube first, and my jaw dropped when I saw it working!) Quick question: what is the NUS and what would cause it to need erasing? I ask because, after trying some different firmwares, I tried booting Super Go Play up again but it just stayed on a black screen with the backlight on. I tried erasing and reinstalling Super Go Play, then erasing all apps, but still nothing. Finally, with nothing left to lose, I erased the NUS, which caused Super Go Play to boot again.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Sun Jul 28, 2019 8:40 am
by ducalex
Cralex wrote:
Sun Jul 28, 2019 12:51 am
Really loving this for how fast you can switch between firmwares. (I actually found this on YouTube first, and my jaw dropped when I saw it working!) Quick question: what is the NUS and what would cause it to need erasing? I ask because, after trying some different firmwares, I tried booting Super Go Play up again but it just stayed on a black screen with the backlight on. I tried erasing and reinstalling Super Go Play, then erasing all apps, but still nothing. Finally, with nothing left to lose, I erased the NUS, which caused Super Go Play to boot again.
The NVS is non volatile storage. It can be used to store things like high scores and settings and the emulators use it to store the name of the rom to load. It can be safely erased at any time.
The official firmware erases it every time you boot into the firmware.

The problem is that the NVS format can change depending on which version of esp-idf (the esp32 framework) was used to build the app, and as the NVS partition is shared it can causes issues.

Most applications handle this gracefully and simply reformat it if they don't understand the existing NVS. But others do not handle errors at all, which is the case of Springboard (the official rom launcher in Go-Play and its forks).

I've been working on a way of giving each application its own NVS partition so there is never a conflict but it isn't well tested so I have not released it yet.

I attached a build to this post if you want to help me test it! Make sure to erase everything when flashing this update.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Wed Jul 31, 2019 4:45 pm
by ripper121
Could you please push the latest FW also to a Github Release.
The Github release is outdated.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Wed Jul 31, 2019 10:48 pm
by ducalex
ripper121 wrote:
Wed Jul 31, 2019 4:45 pm
Could you please push the latest FW also to a Github Release.
The Github release is outdated.
The code is there but for the release I was waiting for anyone to confirm that it's working correctly as I did not have time to test it extensively myself.

If you confirm that it works fine for you I will add odroid-go-firmware-20190727 to the release page tonight!

Thanks

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Wed Jul 31, 2019 10:53 pm
by Nemo1984
I will do some extensive test tonight. I know that the Web File Browser and Go IR Cam are causing this behavior with Super Go and Triforce. For me, it is problematic to erase NVS every time because it also deletes my Arduventure saved game, so I will be happy to help testing.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Wed Jul 31, 2019 11:01 pm
by Cralex
Yeah, my work schedule changed this week, so I haven’t had time to do much testing. I think the firmware that caused Super Go Play to not boot on mine was the WiFi Firmware Updater.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 6:29 am
by Nemo1984
I have tested the NVS separation and it works good. I tested "Erase selected NVS" too. It works good IF THERE IS A NVS SELECTED. If there is none (eg nothing flashed yet), it kills the multi-boot and it has to be reflashed from the pc again.It is the only major bug I have found so far.

EDIT: Maybe an option to delete all NVS as well?

Thanks!

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 10:13 am
by ducalex
Nemo1984 wrote:
Thu Aug 01, 2019 6:29 am
It works good IF THERE IS A NVS SELECTED. If there is none (eg nothing flashed yet), it kills the multi-boot and it has to be reflashed from the pc again.It is the only major bug I have found so far.
Wow that was a real oversight from my part! The app-specific menu options are now disabled when the list is empty, it should prevent further issues.
Nemo1984 wrote:
Thu Aug 01, 2019 6:29 am
EDIT: Maybe an option to delete all NVS as well?
Agreed, but I do not have time to add it to this release at the moment.

I have attached the new build to the first post here, as well as on github: https://github.com/ducalex/odroid-go-fi ... g/20190731

Thanks for testing

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 12:58 pm
by Nemo1984
It is my concern than maybe the NVS could get full if I have a lot of firmwares saving a lot of thing? I'm not experienced in all this but is NVS a partition?

BTW, the revision works flawlessly! Thank you very much!

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 1:55 pm
by ducalex
Nemo1984 wrote:
Thu Aug 01, 2019 12:58 pm
It is my concern than maybe the NVS could get full if I have a lot of firmwares saving a lot of thing? I'm not experienced in all this but is NVS a partition?

BTW, the revision works flawlessly! Thank you very much!
Yes, the official GO firmware has a 16KB NVS partition and all the GO applications I know about use very little of it, typically 0 to 1KB (about 5KB if they need Wifi). The NVS was designed by Espressif (the maker of the chip in the GO) to be easily shared, which is why it mostly works in my earlier releases. However all applications have to use the same format and here lies the problem, not all GO apps do.

In my (latest) firmware each application has its own 12KB NVS partition, but it is invisible to all other applications so that only the selected app's NVS partition is visible at one time.

In most cases my firmware can fit that 12KB in space that would be wasted by the .fw layout so the actual usage is no more than before, and in the most extreme case up to 64 additional KB (NVS+padding) will be needed. To put that into perspective the Odroid GO has 15,728 KB of user accessible flash. Also when you erase an application the NVS space is reclaimed.


As a side note: In a future release I'll replace the hexadecimal numbers in the main screen by the app's size (like in the install screen), that would probably be more useful to most people!

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 4:52 pm
by mad_ady
The only limit would be that you won't retain some settings like screen brightness or volume level between different apps (not sure if they use the same API to set/retrieve them). It's a very small limit, but worth knowing.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 6:01 pm
by tmihai20
@ducalex: can you please create fw files instead of img? I gave up on using the PC to flash stuff on my oDroid GO.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 6:41 pm
by ripper121
Thats not possible.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Thu Aug 01, 2019 9:28 pm
by Nemo1984
Thanks for clearing that up. If the NVS is also clear when I deleted an app, then personally I won't need a "Clear all NVS" option. I thought that if I deleted an app, the NVS might remain.

Thanks again for your work, it makes the Odroid Go so much more usefull!

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Fri Aug 02, 2019 2:56 am
by ducalex
mad_ady wrote:
Thu Aug 01, 2019 4:52 pm
The only limit would be that you won't retain some settings like screen brightness or volume level between different apps (not sure if they use the same API to set/retrieve them). It's a very small limit, but worth knowing.
There doesn't seem to be a universal way for the GO, many application store those under many names. It would affect mostly forks I assume, for example Go-Play and all its forks all use these names.
tmihai20 wrote:
Thu Aug 01, 2019 6:01 pm
@ducalex: can you please create fw files instead of img? I gave up on using the PC to flash stuff on my oDroid GO.
There are issues with this new version and the .fw, I recommend you use a previous version if you must use the .fw installation method.
That being said, I have attached a .fw of the current version (20190731) and you are free to try anyway if you want! Remember to boot into this version you need to hold A instead of B.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Sep 02, 2019 3:42 am
by Paspartout
Hey, thanks for this project, it looks really cool and useful.
Unfortunately It seems that the firmware has problems with reading my particular sdcard.
It always shows SD Card Empty.
Here is the relevant log entries:

Code: Select all

I (176) input_init: done.
I (176) gpio: GPIO[22]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
E (256) spi: SPI2 already claimed by spi master.
E (256) spi_master: spi_bus_initialize(242): host already in use
I (256) ili9341_init: LCD: calling ili_init.
I (656) ili9341_init: LCD: calling backlight_init.
I (656) ili9341_init: LCD Initialized (40000000 Hz).
I (1016) read_app_table: Read app table (0 apps)
E (8176) sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd returned 0x107
E (8176) diskio_sdmmc: sdmmc_read_blocks failed (263)
E (8176) odroid_sdcard_files_get: opendir failed.
I (8176) ui_choose_file: fileCount=0
Here is the full log if you need it: https://gist.github.com/Paspartout/1667 ... 955e0ed6d3

I also had similar errors in the past that were due to not locking the display and spi display at the right time, or
using an unpatched version of esp-idf(see viewtopic.php?f=162&t=33290&p=242461#p242461)

I tried building the firmware myself with the patched esp-idf v3.1-odroid branch then but couldn't get it to work.
As far as I know the mentioned patch(https://github.com/OtherCrashOverride/e ... fabe3dac87) should be applied in that branch.

I tried using

Code: Select all

make flash
and using

Code: Select all

./build.sh && esptool.py write_flash 0 ./odroid-go-firmware-*.img
to flash it, but
it always shows APP TABLE ALLOC ERROR without any error message on the log.

Could you please recheck if you built with all the patches from crashoverride(https://github.com/OtherCrashOverride/e ... shOverride), and clarify how you built and flashed
the firmware? Thanks!

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Sep 02, 2019 4:20 am
by ducalex
I use upstream esp-idf (exact version is in your log) and I apply only this patch, the others are usually not necessary.

That being said, this patch suggests it improves SD Card compatibility. I have attached a build using it, if it works let me know and I'll add it to the README.

The "APP TABLE ALLOC ERROR" suggests that you disabled external RAM or it failed to initialize somehow, I'm not sure what the problem is...

As for flashing I use "make flash monitor" and before release I also test the flash tool in odroid's instructions. I have not tried raw esptool but I don't see why it wouldn't work if your parameters are correct.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Sep 02, 2019 4:30 am
by Paspartout
The attached firmware now indeed works without a problem. Thank you for the fast response!
So nice being able to switch applications without reflashing every time :)

Code: Select all

 The "APP TABLE ALLOC ERROR" suggests that you disabled external RAM or it failed to initialize somehow, I'm not sure what the problem is...
Hm, maybe the newer sdkconfig is incompatible with the old esp-idf I used. I will try building with upstream and the patches later.

Re: Multi-app installer/multi-boot loader (odroid-go-firmware mod)

Posted: Mon Sep 02, 2019 4:40 am
by ducalex
Paspartout wrote:
Mon Sep 02, 2019 4:30 am
Hm, maybe the newer sdkconfig is incompatible with the old esp-idf I used. I will try building with upstream and the patches later.
You were right and I think I found the issue. Esp-idf 3.1 doesn't support SPIRAM autodetect (see 3.1 vs 3.2) so it ends up with a SPIRAM_SIZE of -1 which obviously isn't valid under 3.1.

I'll remove CONFIG_SPIRAM_SIZE=-1 from the sdkconfig so that it uses the default value of the sdk which *should* fix the issue building on 3.1.

Thanks!

Re: Multi-app installer/multi-boot loader (odroid-go-multi-firmware)

Posted: Sat Feb 27, 2021 1:01 am
by ducalex
A new release is available (attached to top post) with the following improvements:
  • Added option to format SD Card
  • Enabled exFAT support
Note: Using an exFAT-formatted card isn't recommended because most apps do not support it. The new format option will prepare the SD Card properly (FAT32).