Variables » History » Version 20
Eric Krausser, 01/11/2012 04:19 PM
link to share/mk/converters
1 | 9 | Eric Krausser | h1. Variables for board.mk |
---|---|---|---|
2 | 1 | Eric Krausser | |
3 | 1 | Eric Krausser | h2. Board definition |
4 | 1 | Eric Krausser | |
5 | 1 | Eric Krausser | *SOC_VENDOR* |
6 | 1 | Eric Krausser | |
7 | 1 | Eric Krausser | A valid value would be a directory name from ./socs (http://zrouter.org/projects/zrouter/repository/show/socs). |
8 | 1 | Eric Krausser | |
9 | 1 | Eric Krausser | *SOC_CHIP* |
10 | 1 | Eric Krausser | |
11 | 1 | Eric Krausser | A valid value would be a directory name from ./socs/${SOC_VENDOR}. |
12 | 1 | Eric Krausser | |
13 | 1 | Eric Krausser | *BOARD_FLASH_TYPE* |
14 | 1 | Eric Krausser | |
15 | 4 | Eric Krausser | Obsolete, don't use it. |
16 | 4 | Eric Krausser | |
17 | 1 | Eric Krausser | *BOARD_FLASH_SIZE* |
18 | 4 | Eric Krausser | |
19 | 8 | Eric Krausser | Physical capacity of the flash chip in bytes. Valid values are numbers, hex numbers, or numbers with trailing M or K. |
20 | 1 | Eric Krausser | |
21 | 8 | Eric Krausser | e.g.: |
22 | 8 | Eric Krausser | BOARD_FLASH_SIZE=8388608 |
23 | 8 | Eric Krausser | BOARD_FLASH_SIZE=0x00800000 |
24 | 8 | Eric Krausser | BOARD_FLASH_SIZE=8M |
25 | 8 | Eric Krausser | BOARD_FLASH_SIZE=8192K |
26 | 4 | Eric Krausser | |
27 | 1 | Eric Krausser | |
28 | 1 | Eric Krausser | h2. Customize kernel |
29 | 1 | Eric Krausser | |
30 | 1 | Eric Krausser | *KERNCONF_IDENT* |
31 | 1 | Eric Krausser | |
32 | 1 | Eric Krausser | Usually ${TARGET_VENDOR}_${TARGET_DEVICE} |
33 | 1 | Eric Krausser | |
34 | 1 | Eric Krausser | *WITH_USB* |
35 | 1 | Eric Krausser | |
36 | 1 | Eric Krausser | If defined (e.g. set to WITH_USB=yes), build with kernel modules like usb, ehci, umass, etc. (see ./socs/${SOC_VENDOR}/${SOC_CHIP}/soc.mk). |
37 | 1 | Eric Krausser | |
38 | 1 | Eric Krausser | *KERNCONF_MODULES_OVERRIDE* |
39 | 1 | Eric Krausser | |
40 | 13 | Eric Krausser | Use this to append additional kernel modules, e.g. for some common USB stuff: |
41 | 13 | Eric Krausser | @KERNCONF_MODULES_OVERRIDE+=usb/uplcom usb/u3g usb/umodem usb/ucom cam zlib@ |
42 | 13 | Eric Krausser | or for WLAN: |
43 | 13 | Eric Krausser | @KERNCONF_MODULES_OVERRIDE+=wlan_xauth wlan_wep wlan_tkip wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt@ |
44 | 1 | Eric Krausser | |
45 | 1 | Eric Krausser | |
46 | 1 | Eric Krausser | h2. Customize world |
47 | 1 | Eric Krausser | |
48 | 1 | Eric Krausser | *WORLD_SUBDIRS_ZROUTER* |
49 | 1 | Eric Krausser | |
50 | 1 | Eric Krausser | ?? Additional utilities, e.g. WORLD_SUBDIRS_ZROUTER+=target/sbin/upgrade |
51 | 1 | Eric Krausser | |
52 | 1 | Eric Krausser | |
53 | 19 | Eric Krausser | *WORLD_BUILD_ENV_EXTRA* |
54 | 19 | Eric Krausser | |
55 | 19 | Eric Krausser | Allow to add extra flags for buildworld. |
56 | 19 | Eric Krausser | |
57 | 19 | Eric Krausser | |
58 | 1 | Eric Krausser | *TARGET_PROFILES* |
59 | 1 | Eric Krausser | |
60 | 1 | Eric Krausser | TARGET_PROFILES+=SMALL_ |
61 | 1 | Eric Krausser | #TARGET_PROFILES+=SMALL_ mpd ssh shttpd dlink.ua.web hostap dhcp nfs_client # mono # racoon |
62 | 1 | Eric Krausser | |
63 | 1 | Eric Krausser | |
64 | 1 | Eric Krausser | h2. Firmware image options |
65 | 1 | Eric Krausser | |
66 | 1 | Eric Krausser | *FIRMWARE_IMAGE_SIZE_MAX* |
67 | 1 | Eric Krausser | |
68 | 12 | Eric Krausser | The Image must not be bigger than the geom_map 'upgrade' partition (see [[Partition_layout]]), but other limitations can apply. For example NQ-900 has 32M of RAM and 16M of flash, but it is hard to download 16M image when you have only 32M of RAM. |
69 | 2 | Eric Krausser | |
70 | 2 | Eric Krausser | e.g. FIRMWARE_IMAGE_SIZE_MAX=0x007a0000 |
71 | 1 | Eric Krausser | |
72 | 1 | Eric Krausser | |
73 | 1 | Eric Krausser | *KERNEL_COMPRESSION* |
74 | 1 | Eric Krausser | |
75 | 1 | Eric Krausser | KERNEL_COMPRESSION=oldlzma |
76 | 1 | Eric Krausser | KERNEL_COMPRESSION_TYPE=oldlzma |
77 | 1 | Eric Krausser | UBOOT_KERNEL_COMPRESSION_TYPE=lzma |
78 | 1 | Eric Krausser | MKULZMA_BLOCKSIZE=65536 |
79 | 1 | Eric Krausser | |
80 | 1 | Eric Krausser | |
81 | 1 | Eric Krausser | *PACKING_KERNEL_IMAGE* |
82 | 1 | Eric Krausser | |
83 | 14 | Eric Krausser | A converter chain to use on the built FreeBSD kernel. |
84 | 14 | Eric Krausser | |
85 | 17 | Oleksandr Rybalko | e.g. PACKING_KERNEL_IMAGE?=kernel.strip.oldlzma.uboot.sync |
86 | 1 | Eric Krausser | |
87 | 20 | Eric Krausser | Available converters for kernel (also look at source:share/mk/converters): |
88 | 17 | Oleksandr Rybalko | * _bz2_ to compress the kernel with bzip2 (depends on bootloader if he can decompress in the given format) |
89 | 17 | Oleksandr Rybalko | * _gz_ to compress the kernel with gzip (depends on bootloader if he can decompress in the given format) |
90 | 1 | Eric Krausser | * _kbin_ will do "objcopy -O binary ..." on the ELF-kernel, the result is a smaller binary kernel (without ELF header) |
91 | 17 | Oleksandr Rybalko | * _oldlzma_ to compress the kernel with old release of lzma (depends on bootloader if he can decompress in the given format) |
92 | 17 | Oleksandr Rybalko | * _strip_ will strip symbols from the kernel to save space |
93 | 17 | Oleksandr Rybalko | * _sync_ pad kernel with zeros to block size (like dd(1) conv=sync option do). Example: if kernel size is 127k and flash block size is 64k, it become 128k with 1k zeros in it. |
94 | 17 | Oleksandr Rybalko | * _uboot_ pack kernel with U-Boot mkimage (uboot_mkimage) tool |
95 | 17 | Oleksandr Rybalko | * _xz_ to compress the kernel with xz (depends on bootloader if he can decompress in the given format) |
96 | 1 | Eric Krausser | |
97 | 1 | Eric Krausser | *PACKING_ROOTFS_IMAGE* |
98 | 1 | Eric Krausser | |
99 | 17 | Oleksandr Rybalko | A converter chain to use on the built rootfs file system. |
100 | 1 | Eric Krausser | |
101 | 17 | Oleksandr Rybalko | e.g. PACKING_ROOTFS_IMAGE?=rootfs_clean.iso.ulzma |
102 | 17 | Oleksandr Rybalko | |
103 | 20 | Eric Krausser | Available converters for rootfs (also look at source:share/mk/converters): |
104 | 17 | Oleksandr Rybalko | * _iso_ pack rootfs as iso9660 file system |
105 | 17 | Oleksandr Rybalko | * _ffs_ pack rootfs as FFS/UFS file system |
106 | 17 | Oleksandr Rybalko | * _tar_ pack rootfs with regular tar(1) utility |
107 | 17 | Oleksandr Rybalko | * _bz2_, _gz_, _xz_, _sync_ can be also applied if required (see PACKING_KERNEL_IMAGE) |
108 | 1 | Eric Krausser | |
109 | 1 | Eric Krausser | *NEW_IMAGE_TYPE* |
110 | 1 | Eric Krausser | |
111 | 5 | Eric Krausser | Valid values: |
112 | 6 | Eric Krausser | * zimage (for regular uboot images, see [[zimage]]) |
113 | 5 | Eric Krausser | * ubntimage (for Ubiquty boards) |
114 | 7 | Eric Krausser | * trximage |
115 | 11 | Eric Krausser | * tplink_image (for some TP-Link boards with 'special' uboot) |
116 | 7 | Eric Krausser | * split_kernel_rootfs |
117 | 1 | Eric Krausser | |
118 | 1 | Eric Krausser | e.g. NEW_IMAGE_TYPE=zimage |
119 | 9 | Eric Krausser | |
120 | 9 | Eric Krausser | |
121 | 9 | Eric Krausser | |
122 | 9 | Eric Krausser | h1. Variables for profile.mk |
123 | 9 | Eric Krausser | |
124 | 10 | Eric Krausser | *WORLD_SUBDIRS* |
125 | 10 | Eric Krausser | |
126 | 10 | Eric Krausser | *WORLD_SUBDIRS_BIN* |
127 | 10 | Eric Krausser | |
128 | 10 | Eric Krausser | A shortcut that add to WORLD_SUBDIRS each bin/${item} |
129 | 10 | Eric Krausser | |
130 | 10 | Eric Krausser | *WORLD_SUBDIRS_SBIN* |
131 | 10 | Eric Krausser | |
132 | 10 | Eric Krausser | A shortcut that add to WORLD_SUBDIRS each sbin/${item} |
133 | 10 | Eric Krausser | |
134 | 9 | Eric Krausser | *WORLD_SUBDIRS_USR_SBIN* |
135 | 9 | Eric Krausser | |
136 | 9 | Eric Krausser | A shortcut that add to WORLD_SUBDIRS each usr.sbin/${item} |
137 | 10 | Eric Krausser | |
138 | 10 | Eric Krausser | *WORLD_SUBDIRS_USR_BIN* |
139 | 10 | Eric Krausser | |
140 | 10 | Eric Krausser | A shortcut that add to WORLD_SUBDIRS each usr.bin/${item} |
141 | 10 | Eric Krausser | |
142 | 10 | Eric Krausser | *WORLD_SUBDIRS_LIB* |
143 | 10 | Eric Krausser | |
144 | 10 | Eric Krausser | A shortcut that add to WORLD_SUBDIRS each lib/${item} |