To create a custom install image for B1, B2 or B3?

Discuss development on Bubba
paulchany
Posts: 123
Joined: 10 Jul 2009, 15:48
Location: Serbia
Contact:

To create a custom install image for B1, B2 or B3?

Post by paulchany » 19 Jun 2015, 08:02

Hello,

how can one create her/his custom install image for her/his Bubba#?
If I could do this, I wish an installation image with the newest Debian system ( with the newest Bubba kernel ) with some applications for system rescue, such parted is.
What should one do to get such custom install image?
Best, Pali

MouettE
Site admin
Posts: 267
Joined: 06 Oct 2011, 19:45

Re: To create a custom install image for B1, B2 or B3?

Post by MouettE » 19 Jun 2015, 09:29

Hello,

I'm currently working on an updated install/rescue system for b2/b3 (not the b1) with a new install script to install various systems. The install/rescue system is done and source is available at GitHub. It should build on any regular linux system (tested on arch and debian). It's based on buildroot so it's failrly easy to customize. Take a look and don't hesitate to ask should you need help.

paulchany
Posts: 123
Joined: 10 Jul 2009, 15:48
Location: Serbia
Contact:

Re: To create a custom install image for B1, B2 or B3?

Post by paulchany » 19 Jun 2015, 15:38

MouettE wrote:Hello,

I'm currently working on an updated install/rescue system for b2/b3 (not the b1) with a new install script to install various systems. The install/rescue system is done and source is available at GitHub. It should build on any regular linux system (tested on arch and debian). It's based on buildroot so it's failrly easy to customize. Take a look and don't hesitate to ask should you need help.
I clone the buildroot source tree with command:

Code: Select all

svn co https://github.com/Excito/buildroot
So I have now the buildroot/ directory, but have in it subdirectories. I which subdirectory can I build the custom install / rescue image?
Best, Pali

MouettE
Site admin
Posts: 267
Joined: 06 Oct 2011, 19:45

Re: To create a custom install image for B1, B2 or B3?

Post by MouettE » 19 Jun 2015, 21:40

Just run the make command from the top directory (see README.md)

Gordon
Posts: 1356
Joined: 10 Aug 2011, 03:18

Re: To create a custom install image for B1, B2 or B3?

Post by Gordon » 20 Jun 2015, 03:02

MouettE wrote:Just run the make command from the top directory (see README.md)
Just noticed you're changing package sources on github. Will you be building packages and source archives as well? Can I rely on you assigning new revision numbers then? Do note that other projects use (some of) these sources as well. I'm actually kind of puzzled why writemagic had to move to a separate package from buttond.

MouettE
Site admin
Posts: 267
Joined: 06 Oct 2011, 19:45

Re: To create a custom install image for B1, B2 or B3?

Post by MouettE » 20 Jun 2015, 14:28

Gordon wrote:Just noticed you're changing package sources on github. Will you be building packages and source archives as well? Can I rely on you assigning new revision numbers then?
Yes there wil be new debian repositories with full binary and source packages. The version numbers will be incremented as normal packages.
Gordon wrote:I'm actually kind of puzzled why writemagic had to move to a separate package from buttond.
I think that it make more sense to tight write-magic with the halt scripts rather than buttond because the halt script depends on write-magic whereas buttond is not. That being said, write-magic and buttond are both b3-specific so it make also sense to build them in the same package. Or to have a specific package.

Gordon
Posts: 1356
Joined: 10 Aug 2011, 03:18

Re: To create a custom install image for B1, B2 or B3?

Post by Gordon » 21 Jun 2015, 06:16

I see your point. It does not appear to be completely true however, as buttond is largely based around the write-magic code. Not looking at the code this moment, but I think that write-magic is/was in fact an already existing code snippet that was kept as is to accompany buttond to allow userland control as well. As such I do not think you could place write-magic in any specific category even though you do need it to "shut down" the B3.

IMO it would make more sense to extend the write-magic binary in a similar way as was done in buttond and create a proper shutdown command from it. Particularly because 0xdeadbeef seems to be the only sensible command line parameter you can supply and there is no reason NOT to hardcode that value (other than trying to obscure how to shut down the B3 from command line).

Should this be a separate topic?

paulchany
Posts: 123
Joined: 10 Jul 2009, 15:48
Location: Serbia
Contact:

Re: To create a custom install image for B1, B2 or B3?

Post by paulchany » 21 Jun 2015, 14:43

MouettE wrote:Just run the make command from the top directory (see README.md)
OK, I clone the git repository once again:

Code: Select all

svn co https://github.com/Excito/buildroot/trunk
After that I run:

Code: Select all

make excito_bubbatwo_defconfig
make
but at the end of process I get:
>>> Executing post-image script board/excito/bubbatwo/post_image.sh
Compiling bubbatwo.dts
Preparing vmlinux.bin
Compiling reloc_shim_itb.S
Generating 8313E21.itb
board/excito/bubbatwo/post_image.sh: sor: 21: mkimage: command not found
What can I do to solve this problem?
Best, Pali

sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Re: To create a custom install image for B1, B2 or B3?

Post by sakaki » 21 Jun 2015, 15:52

Hi,
Been a while since I used Debian, but I believe that's in the uboot-mkimage package, so:

Code: Select all

# apt-get update
# apt-get install uboot-mkimage
should fix it.

Best, sakaki

