OS Builder output img ?

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

OS Builder output img ?

Lionel Laské-2

Hi all,

 

Thanks to the nice documentation on the Wiki, I’ve successfully created my first OS Build.

For the moment, it’s just a 12.1.0 without any customization but I’m very proud of this first step! :-)

Now I want to deploy it on my unlock XO-1 but I’m slightly disappointed by the output of the build.

I expected to have something like a “fs0.zip” file and a “21021o0.img” file but here is the content of the output directory:

 

total 2124968

-rw-r--r--. 1 root root        383 Mar 22 22:37 21007xx0.activities.txt

-rw-r--r--. 1 root root      46485 Mar 22 22:25 21007xx0.crc

-rw-r--r--. 1 root root     694986 Mar 22 22:37 21007xx0.files.txt.gz

-rw-r--r--. 1 root root  676986880 Mar 22 22:25 21007xx0.img

-rw-r--r--. 1 root root         47 Mar 22 22:26 21007xx0.img.md5

-rw-r--r--. 1 root root        150 Mar 22 22:37 21007xx0.libraries.txt

-rw-r--r--. 1 root root      22541 Mar 22 22:36 21007xx0.packages.txt

-rw-r--r--. 1 root root    8348832 Mar 22 22:11 21007xx0.toc

-rw-r--r--. 1 root root  448624505 Mar 22 22:36 21007xx0.tree.tar.lzma

-rw-r--r--. 1 root root         57 Mar 22 22:36 21007xx0.tree.tar.lzma.md5

-rw-r--r--. 1 root root 1041203200 Mar 22 22:29 21007xx0.usb

 

I guess that the “21007xx0.img” file is the “21021o0.img” file I’m looking for but where is the “fs0.zip” file?

Sorry, it’s probably a stupid question but I’m an absolute beginner on that!

 

Best regards from France.

 

                Lionel.

 

 


_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

Samuel Greenfeld
The "fs0.zip" file would only appear if you configured everything to make a signed build.  You would only be able to make a signed build if you had a copy of the private keys for the deployment you are making the signed build for.   Only OLPC has the keys to make a signed build that pretty much any XO-1 will accept.

The .crc and .img files, when copied to USB, etc., are enough to install the image on a unlocked XO-1 with a command like "copy-nand u:\21007xx0.img" from the "ok" Open Firmware prompt (available if you press the "ESC"/(X) key while the startup sound plays on unlocked units).



On Sun, Mar 24, 2013 at 4:53 AM, <[hidden email]> wrote:

Hi all,

 

Thanks to the nice documentation on the Wiki, I’ve successfully created my first OS Build.

For the moment, it’s just a 12.1.0 without any customization but I’m very proud of this first step! :-)

Now I want to deploy it on my unlock XO-1 but I’m slightly disappointed by the output of the build.

I expected to have something like a “fs0.zip” file and a “21021o0.img” file but here is the content of the output directory:

 

total 2124968

-rw-r--r--. 1 root root        383 Mar 22 22:37 21007xx0.activities.txt

-rw-r--r--. 1 root root      46485 Mar 22 22:25 21007xx0.crc

-rw-r--r--. 1 root root     694986 Mar 22 22:37 21007xx0.files.txt.gz

-rw-r--r--. 1 root root  676986880 Mar 22 22:25 21007xx0.img

-rw-r--r--. 1 root root         47 Mar 22 22:26 21007xx0.img.md5

-rw-r--r--. 1 root root        150 Mar 22 22:37 21007xx0.libraries.txt

-rw-r--r--. 1 root root      22541 Mar 22 22:36 21007xx0.packages.txt

-rw-r--r--. 1 root root    8348832 Mar 22 22:11 21007xx0.toc

-rw-r--r--. 1 root root  448624505 Mar 22 22:36 21007xx0.tree.tar.lzma

-rw-r--r--. 1 root root         57 Mar 22 22:36 21007xx0.tree.tar.lzma.md5

