overdue-scratch

Author Topic: Revisit Chameleon's package builder  (Read 104966 times)

0 Members and 1 Guest are viewing this topic.

oldnapalm

  • Member
  • Posts: 45
Re: Revisit Chameleon's package builder
« Reply #45 on: September 18, 2010, 08:50:04 PM »
Hey guys,

the standard postinstall script is not making the target partition active, looks like it only does if table is GPT
Code: [Select]
# If table is GPT make the first partition active (BadAxe compatibility).
[ "${partitiontable}" = "GPT" ] && bootslice=1

Last scrax installer worked some times, now it's crashing after I click the first continue button (crash report attached).

Edit: here's the updated portuguese Localizable.strings (attached)

I don't understand the ZEvOreboot_description.

I think Kexts_description should be updated since you included kexts which are not plist only and are not compatible with Extra folder (new FakeSMC plugins).
« Last Edit: September 18, 2010, 10:00:39 PM by oldnapalm »

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #46 on: September 19, 2010, 12:46:23 AM »
I think ZEvOreboot will be removed from the official installer, because it's a mix of kext needed for my board all in one kext.

I've made some little changes and now i'm testing it, added portuguese translation. Thanks for it

I think we need to work and test it step by step now, so first I''ll look in the standard installer script to be sure it's ok.
when ok I'll pass to the Standard HFS and so on.

XLR

  • Entrant
  • Posts: 1
Re: Revisit Chameleon's package builder
« Reply #47 on: September 19, 2010, 01:50:10 AM »
Regarding FakeSMC, i assume it would be great to keep things simple by leaving it without any plugins and with debugging option turned off. Those plugins are obviously for advanced users only, and debugging may only scare the n00bs and trigger "omg fake smc gives me errors during verbose boot!" sort of messages on message boards.

And regarding EFI partition mounter script, in my inconsequential opinion, the best scenario would be to have it implemented into the Preference.panel, but the script needs to be updated in order to be able mounting FAT and HFS partitions as mentioned earlier. The script itself is pretty simple so i believe it shouldn't be a problem, imho.

Just my 2 cents. :)

oldnapalm

  • Member
  • Posts: 45
Re: Revisit Chameleon's package builder
« Reply #48 on: September 19, 2010, 03:05:55 AM »
Scrax,

I updated the portuguese translation again, I forgot to translate some options, and some were missing.



I'm still experiencing random crashes with your installer, and it's still not making the target partition active.

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #49 on: September 19, 2010, 03:51:58 PM »
Hi scrax...
always relate to the options in the c.a.B.p here a dirty cycle to put in the buidpkg
using the structure folder of my previus archive..

need correction when the script generate the _title and _description...

Quote
# build options packages

   outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
   choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
   ((xmlindent++))
   packagesidentity="org.chameleon.options"
   options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))
   for (( i = 0 ; i < ${#options
  • } ; i++ ))

   do
       packagesidentity="org.chameleon.flsgs"
       flagname=($( find "${pkgroot}/Scripts/Options/${options[$i]##*/}" -type d -depth 1 -not -name '.svn' ))
       for (( j = 0 ; j < ${#flagname
  • } ; j++ ))

       do
         outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${options[$i]##*/}\">"
         choices[$((choicescount++))]="<choice\n\tid=\"${flagname[$i]##*/}\"\n\ttitle=\"${flagname[$i]##*/}_title\"\n\tdescription=\"${flagname[$i]##*/}_description\"\n>\n</choice>\n"
         ((xmlindent++))
         mkdir -p "${1}/${flagname[$j]##*/}/Root"
         mkdir -p "${1}/${flagname[$j]##*/}/Scripts"
         cp -f "${pkgroot}/Scripts/Options/${options[$i]##*/}/${flagname[$j]##*/}/postinstall" "${1}/${flagname[$j]##*/}/Scripts"
         buildpackage "${1}/${flagname[$j]##*/}" "/binaries" "${coresize}" "start_enabled=\"true\""
         rm -R -f "${1}/${j##*/}"      
         ((xmlindent--))
         outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
      done
      echo "Building ${options[$i]##*/} package"
      buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\""
      rm -R -f "${1}/${i##*/}"
   done
   ((xmlindent--))
   outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build options packages

Fabio
« Last Edit: September 19, 2010, 03:53:43 PM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #50 on: September 19, 2010, 06:17:02 PM »
Conclusion: Both package installers fail to correctly install to FAT32 formatted EFI.. Though we're getting closer.. Keep up the good work guys :)
UPDATE:
I have to apologise after my previous report as I have since done hours of testing and discovered the package install to FAT32 formatted EFI partition does work. :-[

In my tests, I was formatting the EFI partition myself before running the installer and I was doing it incorrectly!
I was using:
Code: [Select]
newfs_msdos -v EFI /dev/rdisk1s1
when the correct command is:
Code: [Select]
newfs_msdos -F 32 -v EFI /dev/rdisk1s1
Note: the -v isn't required for the script.

The package installer script uses the correct command but only if the EFI partition is not FAT32. The problem here is I had incorrectly formatted it prior to running the installer so the script assumes it's fine and continues.
« Last Edit: September 19, 2010, 06:18:34 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #51 on: September 19, 2010, 06:47:22 PM »
With regard to the hfs+ Mounter, I have quickly edited it to mount a FAT32 partition and renamed it FAT32 EFI Mounter. I've attached it for now and I'll have a look to see if it's possible to make a single version to recognise both HFS+ and FAT32.
« Last Edit: September 19, 2010, 06:50:05 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #52 on: September 19, 2010, 06:51:52 PM »
Ok perfect, so now we have EFI FAT and HFS+ working,
Standard and Standard boot0hfs working without makeactive if not GPT (easy to add for any type of partition table),
and also Options working if i'm not wrong

FakeSMC now is without plugin so it can be used from /E/E
Hi scrax...

need correction when the script generate the _title and _description...

So for now is not working good?
Quindi per ora non va bene?
Ad ogni modo ottimo lavoro, io mi sto concentrando piĆ¹ sulla parte EFI, RAID ecc e il tuo lavoro sulle opzioni ci sta facendo andar avanti molto in fretta  :)

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #53 on: September 20, 2010, 12:28:46 AM »
I'll have a look to see if it's possible to make a single version to recognise both HFS+ and FAT32.
I have changed the EFI Mounter to now recognise and mount both HFS+ and FAT32 EFI partitions. See attached for the revised applescript.

The way I did it was to use the fdisk -d  (Dump partition table) command. i.e. fdisk -d /dev/disk0
I noticed on my system that for the EFI partition, fdisk -d returned:

for an HFS+ formatted EFI
Code: [Select]
409640,1835008,0xAF,-,25,127,15,139,184,21
for a FAT32 formatted EFI
Code: [Select]
409640,2100808,0xAF,-,25,127,15,156,68,24
So I have grep'd the fdisk -d command for 1835008 or 2100808 to determine which filesystem to mount. If there's a better way then we can use that instead, but for now it works on my system. However, it might not be fool proof so it needs some testing.
« Last Edit: September 20, 2010, 12:37:30 AM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #54 on: September 20, 2010, 01:46:16 AM »
I've updated the English Localizable.strings to be more explanatory.

Also, the UseMemDetect boot option should disable the automatically enabled memory detection, where as it currently enables it (again).
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #55 on: September 20, 2010, 06:39:17 AM »
So for now is not working good?
Quindi per ora non va bene?


this is little better... but there is a "still problem" with duplicate name_opt

the problem is marked in red color...
How I can solve that?
Quote
# build options packages

   outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
   choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
   ((xmlindent++))
   packagesidentity="org.chameleon.options"
   options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))
   for (( i = 0 ; i < ${#options
  • } ; i++))

   do
      packagesidentity="org.chameleon.flags"
      flagname=($( find "${options[$i]}" -type d -depth 1 -not -name '.svn' ))
      for (( j = 0 ; j < ${#flagname
  • } ; j++ ))

         do
            outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${options[$i]##*/}\">"
            choices[$((choicescount++))]="<choice\n\tid=\"${options[$i]##*/}\"\n\ttitle=\"${options[$i]##*/}\"\n\tdescription=\"${options[$i]##*/}_description\"\n>\n</choice>\n"
            ((xmlindent++))
                  mkdir -p "${1}/${flagname[$j]##*/}/Root"
                  mkdir -p "${1}/${flagname[$j]##*/}/Scripts"
                  cp -f "${flagname[$j]}/postinstall" "${1}/${flagname[$j]##*/}/Scripts"
                  echo "Building ${options[$i]##*/}${flagname[$j]##*/} package"
                  buildpackage "${1}/${flagname[$j]##*/}" "/" "" "start_selected=\"false\""
                  rm -R -f "${1}/${j##*/}"
            ((xmlindent--))
            outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
      done
      echo "Building ${options[$i]##*/} package"
      buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\""
      rm -R -f "${1}/${i##*/}"
   done
   ((xmlindent--))
   outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build options packages

Fabio
« Last Edit: September 21, 2010, 05:04:54 AM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #56 on: September 20, 2010, 08:50:50 AM »
I've mado UseMemDetect = No instead of Yes,
and added the new localizable for english
and updated the EFI Mounter
But I have some problem in the compilation so I can't upload a new version
Now random crashes and makeactive for standard install should be fixed.
I've found that if compiled with not all the language it's more stable so now it has only english and italian
After checking that all the options are ok we can rearrange them in simple and advanced
« Last Edit: September 20, 2010, 09:41:04 AM by scrax »

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #57 on: September 20, 2010, 02:19:51 PM »
Great. I'll try it out this evening when I get home.
EDIT: Tried it but this one keeps crashing when double clicking it, same as oldnapalm reported above. Crash Report attached
EDIT2: Got it working now, so I'll do some testing.

Standard Install and boot0hfs install:
Both work well, with every file selected in the right place. However, with both installs, EFI Mounter and the Chameleon Preference Pane were both installed as the application's package contents (list of files) and not as a bundle?

The standard install doesn't make the selected partition active.
« Last Edit: September 20, 2010, 11:42:43 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #58 on: September 21, 2010, 03:38:13 AM »
I've corrected the error for EFI Mounter and PrefPanel (I considered them as file instead of folder).
For the active partition I don't know why it is not working, if there is another way to make it active than:
Code: [Select]
fdisk440 -e ${bootdisk} <<-MAKEACTIVE
print
flag ${bootslice}
write
y
quit
MAKEACTIVE

With the installer made by iFabio is it working?

oldnapalm

  • Member
  • Posts: 45
Re: Revisit Chameleon's package builder
« Reply #59 on: September 21, 2010, 04:32:21 AM »
Is fdisk440 in the path? If it's not you should use the full path to the executable.

Anyway we can use default fdisk to make the partition active, fdisk440 is only needed to write boot0 (or boot0hfs) to MBR.

Code: [Select]
if ${diskupdate}; then
echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
${bootvolume}/usr/standalone/i386/fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
fi