summaryrefslogtreecommitdiff
path: root/meta-tizen-micro/recipes-image/raspberrypi2/rpi-hwup-image-tizen-micro.bb
blob: 004ec784ddea22bb49f0903758b8cef102d856cc (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
26
27
28
29
# Base this image on rpi-hwup-image
include recipes-core/images/rpi-hwup-image.bb

CORE_IMAGE_EXTRA_INSTALL += "nodejs"
CORE_IMAGE_EXTRA_INSTALL += "nginx"
CORE_IMAGE_EXTRA_INSTALL += "wpa-supplicant wpa-supplicant-cli"
CORE_IMAGE_EXTRA_INSTALL += "openssh"
CORE_IMAGE_EXTRA_INSTALL += "systemd-serialgetty util-linux-agetty procps"
CORE_IMAGE_EXTRA_INSTALL += "v4l2grab"

# Set root password to "root"
ROOTFS_POSTPROCESS_COMMAND += "set_root_passwd;"
set_root_passwd() {
    sed 's%^root:[^:]*:%root:wYNffsf6sozwE:%' \
        < ${IMAGE_ROOTFS}/etc/shadow \
        > ${IMAGE_ROOTFS}/etc/shadow.new;
    mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow ;
}

def get_kernelversion_file(p):
    fn = p + '/kernel-abiversion'

    try:
        with open(fn, 'r') as f:
            return f.readlines()[0].strip()
    except IOError:
        return None

STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"