Bug 12666

Summary: Doesn't pick up a custom bash profile
Product: buildroot Reporter: Alex <alex.demyankov>
Component: OtherAssignee: unassigned
Status: RESOLVED INVALID    
Severity: critical CC: buildroot
Priority: P5    
Version: 2019.02.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

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.