| | |
| | | |
| | | TARBALL_FTP=ftp://master.iot-yun.club/src/ |
| | | |
| | | |
| | | ROOTFS_SRC=rootfs |
| | | ROOTFS_IMG=rootfs-${BOARD}.ubi |
| | | |
| | |
| | | tar -xjf ${PACK_PATH}/${SRC_DIR}.tar.bz2 |
| | | cd ${SRC_DIR} |
| | | |
| | | # Copy u-boot logo file |
| | | echo ${SRC_DIR} | grep "u-boot" > /dev/null |
| | | if [ $? == 0 ] ; then |
| | | LOGO_FILE=logo-uboot.bmp |
| | | if [ -f ${PATCH_PATH}/${LOGO_FILE} ] ; then |
| | | cp -f ${PATCH_PATH}/${LOGO_FILE} tools/logos/logo.bmp |
| | | fi |
| | | fi |
| | | |
| | | # Copy linux kernel logo file |
| | | echo ${SRC_DIR} | grep "linux" > /dev/null |
| | | if [ $? == 0 ] ; then |
| | | LOGO_FILE=logo-kernel.ppm |
| | | if [ -f ${PATCH_PATH}/${LOGO_FILE} ] ; then |
| | | cp -f ${PATCH_PATH}/${LOGO_FILE} drivers/video/logo/logo_linux_clut224.ppm |
| | | fi |
| | | fi |
| | | |
| | | # patch for Jelliesv2 |
| | | # do patch |
| | | if [ -f ${PATCH_PATH}/${SRC_DIR}-${PATCH_SUFIX} ] ; then |
| | | show_banner "| patch for ${SRC_DIR} |" |
| | | |
| | |
| | | ubinize_cfg=ubinize.cfg |
| | | ubimg_tmp=ubi.img |
| | | |
| | | |
| | | # Rootfs partition size |
| | | partition_size=40 # MiB |
| | | partition_size=80 # MiB |
| | | |
| | | # K9F2G08: Nandflash 1 block=64 pages, 1 page = 2048 |
| | | BLOCK_PAGES=64 |
| | | PAGE_SIZE=2048 |
| | | SUBPAGE_SIZE=512 |
| | | |
| | | # Logic Erase Block Size: UBI requires 2 minimum I/O units out of each Physical Erase Block (PEB) for overhead: |
| | | # 1 for maintaining erase count information, and 1 for maintaining the Volume ID information. |
| | | # |
| | | # In FL2440 Linux-3.0 kernel only need 1 PEB, or kernel will throw error: |
| | | # UBIFS error (pid 1): validate_sb: LEB size mismatch: 126976 in superblock, 129024 real |
| | | |
| | | PEB_SIZE=`expr $PAGE_SIZE \* $BLOCK_PAGES` |
| | | LEB_SIZE=`expr $PEB_SIZE - 2 \* $PAGE_SIZE ` |
| | | LEB_SIZE=`expr $PEB_SIZE - 1 \* $PAGE_SIZE ` |
| | | |
| | | |
| | | #UBI reserves 4 blocks space for management and bad PEB handling operations |
| | | # 2 PEBs are used to store the UBI volume table |
| | |
| | | #cat $ubinize_cfg |
| | | |
| | | set -x |
| | | ubinize -o ${ROOTFS_IMG} -m ${PAGE_SIZE} -p ${PEB_SIZE} $ubinize_cfg |
| | | ubinize -o ${ROOTFS_IMG} -m ${PAGE_SIZE} -p ${PEB_SIZE} -s ${SUBPAGE_SIZE} $ubinize_cfg |
| | | set +x |
| | | |
| | | rm -f $ubimg_tmp $ubinize_cfg |