Fixed extlinux for BananaPro, add initrd for root=UUID.
This commit is contained in:
@ -1,9 +1,14 @@
|
||||
default linux
|
||||
menu Welcome to Mageia-Minimal.
|
||||
timeout 20
|
||||
menu title Welcome to Mageia-Minimal.
|
||||
default Mageia
|
||||
|
||||
label Mageia
|
||||
kernel /boot/vmlinuz
|
||||
initrd /boot/initrd.img
|
||||
fdtdir /usr/lib/<FDTDIR>
|
||||
append root=UUID=<UUID> <BOOT_ARGS>
|
||||
|
||||
label linux
|
||||
kernel /boot/vmlinuz
|
||||
initrd /boot/initrd.img
|
||||
fdtdir /usr/lib/<FDTDIR>
|
||||
append root=UUID=<UUID> <BOOT_ARGS>
|
||||
kernel /boot/vmlinuz
|
||||
fdtdir /usr/lib/<FDTDIR>
|
||||
append root=/dev/mmcblk0p1 <BOOT_ARGS>
|
||||
|
@ -32,6 +32,7 @@ export ARCH=arm
|
||||
# ############################
|
||||
# ## For compiling a module ##
|
||||
# ############################
|
||||
# BUG : Make does not like to build inside chroot. It doesn't find tools. Impossible to build any module there.
|
||||
# /usr/sbin/urpmi --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 0 kernel-source-latest
|
||||
# #See if it is a Server or Desktop kernel :
|
||||
# rpm -q kernel-serveur-latest
|
||||
@ -57,13 +58,16 @@ export ARCH=arm
|
||||
# ####################################################
|
||||
# #Set the kernel name :
|
||||
# KERNELVERSION="5.3.7-desktop-4.mga7"
|
||||
K_INST_VERSION=$(rpm -q kernel-desktop-latest | sed -e 's/kernel-\([[:alnum:]]*\)-latest-\([\.[:digit:]]*\)-\([\.[:alnum:]]*\).*$/\2-\1-\3/')
|
||||
# #Set the list of added modules and omitted modules :
|
||||
# DRIVER_ADD_LIST="8250_dw"
|
||||
# DRIVER_OMI_LIST="drm"
|
||||
# #Create a configuration file inside the FS, it will be used by dracut for all kernel update
|
||||
# echo -e "# Omiting drm as it failed for arm :\nomit_dracutmodules+=\" ${DRIVER_OMI_LIST} \"\n\n# Driver to add for banana Pro (serial) :\nadd_drivers+=\" ${DRIVER_ADD_LIST} \"\n" > /etc/dracut.conf.d/30-bananapro.conf
|
||||
# #Generate the initrd :
|
||||
# OUTPUT=$(ARCH=arm CROSS_COMPILE=arm-linux-gnu- dracut --no-compress --force --no-hostonly --local --no-early-microcode --confdir "/etc/dracut.conf.d" --kmoddir="/lib/modules/${KERNELVERSION}" --xz --printsize --kernel-image /boot/vmlinuz --fstab initrd-${KERNELVERSION}.img ${KERNELVERSION} 2>&1 | tee /dev/tty )
|
||||
# OUTPUT=$(ARCH=arm CROSS_COMPILE=arm-linux-gnu- dracut --no-compress --force --no-hostonly --local --no-early-microcode --confdir "/etc/dracut.conf.d" --kmoddir="/lib/modules/${K_INST_VERSION}" --xz --printsize --kernel-image /boot/vmlinuz --fstab initrd-${K_INST_VERSION}.img ${K_INST_VERSION} 2>&1 | tee /dev/tty )
|
||||
dracut --no-compress --force --no-hostonly --local --no-early-microcode --confdir "/etc/dracut.conf.d" --kmoddir="/lib/modules/${K_INST_VERSION}" --xz --printsize --kernel-image /boot/vmlinuz --fstab /boot/initrd-${K_INST_VERSION}.img ${K_INST_VERSION}
|
||||
ln -r -s /boot/initrd-${K_INST_VERSION}.img /boot/initrd.img
|
||||
# #Add the uboot header to the initrd file, first, find the file :
|
||||
# INITRD_FILE="$(echo "${OUTPUT}" | grep "Creating initramfs image file" | sed -e "s/^[*:[:space:][:alnum:]]*'//" -e "s/'.*$//" )"
|
||||
# #Add the uboot header, the result file will contain a 'u' as prefix-name.
|
||||
@ -94,17 +98,20 @@ export ARCH=arm
|
||||
#Get the vmlinuz file :
|
||||
VMLINUZ=$(ls --sort=time -1 /boot/vmlinuz-[[:digit:]]* | head -n 1)
|
||||
rm -f /boot/uvmlinuz
|
||||
ln -r -s "${VMLINUZ}" /boot/uvmlinuz
|
||||
ln -r -s "${VMLINUZ}" /boot/uvmlinuz #For the uboot script
|
||||
# Normally, /boot/vmlinuz is generated with the /sbin/installkernel script, but it is not generated with chroot.
|
||||
ln -r -s "${VMLINUZ}" /boot/vmlinuz #For extlinux.conf
|
||||
|
||||
################################
|
||||
## Create the extlinux script ##
|
||||
################################
|
||||
# BUG : installkernel call bootloader-config which doesn't process inside a chroot.
|
||||
# echo -e "\nTrying to generate extlinux script\n"
|
||||
K_INST_VERSION=$(rpm -q kernel-desktop-latest | sed -e 's/kernel-\([[:alnum:]]*\)-latest-\([\.[:digit:]]*\)-\([\.[:alnum:]]*\).*$/\2-\1-\3/')
|
||||
# K_INST_VERSION=$(rpm -q kernel-desktop-latest | sed -e 's/kernel-\([[:alnum:]]*\)-latest-\([\.[:digit:]]*\)-\([\.[:alnum:]]*\).*$/\2-\1-\3/')
|
||||
# /sbin/installkernel %{kversion}-$kernel_flavour-%{buildrpmrel}
|
||||
# bash -x /sbin/installkernel ${K_INST_VERSION}
|
||||
# perl -d /usr/sbin/bootloader-config --kernel-version ${K_INST_VERSION} --initrd-options '' --action add-kernel
|
||||
/usr/sbin/bootloader-config --kernel-version ${K_INST_VERSION} --initrd-options '' --action add-kernel
|
||||
# /usr/sbin/bootloader-config --kernel-version ${K_INST_VERSION} --initrd-options '' --action add-kernel
|
||||
# echo -e "\nEnd trying to generate extlinux script with errcode ${?}\n"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user