SGDDevBuild

From Super Grub Disk Wiki
Jump to navigationJump to search

Castillonroy Series Build

Grub itself

Advice: As long as a compiled /boot folder is found by default in Castillonroy Series you actually do not need to compile this In order to build grub itself you need to run:

cd dev_grub
./update_grub_binaries.sh

It is very important to run the update_grub_binaries.sh script from inside the dev_grub folder, otherwise it will not work ok

The result of these scripts is compiling grub files found at: dev_grub folder with the options defined at: dev_grub/smart_grub_compile.sh. After the compilation these files:

stage2/*stage1_5 stage2/stage2 stage2/stage2_eltorito stage1/stage1

are copied automatically to boot so they can be used later by the Super Grub Disk Bash Scripts.

Super Grub Disk Media

In order to run the Super Grub Disk Bash Scripts you need to:

cd ROOT_OF_SGD_SOURCE_CODE

Then you can choose these commands:

make_release.sh

You need to run:

./make_release.sh

options: None.

Result: It builds Super Grub Disk media in release. Release is populated with many files:

.
|-- binaries
|   `-- sgd
|       |-- cdrom
|       |   `-- super_grub_disk_0.9770.iso -  Multilingual Cdrom Super Grub Disk
|       |-- floppy
|       |   |-- super_grub_disk_castellano_floppy_0.9770.img -- Spanish Super Grub Disk Floppy 
|       |   |-- super_grub_disk_catala_floppy_0.9770.img --  (and so on)
|       |   |-- super_grub_disk_deutsch_floppy_0.9770.img
|       |   |-- super_grub_disk_english_floppy_0.9770.img 
|       |   |-- super_grub_disk_euskera_floppy_0.9770.img
|       |   |-- super_grub_disk_francais_floppy_0.9770.img
|       |   |-- super_grub_disk_galego_floppy_0.9770.img
|       |   |-- super_grub_disk_italiano_floppy_0.9770.img
|       |   |-- super_grub_disk_maygaar_floppy_0.9770.img
|       |   `-- super_grub_disk_slovensky_floppy_0.9770.img
|       `-- usb
|           |-- super_grub_disk_castellano_usb_0.9770.tar.gz -- Spanish Super Grub Disk Usb tar.gz 
|           |-- super_grub_disk_catala_usb_0.9770.tar.gz --  (and so on)
|           |-- super_grub_disk_deutsch_usb_0.9770.tar.gz
|           |-- super_grub_disk_english_usb_0.9770.tar.gz
|           |-- super_grub_disk_euskera_usb_0.9770.tar.gz
|           |-- super_grub_disk_francais_usb_0.9770.tar.gz
|           |-- super_grub_disk_galego_usb_0.9770.tar.gz
|           |-- super_grub_disk_italiano_usb_0.9770.tar.gz
|           |-- super_grub_disk_maygaar_usb_0.9770.tar.gz
|            `-- super_grub_disk_slovensky_usb_0.9770.tar.gz
`-- source_code
    `-- sgd
        `-- public_super_grub_disk_source_code_0.9770.tar.bz2 -- Super Grub Disk Source Code in a tar.bz2

Warning: If you want floppy creation to be succesfull you will need sudo privilegies for the build user.

make_sgd.sh

Option 1: cdromiso

You need to run:

./make_sgd.sh cdromiso /path/to/sgd.iso

where /path/to/sgd.iso is the file where you want to build the resultant cdrom.

Result: Builds a Super Grub Disk cdrom in the specificated iso file.

Warning: The languages in the cdrom will depend on the sdg_module file being present on the different cdrom folders. For more information check language scripts.

Option 2: multilingualiso

You need to run:

./make_sgd.sh multilingualiso /path/to/sgd.iso

where /path/to/sgd.iso is the file where you want to build the resultant cdrom.

Result: Builds a Super Grub Disk cdrom in the specificated iso file.

Warning: These script will add the sdg_module file in all the language folders. For more information check language scripts.

Option 3: floppies

You need to run:

./make_sgd.sh floppies

Result: Builds monolingual floppy images in the release folder.

Warning: These script will add the sdg_module file in all the language folders and then remove it. Usually after running this command the last language in alphabetic order becomes enabled while the other ones become disabled. For more information check language scripts.

Warning: You will need root privilegies to build the floppies.

Warning: You will need to have the appropiated tools for building Grub itself (C compiler and so on).

Castillonroy Series How menues do work

I am going to explain how the buid process manages menues.

Each folder contains other folders or might not contain any other folder and be a terminal folder as it has been explained at: Castillonroy Design.

In order to track menues titles we use a bash string array called:

${SDG_TITLE[]}

In order to know which it is the current menu we use the bash integer variable:

$LEVEL

. In order words we can get current title for current menu with:

${SDG_TITLE[LEVEL]}.

So, that means that in any menu level (except the root one) what we get is:

  • Back option: ${SDG_TITLE[ LEVEL - 1 ]}
  • Current option: ${SDG_TITLE[LEVEL]}

Other variables like CURRENT_FOLDER or SDG_MENU_LST work in the same way.

The problem about this method is that the variables values need to be re-computed each time you want to build the program. You cannot just edit one menu and forget about its parent menu, as you would have done with a normal C program and makefile files.

This has to be solved in Baells series.