Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize names and descriptions of NOOBS bundles #393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,36 @@ The config file can also be specified on the command line as an argument the `bu

This is parsed after `config` so can be used to override values set there.

### Customizing the OS name and description displayed in NOOBS

By default, pi-gen builds NOOBS bundles during Stages 2, 4, and 5. You can customize the OS name and description displayed by the NOOBS interface. Names and descriptions for those three stages can be dynamically generated depending on the variables set in `config`:

* `NOOBS_NAME` (Default: Raspbian)

The base name of the OS. The actual OS names of the bundles generated in Stages 2, 4, and 5 are based on this:
Stage 2: `$NOOBS_NAME Lite`
Stage 4: `$NOOBS_NAME`
Stage 5: `$NOOBS_NAME Full`

* `PORT_OF` (Default: Debian)

Specifies the OS from which your OS is ported. This is used in the dynamically generated default OS descriptions.

* `NOOBS_DESCRIPTION_ALL` (Default: unset)

Sets the default OS descriptions of all three stages to this. When left unset, the descriptions are generated as follows:
Stage 2: `A port of $PORT_OF with no desktop environment`
Stage 4: `A port of $PORT_OF with the Raspberry Pi Desktop`
Stage 5: `A port of $PORT_OF with desktop and recommended applications`

* `NOOBS_DESCRIPTION_2`, `NOOBS_DESCRIPTION_4`, and `NOOBS_DESCRIPTION_5` (Default: unset)

In addition, any of the stages' descriptions can be manually overriden and set by using these variables.

Basically, when none of the `NOOBS_DESCRIPTION_*` variables are set, the descriptions will default to the various *"A port of..."* strings. When `NOOBS_DESCRIPTION_ALL` is set, it will override all the *"A port of..."* strings. Finally, any of the `NOOBS_DESCRIPTION_#` variables will take precedence as the description for that stage if set.

See build.sh and `stage*/EXPORT_NOOBS` for more details.

## How the build process works

The following process is followed to build images:
Expand Down
11 changes: 9 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,18 @@ export PREV_STAGE_DIR
export ROOTFS_DIR
export PREV_ROOTFS_DIR
export IMG_SUFFIX
export NOOBS_NAME
export NOOBS_DESCRIPTION
export EXPORT_DIR
export EXPORT_ROOTFS_DIR

export NOOBS_NAME="${NOOBS_NAME:-Raspbian}"
export NOOBS_BASENAME="${NOOBS_NAME}"
export PORT_OF="${PORT_OF:-Debian}"
export NOOBS_DESCRIPTION
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if export NOOBS_DESCRIPTION is still needed

export NOOBS_DESCRIPTION_ALL
export NOOBS_DESCRIPTION_2
export NOOBS_DESCRIPTION_4
export NOOBS_DESCRIPTION_5

export QUILT_PATCHES
export QUILT_NO_DIFF_INDEX=1
export QUILT_NO_DIFF_TIMESTAMPS=1
Expand Down
7 changes: 5 additions & 2 deletions stage2/EXPORT_NOOBS
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
NOOBS_NAME="Raspbian Lite"
NOOBS_DESCRIPTION="A port of Debian with no desktop environment"
NAME_SUFFIX=" Lite"
NOOBS_NAME="${NOOBS_BASENAME}${NAME_SUFFIX}"

NOOBS_DESCRIPTION="${NOOBS_DESCRIPTION_ALL:-A port of $PORT_OF with no desktop environment}"
NOOBS_DESCRIPTION="${NOOBS_DESCRIPTION_2:-$NOOBS_DESCRIPTION}"
7 changes: 5 additions & 2 deletions stage4/EXPORT_NOOBS
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
NOOBS_NAME="Raspbian"
NOOBS_DESCRIPTION="A port of Debian with the Raspberry Pi Desktop"
NAME_SUFFIX=""
NOOBS_NAME="${NOOBS_BASENAME}${NAME_SUFFIX}"

NOOBS_DESCRIPTION="${NOOBS_DESCRIPTION_ALL:-A port of $PORT_OF with the Raspberry Pi Desktop}"
NOOBS_DESCRIPTION="${NOOBS_DESCRIPTION_4:-$NOOBS_DESCRIPTION}"
7 changes: 5 additions & 2 deletions stage5/EXPORT_NOOBS
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
NOOBS_NAME="Raspbian Full"
NOOBS_DESCRIPTION="A port of Debian with desktop and recommended applications"
NAME_SUFFIX=" Full"
NOOBS_NAME="${NOOBS_BASENAME}${NAME_SUFFIX}"

NOOBS_DESCRIPTION="${NOOBS_DESCRIPTION_ALL:-A port of $PORT_OF with desktop and recommended applications}"
NOOBS_DESCRIPTION="${NOOBS_DESCRIPTION_5:-$NOOBS_DESCRIPTION}"