core-image-elphel393.bb 4.7 KB
Newer Older
1 2
DESCRIPTION = "Elphel NC 393 image (based on core-image-minimal)."

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
3 4
IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"

5 6
#IMAGE_FEATURES = "read-only-rootfs"

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
7
# remove not needed ipkg informations
8
IMAGE_INSTALL_append = "u-boot-ezynq"
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
9 10
IMAGE_INSTALL_append += " \ 
                         sudo \
11
                         gcc \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
12
                         python-core \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
13
                         python-numpy \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
14
                         python-argparse \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
15
                         python-json \
16
                         elphel-python-extensions \
17
                         htop \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
18
                         rsync \
19 20
                         i2c-tools \
                         mtd-utils \
21
                         mtd-utils-misc \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
22
                         mtd-utils-ubifs \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
23
                         hdparm \
24 25
                         ethtool \
                         net-tools \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
26
                         ntp \
27
                         sntp \
28
                         ntpdate \
29 30
                         openssh \
                         nano \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
31
                         tree \
32 33 34 35
                         lighttpd \
                         lighttpd-module-fastcgi \
                         lighttpd-module-cgi \
                         apache2 \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
36
                         perl \
37
                         php-cgi \
38
                         php-cli \
39
                         libsjs \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
40
                         smartmontools \
41
                         libogg \
Andrey Filippov's avatar
Andrey Filippov committed
42
                         libpng \
43 44
                         apps-camogm \
                         apps-imgsrv \
45
                         apps-autocampars \
46
                         apps-autoexposure \
47
                         apps-histograms \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
48
                         web-393 \
Andrey Filippov's avatar
Andrey Filippov committed
49
                         web-camvc \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
50
                         web-hwmon \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
51
                         iw \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
52 53
                         wpa-supplicant \
                         dhcp-client \
54
                         dhcpcd \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
55
                         linux-firmware-rtl8192cu \
56
                         init \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
57
                         overlay-sync \
58
                         init-tempmon \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
59 60
                         udev-rules \
                         e2fsprogs \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
61
                         gstreamer1.0 \
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
62
                        "
63
                        
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
64 65 66 67
# gstreamer1.0-plugins-base \ 
# gstreamer1.0-plugins-good \ 
# gstreamer1.0-plugins-bad \ 
# gstreamer1.0-rtsp-server \ 
68 69
# opencv-apps \
# python-opencv \
70
#
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
71

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
72 73 74 75 76 77
inherit extrausers
EXTRA_USERS_PARAMS = "\
                        useradd -P pass elphel;\
                        usermod -P pass root;\
                    "

78
#kernel-modules
79 80
IMAGE_INSTALL_append += " kernel-module-ahci-elphel \
                        "
81 82 83 84 85 86
IMAGE_LINGUAS = " "

LICENSE = "MIT"

inherit core-image

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
87
IMAGE_ROOTFS_SIZE = "262144"
88

89
#IMAGE_FSTYPES = "ext2.gz ext2.gz.u-boot tar.gz"
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
90
#IMAGE_FSTYPES = "ext2.gz.u-boot tar.gz"
91
IMAGE_FSTYPES = "tar.gz ubi"
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
92

93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
########################################################################
########################################################################
## root@elphel393:~# mtdinfo /dev/mtd4 -u
## mtd4
## Name:                           rootfs
## Type:                           nand
## Eraseblock size:                131072 bytes, 128.0 KiB
## Amount of eraseblocks:          2048 (268435456 bytes, 256.0 MiB)
## Minimum input/output unit size: 2048 bytes
## Sub-page size:                  2048 bytes
## OOB size:                       64 bytes
## Character device major/minor:   90:8
## Bad blocks are allowed:         true
## Device is writable:             true
## Default UBI VID header offset:  2048
## Default UBI data offset:        4096
## Default UBI LEB size:           126976 bytes, 124.0 KiB
## Maximum UBI volumes count:      128
########################################################################
########################################################################

MKUBIFS_ARGS = " -m 2048 -e 126976 -c 2048"
UBINIZE_ARGS = " -m 2048 -p 128KiB -s 2048"
116 117

create_symlinks_append(){
118 119 120 121 122 123 124 125
    rlocs = (d.getVar('PRODUCTION_ROOT_LOCATION', True)).split()
    for rloc in rlocs:
        if not os.path.isdir("${DEPLOY_DIR_IMAGE}/"+rloc):
            os.system("mkdir ${DEPLOY_DIR_IMAGE}/"+rloc)
            
        if (rloc=="mmc"): 
            image_ext = ".tar.gz"
        else:             
126
            image_ext = ".ubifs"
127 128 129 130 131
        
        if os.path.isfile("${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs"+image_ext):
            if os.path.isfile("${DEPLOY_DIR_IMAGE}/"+rloc+"/${PRODUCTION_ROOTFS}"+image_ext):
                os.system("rm ${DEPLOY_DIR_IMAGE}/"+rloc+"/${PRODUCTION_ROOTFS}"+image_ext) 
            os.system("cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs"+image_ext+" ${DEPLOY_DIR_IMAGE}/"+rloc+"/${PRODUCTION_ROOTFS}"+image_ext)
Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
132
}