Bug 12666 - Doesn't pick up a custom bash profile
Summary: Doesn't pick up a custom bash profile
Status: RESOLVED INVALID
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2019.02.2
Hardware: PC Linux
: P5 critical
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-19 01:26 UTC by Alex
Modified: 2020-03-19 17:18 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2020-03-19 01:26:08 UTC
Hi,
   buildroot does not take the user's profile.

I tried to change ./system/skeleton/etc/profile itself, I tried to add .sh files into ./system/skeleton/etc/profile.d/ but nothings seems help. The final image ends up with no user profile.

Thanks,
Alex
Comment 1 Thomas Petazzoni 2020-03-19 06:16:51 UTC
Changing system/skeleton/ is not recommended. Instead, you should create your own "root filesystem overlay", and use the option BR2_ROOTFS_OVERLAY to point to it.

Most likely you did your change to system/skeleton/ *after* a build was done, and you didn't do a clean rebuild from scratch. In this case, it is expected that you don't see the changes in your image: the skeleton package has already been built/installed, so it's not reinstalled.

Using a rootfs overlay is cleaner as you don't change the Buildroot default skeleton, but also because they are copied into the target filesystem at every "make" invocation.

See https://buildroot.org/downloads/manual/manual.html#rootfs-custom for more details, as well as https://bootlin.com/doc/training/buildroot/buildroot-slides.pdf starting from slide 79.
Comment 2 Alex 2020-03-19 17:18:15 UTC
Got it! Thanks, man.