[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian kernel on Odroid xu3?



On 2016-04-01, Erik de Castro Lopo wrote:
> I've got an Odroid xu3 with Debian Testing on it. Its currently running the
> manufacturer's officially blessed kernel (version 3.10.x) compiled from source
> with the addition of CONFIG_FANOTIFY enabled (required by systemd).
>
> Has anyone run a Debian kernel like this on an Odroid xu3?
>
>     https://wiki.debian.org/DebianKernel/ARMMP
>
> If so, how does one install it and get it set up?

I've the armmp and armmp-lpae kernels on an Odroid-XU4, which is *very*
similar, so should work for the XU3 as well. It did require setting up
boot scripts to use the vendor u-boot for the XU4.

Odroid-XU3 is in theory supportable by mainline u-boot, which might be
simpler to set up and support out of the box(especially if it supports
distro_bootcmd), but isn't yet enabled in the Debian packages. I'd be
happy to enable it, if you could commit to testing it semi-regularly:

  https://wiki.debian.org/U-boot


I've been meaning to document this somewhere, so at least this is a
starting point for some real documentation...

My slightly overly complicated setup for the Odroid-XU4 involves a boot
script on a fat partition, that loads a boot script generated by
flash-kernel, which loads the kernel and initrd and .dtb off of an ext4
partition.

I did this so I wouldn't have to mount the FAT partition, but you could
alternately configure flash-kernel to copy the kernel, initrd, dtb and
boot script directly to the fat partition instead.

On the first FAT partition on an SD card, I made a boot.txt:

  setenv bootm_size 0x10000000
  setenv kernel_addr_r 0x42000000
  setenv fdt_addr_r 0x43000000
  setenv ramdisk_addr_r 0x43300000
  setenv scriptaddr 0x50000000
  setenv pxefile_addr_r 0x51000000
  setenv fdtfile exynos5422-odroidxu4.dtb

  setenv devnum 0
  setenv bootpart 3
  setenv devtype mmc
  setenv load ext4load
  setenv prefix /

  $load $devtype $devnum:$bootpart $scriptaddr boot.scr
  source $scriptaddr

And then compile it into boot.scr:

  mkimage -O linux -A arm -T script -d boot.txt boot.scr


In /etc/flash-kernel/bootscript/bootscr.odroidxu4-local:

  setenv bootargs ${bootargs} @@LINUX_KERNEL_CMDLINE@@
  #@@UBOOT_ENV_EXTRA@@
  
  setenv fk_kvers '@@KERNEL_VERSION@@'
  setenv fdtpath dtbs/${fk_kvers}/${fdtfile}
  
  ext4load $devtype $devnum:$bootpart $kernel_addr_r
  ${prefix}/vmlinuz-${fk_kvers}
  ext4load $devtype $devnum:$bootpart $fdt_addr_r ${prefix}/$fdtpath
  ext4load $devtype $devnum:$bootpart $ramdisk_addr_r
  ${prefix}/initrd.img-${fk_kvers}
  bootz $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r

In /etc/flash-kernel/db:

  Machine: Hardkernel Odroid XU4
  #Kernel-Flavors: armmp armmp-lpae
  DTB-Id: exynos5422-odroidxu4.dtb
  Boot-Script-Path: /boot/boot.scr
  U-Boot-Script-Name: bootscr.odroidxu4-local
  Required-Packages: u-boot-tools


You will, of course, need to adjust a few of the things above for the
Odroid-XU3, like the Machine and DTB-Id and so on. You may also need to
force the use of machine for the first run by setting
/etc/flash-kernel/machine to be identical to the Machine entry above.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


Reply to: