Difference between revisions of "Software projects/OS/Slackware/Build-system"
From Pandora Wiki
Linux-SWAT (talk | contribs) (→rc.local) |
Linux-SWAT (talk | contribs) (→rc.local) |
||
Line 34: | Line 34: | ||
* Put the SD card in the Pandora, and power it on. | * Put the SD card in the Pandora, and power it on. | ||
* The Pandora will build many needed packages, but not all listed, because of some dependencies installed later through sbopkg. | * The Pandora will build many needed packages, but not all listed, because of some dependencies installed later through sbopkg. | ||
− | * You have to edit the OPP="" and MHZ="" variables at the top of the script for your Pandora unit. These will only be used during the build phases. | + | * You have to edit the OPP="" and MHZ="" variables at the top of the script for your Pandora unit(s). These will only be used during the build phases. |
= Phase 1 = | = Phase 1 = |
Revision as of 23:02, 11 January 2013
Contents
Disclaimer
- Same as here.
- The build system is GPL V3.
Principles
- It's not a one run and go. You need time and patience if you want a full and complete release. Anyway, you can get a minimal alpha build relatively fast.
- The target directory is likely to be a SD card. 8G is recommended as a minimum.
- Phase 1 populates the target directory with the main ARMedslack Linux distribution and some crucial stuff like the Pandora kernel.
- Phase 2 populates the target directory with parts from official Open Pandora OS and tweaked stuff.
- A specific part of rc.local is executed during the first boot on a Pandora.
- The files folder contains tweaked stuff.
- The pkg folder contains pre-built packages from previous alpha builds.
- The sources folder contains sources for essential programs.
- Some proprietary stuff is missing, like 3D drivers. They are useful only if you want to compile your own kernel. Check the Open Pandora git repository for them.
Get the build system
- Get the archive here.
- If you don't run a Slackware or a derivative, get the Slackware's installpkg script here. Put it in /sbin and make it executable.
Dependencies
- You need to download the official Open Pandora rootfs: http://openpandora.org/firmware/pandora-rootfs.tar.bz2
- Uncompress it as root anywhere and link it to the build directory as "pandora-rootfs".
- Format a 8G or more SD card with the Ext2 filesystem. To make explanations clear, name it SLACK.
- If you don't know how to format a drive, use GParted under Linux, or run their Live-CD. Here's the manual.
- It's highly recommended to have a second partition formated as a swap. 256M or more is a good choice.
Bash knowledge
- You need minimal bash knowledge in order to understand and succeed. This is a good start.
- Each script contains comments. Read them.
rc.local
- rc.local will be copied and executed automatically on the Pandora. You have to tweak it before Phase 1 or Phase 2.
- Remove simple-comments in order to produce the needed packages during the first boot.
- Put the SD card in the Pandora, and power it on.
- The Pandora will build many needed packages, but not all listed, because of some dependencies installed later through sbopkg.
- You have to edit the OPP="" and MHZ="" variables at the top of the script for your Pandora unit(s). These will only be used during the build phases.
Phase 1
- Run as su -.
- You'll see packages errors because it's a first run.
Phase 2
- Run as su -.
- Now, you can unmount the card and boot normally this alpha build on the Pandora.
After that first boot
- The Pandora will power off after having done the job. May last for one hour or two.
- Remove the card.
- Save all /media/SLACK/tmp/*.t?z in the local repository listed in the PHASE-2.sh
MYPKGS="$CWD/pkg"
folder of the build system.
In-between steps
- Plug the net.
- Launch sbopkg as su -, load the vrac1 queue file, process it saying yes (Q) to options and wait. This is gonna be very long. I really mean very.
- Do the same with vrac2 and vrac3.
- Save all /tmp/*.t?z in the
MYPKGSMORE="$CWD/pkg-more"
folder of the build system.
- Be careful with disk space, you may fill the card. If so, save and erase all /tmp/*.t?z, and sources inside /var/cache/sbopkg/ between queues processing.
- Note that i include other packages listed in other queue files in my own release. If you plan to do so, move them in MYPKGSMORE="$CWD/pkg-more".
Final step
- Populate a new SD card, with PHASE-1.sh and PHASE-2.sh
- Edit /media/SLACK/etc/rc.d/rc.local to build the remaining packages to put in MYPKGS="$CWD/pkg"
- Put the SD card in the Pandora, and power it on.
- The Pandora will generate final needed packages.
- The Pandora will power off after having done the job. May last for one hour or two.
- Remove the card.
- Save all /media/SLACK/tmp/*.t?z in YPKGS="$CWD/pkg" folder of the build system.
- Now, you can create a complete SL4P system.
Creating a compressed rootfs
- Populate a SD card. Now you should know how to do it ;^).
- Boot it on a Pandora.
- Once the Pandora shuts down, remove the card, and follow this procedure.
Special packages
- In the sources folder, you'll find some programs that aren't automatically generated by the build system.
I don't list those dependencies for now, because i do more useful things ^^.
- XMMS may just needs libmikmod.
- Qt3 is a bit long to build. It should be built before the big playlist.
Sources
- Apart what i already mentioned here, some SL4P part are taken directly from the official Open Pandora OS.
- Sources are directly related to the build date, ie. if i upload a release the 1st april 2012, so the sources are related to the corresponding Open Pandora OS, rootfs, pandora-firmware, pandora-libraries, etc.
- Same thing for binaries coming from the official OP rootfs.
- About pre-compiled packages, shipped or not, grab the sources + SlackBuild accordingly to the version here.
- If some package version changed, you have access to the old data using sbopkg git repo.
Notes
- It may look a bit messy for now (and indeed, some part have to be cleaned), but it's versatile, as i intended from the start.
- Depending on what you comment/uncomment, you can produce an alpha build, very minimal, or a full build.
- Depending on what you edit, you can use it to port any *NIX to Open Pandora, and maintain your build very easily
- The -current build system is under work and is not released yet.
Ask a question/Report a bug
- You're welcome, and please post here: http://boards.openpandora.org/index.php?/topic/1524-slackware-inside-pandora/