-rw-r--r--. 1 root root 1041203200 Mar 22 22:29 21007xx0.usb

 

I guess that the “21007xx0.img” file is the “21021o0.img” file I’m looking for but where is the “fs0.zip” file?

Sorry, it’s probably a stupid question but I’m an absolute beginner on that!

 

Best regards from France.

 

                Lionel.

 

 


_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel



_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Lionel Laské-2

 

Ok. I’ve done it.

Is it possible to have an auto install? i.e. without need to type command from the prompt.

 

                Lionel.

 

De : Samuel Greenfeld [mailto:[hidden email]]
Envoyé : dimanche 24 mars 2013 14:40
À : [hidden email]
Cc : [hidden email]
Objet : Re: OS Builder output img ?

 

The "fs0.zip" file would only appear if you configured everything to make a signed build.  You would only be able to make a signed build if you had a copy of the private keys for the deployment you are making the signed build for.   Only OLPC has the keys to make a signed build that pretty much any XO-1 will accept.

The .crc and .img files, when copied to USB, etc., are enough to install the image on a unlocked XO-1 with a command like "copy-nand u:\21007xx0.img" from the "ok" Open Firmware prompt (available if you press the "ESC"/(X) key while the startup sound plays on unlocked units).


 


_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Jerry Vonau
On Sun, 2013-03-24 at 21:33 +0100, [hidden email] wrote:
>  
>
> Ok. I’ve done it.
>
> Is it possible to have an auto install? i.e. without need to type
> command from the prompt.
>

Yes, you would need to have your security keys installed in the XOs, but
that is difficult when the XO's have security enabled. You need a key
injector signed by OLPC to be able to install your deployment key that
you used to sign the image/firmware.

Jerry

>  
>
>                 Lionel.
>
>  
>
> De : Samuel Greenfeld [mailto:[hidden email]]
> Envoyé : dimanche 24 mars 2013 14:40
> À : [hidden email]
> Cc : [hidden email]
> Objet : Re: OS Builder output img ?
>
>  
>
> The "fs0.zip" file would only appear if you configured everything to
> make a signed build.  You would only be able to make a signed build if
> you had a copy of the private keys for the deployment you are making
> the signed build for.   Only OLPC has the keys to make a signed build
> that pretty much any XO-1 will accept.
>
> The .crc and .img files, when copied to USB, etc., are enough to
> install the image on a unlocked XO-1 with a command like "copy-nand u:
> \21007xx0.img" from the "ok" Open Firmware prompt (available if you
> press the "ESC"/(X) key while the startup sound plays on unlocked
> units).
>
>
>
>
>  
>
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> http://lists.laptop.org/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

James Cameron-2
An auto install for an unlocked laptop does not need keys or signing.

Just place the Open Firmware commands that you want to run in a file
olpc.fth in the folder boot on the USB drive.

Sometimes the commands may need careful writing to avoid certain
features of Open Firmware.

There is no action required to trigger it, apart from inserting the
USB drive and turning on the power.  You must not use the four game
keys.

(On the other hand, an auto install for a locked XO-1 laptop requires
fs.zip or fs0.zip, and you trigger it using the four game keys).

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

Martin Langhoff
In reply to this post by Lionel Laské-2
Hi Lionel,

your questions in recent emails lack some background -- specifically,
on how the XOs are configured. Without that info, we can give you many
different answers because it all depends on how the XOs are
configured.

Can you tell us the output of .mfg-data for the laptops you are
targetting? Are they all the same SKU?

With that info, we can give you more relevant answers...



m

On Sun, Mar 24, 2013 at 4:53 AM,  <[hidden email]> wrote:

