Difference between revisions of "Porting Raspbian"

From LinuxMCE
Jump to: navigation, search
Line 1: Line 1:
 
[[Category: Development]]
 
[[Category: Development]]
This will attempt to highlight some of the requirements/process intended/followed for porting lmce to raspbian for use on the raspberry pi
+
This will attempt to highlight some of the requirements/process intended/followed for porting lmce to raspbian for use on the raspberry pi.
  
 
== New database data ==
 
== New database data ==
Line 14: Line 14:
 
  insert into RepositorySource_URL (FK_RepositorySource, URL) values ( 23, 'deb http://deb.linuxmce.org/raspbian')
 
  insert into RepositorySource_URL (FK_RepositorySource, URL) values ( 23, 'deb http://deb.linuxmce.org/raspbian')
 
=== Add Packages ===
 
=== Add Packages ===
 +
For packages we are going to copy the entire bank of ubuntu and lmce packages for 1004 to raspbian wheezy entries, then we'll fix up individual package names afterwards.
 
*update the 'Package_Source' table, add all Packages from ubuntu lucid as a base, copy ubuntu repo packages and lmce repo packages: (then sqlCVS diff/approval/update) - Done.
 
*update the 'Package_Source' table, add all Packages from ubuntu lucid as a base, copy ubuntu repo packages and lmce repo packages: (then sqlCVS diff/approval/update) - Done.
 
  insert into Package_Source (FK_Package, Name, FK_RepositorySource, Repository)select FK_Package, Name, "22", "wheezy main" from Package_Source join Package_Source_Compat on Package_Source.PK_Package_Source=Package_Source_Compat.FK_Package_Source where FK_Distro=18 and FK_RepositorySource IN ( 1, 2, 20)  
 
  insert into Package_Source (FK_Package, Name, FK_RepositorySource, Repository)select FK_Package, Name, "22", "wheezy main" from Package_Source join Package_Source_Compat on Package_Source.PK_Package_Source=Package_Source_Compat.FK_Package_Source where FK_Distro=18 and FK_RepositorySource IN ( 1, 2, 20)  
Line 19: Line 20:
 
*update the 'Package_Source_Compat' table, add OS and Distro for all Raspbian packages added in previous inserts: (then sqlCVS diff/approval/update) - Done
 
*update the 'Package_Source_Compat' table, add OS and Distro for all Raspbian packages added in previous inserts: (then sqlCVS diff/approval/update) - Done
 
  insert into Package_Source_Compat (FK_Package_Source, FK_OperatingSystem, FK_Distro) select PK_Package_Source, "1", "19" from Package_Source where FK_RepositorySource in (22,23)
 
  insert into Package_Source_Compat (FK_Package_Source, FK_OperatingSystem, FK_Distro) select PK_Package_Source, "1", "19" from Package_Source where FK_RepositorySource in (22,23)
*fix package names that are inconsistent between raspbian and ubuntu: (then sqlCVS diff/approval/update)
+
*fix package names that are inconsistent between raspbian and ubuntu: (then sqlCVS diff/approval/update) - Initially Done, likely find more inconsistencies
 
== Builder ==
 
== Builder ==
*build a builder - based on possy's create_builder.sh script, altered to create raspbian build env
+
Most of this has been done already, just not submitted to svn
*Conf files need update
+
*build a builder - base on possy's create_builder.sh script, alter to create raspbian build env (one script to build them all? :P)
**builder.conf, raspbian.conf? (from ubuntu.conf)
+
*Conf files need update - most of this is done, needs a little re-work
**Build dependencies list needs updating. The list with packages needed for building linuxmce needs to be updated from one release to another so you can have the dependencies installed on the build machine. There is no automatic tool for doing this and is a time consuming task when package names change and split as you need to wait for the build to fail to intstall other packages.  This could be partially automated.
+
**builder.conf, raspbian.conf? (from ubuntu.conf/debian.conf) - .conf files contain lots that's never used or has been deprecated for some time
*build scripts need update
+
**Build dependencies list needs updating. - done
 +
*build scripts need update - mostly done, needs re-work for backwards compatibility across arch's/flavor's (why was the 'u' dropped in American English? need to investigate further)
 
**alter prepare-scripts to accomodate new distro, new flavor and new arch, where required
 
**alter prepare-scripts to accomodate new distro, new flavor and new arch, where required
 
**alter build-scripts to accomodate new distro, new flavor and new arch, where required
 
**alter build-scripts to accomodate new distro, new flavor and new arch, where required
***build-maindebs.sh - likely need to disable building some packages on RPi, namely game stuff and pre-built binary stuff (uirt, etc)
+
***build-maindebs.sh - need to disable building some packages on RPi, namely game stuff and pre-built binary stuff (uirt, etc)
 
*attempt a build
 
*attempt a build
 
== Creating Pi MD ==
 
== Creating Pi MD ==
Line 36: Line 38:
 
*diskless boot (nfs rootfs actually)
 
*diskless boot (nfs rootfs actually)
 
**net boot (PXE) is not immediately possible from RPi
 
**net boot (PXE) is not immediately possible from RPi
**using nfs for rootfs with kernel on an SD card IS possible: kernel is loaded by gpu prior to boot? video config and kernel are on the SD card.
+
**using nfs for rootfs with kernel on an SD card IS possible: kernel is loaded by gpu prior to boot, video config and kernel are both on the SD card.
**NewMDInteractor/CreateDiskless likely need changes to support multi arch/multi distro, in conjunction with RaspberryPi as MD device template
+
**NewMDInteractor/CreateDiskless likely need changes to support multi arch/multi distro, in conjunction with RaspberryPi as MD device template - needs investigation
 
*disked boot? not desireable - SD card based, very slow
 
*disked boot? not desireable - SD card based, very slow
 
*boot scripts
 
*boot scripts
Line 47: Line 49:
 
**graphics setup is performed by gpu prior to the kernel boot.
 
**graphics setup is performed by gpu prior to the kernel boot.
 
**method of setting/determining graphics mode? changing resolution requires reboot for gpu init
 
**method of setting/determining graphics mode? changing resolution requires reboot for gpu init
**initially something simple and text based, ala raspi-conf
+
**initially simple and functional
*qOrbiter  
+
*qOrbiter on Pi
*omxplayer device template/player/streamer?
+
*omxplayer player & streamer pair?
 
== Other ==
 
== Other ==
 
*arm libs required for pre-compiled libraries (usb-uirt, external media identifier?/id-my-disc?, more?)
 
*arm libs required for pre-compiled libraries (usb-uirt, external media identifier?/id-my-disc?, more?)
 
*mythtv frontend is too heavy for RPi, recordings will need to be natively played by omxplayer
 
*mythtv frontend is too heavy for RPi, recordings will need to be natively played by omxplayer

Revision as of 06:16, 27 July 2012

This will attempt to highlight some of the requirements/process intended/followed for porting lmce to raspbian for use on the raspberry pi.

New database data

Linuxmce uses the database at build time when creating deb packages for dependencies and later at install time to install those dependencies, add repositories to /etc/sources.list and so on. Since on every release some packages tend to change names or split/merge into others, updating the packages tables is time consuming and you need to do some install/fix cycles before figuring them all out.

Add Distro and Repositories

  • update the 'Distro' table, add Raspbian: (then sqlCVS diff/get batch approved/sqlCVS udpate) - Done.
insert into Distro (Description, FK_OperatingSystem, Installer, SourceCode, Confirmed, InstallerURL ) values ('Raspbian Wheezy', 1, 'ConfirmDependencies_Debian.sh', 'src', 1, 'installDebian.php')
  • update the 'RepositorySource' table, add the main raspbian repo and an lmce raspbian repo [2 entries]: (then sqlCVS diff/get batch approved/sqlCVS update) - Done.
insert into RepositorySource (FK_OperatingSystem, FK_Distro, FK_RepositoryType, Description, Define, Instructions) values ( 1, 19, 1, 'Raspbian', 'Raspbian', 'This package is part of Raspbian')
insert into RepositorySource (FK_OperatingSystem, FK_Distro, FK_RepositoryType, Description, Instructions) values (1, 19, 1, 'Raspbian LinuxMCE addons', 'LinuxMCE packages for Raspbian')
  • update the 'RepositorySource_URL' table, add the URLs for the 2 repositories above [2 entries]: (then sqlCVS diff/get batch approved/sqlCVS update) - Done.
insert into RepositorySource_URL (FK_RepositorySource, URL) values ( 22, 'deb http://archive.raspbian.org/raspbian')
insert into RepositorySource_URL (FK_RepositorySource, URL) values ( 23, 'deb http://deb.linuxmce.org/raspbian')

Add Packages

For packages we are going to copy the entire bank of ubuntu and lmce packages for 1004 to raspbian wheezy entries, then we'll fix up individual package names afterwards.

  • update the 'Package_Source' table, add all Packages from ubuntu lucid as a base, copy ubuntu repo packages and lmce repo packages: (then sqlCVS diff/approval/update) - Done.
insert into Package_Source (FK_Package, Name, FK_RepositorySource, Repository)select FK_Package, Name, "22", "wheezy main" from Package_Source join Package_Source_Compat on Package_Source.PK_Package_Source=Package_Source_Compat.FK_Package_Source where FK_Distro=18 and FK_RepositorySource IN ( 1, 2, 20) 
insert into Package_Source (FK_Package, Name, FK_RepositorySource, Repository)select FK_Package, Name, "23", "wheezy main" from Package_Source join Package_Source_Compat on Package_Source.PK_Package_Source=Package_Source_Compat.FK_Package_Source where FK_Distro=18 and FK_RepositorySource=21
  • update the 'Package_Source_Compat' table, add OS and Distro for all Raspbian packages added in previous inserts: (then sqlCVS diff/approval/update) - Done
insert into Package_Source_Compat (FK_Package_Source, FK_OperatingSystem, FK_Distro) select PK_Package_Source, "1", "19" from Package_Source where FK_RepositorySource in (22,23)
  • fix package names that are inconsistent between raspbian and ubuntu: (then sqlCVS diff/approval/update) - Initially Done, likely find more inconsistencies

Builder

Most of this has been done already, just not submitted to svn

  • build a builder - base on possy's create_builder.sh script, alter to create raspbian build env (one script to build them all? :P)
  • Conf files need update - most of this is done, needs a little re-work
    • builder.conf, raspbian.conf? (from ubuntu.conf/debian.conf) - .conf files contain lots that's never used or has been deprecated for some time
    • Build dependencies list needs updating. - done
  • build scripts need update - mostly done, needs re-work for backwards compatibility across arch's/flavor's (why was the 'u' dropped in American English? need to investigate further)
    • alter prepare-scripts to accomodate new distro, new flavor and new arch, where required
    • alter build-scripts to accomodate new distro, new flavor and new arch, where required
      • build-maindebs.sh - need to disable building some packages on RPi, namely game stuff and pre-built binary stuff (uirt, etc)
  • attempt a build

Creating Pi MD

Device Template

  • a device template for the Pi so it's specific MD needs are recognized and implemented automatically, proper devices started, etc...

Booting - howto?

  • diskless boot (nfs rootfs actually)
    • net boot (PXE) is not immediately possible from RPi
    • using nfs for rootfs with kernel on an SD card IS possible: kernel is loaded by gpu prior to boot, video config and kernel are both on the SD card.
    • NewMDInteractor/CreateDiskless likely need changes to support multi arch/multi distro, in conjunction with RaspberryPi as MD device template - needs investigation
  • disked boot? not desireable - SD card based, very slow
  • boot scripts

Install

  • build a diskless image to untar similar to i386
  • SD fat32 formatted with RPi boot files and MD initial config installed (can be done easily from a Windows PC or ...)

UI/Media

  • avwizard
    • graphics setup is performed by gpu prior to the kernel boot.
    • method of setting/determining graphics mode? changing resolution requires reboot for gpu init
    • initially simple and functional
  • qOrbiter on Pi
  • omxplayer player & streamer pair?

Other

  • arm libs required for pre-compiled libraries (usb-uirt, external media identifier?/id-my-disc?, more?)
  • mythtv frontend is too heavy for RPi, recordings will need to be natively played by omxplayer