rev |
line source |
pankso@1
|
1 SEB - SliTaz Embedded OS
|
pankso@1
|
2 ================================================================================
|
pankso@1
|
3
|
paul@15
|
4 Back to the root with this cmdline tool to build really small SliTaz text mode
|
paul@15
|
5 systems for hacking, learning and developing small Linux operating systems.
|
pankso@1
|
6
|
paul@15
|
7 Seb builder will init a minimal set of files that you can customise to your
|
pankso@1
|
8 needs, install Busybox and create a compressed rootfs that can boot in frugal
|
pankso@1
|
9 mode as well as an ISO image to use with Qemu. Other boot methods can be used
|
pankso@1
|
10 with a bit a knowledge (web boot). The system is built in a single rootfs
|
paul@15
|
11 folder which can be used as a chroot environment.
|
pankso@1
|
12
|
paul@15
|
13 SliTaz embedded provides all basic Linux commands, a powerful web server with
|
paul@15
|
14 CGI support and a set of home made tools for administration and debugging. Seb
|
paul@15
|
15 is easy too use, follows the KISS principle. Please use SliTaz Bugs System
|
paul@15
|
16 for any bug reports. There is no wifi support and it's not bug :-)
|
pankso@1
|
17
|
pankso@1
|
18 If you want to learn more about the basics of a Linux operating system you
|
paul@15
|
19 can have a look at the SliTaz Scratchbook which explains step by step the creation
|
paul@15
|
20 of SliTaz back in 2006. This tool was published in 2017, ten years after the first
|
pankso@1
|
21 cooking public release :-)
|
pankso@1
|
22
|
paul@15
|
23 Seb system will fit into a ~4MB ISO image for the really base system, up to 10Mb
|
paul@15
|
24 or more, but without X. If you are searching for an even more smaller SliTaz
|
pankso@1
|
25 version, please have a look to Tiny SliTaz: http://tiny.slitaz.org
|
pankso@1
|
26
|
pankso@1
|
27
|
pankso@1
|
28 Goals and features
|
pankso@1
|
29 -------------------------------------------------------------------------------
|
pankso@1
|
30
|
paul@15
|
31 * Build fast and light servers or mediabox
|
pankso@1
|
32 * Nice way to learn about creating Linux OS
|
paul@15
|
33 * Build small rescue systems in frugal mode
|
pankso@1
|
34 * Fun playground for hackers and kids
|
pankso@1
|
35
|
pankso@1
|
36
|
pankso@1
|
37 Quickstart Guide:
|
pankso@1
|
38 --------------------------------------------------------------------------------
|
pankso@12
|
39 Build a distro in a few commands. Install seb or run it from source tree:
|
pankso@1
|
40
|
pankso@12
|
41 # mkdir seb-os; cd seb-os
|
pankso@1
|
42 # seb init
|
pankso@12
|
43
|
pankso@12
|
44 You can now modify and add extra files in the embfs/ folder. Let's include
|
pankso@12
|
45 sqlite package and build the ISO image:
|
pankso@12
|
46
|
pankso@1
|
47 # seb -p sqlite --add
|
pankso@1
|
48 # seb build
|
pankso@1
|
49
|
pankso@12
|
50 If you want to test the OS, you can install Qemu emulator and run:
|
pankso@12
|
51
|
pankso@12
|
52 # seb -e
|
pankso@12
|
53
|
pankso@11
|
54 To get a list of commands, just run seb without arguments: $ seb
|
pankso@11
|
55
|
pankso@1
|
56
|
pankso@1
|
57 Build process & environment
|
pankso@1
|
58 --------------------------------------------------------------------------------
|
paul@15
|
59 Seb does not compile any tools, it will use a SliTaz standard executable and
|
pankso@10
|
60 libraries - Seb OS is created on top of SliTaz. Packages installed in seb must
|
paul@15
|
61 be on the build host, this is the case for the full basic system.
|
pankso@1
|
62
|
pankso@1
|
63 Seb will build the custom operating system into the current directory or it
|
pankso@10
|
64 will read a build.conf file to know the path to the work/build folder. Seb will
|
pankso@1
|
65 use these directories to work:
|
pankso@1
|
66
|
paul@15
|
67 * rootfs/ The root filesystem of the compressed operating system
|
pankso@1
|
68 * rootiso/ Root of the ISO image with rootfs.gz, bootloader and kernel
|
paul@15
|
69 * sebfs/ Custom files overwriting files in the rootfs
|
pankso@1
|
70 * sebpkgs/ The packages to install into the distro
|
pankso@1
|
71
|
pankso@1
|
72
|
pankso@21
|
73 Rootfs & rootfs.xz
|
pankso@21
|
74 --------------------------------------------------------------------------------
|
paul@23
|
75 The rootfs/ folder contains the full system tree and the rootfs.xz in a cpio
|
pankso@21
|
76 archive compressed with xz. In the build process, the files and the packages
|
paul@23
|
77 are installed in the rootfs first, then the customizable files in the sebfs/
|
paul@23
|
78 folder are copied in the system tree, so any file can be overwritten and you
|
pankso@21
|
79 have full control on all files :-)
|
pankso@21
|
80
|
pankso@21
|
81
|
pankso@12
|
82 Linux kernel and modules
|
pankso@12
|
83 -------------------------------------------------------------------------------
|
pankso@12
|
84 By default seb will use the running kernel and a custom one can be used with
|
paul@15
|
85 the option --linux= or with a build.conf file. There are no kernel modules
|
pankso@12
|
86 support in seb, it would mean having kmod, liblzma, zlib and a bunch of files
|
pankso@12
|
87 in /lib/modules. This is not what we want in a small customized OS. To be fast
|
paul@15
|
88 at boot we recommend you to build your own linux kernel with SliTaz utils or
|
paul@15
|
89 from source like explained in the Scratchbook with modules built-in the kernel.
|
pankso@12
|
90
|
pankso@12
|
91 To use a custom Linux kernel with seb builder:
|
pankso@12
|
92
|
pankso@12
|
93 # seb build --linux=/path/to/bzImage
|
pankso@12
|
94
|
pankso@12
|
95 To cook a custom kernel with SliTaz cookutils:
|
pankso@12
|
96
|
pankso@12
|
97 # cooklinux usage
|
pankso@12
|
98
|
paul@15
|
99 After the kernel is built, you will have SliTaz packages and all generated
|
pankso@12
|
100 files in /home/slitaz/src/linux-XXX. The kernel compressed image (bzImage) can
|
paul@15
|
101 be found in the arch/folder. Example for linux 4.9.10 built for X86 platform:
|
pankso@12
|
102
|
pankso@12
|
103 /home/slitaz/src/linux-4.9.10/arch/x86/boot/bzImage
|
pankso@12
|
104
|
pankso@12
|
105
|
pankso@1
|
106 Frugal install
|
pankso@1
|
107 --------------------------------------------------------------------------------
|
paul@15
|
108 A frugal installation lets you boot your seb system without any installation and
|
paul@15
|
109 with the all system running in memory. Basically you need to have the rootfs.gz
|
paul@15
|
110 and the kernel in the /boot tree and a entry in a Grub configuration file. SliTaz
|
paul@15
|
111 provides nifty little tools for frugal install:
|
pankso@1
|
112
|
pankso@1
|
113 # frugal path/to/image.iso
|
pankso@10
|
114
|
pankso@10
|
115 Grub entry will need a rdinit=/sbin/init on the kernel line. Here is an example:
|
pankso@10
|
116
|
pankso@10
|
117 # Seb OS Frugal on sdb1
|
pankso@10
|
118 title SliTaz Embedded OS (frugal)
|
pankso@10
|
119 root (hd0,0)
|
pankso@12
|
120 kernel /boot/frugal/bzImage root=/dev/null rdinit=/sbin/init loglevel=5
|
pankso@10
|
121 initrd /boot/frugal/rootfs.gz
|
pankso@10
|
122
|
pankso@1
|
123
|
pankso@1
|
124 Virtual disk
|
pankso@1
|
125 --------------------------------------------------------------------------------
|
paul@15
|
126 A virtual disk lets you have a persistent filesystem when using Qemu or booting
|
paul@15
|
127 in frugal mode (recommended). It is useful when developing/debugging scripts
|
paul@15
|
128 that run in a seb-os or to host web server virtual hosts. Create, mount or
|
pankso@1
|
129 umount disk:
|
pankso@1
|
130
|
pankso@1
|
131 # seb disk
|
pankso@1
|
132
|
paul@15
|
133 In frugal or live USB mode, seb can also use a sebhome.img to have persistent
|
paul@15
|
134 files even with the full system running in memory. To get /home automounted at
|
pankso@13
|
135 boot time, you can use this kernel cmdline option:
|
pankso@13
|
136
|
pankso@13
|
137 home=/dev/sdb1:/path/to/sebhome.img
|
pankso@13
|
138
|
pankso@1
|
139
|
pankso@12
|
140 Source code and developers guidelines
|
pankso@1
|
141 --------------------------------------------------------------------------------
|
paul@15
|
142 Note need to say that this tool MUST stay simple, fast, elegant and fun.
|
paul@15
|
143 We don't want a super tool for complex system building, we have tazlito and Tiny
|
paul@15
|
144 SliTaz for that. Seb is as close as possible to SliTaz's first build, seb is
|
paul@15
|
145 also a learning tool. Seb lets you build a sandbox os from scratch and rock solid
|
pankso@12
|
146 hardware specific servers.
|
pankso@1
|
147
|
pankso@1
|
148 * examples/ Various fs and scripts examples
|
pankso@1
|
149 * initfs/ Initial files used to create the system
|
pankso@1
|
150 * seb SliTaz Embedded operation system builder
|
paul@15
|
151 * libseb.sh Seb shared functions installed on host and in seb OS
|
pankso@1
|
152 * tools/ Various tools included or used to build an OS
|
pankso@11
|
153 * packages/ SliTaz Embedded packages database
|
pankso@10
|
154
|
paul@15
|
155 We don't want to much automation, let people create their own OS in their own way
|
paul@15
|
156 but provide some useful functions to help :-)
|
pankso@1
|
157
|
pankso@1
|
158
|
pankso@1
|
159 Gettext i18n
|
pankso@1
|
160 --------------------------------------------------------------------------------
|
paul@15
|
161 No i18n with gettext in seb tools since seb distro doesn't include gettext-base.
|
pankso@1
|
162
|
pankso@1
|
163
|
pankso@1
|
164 ================================================================================
|