> Hi all,
>
>
>
> Thanks to the nice documentation on the Wiki, I’ve successfully created my
> first OS Build.
>
> For the moment, it’s just a 12.1.0 without any customization but I’m very
> proud of this first step! :-)
>
> Now I want to deploy it on my unlock XO-1 but I’m slightly disappointed by
> the output of the build.
>
> I expected to have something like a “fs0.zip” file and a “21021o0.img” file
> but here is the content of the output directory:
>
>
>
> total 2124968
>
> -rw-r--r--. 1 root root        383 Mar 22 22:37 21007xx0.activities.txt
>
> -rw-r--r--. 1 root root      46485 Mar 22 22:25 21007xx0.crc
>
> -rw-r--r--. 1 root root     694986 Mar 22 22:37 21007xx0.files.txt.gz
>
> -rw-r--r--. 1 root root  676986880 Mar 22 22:25 21007xx0.img
>
> -rw-r--r--. 1 root root         47 Mar 22 22:26 21007xx0.img.md5
>
> -rw-r--r--. 1 root root        150 Mar 22 22:37 21007xx0.libraries.txt
>
> -rw-r--r--. 1 root root      22541 Mar 22 22:36 21007xx0.packages.txt
>
> -rw-r--r--. 1 root root    8348832 Mar 22 22:11 21007xx0.toc
>
> -rw-r--r--. 1 root root  448624505 Mar 22 22:36 21007xx0.tree.tar.lzma
>
> -rw-r--r--. 1 root root         57 Mar 22 22:36 21007xx0.tree.tar.lzma.md5
>
> -rw-r--r--. 1 root root 1041203200 Mar 22 22:29 21007xx0.usb
>
>
>
> I guess that the “21007xx0.img” file is the “21021o0.img” file I’m looking
> for but where is the “fs0.zip” file?
>
> Sorry, it’s probably a stupid question but I’m an absolute beginner on that!
>
>
>
> Best regards from France.
>
>
>
>                 Lionel.
>
>
>
>
>
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> http://lists.laptop.org/listinfo/devel
>



--
 [hidden email]
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/24/en/User:Martin_Langhoff
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Lionel Laské-2

Hi Martin,

Thanks for your answer.

> Can you tell us the output of .mfg-data for the laptops you are
targetting? Are they all the same SKU?

Here is a screen capture from the XO-1 I'm using to test the procedure:
http://laske.fr/tmp/SHF8080270B.jpg 
Targeted XOs to our Nosy Komba deployment come from different sources (G1G1,
Contributor Program, buy to OLPC EU, ...) but, yes all have the same
keyboard (US International).

        Lionel.

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Lionel Laské-2
In reply to this post by James Cameron-2

> Just place the Open Firmware commands that you want to run in a file
olpc.fth in the folder boot on the USB drive.

Waoooo, very great!
I've just seen the Wiki Page dedicated to it.
Combined with other answers that other guys give me here, "olpc.fth" give me
great opportunities: lang update, copy-nand, reboot, ...
I'm going to test it.

Thanks a lot for your answer.

        Lionel.

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

James Cameron-2
Let us know if you have any further questions ... I expect some from
every new Forth user.  ;-)

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

smithbone@gmail.com
In reply to this post by Lionel Laské-2
>
> Here is a screen capture from the XO-1 I'm using to test the procedure:
> http://laske.fr/tmp/SHF8080270B.jpg

You appear to be using a developer key.  If you are going to be
installing a custom build on all the laptops I would encourage you to
disable the security system altogether as the last step in your
olpc.fth step with 'disable-security'.  Then some of the gotchas that
occur with secure laptops won't happen.

--
Richard A. Smith
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Lionel Laské-2
In reply to this post by James Cameron-2

Hi all,

Thanks for your answer.

> Let us know if you have any further questions ... I expect some from every
new Forth user.  ;-)

