summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNora Björklund <nora.bjorklund@enea.com>2016-02-15 11:15:04 +0100
committerHuimin She <huimin.she@enea.com>2016-02-25 14:50:52 +0100
commite58201058c30d84fe4af70d15922ffa92ebcfb81 (patch)
tree45ef31a11d5ff744a4e758830559b4f56ded831c
parent08ed22a80c1f4ba38f09ede1118fd49e843202f6 (diff)
downloadmeta-el-common-e58201058c30d84fe4af70d15922ffa92ebcfb81.tar.gz
pramfs-init: remove recipe
Since pramfs has been moved, and the init scripts are not applicable to all architectures, we can move pramfs-init from meta-enea-base to meta-enea-bsp-ppc instead. Signed-off-by: Nora Björklund <nora.bjorklund@enea.com> Signed-off-by: Huimin She <huimin.she@enea.com>
-rw-r--r--recipes-kernel/pramfs-init/files/pramfs_init80
-rw-r--r--recipes-kernel/pramfs-init/pramfs-init_1.0.bb20
2 files changed, 0 insertions, 100 deletions
diff --git a/recipes-kernel/pramfs-init/files/pramfs_init b/recipes-kernel/pramfs-init/files/pramfs_init
deleted file mode 100644
index 64c7bc2..0000000
--- a/recipes-kernel/pramfs-init/files/pramfs_init
+++ /dev/null
@@ -1,80 +0,0 @@
1#!/bin/sh
2#set -e
3
4echo "Setting up pramfs"
5
6# ensure the required binaries are present
7#[ -x /sbin/modprobe ] || exit 1
8[ -x /bin/mount ] || exit 1
9[ -x /bin/grep ] || exit 1
10[ -x /bin/cat ] || exit 1
11[ -x /bin/sed ] || exit 1
12
13#modprobe pramfs
14mkdir -p /mnt/pram
15
16case "$1" in
17 start)
18 # Figure out RAM for pramfs
19 # This requires a kernel cmdline resevation of PRAMFS physmem
20 # in format memmap=16M$0x7000000
21 grep memmap /proc/cmdline > /dev/null
22 if [ $? -eq 0 ]; then
23 addr=$(sed 's/.*memmap=\([^ ]*\)\$\([^ ]*\).*/\2/' < /proc/cmdline)
24 size=$(sed 's/.*memmap=\([^ ]*\)\$\([^ ]*\).*/\1/' < /proc/cmdline)
25
26 if [ -d /seed ]; then
27 echo "Init new pramfs"
28 mount -t pramfs -o physaddr=$addr,init=$size,bs=1k none /mnt/pram > /dev/null 2>&1
29 cp /seed/* /mnt/pram
30 echo "0" > /mnt/pram/kcount
31 else
32 echo "Mounting old pramfs"
33 mount -t pramfs -o physaddr=$addr,bs=1k none /mnt/pram > /dev/null 2>&1
34 if [ $? -ne 0 ]; then
35 echo "Mounting old pramfs failed, zeroing"
36 mount -t pramfs -o physaddr=$addr,init=$size,bs=1k none /mnt/pram > /dev/null 2>&1
37 if [ $? -ne 0 ]; then
38 echo "All attempts to mount pramfs has failed, exiting"
39 rm -fr /mnt/pram
40 exit 1
41 fi
42 echo "0" > /mnt/pram/kcount
43 fi
44 fi
45
46# echo "* Setting up kexec"
47# kexec -l --reuse-cmdline --initrd=/mnt/pram/initramfs.cpio.gz /mnt/pram/vmlinuz
48
49 # Calculate number of boots
50 export KCOUNT=$(expr $(cat /mnt/pram/kcount) + 1)
51 echo $KCOUNT > /mnt/pram/kcount
52 else
53 KCOUNT="no-mem"
54 echo "Can't find memory area for pram fs"
55 rm -fr /mnt/pram
56 fi
57
58 echo "PRAMFS boot count: $KCOUNT"
59# echo "kexec -e to kexec and keep persistent files in /mnt/pram"
60 ;;
61 stop)
62 echo
63 ;;
64 restart)
65 $0 stop
66 $0 start
67 ;;
68 *)
69 echo "usage: $0 { start | stop | restart }" >&2
70 exit 1
71 ;;
72esac
73
74exit 0
75
76
77
78
79
80
diff --git a/recipes-kernel/pramfs-init/pramfs-init_1.0.bb b/recipes-kernel/pramfs-init/pramfs-init_1.0.bb
deleted file mode 100644
index d9b36a7..0000000
--- a/recipes-kernel/pramfs-init/pramfs-init_1.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1DESCRIPTION = "Pramfs init scripts"
2SECTION = "init"
3LICENSE = "BSD"
4SRC_URI = "file://pramfs_init"
5PR = "r0"
6
7LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
8 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
9
10PACKAGE_ARCH = "all"
11
12do_install() {
13 install -d ${D}${sysconfdir}/init.d/
14 install -m 0755 ${WORKDIR}/pramfs_init ${D}${sysconfdir}/init.d/pramfs_init
15}
16
17inherit update-rc.d
18
19INITSCRIPT_NAME = "pramfs_init"
20INITSCRIPT_PARAMS = "start 99 5 2 . stop 19 0 1 6 ."