Skip to content

Commit

Permalink
Update armbian-configng documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tearran committed Jan 5, 2024
1 parent 698e26c commit 66307f2
Show file tree
Hide file tree
Showing 19 changed files with 819 additions and 85 deletions.
2 changes: 2 additions & 0 deletions bin/armbian-configng
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ directory="$(cd "$bin/../" && pwd )"
file_name="$(basename "${BASH_SOURCE[0]}")"
filename="${file_name%.*}"
libpath=$(cd "$directory/lib/$filename/" && pwd)
[[ -f "/etc/armbian-release" ]] && source /etc/armbian-release
[[ -f "/etc/os-release" ]] && source /etc/os-release

#
# Check if the script is dev version.
Expand Down
100 changes: 16 additions & 84 deletions lib/armbian-configng/system/set_freeze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,90 +12,22 @@
# @default unfrozen
# @options [frozen] [unfrozen]
function testing::Kernel_hold(){
if apt-mark showhold | grep -q "^u-boot$"; then
echo "uboot_package=frozen" > "$etcpath"/"$filename".sh
else
echo "uboot_package=unfrozen" > "$etcpath"/"$filename".sh
# Read the /etc/armbian-release file

# Populate the packages array
packages=("linux-image-current-$LINUXFAMILY" "linux-u-boot-$BOARD-$BRANCH" "u-boot-tools")

for pkg in "${packages[@]}"; do
# Check if the package is currently held
if apt-mark showhold | grep -q "^$pkg$"; then
# If the package is held, unhold it
sudo apt-mark unhold "$pkg"
echo "Unheld $pkg"
else
# If the package is not held, hold it
sudo apt-mark hold "$pkg"
echo "Held $pkg"
fi
if apt-mark showhold | grep -q "^linux-image$"; then
echo "kernel_package=frozen" > "$etcpath"/"$filename".sh
else
echo "kernel_package=unfrozen" > "$etcpath"/"$filename".sh
fi

return 0 ;
}

freeze::uboot() {
# Bash

# Get the current kernel package
kernel_package=$(dpkg --list | grep linux-image | awk '{print $2}')
done

# Get the U-Boot package
uboot_package=$(dpkg --list | grep u-boot | awk '{print $2}')

# Check if the packages are installed
if [ -z "$kernel_package" ]; then
echo "Kernel package not found."
else
echo "Kernel package: $kernel_package"

fi

if [ -z "$uboot_package" ]; then
echo "U-Boot package not found."

else
echo "U-Boot package: $uboot_package"

fi

# Freeze the packages
if [ -n "$kernel_package" ]; then
sudo apt-mark hold $kernel_package
echo "kernel_package=frozen"
fi

if [ -n "$uboot_package" ]; then
sudo apt-mark hold $uboot_package
echo "uboot_package=frozen"
fi
}

unfreeze::uboot() {
echo "Unfreezing U-Boot and Kernel..."

# Get the current kernel package
kernel_package=$(dpkg --list | grep linux-image | awk '{print $2}')

# Get the U-Boot package
uboot_package=$(dpkg --list | grep u-boot | awk '{print $2}')

# Unfreeze the packages
if [ -n "$kernel_package" ]; then
sudo apt-mark unhold $kernel_package
echo "kernel_package=unfrozen"
fi

if [ -n "$uboot_package" ]; then
sudo apt-mark unhold $uboot_package
echo "uboot_package=unfrozen"
fi
}


handeling::Kernal-freeze() {
local command=$1
case $command in
freeze)
freeze::uboot
;;
unfreeze)
unfreeze::uboot
;;
*)
echo "Invalid command. Please use 'freeze' or 'unfreeze'."
;;
esac
}
33 changes: 33 additions & 0 deletions share/doc/armbian-configng/Desktoops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
You can install different desktop environments on a standard Armbian image. Here are the steps to do it:

