Hi Guys,
I just want to share a script to repack initramfs file with new files.
Background:
When we go custom (like creating kiosk), we need edit/add some file into the TC base.
Based on tinycorebook, many bootloader support more than one initramfs, but some is not.
I play with RPi to create appliances. Unfortunately, bootloader at piCore can't load 2 initramfs (CMIIW, I have tried many combination in config.txt).
Hence I create a script to ease the job.
Description:
Create a new initramfs file from original file overwritten with custom files.
Usage:
repack_initrmfs.sh [args]
args:
Ori.gz New.gz CustDir Do the job.
e Input.gz DestDir Extract initramfs file.
p Output.gz InDir Pack initramfs file.
g InDir Filter gzip all filtered files inside directory.
h (or no-args) This help.
We create a custom directory for files we need to edit/add into TC base.
Using the script, it will:
1. Extract original TC base.
2. Copy all file from custom directory into extracted one (overwrite existing).
3. Repack into a new initramfs file.
Comment/feedback is appreciated.
Especially to make bootloader support more than one initramfs.
BR,
adit