WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Enabling CONFIG_FEATURE_NTP_AUTH in BusyBox's NTP Daemon  (Read 627 times)

Offline emdi.hsn.2023

  • Newbie
  • *
  • Posts: 7
Enabling CONFIG_FEATURE_NTP_AUTH in BusyBox's NTP Daemon
« on: June 28, 2024, 12:55:37 PM »
Hello TinyCore Community,

I am currently working on enabling `CONFIG_FEATURE_NTP_AUTH` in BusyBox's NTP daemon to support NTP authentication. I've been able to compile and install BusyBox with the required configuration by modifying the `.config` file and rebuilding BusyBox. Here is the script I use to compile BusyBox:

Code: [Select]
#!/bin/bash

# Install necessary tools
tce-load -wi compiletc sstrip

# Define variables for paths
NEW_BUSYBOX_DIR="$(pwd)/new_pkg"
COREPURE64_FILE="$(pwd)/corepure64.gz"
TEMP_CORE_WORK_DIR="$(pwd)/tmp_work_dir"

# Download and patch BusyBox
wget --no-check-certificate <URLs to various BusyBox sources and patches>
tar -xvjf busybox-1.36.0.tar.bz2
cd busybox-1.36.0
# Applying patches
patch -Np1 -i ../<patch_files>

# Update config and build BusyBox
cp ../busybox-1.36.0_config_nosuid .config
sed -i 's/# CONFIG_FEATURE_NTP_AUTH is not set/CONFIG_FEATURE_NTP_AUTH=y/' .config
make oldconfig
make CC="gcc -flto -mtune=generic -Os -pipe" CXX="g++ -flto -mtune=generic -Os -pipe -fno-exceptions -fno-rtti"

# Install the newly built BusyBox
mkdir -p $NEW_BUSYBOX_DIR
sudo make CONFIG_PREFIX=$NEW_BUSYBOX_DIR install

# Prepare and update the core image
cd ..
mkdir -p $TEMP_CORE_WORK_DIR
cd $TEMP_CORE_WORK_DIR
sudo zcat $COREPURE64_FILE | sudo cpio -idmv
sudo mv ./bin/busybox ./bin/busybox_old
sudo cp $NEW_BUSYBOX_DIR/bin/busybox ./bin/busybox
sudo find . | sudo cpio -o -H newc | sudo gzip -9 > new_corepure64.gz

echo "BusyBox update and core image preparation completed successfully."

I am looking for advice on whether there are best practices or alternative methods for enabling NTP authentication in the BusyBox configuration for TinyCore Linux. Any suggestions on how to improve this process or insights into handling NTP authentication more effectively would be greatly appreciated.

Thank you in advance for your help and guidance!