1. **Setting up Display Manager**: First, you need a Display Manager. NODM is installed by default. [If you have problems with NODM, you can try LXDM](https://forum.armbian.com/topic/10526-using-different-desktop-environments-on-armbian/)¹.
```
sudo apt install lxdm
sudo apt remove nodm
sudo dpkg-reconfigure lxdm
```
2. **Install LXDE Desktop**: Next, install the desktop environment you want. It's easiest to install LXDM first to be able to configure the others well¹.
```
sudo apt install lxde
sudo reboot
```
3. **Fixing Login Issues**: If you're having trouble logging in to some Desktop Environments with LXDM, you can fix this by modifying the file `/usr/share/xsessions/xfce.desktop`¹.
```
sudo geany /usr/share/xsessions/xfce.desktop
```
Replace `Name=Xfce Session` with `Name=Xfce-Session` and save the file¹.
4. **Installing Different Desktop Environments**: You can install different desktop environments like Mate, KDE-Plasma, and Gnome¹. For example, to install Mate:
```
sudo apt install mate-desktop-environment mate-applets
```
5. **Removing a Desktop Environment**: If you want to remove a desktop environment, you can do so by using the `remove` command¹.
```
sudo apt remove mate-desktop-environment
```
Source:
- https://forum.armbian.com/topic/10526-using-different-desktop-environments-on-armbian/
- https://raspberrytips.com/armbian-on-raspberry-pi/.
- https://docs.armbian.com/User-Guide_Getting-Started/
33 changes: 33 additions & 0 deletions share/doc/armbian-configng/Desktops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
You can install different desktop environments on a standard Armbian image. Here are the steps to do it:

1. **Setting up Display Manager**: First, you need a Display Manager. NODM is installed by default. [If you have problems with NODM, you can try LXDM](https://forum.armbian.com/topic/10526-using-different-desktop-environments-on-armbian/)¹.
```
sudo apt install lxdm
sudo apt remove nodm
sudo dpkg-reconfigure lxdm
```
2. **Install LXDE Desktop**: Next, install the desktop environment you want. It's easiest to install LXDM first to be able to configure the others well¹.
```
sudo apt install lxde
sudo reboot
```
3. **Fixing Login Issues**: If you're having trouble logging in to some Desktop Environments with LXDM, you can fix this by modifying the file `/usr/share/xsessions/xfce.desktop`¹.
```
sudo geany /usr/share/xsessions/xfce.desktop
```
Replace `Name=Xfce Session` with `Name=Xfce-Session` and save the file¹.
4. **Installing Different Desktop Environments**: You can install different desktop environments like Mate, KDE-Plasma, and Gnome¹. For example, to install Mate:
```
sudo apt install mate-desktop-environment mate-applets
```
5. **Removing a Desktop Environment**: If you want to remove a desktop environment, you can do so by using the `remove` command¹.
```
sudo apt remove mate-desktop-environment
```
Source:
- https://forum.armbian.com/topic/10526-using-different-desktop-environments-on-armbian/
- https://raspberrytips.com/armbian-on-raspberry-pi/.
- https://docs.armbian.com/User-Guide_Getting-Started/
28 changes: 28 additions & 0 deletions share/doc/armbian-configng/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
![image](https://github.com/Tearran/configng/assets/2831630/43316906-ccc7-4b5d-8214-2514681377b4)

[![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Tearran/configng/main)](https://github.com/Tearran/configng/commits)
[![Join the Discord](https://img.shields.io/discord/854735915313659944.svg?color=7289da&label=Discord%20&logo=discord)](https://discord.com/invite/gNJ2fPZKvc)

Armbian utilities

## Codename Configng
Under development

## Overview
This document discusses establishing a set of binary tools while the refactoring of `armbian-config`
## Design
A modular design is used, with a focus on making it easy to add new software titles or functionality. A combination of grouped functions in `/lib` and binary tools in `/bin` is used. Suggested that the tools be classified as `armbian-tools`, `armbian-utilities`, or similar for later packaging.

## The current focus:
- library, Desktop Installs [[wiki]](https://github.com/Tearran/configng/wiki/library)
- wki, Naming Convention [[wiki]](https://github.com/Tearran/configng/wiki/Naming-Convention)

## Tools
- [[armbian-lib]](https://github.com/Tearran/configng/wiki/library) armbian-config library of grouped functions
- [[armbian-config]](https://github.com/Tearran/configng/wiki/config) tool is used for the CLI.
- [[armbian-tui]](https://github.com/Tearran/configng/wiki/tui) A TUI frontend for `config`.
- [[armbian-monitor]](https://github.com/Tearran/configng/wiki/monitor) System benchmarks and report tool.
- [[others]](#) coming soon

## Help messages
Help messages for each command are accessible from the CLI `config -h`
43 changes: 43 additions & 0 deletions share/doc/armbian-configng/Invest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Strategic Investment: Contributing Funds to Open Source Communities

## Rethinking Investment: Beyond Development Costs

In the world of open source, contributing funds to a project's community is often misperceived as a development cost. However, savvy businesses recognize that it's not an expense for development but a strategic marketing investment with broader implications in the realm of developments.

### Shifting Perspectives: It's More Than Development

1. **Community Recognition:**
- Contributing funds to an open-source project's community establishes your business as a recognized and invested participant in the project's ecosystem.

2. **Brand Visibility:**
- Investment in community funds results in increased brand visibility. As community members acknowledge your contribution, your brand gains exposure among a tech-savvy audience.

3. **Trust and Credibility:**
- Financial support demonstrates trust and commitment, building credibility within the open-source community and fostering a positive perception of your brand.

## Marketing Impact: A Strategic Move

Contributing funds to an open-source project's community isn't just an altruistic gesture; it's a strategic move with marketing benefits.

### Building a Positive Brand Image

#### Example: [GitHub Sponsors](https://github.com/sponsors)
- GitHub Sponsors allows businesses to financially support open-source developers. This not only aids development but also builds a positive brand image by showcasing commitment to the developer community.

#### Best Practice: Transparent Communication
- Communicate openly about your financial contributions. Transparency reinforces your commitment to the community and strengthens the positive perception of your brand.

### Leveraging Community Funds for Strategic Marketing

1. **Sponsorship Opportunities:**
- Explore sponsorship opportunities within open-source events or community initiatives. This not only supports the community but also positions your brand prominently in front of a relevant audience.

2. **Branded Content and Materials:**
- Allocate a portion of your funds to create branded content or materials that resonate with the open-source community, ensuring your brand remains top-of-mind among community members.

3. **Strategic Partnerships:**
- Use community funds to initiate strategic partnerships. Collaborating with key players in the open-source ecosystem can amplify your brand reach and market influence.

## Conclusion: Beyond Development, Toward Strategic Influence

In summary, contributing funds to an open-source community is a marketing cost; it's a strategic investment with significant marketing implications. Businesses should recognize that it's not just about development expenses but about supporting the resources required to keep the community running. Additionally, for transparent developmental control, businesses can offer bounties to motivate coders and gain priority in the development process.
93 changes: 93 additions & 0 deletions share/doc/armbian-configng/Naming-Convention.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Naming Convention

## deb packages
```bash
armbian-release-category-name - A simple description with tag such as (metapackage) (dev) (contrib)
A very long and detailed description in this line a really long description can go here really really long.
```

## User Levels

- Basic: For basic users, who are non-admins and only have access to userland
- The conventions should be simple and straightforward.
- These users may not have a deep understanding of the system, so
- Defaults options should established and be easy to understand and use.
- Intermediate: For intermediate users, who are system admins or sudo users,
- The conventions can be more complex.
- These users have a deeper understanding or willingness to learn the system and may need more advanced options.
- Using the limitations of whiptail vs dialog can help define the conventions for this level and remaining compatible with dialog
- Advanced: For advanced users, who have access to all options and configurations,
- These users are expected to have a deep understanding of the system and its tools,
- Basic knowledge of help messages and documentation should be assumed for these users.
- Help conventions will offer more complex options and configurations.

## Categories
- System:
- configuring system-wide settings such as hostname, password, and time zone

- Network:
- Managing network connections and settings

- Display:
- Configuring display settings such as resolution and overscan

- Interfaces:
- Enabling or disabling hardware interfaces such as camera, SSH, and SPI

- Performance:
- Configuring performance-related settings such as overclocking and memory split

- Localization: for
- Configuring language, keyboard, and regional settings


## File Naming
### category_does_menuname.
* advance_install_desktops.sh
* advance_install_system.sh
* systems_config_boardled.sh
* network_config_wirerless.sh
* utiilty_config_storage.sh
* utility_test_benchmark.sh


## Function Naming

### Admin sudo user
**System administration, configuration, and security**
- `see_`: used for retrieving or viewing values `apt-cashe grep something` `ls -h` `cat file.txt` `lsblk`
- `set_`: used for setting or updating values `echo "somevalue" > somefile.txt`
- `get_`: used for getting downloads or updates `apt-get install something`
- `rem_`: used for removing or uninstalling something `apt-get purge something`
### Non Admin non sudo
**user space, end-user Customization**
- `run_`: used for running apps in the user space `/usr/bin/chromium --kiosk https://forum.armbian.com/ https://github.com/armbian/configng &`
- `mod_`: used for modifying or getting something in user space `git clone` `wget`

## Help message format
### Existing Example
- `ls --help` Shows advanced flag options
- `p7zip -h` Shows simple flag options
- `git --help` Shows advanced non flag options

```bash

Usage: armbina-monitor [options] [ path | device ]

Options:
-c [path] Performs disk health/performance tests
-d [device] Monitors writes to $device
-D Tries to upload debug disk info to improve armbianmonitor
-m Provides simple CLI monitoring - scrolling output
-M Provides simple CLI monitoring - fixed-line output
-n Provides simple CLI network monitoring - scrolling output
-N Provides simple CLI network monitoring - fixed-line output
-p Tries to install cpuminer for performance measurements
-r Tries to install RPi-Monitor
-u Tries to upload armbian-hardware-monitor.log for support purposes
-v Tries to verify installed package integrity
-z Runs a quick 7-zip benchmark to estimate CPU performance
```



15 changes: 15 additions & 0 deletions share/doc/armbian-configng/Reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Bash

## Lectures
- [[link]](https://missing.csail.mit.edu/2020/shell-tools/)
- [[youtube]](https://www.youtube.com/watch?time_continue=226&v=kgII-YWo3Zw&embeds_referring_euri=https%3A%2F%2Fmissing.csail.mit.edu%2F&source_ve_path=MjM4NTE&feature=emb_title)

## Commands
- [[bash]](https://devhints.io/bash)
- [[awk]](https://www.shortcutfoo.com/app/dojos/awk/cheatsheet)
- [[sed]](https://quickref.me/sed.html)

# TUI

## tput
Explore [[tput]](https://linuxcommand.org/lc3_adv_tput.php) As a TUI
18 changes: 18 additions & 0 deletions share/doc/armbian-configng/Sponsors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Contributing Funds to Open Source Communities

Rethinking Investment: Beyond Development Costs In the world of open source, contributing funds to a project's community is often misperceived as a development cost. However, savvy businesses recognize that it's not an expense for development but a strategic marketing investment with broader implications in the realm of developments.

Shifting Perspectives: It's More Than Development
Community Recognition: Contributing funds to an open-source project's community establishes your business as a recognized and invested participant in the project's ecosystem. Brand Visibility: Investment in community funds results in increased brand visibility. As community members acknowledge your contribution, your brand gains exposure among a tech-savvy audience. Trust and Credibility: Financial support demonstrates trust and commitment, building credibility within the open-source community and fostering a positive perception of your brand.

Marketing Impact: A Strategic Move Contributing funds to an open-source project's community isn't just an altruistic gesture; it's a strategic move with marketing benefits.

Building a Positive Brand Image

Example: GitHub Sponsors GitHub Sponsors allows businesses to financially support open-source developers. This not only aids development but also builds a positive brand image by showcasing commitment to the developer community.

Best Practice: Transparent Communication Communicate openly about your financial contributions. Transparency reinforces your commitment to the community and strengthens the positive perception of your brand.

Leveraging Community Funds for Strategic Marketing Sponsorship Opportunities: Explore sponsorship opportunities within open-source events or community initiatives. This not only supports the community but also positions your brand prominently in front of a relevant audience. Branded Content and Materials: Allocate a portion of your funds to create branded content or materials that resonate with the open-source community, ensuring your brand remains top-of-mind among community members. Strategic Partnerships: Use community funds to initiate strategic partnerships. Collaborating with key players in the open-source ecosystem can amplify your brand reach and market influence.

Conclusion: Beyond Development, Toward Strategic Influence In summary, contributing funds to an open-source community is a marketing cost; it's a strategic investment with significant marketing implications. Businesses should recognize that it's not just about development expenses but about supporting the resources required to keep the community running. Additionally, for transparent developmental control, businesses can offer bounties to motivate coders and gain priority in the development process.
2 changes: 1 addition & 1 deletion share/doc/armbian-configng/armbian-configng.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function group::string() {s
- [CSV](share/armbian-configng/data/armbian-configng.csv)
- [HTML](share/armbian-configng/armbian-configng-table.html)
- [github.io](//tearran/github.io/armbian-configng/index.html)
## Functions list as of 2024-01-03
## Functions list as of 2024-01-05
## locales


Expand Down
Loading

0 comments on commit 66307f2

Please sign in to comment.