You're right, it's hard to enter in Forth language :-{
I've added a olpc.fth file in the boot directory of my key with following
commands:

        " copy-nand u:\21007xx0.img" eval
        " change-tag LO fr_FR.UTF-8" eval

I've expected than it autoboot the key and install the image but it does
nothing, just display the "ok" prompt :-(
Does I miss something ?

        Lionel.

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Lionel Laské-2
In reply to this post by smithbone@gmail.com

Hi Richard,

> You appear to be using a developer key.  If you are going to be installing
a custom build on all the laptops I would encourage you to disable the
security
> system altogether as the last step in your olpc.fth step with
'disable-security'.  Then some of the gotchas that occur with secure laptops
won't happen.

Yes you're right, I'm using an "unlock stick" [1]. What sort of problem
could occur?

        Lionel.

[1]
http://wiki.laptop.org/go/Collection_stick#Unlocking_with_an_Unlock_stick 

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

James Cameron-2
In reply to this post by Lionel Laské-2
Yes, add a comment line to the start of file, so that the file is
recognised.  I also suggest encoding the work as a program
definition.  So the file might be:

\ automatic installer by [hidden email]
: installer
   " copy-nand u:\21007xx0.img" eval
   " change-tag LO fr_FR.UTF-8" eval
;
installer

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

Richard A. Smith
In reply to this post by Lionel Laské-2
On Mon, Mar 25, 2013 at 5:20 PM,  <[hidden email]> wrote:

> Hi Richard,
>
>> You appear to be using a developer key.  If you are going to be installing
> a custom build on all the laptops I would encourage you to disable the
> security
>> system altogether as the last step in your olpc.fth step with
> 'disable-security'.  Then some of the gotchas that occur with secure laptops
> won't happen.
>
> Yes you're right, I'm using an "unlock stick" [1]. What sort of problem
> could occur?

Well for one you have to have those keys present for your installed os
to run either on that stick or by copying the developer key to the XO.
 But then you have to make sure that the developer key is re-installed
anytime you reflash the XO.  Also if for some other reason the dev
keys are removed from the laptop it will stop booting the OS.  Other
than that the most common gotcha with running XO's in secure mode is
that if you have RTC clock problems then the laptop can stop booting
and you have to have a developer key to fix them.  Getting developer
keys after the laptops have been deployed can be a lot of extra effort
to obtain and then distribute to the XO.

Its also just less hassle.  If you are installing a customized
non-signed build then you have to have the laptops un-secure to boot
it so the one-time disable of the security system means that you won't
ever have to mess with it again unless you re-enable it.

: installer
   " copy-nand u:\21007xx0.img" eval
   " change-tag LO fr_FR.UTF-8" eval
;

Note that if you want to also disable the security system in this
script then we will need a slightly different approach.  By default
each time you change a tag the laptop will reboot.  So to change
multiple tags in one go you need to use a tag change that won't reboot
the laptop.

--
Richard A. Smith
One Laptop per Child
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Lionel Laské-2
In reply to this post by James Cameron-2

> Yes, add a comment line to the start of file, so that the file is
recognised.  I also suggest encoding the work as a program definition.  So
the file might be:

YEEEEEESSSSS !!!! It works !
You're my new Forth Hero !

        Lionel.

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

RE: OS Builder output img ?

Lionel Laské-2
In reply to this post by Richard A. Smith

> Well for one you have to have those keys present for your installed os to
run either on that stick or by copying the developer key to the XO.
> But then you have to make sure that the developer key is re-installed
anytime you reflash the XO.  Also if for some other reason the dev keys are
removed
> from the laptop it will stop booting the OS.  Other than that the most
common gotcha with running XO's in secure mode is that if you have RTC clock
problems
> then the laptop can stop booting and you have to have a developer key to
fix them.  Getting developer keys after the laptops have been deployed can
be a
> lot of extra effort to obtain and then distribute to the XO.
>
> Its also just less hassle.  If you are installing a customized non-signed
build then you have to have the laptops un-secure to boot it so the one-time
disable of
> the security system means that you won't ever have to mess with it again
unless you re-enable it.

Okay, you definitively convince me to disable security.


>: installer
>   " copy-nand u:\21007xx0.img" eval
>   " change-tag LO fr_FR.UTF-8" eval
> ;
> installer
>
> Note that if you want to also disable the security system in this script
then we will need a slightly different approach.  By default each time you
change a tag
> the laptop will reboot.  So to change multiple tags in one go you need to
use a tag change that won't reboot the laptop.

Hmmm. Change-tag without reboot ? Is there any way to do that ?
And that's only one part of the problem, the other one is that my
"installer" script run for ever:
copy-nand/change-tag/reboot/copy-nand/change-tag/reboot/...

        Lionel.


_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

James Cameron-2
On Mon, Mar 25, 2013 at 11:23:39PM +0100, [hidden email] wrote:
> Hmmm. Change-tag without reboot ? Is there any way to do that ?

Yes, it is possible.  For XO-4 it is easy.  For XO-1 it disables
keyboard during the actions.  If you have a bug in the code at this
time, you have to remove main battery to recover.  Requires Q2F16
firmware.  tags( starts the changes, )tags ends them and does reboot.

But maybe you don't need to do that, if you are only changing one tag?
How many tags are you changing?  If one, then finish the script with
the tag change.

> And that's only one part of the problem, the other one is that my
> "installer" script run for ever:
> copy-nand/change-tag/reboot/copy-nand/change-tag/reboot/...

Put in a prompt to remove USB drive after copy-nand:

\ example

: wait-for-enter
  begin key h# d = until
;

: ask-remove
  ." Please remove the USB drive and press enter ? "
  wait-for-enter
;

: installer
  " copy-nand ...
  ask-remove
  " change-tag ...
;

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

Richard A. Smith
> But maybe you don't need to do that, if you are only changing one tag?
> How many tags are you changing?  If one, then finish the script with
> the tag change.

I mentioned that he could also disable security.  So he would be
deleting the 'wp' tag too.

--
Richard A. Smith
One Laptop per Child
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

James Cameron-2
On Mon, Mar 25, 2013 at 06:50:00PM -0400, Richard Smith wrote:
> > But maybe you don't need to do that, if you are only changing one tag?
> > How many tags are you changing?  If one, then finish the script with
> > the tag change.
>
> I mentioned that he could also disable security.  So he would be
> deleting the 'wp' tag too.

Really?  disable-security changes the wp tag to ww rather than
deleting it.  Do you think he should delete it instead?

Is there a risk of having to reboot to enable writes?

--
James Cameron
http://quozl.linux.org.au/
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: OS Builder output img ?

Richard A. Smith
On Mon, Mar 25, 2013 at 7:07 PM, James Cameron <[hidden email]> wrote:
> On Mon, Mar 25, 2013 at 06:50:00PM -0400, Richard Smith wrote:

>> > But maybe you don't need to do that, if you are only changing one tag?
>> > How many tags are you changing?  If one, then finish the script with
>> > the tag change.
>>
>> I mentioned that he could also disable security.  So he would be
>> deleting the 'wp' tag too.
>
> Really?  disable-security changes the wp tag to ww rather than
> deleting it.  Do you think he should delete it instead?

The effect is the same.  We did ww and wp because 'w' is a 0x77 and
'p' is a 0x70 so you could change the w to a p with a single write
without an erase cycle in-between.  We never really used that feature
though.

> Is there a risk of having to reboot to enable writes?

I was just pondering this as well.  Its been a while,  but IIRC think
this may thwart any attempt to do it in a single pass.  The write
protect on the SPI flash is set very early so OFW has to issue a
special command to reboot without the lock.  No way around it as you
can only unlock with a reboot.  I suppose you could do the security
disable first and then when you see that its 'ww' rather than 'wp'
continue on with the re-flash and then the LO change as the last step.

--
Richard A. Smith
One Laptop per Child
_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
12