Improve extlinux.conf doc and process.
This commit is contained in:
parent
1a545d74b3
commit
68db69c9bf
42
README.md
42
README.md
@ -108,8 +108,25 @@ Si l'une de ces fonctions ne retourne pas 0, la création de l'image échoue.
|
|||||||
|
|
||||||
<a id="fr_file-extlinux"/>
|
<a id="fr_file-extlinux"/>
|
||||||
#### extlinux.conf
|
#### extlinux.conf
|
||||||
Extlinux.conf est un script utilisé par le chargeur de démarrage (s'il est capable de le gérer, uboot le peut), pour spécifier le noyau à démarrer. Le script est normalement généré automatiquement par les outils de Mageia à chaque installation/mise à jour d'un noyau. Malheureusement, lors de la création d'une image de Mageia, l'outil refuse de générer ce fichier dans un chroot. For cette image, soit le fichier peut être omit, soit écrit par vous même.
|
Extlinux.conf est un script utilisé par le chargeur de démarrage (s'il est capable de le gérer, uboot le peut), pour spécifier la version du noyau à démarrer. Le script est normalement généré automatiquement par les outils de Mageia à chaque installation/mise à jour d'un noyau. Malheureusement, lors de la création d'une image de Mageia en chroot, l'outil refuse de générer ce fichier, de plus si le fichier est manquant, lors de la mise à jour du noyau, l'outil de Mageia génère un fichier erroné avec des entrées vides que u-boot refuse.
|
||||||
TODO : Comment spécifier la ligne de commande pour un matériel spécifique ?
|
Il vaut mieux créer ce fichier, même s'il n'est pas primordiale. D'autant plus que lors de la mise à jour d'un noyau, l'outil de Mageia reprends les arguments de la commande de démarrage pour les nouvelles versions.
|
||||||
|
|
||||||
|
La structure basique du fichier est :
|
||||||
|
```
|
||||||
|
default linux
|
||||||
|
timeout 20
|
||||||
|
menu title Welcome to Mageia-Minimal.
|
||||||
|
|
||||||
|
label linux
|
||||||
|
kernel /boot/vmlinuz
|
||||||
|
initrd /boot/initrd.img
|
||||||
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
|
append root=UUID=<UUID> <BOOT_ARGS>
|
||||||
|
```
|
||||||
|
Les balises :
|
||||||
|
- <FDTDIR> est automatiquement généré par le script ./mageia4arm/create_arm_img_urpmi.sh
|
||||||
|
- <UUID> est récupéré par le script ./mageia4arm/create_arm_img_urpmi.sh
|
||||||
|
- <BOOT_ARGS> est défini dans le fichier ./mageia4arm/platforms/<LaPlateforme>/mageia4arm.cfg
|
||||||
|
|
||||||
<a id="fr_file-others"/>
|
<a id="fr_file-others"/>
|
||||||
#### Autres
|
#### Autres
|
||||||
@ -283,8 +300,25 @@ If one of this functions does not return 0, the process is stoped.
|
|||||||
|
|
||||||
<a id="en_file-extlinux"/>
|
<a id="en_file-extlinux"/>
|
||||||
#### extlinux.conf
|
#### extlinux.conf
|
||||||
extlinux.conf is a script used by the bootloader (if it is able to handel, uboot does) in order to select specific kernel to start. This script is normaly automatically generated by Mageia's tools at each kernel installation/update. Unfortunately, when creating the image of Mageia, the tool refuse to generate the file in chroot. For the image, either the file can be omited, or write by yourself.
|
extlinux.conf is a script used by the bootloader (if it is able to manage it, uboot does) in order to select specific kernel version to start with boot arguments. This script is normaly automatically generated by Mageia's tools at each kernel installation/update. Unfortunately, when creating the image of Mageia in chroot, the tool refuses to generate the file, moreover, if the file is missing, at the first kernel update, the tool will create it with empty entries which makes uboot failing to parse it.
|
||||||
TODO : How to specify the command line specific for an hardware ?
|
It is better to generate this file, even if it isn't mandatory. It is even better as the tool take into account the boot arguments of previous kernel and add it for the new one and regenerate automatically the file.
|
||||||
|
|
||||||
|
The basic file is:
|
||||||
|
```
|
||||||
|
default linux
|
||||||
|
timeout 20
|
||||||
|
menu title Welcome to Mageia-Minimal.
|
||||||
|
|
||||||
|
label linux
|
||||||
|
kernel /boot/vmlinuz
|
||||||
|
initrd /boot/initrd.img
|
||||||
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
|
append root=UUID=<UUID> <BOOT_ARGS>
|
||||||
|
```
|
||||||
|
The tags :
|
||||||
|
- <FDTDIR> is automatically generated by the script ./mageia4arm/create_arm_img_urpmi.sh
|
||||||
|
- <UUID> is automatically reused bu the script ./mageia4arm/create_arm_img_urpmi.sh
|
||||||
|
- <BOOT_ARGS> is defined in the configuration file ./mageia4arm/platforms/<LaPlateforme>/mageia4arm.cfg
|
||||||
|
|
||||||
<a id="en_file-others"/>
|
<a id="en_file-others"/>
|
||||||
#### others
|
#### others
|
||||||
|
@ -419,9 +419,9 @@ function copyingsystem()
|
|||||||
fi
|
fi
|
||||||
if [ ! -f "${BUILD_PATH}/boot/extlinux/extlinux.conf" ]; then
|
if [ ! -f "${BUILD_PATH}/boot/extlinux/extlinux.conf" ]; then
|
||||||
info "\tTuning extlinux.conf"
|
info "\tTuning extlinux.conf"
|
||||||
sed -e s/\<UUID\>/${ROOT_UUID}/g ${CONFIG_PATH}/extlinux.conf >"${BUILD_PATH}/boot/extlinux/extlinux.conf"
|
sed -e "s/<UUID>/${ROOT_UUID}/g" -e "s/<BOOT_ARGS>/${BOOT_ARGS}/g" ${CONFIG_PATH}/extlinux.conf >"${BUILD_PATH}/boot/extlinux/extlinux.conf"
|
||||||
KERNEL_ID=$(basename ${BUILD_PATH}/usr/lib/linux-*)
|
KERNEL_ID=$(basename ${BUILD_PATH}/usr/lib/linux-*)
|
||||||
sed -i -e s/\<FDTDIR\>/${KERNEL_ID}/g "${BUILD_PATH}/boot/extlinux/extlinux.conf"
|
sed -i -e "s/<FDTDIR>/${KERNEL_ID}/g" "${BUILD_PATH}/boot/extlinux/extlinux.conf"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
1243
log/creation.log
1243
log/creation.log
File diff suppressed because one or more lines are too long
9
platforms/bananaPro/extlinux.conf
Normal file
9
platforms/bananaPro/extlinux.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
default linux
|
||||||
|
timeout 20
|
||||||
|
menu title Welcome to Mageia-Minimal.
|
||||||
|
|
||||||
|
label linux
|
||||||
|
kernel /boot/vmlinuz
|
||||||
|
initrd /boot/initrd.img
|
||||||
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
|
append root=UUID=<UUID> <BOOT_ARGS>
|
@ -71,7 +71,10 @@ BOOTFS="ext4"
|
|||||||
#kernel package to install
|
#kernel package to install
|
||||||
KERNEL="kernel-desktop"
|
KERNEL="kernel-desktop"
|
||||||
|
|
||||||
|
#The arguments for the Kernel
|
||||||
|
BOOT_ARGS='console=ttyS0,115200 disp.screen0_output_mode=EDID:1024x768p50 hdmi.audio=EDID:0'
|
||||||
|
|
||||||
#Path where the raspberry pi firmware is/will be installed ( just needed for raspberry pi )
|
#Path where the raspberry pi firmware is/will be installed ( just needed for raspberry pi )
|
||||||
FIRMWARE_PATH="${INSTALL_PATH}/"
|
# FIRMWARE_PATH="${INSTALL_PATH}/"
|
||||||
#FIRMWARE_DIR="firmware-stable"
|
#FIRMWARE_DIR="firmware-stable"
|
||||||
#FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
|
#FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
|
||||||
|
@ -4,7 +4,7 @@ default linux
|
|||||||
|
|
||||||
label linux
|
label linux
|
||||||
kernel /boot/vmlinuz
|
kernel /boot/vmlinuz
|
||||||
append root=UUID=<UUID> dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0
|
append root=UUID=<UUID> <BOOT_ARGS>
|
||||||
fdtdir /usr/lib/<FDTDIR>
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
|
|
||||||
|
@ -54,6 +54,9 @@ HOSTNAME="$TARGET.$ID_USER"
|
|||||||
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
||||||
BOOTFS="vfat"
|
BOOTFS="vfat"
|
||||||
|
|
||||||
|
#The arguments for the Kernel
|
||||||
|
BOOT_ARGS='dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0'
|
||||||
|
|
||||||
#Path where the raspberry pi firmware is/will be installed
|
#Path where the raspberry pi firmware is/will be installed
|
||||||
FIRMWARE_PATH="$INSTALL_PATH"
|
FIRMWARE_PATH="$INSTALL_PATH"
|
||||||
FIRMWARE_DIR="firmware-stable"
|
FIRMWARE_DIR="firmware-stable"
|
||||||
|
@ -4,7 +4,7 @@ default linux
|
|||||||
|
|
||||||
label linux
|
label linux
|
||||||
kernel /boot/vmlinuz
|
kernel /boot/vmlinuz
|
||||||
append root=UUID=<UUID> dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0
|
append root=UUID=<UUID> <BOOT_ARGS>
|
||||||
fdtdir /usr/lib/<FDTDIR>
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
|
|
||||||
|
@ -54,6 +54,10 @@ HOSTNAME="$TARGET.$ID_USER"
|
|||||||
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
||||||
BOOTFS="vfat"
|
BOOTFS="vfat"
|
||||||
|
|
||||||
|
#The arguments for the Kernel
|
||||||
|
BOOT_ARGS='dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0'
|
||||||
|
|
||||||
|
|
||||||
#Path where the raspberry pi firmware is/will be installed
|
#Path where the raspberry pi firmware is/will be installed
|
||||||
FIRMWARE_PATH="$INSTALL_PATH"
|
FIRMWARE_PATH="$INSTALL_PATH"
|
||||||
FIRMWARE_DIR="firmware-stable"
|
FIRMWARE_DIR="firmware-stable"
|
||||||
|
@ -4,7 +4,7 @@ default linux
|
|||||||
|
|
||||||
label linux
|
label linux
|
||||||
kernel /boot/vmlinuz
|
kernel /boot/vmlinuz
|
||||||
append root=UUID=<UUID> dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0
|
append root=UUID=<UUID> <BOOT_ARGS>
|
||||||
fdtdir /usr/lib/<FDTDIR>
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
|
|
||||||
|
@ -54,6 +54,9 @@ HOSTNAME="$TARGET.$ID_USER"
|
|||||||
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
||||||
BOOTFS="vfat"
|
BOOTFS="vfat"
|
||||||
|
|
||||||
|
#The arguments for the Kernel
|
||||||
|
BOOT_ARGS='dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0'
|
||||||
|
|
||||||
#Path where the raspberry pi firmware is/will be installed
|
#Path where the raspberry pi firmware is/will be installed
|
||||||
FIRMWARE_PATH="$INSTALL_PATH"
|
FIRMWARE_PATH="$INSTALL_PATH"
|
||||||
FIRMWARE_DIR="firmware-stable"
|
FIRMWARE_DIR="firmware-stable"
|
||||||
|
@ -4,7 +4,7 @@ default linux
|
|||||||
|
|
||||||
label linux
|
label linux
|
||||||
kernel /boot/vmlinuz
|
kernel /boot/vmlinuz
|
||||||
append root=UUID=<UUID> dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0
|
append root=UUID=<UUID> <BOOT_ARGS>
|
||||||
fdtdir /usr/lib/<FDTDIR>
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
|
|
||||||
|
@ -58,6 +58,10 @@ HOSTNAME="$TARGET.$ID_USER"
|
|||||||
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
#Filesystem of boot partitions (default ext4 raspberry pi need vfat)
|
||||||
BOOTFS="vfat"
|
BOOTFS="vfat"
|
||||||
|
|
||||||
|
#The arguments for the Kernel
|
||||||
|
BOOT_ARGS='dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0'
|
||||||
|
|
||||||
|
|
||||||
#Path where the raspberry pi firmware is/will be installed
|
#Path where the raspberry pi firmware is/will be installed
|
||||||
FIRMWARE_PATH="$INSTALL_PATH"
|
FIRMWARE_PATH="$INSTALL_PATH"
|
||||||
FIRMWARE_DIR="firmware-stable"
|
FIRMWARE_DIR="firmware-stable"
|
||||||
|
@ -4,7 +4,7 @@ default Mageia
|
|||||||
|
|
||||||
label Mageia
|
label Mageia
|
||||||
kernel /boot/vmlinuz
|
kernel /boot/vmlinuz
|
||||||
append root=UUID=<UUID> dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0
|
append root=UUID=<UUID> <BOOT_ARGS>
|
||||||
fdtdir /usr/lib/<FDTDIR>
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
|
|
||||||
|
@ -49,5 +49,8 @@ HOSTNAME="xu4.odroid"
|
|||||||
#Filesystem of boot partitions (default ext4)
|
#Filesystem of boot partitions (default ext4)
|
||||||
BOOTFS=ext4
|
BOOTFS=ext4
|
||||||
|
|
||||||
|
#The arguments for the Kernel
|
||||||
|
BOOT_ARGS='dwc_otg.lpm_enable=0 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 rootwait fsck.repair=1 8250.nr_uarts=1 elevator=deadline cma=256M\@512M audit=0'
|
||||||
|
|
||||||
#kernel package to install
|
#kernel package to install
|
||||||
KERNEL=kernel-odroid
|
KERNEL=kernel-odroid
|
||||||
|
Reference in New Issue
Block a user