Forum: 

three questions for tkldev

bubble501's picture

Hello, I cam across tkldev when i try to found the solution to build a live system which forbid all outside network traffic.

I have three questions when I follow the tkldev's document:

1 After building core successfully, I try to build "hello world" using root.sanbox. however, it take me about the same time as build from scratch instead of several seconds. sometime, it also complain "error: root.sanbox is dirty with manual changea. To continue: deck -D build/root/sandbox /usr/share/fab/prodcut.mk:476 recipe for target 'build/stamps/root.sandbox' failed" (BTW, i had run apt update after I fab-chroot build/root.sandbox/ or it will complain "hello" can not be found when i apt install it).

 

2 What the right(recommend) way to change the source of apt-get which can take effect during the make? I found lots of time has been spend on download from apt source, I'd like to change it to some mirror site near my location.

 

3 I also want to do customization build against kernel, I can not find the document about how to make tkldev using own build kernel, could anyone give me some hint as for how or where can i find the related document?

 

 

Jeremy Davis's picture

In theory, what you want should be fairly easily achieved (although the devil is always in the detail).

For an example, please see our side project, BitKey (build code on GitHub). It's a live OS that runs from USB. It has a range of different modes which allow different functionality; e.g. filesystem persistence (or not) and networking (or not).

Regarding your specific questions:

1. the issue with the sandbox is a bug that we intend to fix for v14.2. Instead of working how it should, it forces a full rebuild. You should be able to resolve that by updating deck, like this:

apt-get update
apt-get install deck

2. IIRC it should be using the Debian redirector service. That should give you the fastest mirror available. Also by default all downloaded packages are cached (by polipo) so subsequent runs should be quicker to download (it'll still download the repo indexes, but then won't need to download any packages which it has already).

3. That's not a scenario that we currently explicitly support. However, there's no reason why you can't do that (or whatever you like really). Just keep in mind that anything you want scripted can be done with a conf script (in conf.d directory of your build code). Alternatively for inserting data or other files, then add to the overlay directory. The contents of the overlay/ directory are relative to root (/) so to add a new config file to etc, add it as overlay/etc/some-app/some-app.conf and it will become /etc/some-app/some-app.conf on your new system.

Hope that helps a little...

[update] one other thing I thought of which may not immediately be clear is that there are also conf and overlays that are pulled from common. Anything that is used (or at least would be useful) for building more than one end product can be found there (/turnkey/fab/common within TKLDev). The common conf and overlays are called by the Makefile (and/or common makefiles can also be called).

Post new comment