Subversion Repositories Kolibri OS

Rev

Rev 5176 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5176 Rev 5568
Line 11... Line 11...
11
Q4. I want to build the entire system.
11
Q4. I want to build the entire system.
12
Q5. I'm sure that I want to build the entire system.
12
Q5. I'm sure that I want to build the entire system.
13
    The autobuild server does this, after all.
13
    The autobuild server does this, after all.
14
Q6. I don't want to keep a zoo of compilers and tools required for Q5,
14
Q6. I don't want to keep a zoo of compilers and tools required for Q5,
15
    but I still want to build as many programs as possible with what I have.
15
    but I still want to build as many programs as possible with what I have.
-
 
16
Q7. I have modified the source code of the kernel, one driver or one program
-
 
17
    and want to test changes.
Line 16... Line 18...
16
 
18
 
Line 17... Line 19...
17
-------------------------------------------------------------------------------
19
-------------------------------------------------------------------------------
18
 
20
 
Line 175... Line 177...
175
A4. Why? Even the person who has configured the autobuild server does not build
177
A4. Why? Even the person who has configured the autobuild server does not build
176
    everything on her computer.
178
    everything on her computer.
Line 177... Line 179...
177
 
179
 
178
    If you want to create your own image of the system, it is much simpler to
180
    If you want to create your own image of the system, it is much simpler to
-
 
181
    start from existing one and modify it, building only what is necessary.
179
    start from existing one and modify it, building only what is necessary.
182
    Look for Q7/A7 for details of that approach.
180
    If you don't know how to modify an image, don't expect that the build
183
    If you don't know how to modify an image, don't expect that the build
181
    system will magically do it for you. The build system uses mtools for
184
    system will magically do it for you. The build system uses mtools for
182
    image manipulation; if you have configured mtools, you can just use them
185
    image manipulation; if you have configured mtools, you can just use them
183
    directly. There are also other ways of image manipulation, which would
186
    directly. There are also other ways of image manipulation, which would
Line 238... Line 241...
238
        tup init
241
        tup init
239
    in the root of repository.
242
    in the root of repository.
240
  * Run
243
  * Run
241
        tup
244
        tup
242
    anywhere inside repository.
245
    anywhere inside repository.
-
 
246
 
-
 
247
Q7. I have modified the source code of the kernel, one driver or one program
-
 
248
    and want to test changes.
-
 
249
A7. First, you need to build the corresponding binary as described in Q1/A1 or
-
 
250
    Q2/A2.
-
 
251
    To test a program, it is sufficient to put it to some place accessible
-
 
252
    to the working KolibriOS and just run it from there. Drivers are loaded
-
 
253
    from the folder /rd/1/drivers/, which is initialized from kolibri.img,
-
 
254
    so testing a driver requires either copying the compiled binary to
-
 
255
    /rd/1/drivers manually between KolibriOS startup and loading driver or
-
 
256
    inserting the driver to the image kolibri.img outside of KolibriOS.
-
 
257
    Testing the kernel or an auto-loading driver requires modifying the image.
-
 
258
 
-
 
259
    There are several possible approaches for writing to kolibri.img.
-
 
260
  * From inside KolibriOS, write to /rd/1 and then save the ramdisk image.
-
 
261
  * On Linux, there is a package named "mtools",
-
 
262
    https://www.gnu.org/software/mtools/ . It can be available in the
-
 
263
    repository of your Linux distribution or it can be compiled manually.
-
 
264
    Compiling mtools for Windows is not impossible, but not supported either.
-
 
265
    Using mtools:
-
 
266
        mdir -i kolibri.img []
-
 
267
    lists contents of the given directory of the image or the root directory
-
 
268
    if  is omitted;
-
 
269
        mcopy -moi kolibri.img  ::
-
 
270
    inserts the file  to the image using the name ; with
-
 
271
    reverse order of the arguments, it extracts the corresponding file.
-
 
272
  * On Linux with root privileges, the standard mount command can be used:
-
 
273
        mount -t vfat -o loop kolibri.img 
-
 
274
    maps contents of kolibri.img under the directory , which must exist,
-
 
275
    hiding whatever was in . When done, use
-
 
276
        umount 
-
 
277
  * On Windows with administrator privileges, the driver ImDisk
-
 
278
    http://www.ltr-data.se/opencode.html/#ImDisk can be used:
-
 
279
        imdisk -a -m A: -t file -f kolibri.img
-
 
280
    maps contents of kolibri.img to the virtual disk A:. When done, use
-
 
281
        imdisk -d -m A: