OpenSUSE JeOS bringup: различия между версиями

Материал из Toshiba AC100 wiki
Перейти к навигации Перейти к поиску
Нет описания правки
 
м (contrib not required anymore)
 
(не показано 13 промежуточных версий этого же участника)
Строка 1: Строка 1:
Brief guide how to add target to openSUSE:Factory:ARM:Jeos
Brief guide how to add target to openSUSE:Factory:ARM:JeOS


=Add new target=  
==Get source code==


* config.sh
* Install '''osc''' <pre># zypper in osc</pre>
** Add additional modules to include to initrd file
* Branch or copy '''openSUSE:Factory:ARM:JeOS''' project <pre>$ osc bco openSUSE:Factory:ARM JeOS</pre>
* Disable building of all images in your JeOS branch


* pre_checkin.sh
==Add new target==
** add target name to '''armv7_jeos_images''', optional to '''armv7_gfx_images'''


* Images.kiwi.in
* Modify config.sh
** add target flavor '''#elif IS_FLAVOR_paz00'''
** Add contrib repo if required for downstream kernel/u-boot or addititional rpms (optional)
** Add additional modules to include to initrd file (optional)


* uboot-image-setup.in
* Modify pre_checkin.sh
** add target case '''case $flavor in paz00)'''
** add target name to '''armv7_jeos_images''', optional to '''armv7_gfx_images'''
*** jeos image contain only rootfs with main packages and gfx image also contain various desktop enviroments
* Modify Images.kiwi.in (input file for specific configs generation)
** add target flavor '''#elif IS_FLAVOR_paz00''' <pre>+#elif IS_FLAVOR_paz00&#10;+#  define BOOTKERNEL default&#10;+#  define KERNEL_CMDLINE_SER "plymouth.enable=0 console=ttyS0,115200n8 console=tty"&#10;+#  define KERNEL_CMDLINE_GFX "plymouth.enable=0 console=ttyS0,115200n8 console=tty"&#10;+#  define EXTRA_PACKAGES PKG_BOOT_TAG(u-boot-paz00) \&#10;+                        PKG_BOOT_TAG(dtb-tegra2)&#10;</pre>
*** BOOTKERNEL var defines kernel name to use, for example default or lpae for upstream openSUSE Factory kernels
*** PKG_BOOT_TAG var defines u-boot rpm package name which contain board dtb file and name of rpm of u-boot itself for the board
** add additional repo (''legacy, not required anymore'')<pre>+#if IS_FLAVOR_paz00&#10;+        <repository type="rpm-md" priority="5">&#10;+                <source path="obs://devel:ARM:Factory:Contrib:Tegra/standard"/>&#10;+        </repository>&#10;+#endif&#10;</pre>
*** packages in higher priority repo will go before default factory repo ones
* Modify uboot-image-setup.in
** add target case '''case $flavor in paz00)''' <pre>+  paz00)&#10;+    kerneladdr=0x1000000&#10;+    ramdiskaddr=0x2200000&#10;+    fdtaddr=0x2000000&#10;+    should_use_fdt=1&#10;+    should_load_fdt=1&#10;+    units="1 0"&#10;+    bootdevs="mmc usb"&#10;+    fdtfile=dtb/tegra20-paz00.dtb&#10;+    ;;&#10;</pre>
*** Define variables which openSUSE common boot.scr script will use
* Create uboot-setup-paz00.tgz
** copy any of existing ones <pre>cp uboot-setup-panda.tgz uboot-setup-paz00.tgz</pre>
*** it will be overriten with pre_checkin.sh script


* uboot-setup-paz00.tgz
* run pre_checkin.sh to generate specific configs for all boards <pre>sh ./pre_checkin.sh</pre>
** copy any of existing ones
<pre>
cp uboot-setup-panda.tgz uboot-setup-paz00.tgz
</pre>
'''* it will be overriten with pre_checkin.sh script


* run pre_checkin.sh
* run build of '''JeOS-paz00.kiwi'''
<pre>
<pre> osc build images armv7l JeOS-paz00.kiwi </pre>
sh ./pre_checkin.sh
</pre>


* run build of '''JeOS-paz00.kiwi'''
* Submit patch with new target to upstream Jeos project


=Todo=  
==Todo==
* Find some way to install u-boot with kiwi
* Find some way to install u-boot with kiwi
* Find some way to update u-boot with kiwi
* Find some way to update u-boot with kiwi


=Test results=
==Test results==

Текущая версия от 13:51, 18 июня 2017

Brief guide how to add target to openSUSE:Factory:ARM:JeOS

Get source code

  • Install osc
    # zypper in osc
  • Branch or copy openSUSE:Factory:ARM:JeOS project
    $ osc bco openSUSE:Factory:ARM JeOS
  • Disable building of all images in your JeOS branch

Add new target

  • Modify config.sh
    • Add contrib repo if required for downstream kernel/u-boot or addititional rpms (optional)
    • Add additional modules to include to initrd file (optional)
  • Modify pre_checkin.sh
    • add target name to armv7_jeos_images, optional to armv7_gfx_images
      • jeos image contain only rootfs with main packages and gfx image also contain various desktop enviroments
  • Modify Images.kiwi.in (input file for specific configs generation)
    • add target flavor #elif IS_FLAVOR_paz00
      +#elif IS_FLAVOR_paz00
      +#  define BOOTKERNEL default
      +#  define KERNEL_CMDLINE_SER "plymouth.enable=0 console=ttyS0,115200n8 console=tty"
      +#  define KERNEL_CMDLINE_GFX "plymouth.enable=0 console=ttyS0,115200n8 console=tty"
      +#  define EXTRA_PACKAGES PKG_BOOT_TAG(u-boot-paz00) \
      +                         PKG_BOOT_TAG(dtb-tegra2)
      
      • BOOTKERNEL var defines kernel name to use, for example default or lpae for upstream openSUSE Factory kernels
      • PKG_BOOT_TAG var defines u-boot rpm package name which contain board dtb file and name of rpm of u-boot itself for the board
    • add additional repo (legacy, not required anymore)
      +#if IS_FLAVOR_paz00
      +        <repository type="rpm-md" priority="5">
      +                <source path="obs://devel:ARM:Factory:Contrib:Tegra/standard"/>
      +        </repository>
      +#endif
      
      • packages in higher priority repo will go before default factory repo ones
  • Modify uboot-image-setup.in
    • add target case case $flavor in paz00)
      +  paz00)
      +    kerneladdr=0x1000000
      +    ramdiskaddr=0x2200000
      +    fdtaddr=0x2000000
      +    should_use_fdt=1
      +    should_load_fdt=1
      +    units="1 0"
      +    bootdevs="mmc usb"
      +    fdtfile=dtb/tegra20-paz00.dtb
      +    ;;
      
      • Define variables which openSUSE common boot.scr script will use
  • Create uboot-setup-paz00.tgz
    • copy any of existing ones
      cp uboot-setup-panda.tgz uboot-setup-paz00.tgz
      • it will be overriten with pre_checkin.sh script
  • run pre_checkin.sh to generate specific configs for all boards
    sh ./pre_checkin.sh
  • run build of JeOS-paz00.kiwi
 osc build images armv7l JeOS-paz00.kiwi 
  • Submit patch with new target to upstream Jeos project

Todo

  • Find some way to install u-boot with kiwi
  • Find some way to update u-boot with kiwi

Test results