mkimage-profiles/features.in/mipsel-bfk3/rootfs/image-scripts.d/40-boot
Ivan A. Melnikov 3956f98bb0 mipsel-bfk3: Initial take on bfk3 support
We only plan to distribute XZ-compressed rootfs tarballs.

(mike@: merging cleaned-up version)
2019-09-30 19:42:10 +03:00

27 lines
603 B
Bash
Executable File

#!/bin/sh -efu
mkdir -p /boot
vmlinuz="$(find /boot -type f -name 'vmlinuz-*')"
kversion="${vmlinuz##/boot/vmlinuz-}"
DTB_NAME=baikal_bfk2
[ -n "$DTB_NAME" ]
cp /lib/devicetree/"$kversion/$DTB_NAME".dtb /boot/"$DTB_NAME"-"$kversion".dtb
ln -s "$DTB_NAME"-"$kversion".dtb /boot/$DTB_NAME.dtb
ln -s boot/vmlinuz /vmlinux.bin
ln -s boot/initrd.img /initramfs.gz
ln -s boot/"$DTB_NAME".dtb /baikal.dtb
ln -s boot/vmlinuz /bfk3.vmlinux.bin
# to match update-kernel
mkdir -p /boot/dtb
ln -s /boot/"$DTB_NAME"-"$kversion".dtb /boot/dtb/"$DTB_NAME".dtb
ln -s /boot/dtb/"$DTB_NAME".dtb /bfk3.dtb
exit 0