paulchany
Posts: 123
Joined: 10 Jul 2009, 15:48
Location: Serbia
Contact:

Re: To create a custom install image for B1, B2 or B3?

Post by paulchany » 21 Jun 2015, 16:25

sakaki wrote:Hi,
Been a while since I used Debian, but I believe that's in the uboot-mkimage package, so:

Code: Select all

# apt-get update
# apt-get install uboot-mkimage
should fix it.
On arch linux it is the uboot-tools package. I just installed it as root with:

Code: Select all

# pacman -S uboot-tools
Now I run again the 'make' command and get 8313E21.itb in trunk/output/images/ directory.
Best, Pali

paulchany
Posts: 123
Joined: 10 Jul 2009, 15:48
Location: Serbia
Contact:

Re: To create a custom install image for B1, B2 or B3?

Post by paulchany » 22 Jun 2015, 11:43

So I did followings sofar:

Code: Select all

svn co https://github.com/Excito/buildroot/trunk
cd buildroot/trunk/
make excito_bubbatwo_defconfig
make gconfig
I suppose the gconfig is automatically loaded the excito_bubbatwo_defconfig, right?
Here I have a question. In the gconfig menu I may to choose between BusyBox or systemV. Because on Debian Jessie the systemd is the system and service manager, should I choose systemV instead of default choosed BusyBox?
Best, Pali

MouettE
Site admin
Posts: 267
Joined: 06 Oct 2011, 19:45

Re: To create a custom install image for B1, B2 or B3?

Post by MouettE » 23 Jun 2015, 04:35

paulchany wrote:I suppose the gconfig is automatically loaded the excito_bubbatwo_defconfig, right?
Yes
paulchany wrote:Here I have a question. In the gconfig menu I may to choose between BusyBox or systemV. Because on Debian Jessie the systemd is the system and service manager, should I choose systemV instead of default choosed BusyBox?
You can't create a debian-based rescue image with buildroot. buildroot compiles from sources a specific small image intended for either rescue or embedded systems. You can add packages like parted if you wish in the menus but that's all. Generating a debian rescue system is a little bit more complicated. If you want a full blown system booting from USB use sakaki's gentoo or arch images

paulchany
Posts: 123
Joined: 10 Jul 2009, 15:48
Location: Serbia
Contact:

Re: To create a custom install image for B1, B2 or B3?

Post by paulchany » 23 Jun 2015, 09:14

MouettE wrote:
paulchany wrote:I suppose the gconfig is automatically loaded the excito_bubbatwo_defconfig, right?
Yes
paulchany wrote:Here I have a question. In the gconfig menu I may to choose between BusyBox or systemV. Because on Debian Jessie the systemd is the system and service manager, should I choose systemV instead of default choosed BusyBox?
buildroot compiles from sources a specific small image intended for either rescue or embedded systems. You can add packages like parted if you wish in the menus but that's all.
OK, I leave default settings ( BusyBox among others ) and added in gconfig packages: parted, mc, less, nano . Finally I save the .config file and did:

Code: Select all

make
Finally I get these files in output/images/ directory:
8313E21.itb
rootfs.ext2
rootfs.ext2.gz
vmlinux
In README.md there is an advice at bottom:
## Using
Place the install.itb file in the install directory of a fat-formatted usb disk and run the b3 with power button pushed.
But on the original Bubba 2 install rescue USB disk there is more files in install/ directory:
payload/bubbaroot-120319-1139.tar.gz
8313E21.itb
bubba.cfg
install.itb
version
so what should I do with generated files?
Should I use - in case of Bubba 2 - the generated 8313E21.itb file only in install directory of the usb disk:
install/8313E21.itb
but without following files:
payload/bubbaroot-120319-1139.tar.gz
bubba.cfg
install.itb
version
?
Maybe I should use the generated files:
rootfs.ext2.gz
vmlinux
too?
Best, Pali

MouettE
Site admin
Posts: 267
Joined: 06 Oct 2011, 19:45

Re: To create a custom install image for B1, B2 or B3?

Post by MouettE » 23 Jun 2015, 09:22

On the original excito install/rescue key :
  • 8313E21.itb : the bubba 2 rescue image
  • bubba.cfg : configuration for the excito install script
  • install.itb : the b3 rescue image (no use on a bubba2)
  • version : text file containing the version of the excito install/rescue system
  • payload/bubbaroot-120319-1139.tar.gz : the root of the full bubba 2 excito system
The new 8313E21.itb file generated by buildroot contains no install script and really doesn't do anything during boot except running dhcp on plugged wired interfaces and starting ssh, telnet and ftp service. The other generated files are useless, just copy the 8313E21.itb file on the install directory and don't worry about the other files, they will be ignored.

MouettE
Site admin
Posts: 267
Joined: 06 Oct 2011, 19:45

Re: To create a custom install image for B1, B2 or B3?

Post by MouettE » 23 Jun 2015, 10:20

paulchany wrote:

Code: Select all

>>>   Executing post-image script board/excito/bubbatwo/post_image.sh
Compiling bubbatwo.dts
Preparing vmlinux.bin
Compiling reloc_shim_itb.S
Generating 8313E21.itb
board/excito/bubbatwo/post_image.sh: sor: 21: mkimage: command not found
What can I do to solve this problem?
I've added u-boot-tools to the host utilities in buildroot configs so it won't need to be present on the compiling machine.

Post Reply