Skip to content
Snippets Groups Projects
Commit be41824d authored by Daniel Schulte's avatar Daniel Schulte
Browse files

Passing rootfs reference to remaster_initrd to replace kernel modules in initrd

parent a335e812
No related branches found
No related tags found
No related merge requests found
......@@ -196,8 +196,8 @@ initrd_clean:
$(RM) "$(ARCH_DIR)$(STATE_DIR)/initrd_remastered"
initrd_remaster : $(ARCH_DIR)$(STATE_DIR)/initrd_remastered
$(call gentargets,$(STATE_DIR)/initrd_remastered) : $(call archdir,%)$(STATE_DIR)/initrd_extracted
$(CURDIR)/scripts/remaster_initrd.sh "$(CURDIR)" "$(call archdir,$*)$(INITRD)"
$(call gentargets,$(STATE_DIR)/initrd_remastered) : $(call archdir,%)$(STATE_DIR)/initrd_extracted $(call archdir,%)$(STATE_DIR)/rootfs_finalized
$(CURDIR)/scripts/remaster_initrd.sh "$(CURDIR)" "$(call archdir,$*)$(INITRD)" "$(call archdir,$*)$(ROOTFS)"
touch "$(call archdir,$*)$(STATE_DIR)/initrd_remastered"
initrd_pack : $(ARCH_DIR)$(INITRD_TARGET)
......
......@@ -20,6 +20,7 @@
SCRIPT_DIR="$1"
IRD="$2"
ROOTFS="$3"
if [ ! -d "$SCRIPT_DIR" ]; then
echo "Expected lipck base path as first argument!"
......@@ -31,6 +32,11 @@ if [ ! -d "$IRD" ]; then
exit 2
fi
if [ ! -d "$ROOTFS" ]; then
echo "Expected rootfs directory as third argument!"
exit 3
fi
CONTRIB_DIR="$SCRIPT_DIR/contrib/initrd"
if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then
......@@ -63,9 +69,17 @@ function install_liphook()
cp "$CONTRIB_DIR/initrd_hook/ORDER" "$IRD/scripts/casper-bottom/"
}
function replace_modules()
{
local version=$(basename $(readlink -f "/mnt/data/lipck-work/x86_64/rootfs/vmlinuz") | cut -d'-' -f2-)
rm -rf "$IRD/lib/modules/*"
cp -a "$ROOTFS/lib/modules/$version" "$IRD/lib/modules"
}
mkdir -p "$IRD/lip"
install_nmtelekinese
add_no_bootloader_icon
#add_no_bootloader_icon
install_liphook
replace_modules
patch_all "$SCRIPT_DIR/patches/initrd" "$IRD"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment