summaryrefslogtreecommitdiff
path: root/packages/initrdscripts/initramfs-kexec_1.0.bb
blob: b5bf497f373437e2357eb00e0752f42766af018e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DESCRIPTON = "A init script that mounts a device and kexecs a new kernel from it."
PR = "r3"

do_compile() {
        cat > init.sh << EOF
#!/bin/sh
/bin/mount -t proc proc /proc
/bin/mount -t ${ROOTFS} /dev/${ROOTDEV} /mnt
/usr/sbin/kexec -l /mnt/zImage
/usr/sbin/kexec -e
EOF
}

do_install() {
        install -m 0755 ${S}/init.sh ${D}/init
        install -d ${D}/proc
        install -d ${D}/mnt
}

PACKAGE_ARCH = "all"

FILES_${PN} = "/init /proc /mnt"

ROOTDEV = "mtdblock2"
ROOTFS = "jffs2"