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

Armbian desktop #2776

Closed
wants to merge 13 commits into from
Closed

Conversation

Miouyouyou
Copy link
Member

@Miouyouyou Miouyouyou commented Apr 16, 2021

Description

  • Adding the creation of the BSP Desktop packages (armbian-bsp-desktop)
  • Renaming the BSP package to armbian-bsp

This is still a WIP. The files need to be actually moved to the appropriate folders

  • ${SRC}/packages
  • ${SRC}/config/optional/_any_board/_packages
  • ${SRC}/config/optional/architectures/${ARCH}/_packages
  • ${SRC}/config/optional/families/${LINUXFAMILY}/_packages
  • ${SRC}/config/optional/boards/${BOARD}/_packages

Only the X11/xorg.conf.d files were tested at the moment.

Still, I'm extremely late and I barely have time to finish this, so I'll try to add appropriate documentation by the end of the month, so that people understand "what's going on" with these changes.

Jira reference number AR-713

How Has This Been Tested?

Brfiefly on NanoPC T4 systems. Testing still need to be intensively done on other platforms to test the reliability of the system.
I mainly checked that the files are actually copied, and the package actually installed on the system.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
    No. Some parts clearly need more documentation.
  • I have made corresponding changes to the documentation
    Not at the moment.
  • My changes generate no new warnings
  • [-] Any dependent changes have been merged and published in downstream modules
    Unapplicable here.

By adding uuid-runtime to the list of packages to install.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
That way we can use ONE function that actually works for
cleaning lists.
This list cleanup function lets people format their packages
lists like they want (spaces, tabs, carriage returns), making
them easier to maintain.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
Now, the code should start to be "readable" in configuration.sh,
while providing the abilities to setup packages files with tabs,
spaces, carriages returns and anything that can be recognized as
a "space" character.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
So now we have :
* debootstrap
* debootstrap/custom/boards/${BOARD}
* debootstrap/config_${CONFIG_SELECTED}
* debootstrap/config_${CONFIG_SELECTED}/custom/boards/${BOARD}

* main
* main/custom/boards/${BOARD}
* main/config_${SELECTED_CONFIGURATION}
* main/config_${SELECTED_CONFIGURATION}/custom/boards/${BOARD}

Which is coherent with how board specific subdirs work with
Desktop environments and appgroups.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
The aggregation of Debootstrap packages list should not glue packages
names together now.

Also the PACKAGE_LIST_RM content will be added to the packages.remove
files content, instead of being overwritten by them.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
This is still quite untested, since each test take roughly an hour
to execute. I'm currently retesting the addition of APT sources,
since the functions used have been modified.
Still, so far, it seems to works.

Anyway, the system has been modified to avoid, at much as possible,
the duplication of build related files, and put everything related
to specific boards inside a directory located at config/optional,
instead of putting this as a custom/boards subdirectory inside
desktop environments and appgroups.

So now, the base directories used to source build files are :

	${SRC}/config
	${SRC}/config/optional/_any_board/_configs
	${SRC}/config/optional/architectures/${ARCH}/_config
	${SRC}/config/optional/families/${LINUXFAMILY}/_config
	${SRC}/config/optional/boards/${BOARD}/_config

New subfolders have been added, to reduce the duplication :

* desktop/_all_distributions, cli/_all_distributions
  Sourced for all distributions, which should make it easier to
  put build files that are directly linked to any distribution
  (wallpapers packages, for example)
* desktop/${RELEASE}/environments/_all_environments,
  desktop/_all_distributions/environments/_all_environments
  When building for desktop, this is sourced for any desktop
  environment used.

With these additions, if you're building a desktop image, with
XFCE "base" as your default desktop environment, the system
will look for 'packages' files in these different paths :

config/desktop/_all_distributions/environments/_all_environments/packages
config/desktop/_all_distributions/environments/xfce/packages
config/desktop/_all_distributions/environments/xfce/config_base/packages
config/desktop/focal/environments/_all_environments/packages
config/desktop/focal/environments/xfce/packages
config/desktop/focal/environments/xfce/config_base/packages
config/optional/_any_board/_configs/desktop/_all_distributions/environments/_all_environments/packages
config/optional/_any_board/_configs/desktop/_all_distributions/environments/xfce/packages
config/optional/_any_board/_configs/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/_any_board/_configs/desktop/focal/environments/_all_environments/packages
config/optional/_any_board/_configs/desktop/focal/environments/xfce/packages
config/optional/_any_board/_configs/desktop/focal/environments/xfce/config_base/packages
config/optional/architectures/arm64/_config/desktop/_all_distributions/environments/_all_environments/packages
config/optional/architectures/arm64/_config/desktop/_all_distributions/environments/xfce/packages
config/optional/architectures/arm64/_config/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/architectures/arm64/_config/desktop/focal/environments/_all_environments/packages
config/optional/architectures/arm64/_config/desktop/focal/environments/xfce/packages
config/optional/architectures/arm64/_config/desktop/focal/environments/xfce/config_base/packages
config/optional/families/rockchip64/_config/desktop/_all_distributions/environments/_all_environments/packages
config/optional/families/rockchip64/_config/desktop/_all_distributions/environments/xfce/packages
config/optional/families/rockchip64/_config/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/families/rockchip64/_config/desktop/focal/environments/_all_environments/packages
config/optional/families/rockchip64/_config/desktop/focal/environments/xfce/packages
config/optional/families/rockchip64/_config/desktop/focal/environments/xfce/config_base/packages
config/optional/boards/nanopct4/_config/desktop/_all_distributions/environments/_all_environments/packages
config/optional/boards/nanopct4/_config/desktop/_all_distributions/environments/xfce/packages
config/optional/boards/nanopct4/_config/desktop/_all_distributions/environments/xfce/config_base/packages
config/optional/boards/nanopct4/_config/desktop/focal/environments/_all_environments/packages
config/optional/boards/nanopct4/_config/desktop/focal/environments/xfce/packages
config/optional/boards/nanopct4/_config/desktop/focal/environments/xfce/config_base/packages

That said, currently the configuration files that were put inside
custom/boards subdirectories are still not transferred to the new
directories.
This will be done in the next commit.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
The paths... are getting longer actually, which isn't a good thing.
But I wanted to keep the same directory structure "config/desktop"
and "config/cli" structure inside the arch, families and boards
specific directories.

Anyway, the scripts are now factorized in single specific locations,
which reduce the amount of copy-paste and errors appearing here and
there.

That said, this remains to be actually tested, since I don't have
a Pinebook Pro.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
I don't have a Pinebook anyway, so yeah.

Still, this works and this should allow maintainers to
put all the files related to a specific board builds,
in various specific folders, located in config/optional .

Note that you can actually put any file in the various
config/optional/{architectures,families,boards} subdirectories.
The subdirectory _config is named like this to avoid any
name conflict with other directories you might add.
So, for example, inside config/optional/boards/nanopct4,
you can add a subdirectory named 'desktop_skels' and
copy you various desktop default configurations from this
subdirectory.
I still leave the layout of these subdirectories up to
the various maintainers. The only subdirectory that is
actually sampled by the build scripts is "_config".

Additional package for appgroups, that are dependent of the
selected desktop environment, are now sampled from :

* desktop/_all_distributions/environments/${DESKTOP_ENVIRONMENT}/appgroups
* desktop/${RELEASE}/environments/${DESKTOP_ENVIRONMENT}/appgroups

This makes it easier to understand what packages will be
installed when selecting a desktop environment, instead of
having to check each individual appgroup subdirectory.
So everything related to a specific desktop environment stays
in its folder.

This change leads to 'custom' subdirectories being entirely useless,
which means that you should remove them now.

Anyway, I'm sure there are still parts I haven't checked,
so feel free to play with this and give it a try.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
… armbian_desktop

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
The whole idea is to split the current Armbian desktop packages,
in order to avoid having Board Specific data into the common
Armbian desktop package. This avoids having to update the package,
everytime a board needs a new desktop specific configuration file,
or whatever.
And it's cleaner anyway, desktop package should not contain
configuration files for niche boards.

