would you consider adding dual partition for the g7x so it can use exFAT - Feature Requests - CHDK Forum supplierdeeply

would you consider adding dual partition for the g7x so it can use exFAT

  • 15 Replies
  • 5620 Views
*

Offline Mlapse

  • *****
  • 584
  • S95 S110
Advertisements
Since i noticed the G7X mk2 was upgraded to dual boot capabilties, i was wondering if the same could happen for the G7x.
I have a 100d running CHDK 1.7.
And am only in a hurry if there is testing to be done  :D
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14098
Since i noticed the G7X mk2 was upgraded to dual boot capabilties, i was wondering if the same could happen for the G7x.
I have a 100d running CHDK 1.7.
And am only in a hurry if there is testing to be done  :D
@Mlapse

Whoops, I meant to look into this earlier, then forgot and the thread was marked read so I didn't look again  :-[

Here's a test build for g7x 100d. It works for me.

One thing I noticed is that CHDK "make card bootable" does not work on a FAT16 + exfat card, presumably because we use the MakeSDCardBootable funtion, which thinks the card is exFAT. This presumably applies to many other cams (I think some old ones write directly to the card and so wouldn't be affected)
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 584
  • S95 S110
it for a summer project, so no worries.
and i am actually very busy with soldering wiring and writing a wla for my cooling solution project.

but i will find some time to test it this week..i loaded it on a already formatted card and it boots. i have not tried to format a card on that cam.
as for the [make card bootable], as far as i know that was always only working on single partition cards, even though a cam supports dual partition (like s95, a480 etc))
i always had to use stick or chimp to write the boot flag.

to make a dual partition fat16/exfat i use the dual partition feature in chdk, format exfat on the pc and since chimp handles large sd cards that is used to make them bootable.

a sidenote to this is, if you have a large fat32 card that you are reusing as exfat or just wipe for common use, be sure to do that low level or there will be a few extremely slow blocks left that will slow down or even shut down your cam when it comes to writing those blocks.
« Last Edit: 06 / March / 2023, 04:50:40 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14098
I check this change in for g7x in trunk r6225
as for the [make card bootable], as far as i know that was always only working on single partition cards, even though a cam supports dual partition (like s95, a480 etc))
i always had to use stick or chimp to write the boot flag.
Hmm, maybe I imagined that early cams did this correctly. Or maybe it was very early ones? I guess I should probably dig into the source and clarify on the wiki...

Quote
to make a dual partition fat16/exfat i use the dual partition feature in chdk, format exfat on the pc and since chimp handles large sd cards that is used to make them bootable.
FWIW, I've never trusted the "Create card with two partitions" CHDK option and haven't tried it on G7 X.

I generally use gparted on linux to make the partitions and
Code: [Select]
echo -n BOOTDISK | dd bs=1 count=8 seek=64 of=/dev/<sd card device>p1to make bootable
Don't forget what the H stands for.


*

Offline Mlapse

  • *****
  • 584
  • S95 S110
Or maybe it was very early ones? I guess I should probably dig into the source and clarify on the wiki...
my memory takes me back to 2008 when i used a dual partition A480, think i did the cutting of a large douglas tree back then.......i did have a vxworks cam before that, but can't recall the model, it was all silver metal and i didn't have large enough sd cards in those days don't even know for sure if it supported CHDK or that this was the reason for me to get the A480.

Quote
FWIW, I've never trusted the "Create card with two partitions" CHDK option and haven't tried it on G7 X.

I generally use gparted on linux to make the partitions and
Code: [Select]
echo -n BOOTDISK | dd bs=1 count=8 seek=64 of=/dev/<sd card device>p1to make bootable
i have trusted the CHDK method for some 10 years and it never failed me yet...aside from that in early years i used to be able to copy the complete CHDK folder to the first partition made by CHDK.
i did test it for the models Phil adapted for exFAT.
so i will test the CHDK method on the G7x as soon as i've got a clean sd card.
since it is easy to understand and works reliable i see it as the preferred method fro creating dual partition cards.

I assume there is another BOOTDISK command for single partitions with gparted?
i will write down this one in case that becomes relevant.....
« Last Edit: 07 / March / 2023, 03:31:50 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14098
i have trusted the CHDK method for some 10 years and it never failed me yet...aside from that in early years i used to be able to copy the complete CHDK folder to the first partition made by CHDK.
Well, if you have a method that works for you, you should definitely use that :) (I don't have any specific reason to distrust the CHDK method, blindly writing the partition table on a running cam always just felt sketchy to me)
Quote
I assume there is another BOOTDISK command for single partitions with gparted?
i will write down this one in case that becomes relevant.....
The p1 at the end of the device name refers to the first partition, so that part doesn't change. However, the offset is different (0x1E0) for FAT32. All documented https://chdk.fandom.com/wiki/Prepare_your_SD_card

But again, if the method you are using now works, no need to mess with this stuff.
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 584
  • S95 S110
(I don't have any specific reason to distrust the CHDK method, blindly writing the partition table on a running cam always just felt sketchy to me)
it is a bit sketchy, but formatting the partitions on a pc solves that :)

Quote
But again, if the method you are using now works, no need to mess with this stuff.
it's always nice to have options.
frustration is a key ingredient in progress

*

Offline Mlapse

  • *****
  • 584
  • S95 S110
had other plans, but things happened.
@reyalp
today i finally had time and a unused sd card, the 'make dual partition' in camera for the g7x-100d does not work yet.
however i'm still working with the 6224 you posted here. so maybe you already fixed that.

don't know what is missing, but we had the same thing with the first version of the m3 dual boot i tested, i do not know what it was, but phil fixed it.
« Last Edit: 31 / March / 2023, 13:41:18 by Mlapse »
frustration is a key ingredient in progress


*

Offline reyalp

  • ******
  • 14098
don't know what is missing, but we had the same thing with the first version of the m3 dual boot i tested, i do not know what it was, but phil fixed it.
@Mlapse
Thanks for reporting, and apologies for the slow response. Here's a test build for g7x 100d. Probably the same issue as M3, the WriteSDCard function was not found ;)
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 584
  • S95 S110
no worries, i am not in a hurry.

however, i already tested this version and alas it does not create two partitions. sorry i can't be more helpfull.
@reyalp my test was no test, it was still 6224.

as for camnotes, maybe i do not understand correctly:
Quote
No "firmware update" file is included in the autobuild, you must used
bootable SD card to load. See known bugs below.

while testing the dual partition feature of version 6232, i did use play->menu->update firmware 1.0.0.0 to 1.1.0.0 and that does work, but only if the card is set to locked (making the cam complain about that on boot via play).....
whoops, the fi2 file was from 6224, i did not erase the card but just copied over the old, since there was no new fi2 file it stayed.
this is the reason the dual partition failed..it states 6224 at boot, so i should retest it by first making the card bootable or do you plan to include a fi2 now you know it boots firmware update with the card locked?

If i try to use the firmware update without card locked, it does crash to a black screen like in the notes.
« Last Edit: 09 / April / 2023, 06:23:57 by Mlapse »
frustration is a key ingredient in progress

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal