Annotation of elwix/BUILD.txt, revision 1.7
1.2 misho 1: -= How-to build ELWIX system project =-
2: =========================================
1.7 ! misho 3: $Id: BUILD.txt,v 1.6.2.2 2017/10/10 08:05:35 misho Exp $
1.2 misho 4: =========================================
5:
6: I. Intro
7: Before starting any work on ELWIX must we prepare environment.
8:
9: What this means ::
10: - We must downloading freebsd sources from CVS/SVN repository and put on separate place from /usr/src.
11: Set in config/rc.elwix variable BSDSRC="..." with place where you get freebsd sources.
12: - We gather from ELWIX CVS repository kodicom_mux project. After this we need to patch our freebsd
13: sources like that "cd <where you put freebsd sources>; patch -p0 < <kodicom_mux/contrib/kodicom.patch>"
14: - We must checkout from ELWIX CVS repository core libraries "libait*" , "embedtools", "embedaddons"
15: and GPLv2 "gpl/*" projects
16: - Optional download of 3th party software for ELWIX firmware. Project name is embedaddon from ELWIX CVS
17:
1.7 ! misho 18: II. Fresh FreeBSD source tree
! 19: 1. When you get new FreeBSD source tree. You should apply patches
! 20: ./apply_patches.sh
! 21:
! 22: III. Build system process
1.2 misho 23: 1. Init build structures with clean directory tree
1.5 misho 24: ./build_init.sh <filename of project config>
1.7 ! misho 25: Result after its work is cleaned previous storage and created new structure for build process
1.2 misho 26: 2. Cross compile entire userland software
27: ./build_world.sh
1.7 ! misho 28: Result from build_world.sh. Cross built whole FreeBSD project and
! 29: prepared cross build scripts for ELWIX further build processes.
1.2 misho 30: 3. Cross compile ELWIX kernel
31: ./build_kernel.sh
1.7 ! misho 32: Result from ./build_kernel.sh. Cross built two kernels. One for ELWIX Base image without
! 33: embedded RootFS and another with RootFS for ELWIX RootFS images.
1.2 misho 34: 4. Cross compile ELWIX tools
35: ./build_tools.sh
1.7 ! misho 36: Result from ./build_tools.sh. Cross built ELWIX core tools, libraries and services.
! 37: Produced ELWIX system package file elwix-pkg.frm
1.2 misho 38: 5. Cross compile optional 3th party software
39: ./build_3thparty.sh
1.7 ! misho 40: Result from build_3thparty.sh. Cross built optional 3th party software for project.
! 41: Produced ELWIX system image file elwix-firmware2.sys
1.6 misho 42: ---------------------------------------------------------------------------------
43: 6. Now is moment for build BaseFS ELWIX system
1.3 misho 44: ./build_base.sh
1.7 ! misho 45: Result from build_base.sh. Built ELWIX Base OS version.
! 46: All software will be installed directly on flash/disk storage.
! 47: Script leave ready to install archive and compressed kernel.gz
! 48: Example for ready for install archive: ELWIX-2.6_x86_base_128mb_i386_2017-10-10.tar.gz
1.6 misho 49: ---------------------------------------------------------------------------------
50: 7. Moment comes for build big system binary and inject rootfs image into kernel
1.2 misho 51: ./build_rootfs.sh
1.7 ! misho 52: Result from build_rootfs.sh.
! 53: Cross built and leave image rootfs.img which was been injected into kernel.
! 54: Script prepared compressed kernel with embedded zero stage image of ELWIX into kernel_rootfs.gz
1.3 misho 55: 8. Make romfs image and build big fat second stage firmware image
1.2 misho 56: ./build_romfs.sh
1.7 ! misho 57: Result from build_romfs.sh. Script collected files and prepare first stage ELWIX image.
! 58: Produced ELWIX system image file elwix-firmware.sys
1.6 misho 59: 9. Now is moment for build RootFS ELWIX system
1.2 misho 60: ./build_fs.sh
1.7 ! misho 61: Result from build_fs.sh. Built ELWIX RootFS OS versions.
! 62: All software will be installed as images on flash/disk storage.
! 63: Script produced two version of ELWIX OS:
! 64: - RootFS small image which consume more RAM because all software is into memory drives.
! 65: Example for ready for install archive: ELWIX-2.6_x86_rootfs_64mb_i386_2017-10-10.tar.gz
! 66: - RootFS image which partially installed base tools directly onto flash.
! 67: Example for ready for install archive: ELWIX-2.6_x86_rootfsext_128mb_i386_2017-10-10.tar.gz
1.6 misho 68: ---------------------------------------------------------------------------------
1.2 misho 69:
70: Ok, now we did ELWIX version and placed to build/release directory like tar.gz file
71:
1.6 misho 72: Example of produced tar balls::
73: ELWIX_X.X_target_{base|rootfs|rootfsext}_size_arch_date.tar.gz
74:
75: III. Build storage image
76: 1. Build ELWIX system into binary fs image file
77: ./install2img <ELWIX_X.X_target_.....tar.gz> [image_size_in_KB]
78: 2. Build ELWIX system into direct device
79: ./install2dev </dev/daX> <ELWIX_X.X_target_.....tar.gz>
80: 3. Build ELWIX system into separate compressed binary images for u-boot embedded devices
81: ./install2uboot <kernel|kernel_rootfs|rootfs|bin|vendor>
82:
83: IV. Emergency default address
84: IP: 10.254.254.254/30
85: VLAN: 4093
86:
87: You should setup at your side 10.254.254.253/30 on VLAN 4093
88:
89: IV. Information
90: For more information
1.2 misho 91: Michael Pounov <misho@elwix.org> or <support@elwix.org>
92:
93: Best regards
94: Michael Pounov
95: -----
96: ELWIX - Embedded LightWeight unIX -
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>