Currently, this sample files from debian/armbian-bsp-desktop/
folders inside config/desktop/${RELEASE}/{appgroups,environments}/*/
.

The next step will be to move every board specific script
instruction, from the armbian-desktop preparation scripts,
to the armbian-bsp-desktop-${BOARD} preparation script.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
The whole idea will be to avoid sampling armbian-desktop
preparation scripts from the config/optional folders, as much
as possible, since the armbian-desktop package isn't supposed
to contain any board specific data anyway.

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
The whole idea is to put all the "desktop" related board
specific files in the following directories :

 * ${SRC}/packages
 * ${SRC}/config/optional/_any_board/_packages
 * ${SRC}/config/optional/architectures/${ARCH}/_packages
 * ${SRC}/config/optional/families/${LINUXFAMILY}/_packages
 * ${SRC}/config/optional/boards/${BOARD}/_packages

The directories content are then copied, in order, inside the
armbian-bsp package content, specific files overwriting more
generic files when applicable.

This should make the management of boards specific files easier.

The packages are still customizable by placing :
* debian/armbian-bsp-desktop/prepare.sh
* debian/armbian-bsp-desktop/postinst
files inside environments and appgroups configurations, just in
case you need that extra level of customization.
I hope not. The more you go "fine-grained" customization, the
more difficult it is to manage the whole thing actually.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
@Miouyouyou Miouyouyou self-assigned this Apr 16, 2021
@igorpecovnik igorpecovnik changed the base branch from desktop-march to desktop-april April 16, 2021 18:48
@igorpecovnik igorpecovnik changed the base branch from desktop-april to desktop-march April 16, 2021 18:49
@igorpecovnik
Copy link
Member

Still, I'm extremely late and I barely have time to finish this,

Thank you! Take your time to make it right.

This is still a WIP. The files need to be actually moved to the appropriate folders

Perhaps we should break this into two parts so we can solve at least one problem? First part - introducing cli bsp package naming seems like a reasonable small change which we can properly test, prepare upgrade path and merge into upcoming release @Heisath ? The rest is IMO too much complicated task for those busy times.

I know its getting complicated and it's hard to follow. Already for me. How far do you understand those changes @Heisath @tparys @5kft @150balbes @lanefu @RichNeese @paolosabatino ? (it's more like a short survey, no need to dive in to answer, "little" or "nothing" is legit answer ;)

@lanefu
Copy link
Member

lanefu commented Apr 17, 2021

I like the idea of splitting out the new package naming convention and getting that merged.
ill say i have a light to medium understanding of the other code.

My suggestion is that the remaining work is documented into tasks so that development can be shared and the burden does not remain soley on myy to finish.

@Heisath
Copy link
Member

Heisath commented Apr 17, 2021

little. As the boards I'm interested in are only cli anyways and I dont really care for desktop on SBC tbh.

Would also support merging only a part for the next release. Code freeze was planned for this sunday - afterwards only fixes. We can obv. move this a bit, but should have enough of a window before release to actually test & bugfix.

igorpecovnik added a commit that referenced this pull request Apr 17, 2021
@tparys
Copy link
Contributor

tparys commented Apr 17, 2021

Also little. I've not looked much into Armbian specific desktop bits, and anything board specific that would need to be set.

@paolosabatino
Copy link
Contributor

I took a brief look into the code, I'm quite used to bash scripting, but never really dug into Armbian scripts.
Package creation and management is yet misterious for me.
Need to recheck the commits to understand a bit better the whole.

@lanefu
Copy link
Member

lanefu commented Apr 18, 2021

Should we have a desktop branch again and continue development on this there?

@igorpecovnik
Copy link
Member

Should we have a desktop branch again and continue development on this there?

Probably best, yes. I would say we move on this in a few weeks since merge window for 21.05 is closing, its not tested and clearly early wip. Renaming part can be merged, which is why I prepared a separate MR.

igorpecovnik added a commit that referenced this pull request Apr 18, 2021
* Renaming the BSP package to armbian-bsp

Extracted from #2776

* Update naming

* Create meta package for upgrade and remove deprecated mpv related config management

* Probably we want to keep our internal release version in filename
@paolosabatino
Copy link
Contributor

Just made a little test - nothing exciting or complex, just followed the existing directory structure of NanoPi.
It worked: the added configuration file (actually a .conf for X.org) went into the armbian-bsp-desktop package for the right release version.

I miss the possibility to read some debug output to understand what files are taken and from where they come.

paolosabatino@d0f928c

@AndreiCherniaev
Copy link
Collaborator

AndreiCherniaev commented Jul 2, 2021

I do

git clone --depth 1 https://github.com/armbian/build  
cd build 

I wants configure packages: I want only
bc debconf-utils minicom
and not all packages from armbian/build/config/cli/hirsute
I want build cli version of armbian for Orange Pi 4. So I create file:
armbian/build/config/optional/boards/orangepi4/_config/cli/_all_distributions/environments/_all_environments/armbian/create_desktop_package.sh which contains:
sudo apt-get install bc debconf-utils minicom
Am I right? Can I build armbian usual way?
./compile.sh BOARD=orangepi4 BRANCH=current RELEASE=hirsute BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes COMPRESS_OUTPUTIMAGE=sha,gpg,img CREATE_PATCHES=yes BSPFREEZE=yes REPOSITORY_INSTALL="" EXTRAWIFI=no

@igorpecovnik
Copy link
Member

Am I right?

Nope. (best effort) support is on forums.

@150balbes
Copy link
Contributor

I do

git clone --depth 1 https://github.com/armbian/build  
cd build 

I wants configure packages: I want only
bc debconf-utils minicom
and not all packages from armbian/build/config/cli/hirsute
I want build cli version of armbian for Orange Pi 4. So I create file:
armbian/build/config/optional/boards/orangepi4/_config/cli/_all_distributions/environments/_all_environments/armbian/create_desktop_package.sh which contains:
sudo apt-get install bc debconf-utils minicom
Am I right? Can I build armbian usual way?
./compile.sh BOARD=orangepi4 BRANCH=current RELEASE=hirsute BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes COMPRESS_OUTPUTIMAGE=sha,gpg,img CREATE_PATCHES=yes BSPFREEZE=yes REPOSITORY_INSTALL="" EXTRAWIFI=no

You are using the wrong approach. The script that you created is needed for commands that are additionally executed for a specific device model. For example, to add specific settings only for this model, to add binary firmware and other things (or vice versa, to delete non-compatible components\files). The composition of the packages that are installed is described elsewhere. See the description of how to manage the composition of packages on the example of the desktop version. By analogy, you can do the same with adding packages for the CLI category (in the directory of their settings). Tip, take a ready-made minimal or server image, look at the composition of packages in the system, and make a list of packages that are missing. And you add only them.

https://github.com/armbian/build/blob/master/config/cli/focal/main/packages

https://github.com/armbian/build/blob/master/config/desktop/README.md

igorpecovnik added a commit that referenced this pull request Jul 5, 2021
Extracting from #2776 which can be closed after.
igorpecovnik added a commit that referenced this pull request Jul 5, 2021
* Add support for desktop board support package

Extracting from #2776 which can be closed after.
* Desktop BSP creation is working, but need broader testing and some quick how-to
* Create empty files as examples where we can put things.
* Fixing Pinebook desktop bsp creation
* We need to have information about ARCH in the desktop bsp package. This ain't universal.
@AndreiCherniaev
Copy link
Collaborator

I do

git clone --depth 1 https://github.com/armbian/build  
cd build 

I wants configure packages: I want only
bc debconf-utils minicom
and not all packages from armbian/build/config/cli/hirsute
I want build cli version of armbian for Orange Pi 4. So I create file:
armbian/build/config/optional/boards/orangepi4/_config/cli/_all_distributions/environments/_all_environments/armbian/create_desktop_package.sh which contains:
sudo apt-get install bc debconf-utils minicom
Am I right? Can I build armbian usual way?
./compile.sh BOARD=orangepi4 BRANCH=current RELEASE=hirsute BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes COMPRESS_OUTPUTIMAGE=sha,gpg,img CREATE_PATCHES=yes BSPFREEZE=yes REPOSITORY_INSTALL="" EXTRAWIFI=no

You are using the wrong approach. The script that you created is needed for commands that are additionally executed for a specific device model. For example, to add specific settings only for this model, to add binary firmware and other things (or vice versa, to delete non-compatible components\files). The composition of the packages that are installed is described elsewhere. See the description of how to manage the composition of packages on the example of the desktop version. By analogy, you can do the same with adding packages for the CLI category (in the directory of their settings). Tip, take a ready-made minimal or server image, look at the composition of packages in the system, and make a list of packages that are missing. And you add only them.

https://github.com/armbian/build/blob/master/config/cli/focal/main/packages

https://github.com/armbian/build/blob/master/config/desktop/README.md

So I can't exclude any default package from build/config/cli/hirsute/main/packages ?

P.S. Wants to do it without crutch

@igorpecovnik
Copy link
Member

Closed with #2972

useful64 pushed a commit to useful64/build that referenced this pull request Feb 4, 2022
* Renaming the BSP package to armbian-bsp

Extracted from armbian#2776

* Update naming

* Create meta package for upgrade and remove deprecated mpv related config management

* Probably we want to keep our internal release version in filename
useful64 pushed a commit to useful64/build that referenced this pull request Feb 4, 2022
* Add support for desktop board support package

Extracting from armbian#2776 which can be closed after.
* Desktop BSP creation is working, but need broader testing and some quick how-to
* Create empty files as examples where we can put things.
* Fixing Pinebook desktop bsp creation
* We need to have information about ARCH in the desktop bsp package. This ain't universal.
useful64 pushed a commit to useful64/build that referenced this pull request Feb 4, 2022
* Renaming the BSP package to armbian-bsp

Extracted from armbian#2776

* Update naming

* Create meta package for upgrade and remove deprecated mpv related config management

* Probably we want to keep our internal release version in filename
useful64 pushed a commit to useful64/build that referenced this pull request Feb 4, 2022
* Add support for desktop board support package

Extracting from armbian#2776 which can be closed after.
* Desktop BSP creation is working, but need broader testing and some quick how-to
* Create empty files as examples where we can put things.
* Fixing Pinebook desktop bsp creation
* We need to have information about ARCH in the desktop bsp package. This ain't universal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants