cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Observer
Observer
2,329 Views
Registered: ‎02-05-2018

How to Make Recipe to Modify syslog-startup.conf.busybox

Jump to solution

Hello, 

 

I'm still new to PetaLinux and could use some guidance.  I'm using PetaLinux 2017.1 and following the corresponding ug1144 Reference Guide.  I modified the process to use INITRAMFS, which is what I need.  However, this requires me to have to make a recipe... something I'm not good at.

 

What I need to do is modify how syslog operates.  This involves modifying /etc/syslog-startup.conf (which is really a link to /etc/syslog-startup.conf.busybox).

 

root@plnx_arm:/etc# ls -al /etc/sys*
lrwxrwxrwx    1 root     root            32 Apr  9 19:36 /etc/syslog-startup.conf -> /etc/syslog-startup.conf.busybox
-rw-r--r--    1 root     root           651 Jan 23 23:17 /etc/syslog-startup.conf.busybox
lrwxrwxrwx    1 root     root            24 Apr  9 19:36 /etc/syslog.conf -> /etc/syslog.conf.busybox
-rw-r--r--    1 root     root            69 Jan 23 23:17 /etc/syslog.conf.busybox

The default content of the file syslog-startup.conf.busybox is:

# This configuration file is used by the busybox syslog init script,
# /etc/init.d/syslog[.busybox] to set syslog configuration at start time.

DESTINATION=file                # log destinations (buffer file remote)
LOGFILE=/var/log/messages       # where to log (file)
REMOTE=loghost:514              # where to log (syslog remote)
REDUCE=no                       # reduce-size logging
DROPDUPLICATES=no               # whether to drop duplicate log entries
#ROTATESIZE=0                   # rotate log if grown beyond X [kByte]
#ROTATEGENS=3                   # keep X generations of rotated logs
BUFFERSIZE=64                   # size of circular buffer [kByte]
FOREGROUND=no                   # run in foreground (don't use!)
#LOGLEVEL=5                     # local log level (between 1 and 8)

I need to get it to be the following (changes to LOGFILE, ROTATESIZE, and ROTATEGENS):

# This configuration file is used by the busybox syslog init script,
# /etc/init.d/syslog[.busybox] to set syslog configuration at start time.
 
DESTINATION=file                # log destinations (buffer file remote)
LOGFILE=/new_path_here/logs/syslog/syslog-output.log                            # <-- set new path
REMOTE=loghost:514              # where to log (syslog remote)
REDUCE=no                       # reduce-size logging
DROPDUPLICATES=no               # whether to drop duplicate log entries
ROTATESIZE=100                                                                  # <-- Added this back in and set to 100 (kB), arbitrarily
ROTATEGENS=15                                                                   # <-- Added this back in and set to 15, arbitrarily
BUFFERSIZE=64                   # size of circular buffer [kByte]
FOREGROUND=no                   # run in foreground (don't use!)
#LOGLEVEL=5                     # local log level (between 1 and 8)

I'm assuming this involves making some recipe that takes a copy of the new file and installs it to the /etc folder in place of the existing file.  Any good posts/instructions on how best to do this?

 

Thanks for your help.

 

 

0 Kudos
Reply
1 Solution

Accepted Solutions
Moderator
Moderator
2,494 Views
Registered: ‎12-04-2016

Hi

 

I have attached busybox zip file Just copy the extracted busybox folder to your petalinux's project-spec/meta-user/recipes-core/ directory and modify the syslog-startup.conf file with your changes (project-spec/meta-user/recipes-core/busybox/files/syslog-startup.conf) and build the petalinux project using petalinux-build

 

Once you boot the kernel, you should see the changes in /etc/syslog-startup.conf

 

 

Best Regards

Shabbir

View solution in original post

2 Replies
Moderator
Moderator
2,495 Views
Registered: ‎12-04-2016

Hi

 

I have attached busybox zip file Just copy the extracted busybox folder to your petalinux's project-spec/meta-user/recipes-core/ directory and modify the syslog-startup.conf file with your changes (project-spec/meta-user/recipes-core/busybox/files/syslog-startup.conf) and build the petalinux project using petalinux-build

 

Once you boot the kernel, you should see the changes in /etc/syslog-startup.conf

 

 

Best Regards

Shabbir

View solution in original post

Observer
Observer
2,231 Views
Registered: ‎02-05-2018

Thanks for the help!  I will give this a try.

 

Question... where did you obtain the attached busy box folder to begin with?

0 Kudos
Reply