1
0
This commit is contained in:
Jybz 2019-11-05 21:49:47 +00:00
parent d67cb83633
commit 846b540c42
2 changed files with 41 additions and 21 deletions

View File

@ -16,20 +16,39 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
export ARCH=arm
/usr/bin/chown :shadow /etc/shadow /etc/gshadow /etc/login.defs /etc/pam.d/chage-chfn-chsh /etc/pam.d/chpasswd-newusers /etc/pam.d/system-auth /etc/pam.d/user-group-mod /bin/passwd /bin/chage
/usr/bin/chown :systemd-journal -R /var/log/journal
#Install all packages you need
/usr/sbin/urpmi --auto --no-verify-rpm basesystem dracut chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make u-boot-tools rsync kernel-desktop-latest systemd-bootchart libcap-utils keyutils mindi-busybox plymouth-scripts lvm2 binutils #dmsetup
#/usr/sbin/urpmi --urpmi-root "$BUILD_PATH" --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 200
# /usr/sbin/urpmi --auto --no-verify-rpm /root/kernel-desktop-5.3.1-2.mga7-1-1.mga7.armv7hl.rpm
/usr/sbin/urpmi --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 0 basesystem chrony polkit lockdev rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make rsync kernel-desktop-latest binutils # systemd-bootchart libcap-utils keyutils mindi-busybox plymouth-scripts lvm2 #dmsetup
#For dracut :
/usr/sbin/urpmi --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 0 u-boot-tools mindi-busybox plymouth-scripts #systemd-bootchart libcap-utils keyutils lvm2 #dmsetup
# echo "Install kernel from testing :"
# /usr/sbin/urpmi.update Testing
# /usr/sbin/urpmi --media Testing kernel-desktop-5.3.2-1.mga7
# /usr/sbin/urpme kernel-desktop-5.2.13-2.mga7-1-1.mga7.armv7hl
echo "Urpmi finished."
# dracut --no-compress --force
# echo "Urpmi finished."
# dracut --no-compress --force 2>&1
cd /boot
# -H, --hostonly
# Host-Only mode: Install only what is needed for booting the local host instead of a generic host and generate host-specific configuration.
#
# Warning
# If chrooted to another root other than the real root device, use "--fstab" and provide a valid /etc/fstab.
#The FSTAB is not yet created... It is created only after the image creation...
# --fstab
# Use /etc/fstab instead of /proc/self/mountinfo.
ARCH=arm CROSS_COMPILE=arm-linux-gnu- dracut --no-hostonly --local --no-early-microcode --add systemd --xz --printsize --kernel-image /boot/vmlinuz --fstab
# ls -v1r /boot/vmlinuz*
# echo "--"
# ls -v1r /boot/vmlinuz-[[:digit:]]*
@ -37,7 +56,8 @@ echo "Urpmi finished."
# ln -r -s $(ls -v1r /boot/vmlinuz-[[:digit:]]* | grep -m 1 "vmlinuz") ./boot/vmlinuz
# ls -v1r /boot/initrd-[[:digit:]]*
# rm -f /boot/initrd.img
# ln -r -s $(ls -v1r /boot/initrd-[[:digit:]]* | grep -m 1 "initrd") ./boot/initrd.img
cd /boot/
# ln -r -s $(ls /initrd-* ) ./initrd.img
# echo "--"
# dracut --print-cmdline

View File

@ -1,12 +1,14 @@
#!/bin/bash
#RPI partitionning :
#Fdisk partitionment commands :
DEFAULT=""
NEW_PART=n
PRIMARY=p
CHANGE_TYPE=t
CHANGE_BOOTFLAG=a
APPLY=w
NEW_DOSTAB="o"
NEW_PART="n"
PRIMARY="p"
CHANGE_TYPE="t"
TYPE_FAT32LBA="c"
CHANGE_BOOTFLAG="a"
APPLY="w"
# PART_BOOT=1
# PART_BOOT_FIRST_SECTOR=${DEFAULT}
@ -16,22 +18,19 @@ APPLY=w
# PART_ROOT_FIRST_SECTOR=${DEFAULT}
# PART_ROOT_SIZE=${DEFAULT}
PART_BOOTandROOT=1
PART_BOOTandROOT_FIRST_SECTOR=${DEFAULT}
PART_BOOTandROOT_SIZE=${DEFAULT}
PART_BOOTandROOT="1"
PART_BOOTandROOT_FIRST_SECTOR="${DEFAULT}"
PART_BOOTandROOT_SIZE="${DEFAULT}"
TYPE_FAT32LBA=c
#FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOT}\n${PART_BOOT_FIRST_SECTOR}\n${PART_BOOT_SIZE}\n${CHANGE_TYPE}\n${TYPE_FAT32LBA}\n${NEW_PART}\n${PRIMARY}\n${PART_ROOT}\n${PART_ROOT_FIRST_SECTOR}\n${PART_ROOT_SIZE}\n${CHANGE_BOOTFLAG}\n${PART_BOOT}\n${CHANGE_BOOTFLAG}\n${PART_ROOT}\n${APPLY}\n"
FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOTandROOT}\n${PART_BOOT_FIRST_SECTOR}\n${PART_PART_BOOTandROOT_SIZE}\n${CHANGE_BOOTFLAG}\n${PART_PART_BOOTandROOT}\n${APPLY}\n"
FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOTandROOT}\n${PART_BOOT_FIRST_SECTOR}\n${PART_BOOTandROOT_SIZE}\n${CHANGE_BOOTFLAG}\n${APPLY}\n"
# FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOT}\n${PART_BOOT_FIRST_SECTOR}\n${PART_BOOT_SIZE}\n${CHANGE_TYPE}\n${TYPE_FAT32LBA}\n${NEW_PART}\n${PRIMARY}\n${PART_ROOT}\n${PART_ROOT_FIRST_SECTOR}\n${PART_ROOT_SIZE}\n${CHANGE_BOOTFLAG}\n${PART_BOOT}\n${CHANGE_BOOTFLAG}\n${PART_ROOT}\n${APPLY}\n"
function preImgCreation()
{
title "Creating Banana Pro image"
#Nothing to download.
# mkimage -C none -A arm -T script -d "${CONFIG_PATH}/boot.cmd" "${CONFIG_PATH}/boot.scr"
return 0
}
@ -45,6 +44,7 @@ function postPrepareChroot()
/usr/bin/cp --preserve=mode "${CONFIG_PATH}/u-boot.dtb" "${BUILD_PATH}/boot/"
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/uboot.env" "${BUILD_PATH}/boot/"
/usr/bin/cp --preserve=mode -d "${CONFIG_PATH}/vmlinuz" "${BUILD_PATH}/boot/"
/usr/bin/cp --preserve=mode -r "${CONFIG_PATH}/lib" "${BUILD_PATH}/"
return 0
}
@ -65,6 +65,6 @@ function copyingCustomSystem()
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/uboot.env" "${BOOT}/"
# /usr/bin/cp --preserve=mode "${CONFIG_PATH}/uEnv.txt" "${BOOT}/"
# /usr/bin/cp --preserve=mode -d "${CONFIG_PATH}/vmlinuz" "${BOOT}/"
cp --preserve=mode -R "${BUILD_PATH}/boot/extlinux" "${BOOT}/"
# cp --preserve=mode -R "${BUILD_PATH}/boot/extlinux" "${BOOT}/"
return 0
}