-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Docs/nerves systems guide improvement #1032
base: main
Are you sure you want to change the base?
Docs/nerves systems guide improvement #1032
Conversation
to be included in your `nerves_defconfig`. | ||
|
||
```bash | ||
cp build/busybox-1.27.2/.config ../src/<full system name>/busybox_defconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using <full system name>
here is not ideal.
Likely scenario is that you would want to add new system to config.exs
run
mix ns.clone
# Then actually just populate o directory with something like
mix ns.build --configure
# where it would just create o directory with config without building it
Ideally that would provide us with shell script that could export NERVES_DEFCONFIG_DIR
then this could be.
cp build/busybox-1.27.2/.config ${NERVES_DEFCONFIG_DIR}/busybox_defconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also be good idea for build to accept --only
mix ns.build --only custom_rpi3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this, but the line:
cp build/busybox-1.27.2/.config ${NERVES_DEFCONFIG_DIR}/busybox_defconfig
should be
make busybox-update-config
This takes care of copying the Busybox config to the right place and will properly error out if the fragment config feature is being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I tried this with rpi3 system and
make busybox-update-config
results in
cp -f /home/damir/Projects/nerves/nerves_systems/o/rpi3/build/busybox-1.36.1/.config /home/damir/Projects/nerves/nerves_systems/src/nerves_system_br/board/nerves-common/busybox.config
Which now applies it to all other systems which is IMO not wanted behavior.
In case when fragments are set it does error
Unable to perform busybox-update-config when fragment files are set
make[1]: *** [package/busybox/busybox.mk:464: busybox-update-config] Error 1
make: *** [Makefile:23: _all] Error 2
How this guide states it in current version would be correct for using fragments.
I guess my question is what would be correct way to automate
cp build/busybox-1.27.2/.config ../src/<full system name>/busybox_defconfig
Maybe add new make option `make busybox-update-fragment-config that would basically call
cp build/busybox-1.27.2/.config ${NERVES_DEFCONFIG_DIR}/busybox_defconfig
and maybe set fragments at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you're right, if you have never modified the busybox.config
then it goes to the default one.
I'd do this:
cp build/busybox-1.27.2/.config ../src/<full system name>/busybox.config
Then run make menuconfig
to set BR2_PACKAGE_BUSYBOX_CONFIG
to ${NERVES_DEFCONFIG_DIR}/busybox.config
, and then make savedefconfig
.
Then when I wanted to update it in the future, make busybox-update-config
will work.
Side note: Busybox only knows how to save .config
files. Linux and Buildroot can save .config
and _defconfig
versions where the defconfig
version only has the nondefault settings.
git push | ||
``` | ||
|
||
Now you can go to your `nerves_systems/config/config.exs` and add it to your systems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should include another section of how to now add custom system in a project and use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
> #### Compatibility Note {: .info} | ||
> | ||
> This command is compatible with Debian 11 and 12, and Ubuntu 20.04, 22.04. Older distributions may require adjustments. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> #### Compatibility Note {: .info} | |
> | |
> This command is compatible with Debian 11 and 12, and Ubuntu 20.04, 22.04. Older distributions may require adjustments. |
I think the compatibility note is implied now that you added Arch and Fedora and can be deleted to make the text shorter.
|
||
git add mix.exs | ||
git commit -m "Change project info" | ||
git push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git push | |
git push origin main |
This is still WIP.
Started to take it into direction where it completely replaces "Customizing your nerves system guide"