Stable with kernel update
This commit is contained in:
parent
425791a74b
commit
c0c863c560
@ -170,7 +170,7 @@ function createchroot()
|
|||||||
|
|
||||||
# Create Build path
|
# Create Build path
|
||||||
if ! [ -d "$BUILD_PATH" ];then
|
if ! [ -d "$BUILD_PATH" ];then
|
||||||
warning "Build path does not exists, do you want i create it ? [Y|n] "
|
warning "Build path ( $BUILD_PATH ) does not exists, do you want i create it ? [Y|n] "
|
||||||
read yn
|
read yn
|
||||||
if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
|
if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
|
||||||
title "Creating $BUILD_PATH"
|
title "Creating $BUILD_PATH"
|
||||||
@ -182,6 +182,7 @@ function createchroot()
|
|||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
info "Build path exists"
|
info "Build path exists"
|
||||||
fi
|
fi
|
||||||
#Copying qemu
|
#Copying qemu
|
||||||
@ -440,6 +441,10 @@ p
|
|||||||
2
|
2
|
||||||
|
|
||||||
|
|
||||||
|
a
|
||||||
|
1
|
||||||
|
a
|
||||||
|
2
|
||||||
w
|
w
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -478,7 +483,7 @@ formatpartitions()
|
|||||||
|
|
||||||
copyingsystem()
|
copyingsystem()
|
||||||
{
|
{
|
||||||
info "mounting partitions, creating mountpoint if necessary"
|
info "mounting partitions, making mountpoint if necessary"
|
||||||
if ! [ -d "$BOOT" ];then
|
if ! [ -d "$BOOT" ];then
|
||||||
/bin/mkdir "$BOOT"
|
/bin/mkdir "$BOOT"
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
@ -506,85 +511,92 @@ copyingsystem()
|
|||||||
|
|
||||||
info "making /etc/fstab"
|
info "making /etc/fstab"
|
||||||
echo "proc /proc proc defaults 0 0
|
echo "proc /proc proc defaults 0 0
|
||||||
UUID=$BOOT_UUID /boot vfat defaults 0 0
|
UUID=$BOOT_UUID /mnt/rpi_boot vfat defaults 0 0
|
||||||
UUID=$ROOT_UUID / ext4 defaults 0 0" > "$BUILD_PATH"/etc/fstab
|
UUID=$ROOT_UUID / ext4 defaults 0 0" > "$BUILD_PATH"/etc/fstab
|
||||||
|
|
||||||
|
|
||||||
case $TARGET in
|
case $TARGET in
|
||||||
rpi)
|
rpi)
|
||||||
|
|
||||||
info "copying config.txt, boot.cmd and 10-vchiq-permissions.rules"
|
info "copying 10-vchiq-permissions.rules"
|
||||||
cp "$SOURCE_PATH/$CONFIG_PATH/10-vchiq-permissions.rules" "$BUILD_PATH/etc/udev/rules.d/"
|
cp "$SOURCE_PATH/$CONFIG_PATH/10-vchiq-permissions.rules" "$BUILD_PATH/etc/udev/rules.d/"
|
||||||
# Making /etc/modules
|
info "Making /etc/modules"
|
||||||
echo "vchiq
|
echo "vchiq
|
||||||
snd_bcm2835
|
snd_bcm2835
|
||||||
vc4
|
vc4
|
||||||
brcmfmac" >> "$BUILD_PATH"/etc/modules
|
brcmfmac" >> "$BUILD_PATH"/etc/modules
|
||||||
|
|
||||||
|
RPI_BOOT="$BUILD_PATH/mnt/rpi_boot"
|
||||||
|
if ! [ -d "$RPI_BOOT" ];then
|
||||||
|
mkdir -p "$RPI_BOOT"
|
||||||
|
fi
|
||||||
info "copying modprobe.conf"
|
info "copying modprobe.conf"
|
||||||
/bin/cp -a "$SOURCE_PATH/$CONFIG_PATH/modprobe.conf" "$BUILD_PATH/etc/"
|
/bin/cp -a "$SOURCE_PATH/$CONFIG_PATH/modprobe.conf" "$BUILD_PATH/etc/"
|
||||||
chown root:root "$BUILD_PATH/etc/modprobe.conf"
|
chown root:root "$BUILD_PATH/etc/modprobe.conf"
|
||||||
|
|
||||||
info "making /boot/extlinux/extlinux.conf"
|
info "making /boot/extlinux/extlinux.conf"
|
||||||
mkdir "$BUILD_PATH/boot/extlinux"
|
mkdir -p "$BUILD_PATH/boot/extlinux"
|
||||||
sed -e s/\<UUID\>/$ROOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
|
sed -e s/\<UUID\>/$ROOT_UUID/g $SOURCE_PATH/$CONFIG_PATH/extlinux.conf >"$BUILD_PATH/boot/extlinux/extlinux.conf"
|
||||||
|
KERNEL_ID=`basename $BUILD_PATH/usr/lib/linux-*`
|
||||||
|
sed -i -e s/\<FDTDIR\>/$KERNEL_ID/g "$BUILD_PATH/boot/extlinux/extlinux.conf"
|
||||||
|
info "copying firmware, overlays in rpi boot partition"
|
||||||
|
# cp -a "$BUILD_PATH/usr/lib/linux-"* "$BOOT/dtb"
|
||||||
|
cp -av "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/start"* "$RPI_BOOT/"
|
||||||
|
cp -av "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/fixup"* "$RPI_BOOT/"
|
||||||
|
cp -av "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/bootcode.bin"* "$RPI_BOOT/"
|
||||||
|
cp -av "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/overlays" "$RPI_BOOT/"
|
||||||
|
|
||||||
info "copying firmware, overlays and dtb in /boot"
|
info "copying u-boot binary to $RPI_BOOT"
|
||||||
cp -a "$BUILD_PATH/usr/lib/linux-"* "$BOOT/dtb"
|
|
||||||
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/start"* "$BUILD_PATH/boot/"
|
|
||||||
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/fixup"* "$BUILD_PATH/boot/"
|
|
||||||
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/bootcode.bin"* "$BUILD_PATH/boot/"
|
|
||||||
cp -a "$FIRMWARE_PATH/$FIRMWARE_DIR/boot/overlays" "$BUILD_PATH/boot/"
|
|
||||||
|
|
||||||
info "copying u-boot binary to /boot"
|
|
||||||
case $TARGET_VERSION in
|
case $TARGET_VERSION in
|
||||||
2)
|
2)
|
||||||
info "copying u-boot for $TARGET 2"
|
info "copying u-boot for $TARGET 2"
|
||||||
cp "$BUILD_PATH/usr/lib/u-boot/rpi_2/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
|
cp "$BUILD_PATH/usr/lib/u-boot/rpi_2/u-boot.bin" "$RPI_BOOT/kernel7.img"
|
||||||
;;
|
;;
|
||||||
0)
|
0)
|
||||||
info "copying u-boot for $TARGET 0"
|
info "copying u-boot for $TARGET 0"
|
||||||
cp "$BUILD_PATH/usr/lib/u-boot/rpi_0_w/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
|
cp "$BUILD_PATH/usr/lib/u-boot/rpi_0_w/u-boot.bin" "$RPI_BOOT/kernel7.img"
|
||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
info "copying u-boot for $TARGET 1"
|
info "copying u-boot for $TARGET 1"
|
||||||
cp "$BUILD_PATH/usr/lib/u-boot/rpi/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
|
cp "$BUILD_PATH/usr/lib/u-boot/rpi/u-boot.bin" "$RPI_BOOT/kernel7.img"
|
||||||
;;
|
;;
|
||||||
3_32)
|
3_32)
|
||||||
info "copying u-boot for $TARGET 3 32 bits"
|
info "copying u-boot for $TARGET 3 32 bits"
|
||||||
cp "$BUILD_PATH/usr/lib/u-boot/rpi_3_32b/u-boot.bin" "$BUILD_PATH/boot/kernel7.img"
|
cp "$BUILD_PATH/usr/lib/u-boot/rpi_3_32b/u-boot.bin" "$RPI_BOOT/kernel7.img"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
info "copying raspberry optionals files in opt"
|
# info "copying raspberry optionals files in opt"
|
||||||
# /bin/rsync -rlptDH "$FIRMWARE_PATH/$FIRMWARE_DIR/opt/" "$BUILD_PATH/opt/"
|
# /bin/rsync -rlptDH "$FIRMWARE_PATH/$FIRMWARE_DIR/opt/" "$BUILD_PATH/opt/"
|
||||||
|
|
||||||
info "copying wifi firmware file missing in kernel-firmware-nonfree"
|
info "copying wifi firmware file missing in kernel-firmware-nonfree"
|
||||||
if ! [ -d "$ROOT/usr/lib/firmware/brcm/" ];then
|
if ! [ -d "$ROOT/usr/lib/firmware/brcm/" ];then
|
||||||
/bin/mkdir -p "$ROOT/usr/lib/firmware/brcm/"
|
/bin/mkdir -p "$ROOT/usr/lib/firmware/brcm/"
|
||||||
fi
|
fi
|
||||||
|
if ! [ -f "$ROOT/usr/lib/firmware/brcm/brcmfmac43430-sdio.txt" ];then
|
||||||
/bin/cp "$SOURCE_PATH/$CONFIG_PATH/brcmfmac43430-sdio.txt" "$ROOT/usr/lib/firmware/brcm/"
|
/bin/cp "$SOURCE_PATH/$CONFIG_PATH/brcmfmac43430-sdio.txt" "$ROOT/usr/lib/firmware/brcm/"
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting"
|
error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
info "copying tools in /usr/local/bin/"
|
info "copying tools in /usr/local/bin/"
|
||||||
/bin/cp -a "$SOURCE_PATH/tools/" "$BUILD_PATH/usr/local/bin/"
|
/bin/cp -a "$SOURCE_PATH/tools/" "$BUILD_PATH/usr/local/bin/"
|
||||||
/bin/cp -a "$SOURCE_PATH/rpi/sed_extlinux.conf.sh" "$BUILD_PATH/usr/local/bin/"
|
# /bin/cp -a "$SOURCE_PATH/rpi/sed_extlinux.conf.sh" "$BUILD_PATH/usr/local/bin/"
|
||||||
if ! [ $? -eq 0 ];then
|
if ! [ $? -eq 0 ];then
|
||||||
error "line $LINENO error copying tools"
|
error "line $LINENO error copying tools"
|
||||||
ERRORN=$((ERRORN++))
|
ERRORN=$((ERRORN++))
|
||||||
fi
|
fi
|
||||||
info "copying "
|
# info "copying "
|
||||||
;;
|
;;
|
||||||
ODROID)
|
ODROID)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
info "copying Mageia image to root partition"
|
info "copying Mageia image to root partition"
|
||||||
/bin/rsync -a --exclude "boot/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
|
/bin/rsync -a --exclude "$RPI_BOOT/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
|
||||||
/bin/rsync -a "$BUILD_PATH/boot/" "$BOOT/"
|
/bin/rsync -a "$RPI_BOOT/" "$BOOT/"
|
||||||
/bin/mkdir "$ROOT/boot"
|
# /bin/mkdir "$ROOT/boot"
|
||||||
|
|
||||||
copyingcommon
|
copyingcommon
|
||||||
# Syncing devices before unmounting
|
# Syncing devices before unmounting
|
||||||
@ -610,7 +622,7 @@ copyingcommon()
|
|||||||
{
|
{
|
||||||
title "Copying common files and configuration"
|
title "Copying common files and configuration"
|
||||||
rsync -aP "$SOURCE_PATH/common/" "$ROOT/"
|
rsync -aP "$SOURCE_PATH/common/" "$ROOT/"
|
||||||
rsync -aP "$SOURCE_PATH/tools/" "$ROOT/usr/local/bin/"
|
rsync -aP "$SOURCE_PATH/tools/*.sh" "$ROOT/usr/local/bin/"
|
||||||
chown root:root "$ROOT/usr/local/bin/"
|
chown root:root "$ROOT/usr/local/bin/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
menu title Boot menu
|
menu Welcome to Mageia-Minimal.
|
||||||
timeout 20
|
timeout 20
|
||||||
default Mageia
|
default Mageia
|
||||||
|
|
||||||
label Mageia
|
label Mageia
|
||||||
kernel /vmlinuz
|
kernel /boot/vmlinuz
|
||||||
append root=UUID=78fa0462-5bcf-46ea-beb3-40cab8fe97c3 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> 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
|
||||||
fdtdir /dtb/
|
fdtdir /usr/lib/<FDTDIR>
|
||||||
initrd /initrd
|
initrd /boot/initrd
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#Install all packages you need
|
#Install all packages you need
|
||||||
# No verifying rpm due to a bug in packages, some are not signed
|
# No verifying rpm due to a bug in packages, some are not signed
|
||||||
|
|
||||||
/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11
|
/usr/sbin/urpmi --auto --no-verify-rpm basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11
|
||||||
|
|
||||||
|
|
||||||
/usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
|
/usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
|
||||||
|
Reference in New Issue
Block a user