armh: added umkimage support

It was actually done much earlier during an experiment with
Marvell ArmadaXP but is now integrated more or less properly.

NB: ext2 is not needed anymore (uboot should do it),
ext4 should become configurable by an existing knob.
This commit is contained in:
Michael Shigorin 2013-06-05 10:36:22 +00:00
parent 61ecd095bb
commit 7409aa2fc1

View File

@ -14,8 +14,35 @@ kver="$(rpm -qa 'kernel-image*' \
# for TWRP based ARM "VE" chroots (e.g. for nexus7);
# should be implemented in make-initrd either
### rootfs type should become configurable
if rpm -q mkinitrd; then
mkinitrd --with ext4 -f /boot/initrd-$kver.img "$kver"
fi
# NB: if the adresses ever become different this "API" _will_ change
# NB: initrd compression (-C) might change, armadaxp handles gzip
umk() {
[ $# = 4 ] || exit 1
cd /boot
umkimage \
-A arm \
-O linux \
-T "$1" \
-C none \
-a "$2" \
-e "$2" \
-n "`readlink "$3"`" \
-d "$3" \
"$4"
}
### the addresses will become variables some day probably
if rpm -q uboot-tools; then
umk kernel 0x00008000 vmlinuz uimage
umk ramdisk 0x00800000 initrd.img uinitrd
if [ -s boot ]; then
umk script 0 boot boot.scr
fi
fi
: