Difference between pages "ODROID U2" and "Package:Iproute2"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
m (add more goodies)
 
Line 1: Line 1:
The [http://www.hardkernel.com/renewal_2011/products/prdt_info.php| ODROID U2 ] is an ARM development board, featuring a 1.7 GHz quad-core CPU (ARMv7a). This document contains notes about installing Funtoo Linux on this device.
{{Ebuild
|Summary=kernel routing and traffic control utilities
|CatPkg=sys-apps/iproute2
|Homepage=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
}}
'''Tools replaced by iproute2'''
{{TableStart}}
<tr class="info"><th>Purpose</th><th>Legacy net-tools</th><th>iproute2</th></tr>
<tr><td>Address and link configuration</td><td>ifconfig</td><td>ip addr, ip link</td></tr>
<tr><td>Routing tables</td><td>route</td><td>ip route</td></tr>
<tr><td>Neighbors</td><td>arp</td><td>ip neigh</td></tr>
<tr><td>VLAN</td><td>vconfig</td><td>ip link</td></tr>
<tr><td>Tunnels</td><td>iptunnel</td><td>ip tunnel</td></tr>
<tr><td>Multicast</td><td>ipmaddr</td><td>ip maddr</td></tr>
<tr><td>Statistics</td><td>netstat</td><td>ss</td></tr>
{{TableEnd}}


 
{{PageNeedsUpdates}}
== Cross-compiler installation ==
https://en.wikipedia.org/wiki/Iproute2
 
{{EbuildFooter}}
To compile a suitable Linux kernel and bootloader for the ODROID U2, you need to install an ARMv7a hardfloat toolchain on your system.
 
<console>
# ##i##emerge crossdev
# ##i##crossdev -v -t armv7a-hardfloat-linux-gnueabi
</console>
 
 
{{fancywarning|In the following sections, replace /dev/sdX with the actual device node of your SD card.}}
 
 
== U-boot bootloader ==
 
The ODROID-U2 needs U-boot as a bootloader. The ODROID U2 vendor provides a git repository with all what is needed to build and install U-boot on the SD-card that will be used to boot the device.
 
<console>
# ##i##mkdir ~/odroid_u2
# ##i##cd ~/odroid_u2
# ##i##git clone https://github.com/hardkernel/u-boot.git
# ##i##cd u-boot
# ##i##make smdk4412_config
# ##i##make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-
</console>
 
 
If U-boot does not build with your ARM toolchain, see the troubleshooting section. It may happen that U-boot does not build with a recent toolchain.
 
 
Now, the following will install U-boot on the beginning sectors of your SD card.
 
<console>
# ##i##cd sd_fuse
# ##i##./sd_fusing.sh /dev/sdX
</console>
 
 
 
 
== Partitioning ==
 
{{fancywarning|The bootloader takes a bit more space than usual. You must keep about 5 MB (10240 sectors for example) of free space before the first partition.}}
 
 
You may now partition your SD card to fit your needs. However, U-boot expects to find a FAT32 boot partition (first or second). Also, U-boot needs free space before the first partition.
 
 
<pre>
Partition Table for /dev/sdX
 
              First      Last
# Type      Sector      Sector  Offset    Length  Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
  Pri/Log          0      10239*    0#      10240*Free Space          None
1 Primary      10240*    215039*    0      204800*W95 FAT32 (0B)      None
2 Primary      215040*    2214599*    0    1999560*Linux swap / So (82) None
3 Primary    2214600*  15269887*    0    13055288*Linux (83)          None
</pre>
 
 
Now, format your partitions, e.g.
 
<console>
# ##i##mkfs.vfat /dev/sdX1
# ##i##mkswap /dev/sdX2
# ##i##mkfs.ext4 /dev/sdX3
</console>
 
 
 
== Funtoo Linux Installation ==
Follow the guide from [[Funtoo Linux Installation on ARM]] to begin the installation of Funtoo on the root filesystem. Note that once you are finished, you will not be able to boot the ODROID U2 until you complete the next sections.
 
 
 
=== Kernel and modules ===
 
The ODROID U2 vendor provides kernel sources and default .config files for the ODROID U2. In this example, we clone the git repository, use the default branch, and build the default ubuntu kernel config. Note that other branches exist, some of them provide default configurations for the U2, others not.
 
{{fancywarning|As in [[Funtoo Linux Installation on ARM]], we consider that the root partition is mounted in /mnt/SD_root. Also, we consider that the boot partition is /dev/sdX1.}}
 
<console>
# ##i##cd ~/odroid_u2
# ##i##git clone https://github.com/hardkernel/linux.git
# ##i##cd linux
# ##i##ARCH=arm make odroidu2_ubuntu_defconfig
# ##i##ARCH=arm CROSS_COMPILE=/usr/bin/armv7a-hardfloat-linux-gnueabi- make -j8 (adapt depending on the number of cores available on the build machine)
# ##i##mount /dev/sdX1 /mnt/SD_root/boot
# ##i##ARCH=arm CROSS_COMPILE=/usr/bin/armv7a-hardfloat-linux-gnueabi- make modules_install INSTALL_MOD_PATH=/mnt/SD_root
# ##i##cp arch/arm/boot/zImage /mnt/SD_root/boot
</console>
 
== Boot partition setup ==
You now have a kernel in /mnt/SD_root/boot. The only missing part is a file named ''boot.scr'', which will be read by U-boot.
 
First, create a ''boot.txt'' file on the boot partition.
 
<console>
# ##i##cd /mnt/SD_root/boot
# ##i##touch boot.txt
</console>
 
Modify this file to contain the following :
 
<pre>
setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"
setenv fb_x_res "1920"
setenv fb_y_res "1080"
setenv hdmi_phy_res "1080"
setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; bootm 0x40008000"
setenv bootargs "console=tty1 console=ttySAC1,115200n8 fb_x_res=${fb_x_res} fb_y_res=${fb_y_res} hdmi_phy_res=${hdmi_phy_res} root=/dev/mmcblk0p3 rootwait ro mem=2047M"
boot
</pre>
 
{{fancywarning|Modify the screen resolution to fit your needs. Also, modify ''/dev/mmcblk0p3'' for the correct device of your root partition. ''/dev/mmcblk0p3'' is the third partition of the SD-card. Modify the last digit to fit your partitioning scheme.}}
 
 
Now, install u-boot-tools that provides ''mkimage'' and create ''boot.scr''.
 
 
<console>
# ##i##emerge u-boot-tools
# ##i##mkimage -A arm -T script -C none -n "Boot.scr for odroid-u2" -d boot.txt boot.scr
</console>
 
 
 
== Further configuration ==
 
=== fstab ===
<pre>
/dev/mmcblk0p1 /boot vfat noauto,noatime 1 2
/dev/mmcblk0p2 none swap sw 0 0
/dev/mmcblk0p3 / ext4 noatime 0 0
</pre>
 
 
Note: We disable fsck checking of some devices as it may fail because of the missing hardware clock on the device.
 
=== inittab ===
 
If you have USB/UART debugging hardware, you may want to change /etc/inittab the following way :
 
<pre>
# SERIAL CONSOLESs0:12345:respawn:/sbin/agetty 115200 ttySAC1 vt100
</pre>
 
 
 
== Troubleshooting ==
 
==== Error: selected processor does not support ARM mode `smc 0' ====
<pre>--- board/samsung/smdk4212/smc.c.orig 2013-04-30 17:34:16.556093458 -0400
+++ board/samsung/smdk4212/smc.c 2013-04-30 17:34:50.422095103 -0400
@@ -90,6 +90,7 @@
register u32 reg3 __asm__("r3") = arg3;
 
  __asm__ volatile (
+ ".arch_extension sec\n"
"smc 0\n"
: "+r"(reg0), "+r"(reg1), "+r"(reg2), "+r"(reg3)
 
@@ -104,6 +105,7 @@
register u32 reg1 __asm__("r1") = 0;
  __asm__ volatile (
+ ".arch_extension sec\n" "smc 0\n"
: "+r"(reg0), "+r"(reg1)
</pre>
 
Source :http://forum.insignal.co.kr/viewtopic.php?f=10&t=118
 
==== armv7a-hardfloat-linux-gnueabi-ld: error: /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.2/libgcc.a(bpabi.o) uses VFP register arguments, u-boot does not ====
 
<pre>
--- arch/arm/cpu/armv7/config.mk.orig 2013-04-30 17:40:20.842111160 -0400
+++ arch/arm/cpu/armv7/config.mk 2013-04-30 17:40:52.368112692 -0400
@@ -20,7 +20,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
+PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -mfloat-abi=hard -mfpu=vfpv3 
 
# Make ARMv5 to allow more compilers to work, even though its v7a.
PLATFORM_CPPFLAGS += -march=armv7-a
</pre>
 
Source :
https://code.google.com/p/chromium/issues/detail?id=213120

Latest revision as of 23:55, January 1, 2015

Iproute2

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Tools replaced by iproute2

PurposeLegacy net-toolsiproute2
Address and link configurationifconfigip addr, ip link
Routing tablesrouteip route
Neighborsarpip neigh
VLANvconfigip link
Tunnelsiptunnelip tunnel
Multicastipmaddrip maddr
Statisticsnetstatss

https://en.wikipedia.org/wiki/Iproute2