2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # T2 SDE: target/share/livecd/build_initrd.sh
4 # Copyright (C) 2004 - 2021 The T2 SDE Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
15 [ "$boot_title" ] || boot_title
="T2 @Live"
17 .
$base/misc
/target
/initrd.
in
18 .
$base/misc
/target
/boot.
in
22 # Additional initrd overlay
25 mkdir
-p initramfs
/{bin
,sbin
}
27 sed '/PANICMARK/Q' $build_root/sbin
/initrdinit
> initramfs
/init
28 cat $base/target
/share
/install
/init
>> initramfs
/init
29 cp $base/target
/share
/livecd
/init2 initramfs
/
30 chmod +x initramfs
/{init
,init2
}
32 # For each available kernel:
34 arch_boot_cd_pre
$isofsdir
35 for x
in `egrep 'X .* KERNEL .*' $base/config/$config/packages |
38 for kernelver
in `sed -n "s,.*boot/kconfig.,,p" $build_root/var/adm/flists/$kernel`; do
39 initrd
="initrd-$kernelver"
40 kernelimg
=`ls $build_root/boot/vmlinu?-$kernelver`
41 kernelimg
=${kernelimg##*/}
43 cp $build_root/boot
/vmlinu?
-$kernelver $isofsdir/boot
/
44 cp $build_root/boot
/$initrd $isofsdir/boot
/
45 extend_initrd
$isofsdir/boot
/$initrd $build_toolchain/initramfs
47 arch_boot_cd_add
$isofsdir $kernelver "$boot_title" \
48 /boot
/$kernelimg /boot
/$initrd
52 arch_boot_cd_post
$isofsdir