uboot: initial feature
This commit is contained in:
parent
2194c95f68
commit
b1c1dd488f
1
features.in/uboot/README
Normal file
1
features.in/uboot/README
Normal file
@ -0,0 +1 @@
|
||||
Настраивает систему для использования загрузчика uboot.
|
3
features.in/uboot/config.mk
Normal file
3
features.in/uboot/config.mk
Normal file
@ -0,0 +1,3 @@
|
||||
use/uboot: use/kernel
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_LISTS,singleboard-tools)
|
19
features.in/uboot/image-scripts.d/00-uboot-prepare
Executable file
19
features.in/uboot/image-scripts.d/00-uboot-prepare
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$GLOBAL_BASE_BOOTLOADER" = 'uboot' ] || exit 0
|
||||
|
||||
# installkernel relies on existing extlinux.conf
|
||||
# with filled in `default' label
|
||||
mkdir -p /boot/extlinux
|
||||
cat > /boot/extlinux/extlinux.conf << EOF
|
||||
menu title ALTLinux Boot Options
|
||||
|
||||
default linux
|
||||
timeout 20
|
||||
|
||||
label linux
|
||||
kernel /boot/vmlinuz
|
||||
initrd /boot/initrd.img
|
||||
fdtdir /boot/dtb
|
||||
append root=LABEL=ROOT ro cma=192M console=tty1
|
||||
EOF
|
12
features.in/uboot/image-scripts.d/90-uboot-config-install
Executable file
12
features.in/uboot/image-scripts.d/90-uboot-config-install
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
kver="$(rpm -qa 'kernel-image*' \
|
||||
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
|
||||
| sort -n \
|
||||
| cut -f 2 -d ' ' \
|
||||
| sed 's/kernel-image-//')"
|
||||
|
||||
[ -n "$kver" ] || { echo "** unable to deduce kernel version" >&2; exit 1; }
|
||||
|
||||
/sbin/installkernel --uboot --keep-initrd "$kver"
|
||||
printf 'LABEL=ROOT\t/\text4\tdefaults\t1 1\n' >> /etc/fstab
|
Loading…
Reference in New Issue
Block a user