OpenSUSE rootfs bringup
Перейти к навигации
Перейти к поиску
openSUSE rootfs bringup
Howto create openSUSE custom rootfs. Based on this guide Chroot / do-it-yourself environment
DIY Enviroment
- First, download the latest JeOS, XFCE or E17 root file system (*armv7-rootfs*) available at:
ARMV7HL Factory images for example this one openSUSE-Factory-ARM-E17.armv7-rootfs.armv7l-1.12.1-Build172.10.tbz
- Create type gpt partition table on mmc SD card or USB flash (i will use SD)
- Create two primary partitions, for example first lxboot and second lxroot
- It is possible to put everything on one partition
- Format them to ext4
- Create two primary partitions, for example first lxboot and second lxroot
- Mount /lxroot to /mnt/temp and run
sudo tar xvjf openSUSE-Factory-ARM-E17.armv7-rootfs.armv7l-1.12.1-Build172.10.tbz -C /mnt/temp
- Create folders /boot and /dtb on lxboot partition
- Compile kernel 3.15-rcX using tegra_defconfig or custom config
- Copy resulting arch/arm/boot/zImage to lxboot/boot
- Copy resulting arch/arm/boot/dts/tegra20-paz00.dtb to lxboot/dtb
- Run make modules_install with INSTALL_MOD_PATH variable to some folder then copy resulting modules directories to lxroot/lib/modules/3.15-rcX-kernelname
- WIP Use precompiled kernel
- Self compiled kernel and modules https://dl.dropboxusercontent.com/u/32472722/opensuse/kernel-3.15.0-rc7-tegra.tar.gz
- Will add as rpm later
- Create boot.scr file
- boot.scr content example openSUSE style
setenv ramdisk boot/initrd.uboot setenv kernel boot/zImage setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" setenv bootargs plymouth.enable=0 console=ttyS0,115200n8 console=tty1 rw root=/dev/mmcblk0p3 showopts ${append} setenv kernel 'boot/zImage' setenv initrd 'boot/initrd.uboot' setenv fdtfile 'dtb/tegra20-paz00.dtb' setenv flavor 'paz00' setenv target 'firstboot' setenv bootdevs 'mmc usb' setenv bootparts '${unit}:2' setenv initrd_high '0xffffffff' setenv fdt_high '0xffffffff' setenv boottype 'bootz' setenv kerneladdr '0x1000000' setenv ramdiskaddr '0x2200000' setenv should_use_fdt '1' setenv should_load_fdt '1' setenv fdtaddr '0x2000000' setenv setdev 'mmc dev ${unit}' setenv units '0 1' setenv sizeprefix '0x' setenv fs 'ext2' test -n "$kerneladdr" || setenv kerneladdr ${kernel_addr_r} test -n "$ramdiskaddr" || setenv ramdiskaddr ${ramdisk_addr_r} setenv load_kernel '${fs}load ${bootdev} ${bootpart} ${kerneladdr} ${kernel}' setenv load_initrd '${fs}load ${bootdev} ${bootpart} ${ramdiskaddr} ${initrd}; setenv rd_filesize ${sizeprefix}${filesize}' if itest 1${should_load_fdt} == 11; then if test 0${fdtfile} = 0call_findfdt; then run findfdt setenv fdtfile dtb/${fdtfile} fi setenv loadfdt '${fs}load ${bootdev} ${bootpart} ${fdtaddr} ${fdtfile}' else setenv loadfdt '' fi if itest 1${use_fdt_addr} == 11; then # Calxeda systems use $fdt_addr rather than $fdtaddr setenv fdtaddr $fdt_addr fi if itest 1${use_fdt_addr_r} == 11; then # At least upstream rpi_b uses $fdt_addr_r rather than $fdtaddr setenv fdtaddr ${fdt_addr_r} fi if itest 1${should_use_fdt} == 11; then setenv boot_kernel '${boottype} ${kerneladdr} ${ramdiskaddr}:${rd_filesize} ${fdtaddr}' else setenv boot_kernel '${boottype} ${kerneladdr} ${ramdiskaddr}:${rd_filesize}' fi setenv doit 'if run load_kernel; then; run load_initrd; run loadfdt; run boot_kernel; fi' setenv bootcmd 'for bootdev in ${bootdevs}; do for unit in ${units}; do setenv bootpart; for bootpart in ${bootparts}; do setenv fix_bootpart "setenv bootpart $bootpart"; run fix_bootpart; run setdev; run doit; done; done; done' boot
- Copy resulting boot.scr to lxboot/
- Now it is ready to run on AC100
Firstboot notes
- Howto install opentegra (your kernel must be 3.15-rc3 minimum)
- Add AC100 specific repositories
sudo zypper ar http://download.opensuse.org/repositories/X11:/XOrg/openSUSE_Factory_ARM/ openSUSE_Factory_ARM_X11_XOrg sudo zypper ar http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/Tegra/standard/ devel_ARM_Factory_Contrib_Tegra_standard
- Install latest XOrg version
sudo zypper dup --from openSUSE_Factory_ARM_X11_XOrg
- Install libdrm and xf86-video-opentegra packages
sudo zypper in xf86-video-opentegra libdrm_tegra0 libkms1
- opentegra xorg config live here /usr/share/X11/xorg.conf.d/opentegra.conf
- You may need to remove this file if XOrg version can't parse its OutputClass section and create /etc/X11/xorg.conf.d/00-opentegra.conf config file
- opentegra xorg config live here /usr/share/X11/xorg.conf.d/opentegra.conf
Section "Device" Identifier "opentegra" Driver "opentegra" EndSection
- Fix permissions, if XOrg not suid by chance
sudo zypper in --force permissions
Not sure yet if this is correct fix
- If XOrg fail to start with some permission denied or existing file not found chmod it with suid rights manualy
sudo chmod u+s /usr/bin/Xorg
U-Boot notes
- Load boot.scr manualy if you stuck in u-boot console
ext2load mmc 1:2 0x10000000 /boot.scr source 0x10000000