agentleFS
D-RoboticsD-Robotics/dsh-plugin-rdk/skills/bsp-skills/bsp-rootfs-custom/SKILL.md

bsp-rootfs-custom

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

Make and customize the RDK Ubuntu root filesystem — samplefs/make_ubuntu_rootfs.sh (desktop/server), debootstrap/chroot tooling, the package-list variables (BASE/DESKTOP/SERVER_PACKAGE_LIST…), and hobot_customize_rootfs.sh for users/services. Use when the user wants to build a custom samplefs, add/remove preinstalled apt or python packages, or create users/autostart entries in the image. 触发词:根文件系统、rootfs、samplefs、debootstrap、定制系统、预装软件包、创建用户、自启动. Do not use for whole-image builds (bsp-image-build) or S-series (bsp-s-series).

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Do not use for the full image pipeline or S-series.

    line 25
  2. Distinctive:

    Never hand-edit files inside the generated rootfs to "fix" a build — change the source scripts instead, so images stay reproducible.

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ubuntu Rootfs Customization

Purpose

Build and customize the Ubuntu root filesystem that system images are assembled from. Two levels of customization exist: generating a fresh samplefs with make_ubuntu_rootfs.sh, and per-image tweaks via hobot_customize_rootfs.sh (users, services).

When to use

Use when:

  • The user wants a custom samplefs (desktop or server) with different preinstalled packages
  • Adding users or enabling/disabling autostart services in the image
  • Explaining what debootstrap/chroot do in this flow

Do not use for the full image pipeline or S-series.

Instructions

  1. Prerequisites: bsp-env-setup; for the full samplefs host dependency list (debootstrap, parted, qemu-user-static, …) quote the source README's「环境配置」package list instead of abbreviating it.
  2. Generate the Ubuntu root filesystem:
    cd samplefs
    chmod +x make_ubuntu_rootfs.sh
    sudo ./make_ubuntu_rootfs.sh          # desktop (default)
    sudo ./make_ubuntu_rootfs.sh server   # server edition
    Outputs (X5): desktop/jammy-rdk-arm64, desktop/samplefs_desktop_jammy-v3.0.0.tar.gz, …tar.gz.info (installed apt list). Outputs (X3 legacy): desktop/jammy-xj3-arm64, samplefs_desktop-v3.0.0.tar.gz, …info.
  3. Customize the package set via the documented variables in the make script:
    • PYTHON_PACKAGE_LIST — python packages to install
    • DEBOOTSTRAP_LIST — debootstrap-time debian packages
    • BASE_PACKAGE_LIST — minimal Ubuntu base packages
    • SERVER_PACKAGE_LIST — extras for the server edition
    • DESKTOP_PACKAGE_LIST — packages for the graphical desktop The official samplefs_desktop includes all of these; users edit the lists to add/remove.
  4. Per-image system customization runs automatically during pack_image.sh via hobot_customize_rootfs.sh — creating users and enabling/disabling autostart entries. For changes here, point the user to that script and explain the image build step re-runs it.
  5. Tooling background (brief): debootstrap builds a minimal Debian/Ubuntu system tree; chroot re-roots into it; parted handles image partitioning. Give exact commands only from the README.

Safety

  • Samplefs generation needs sudo and significant disk; confirm before running.
  • Package list edits change what every subsequent image contains — show the diff and get confirmation.
  • Never hand-edit files inside the generated rootfs to "fix" a build — change the source scripts instead, so images stay reproducible.

Sources: x5-rdk-gen README v3.5.0「Ubuntu 文件系统制作」; rdk-gen README v3.0.3「制作 Ubuntu 文件系统」。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.