{"id":1251,"date":"2016-09-04T15:31:49","date_gmt":"2016-09-04T14:31:49","guid":{"rendered":"http:\/\/cdblog.cdstealer.com\/?p=1251"},"modified":"2018-01-03T08:15:09","modified_gmt":"2018-01-03T08:15:09","slug":"raspberry-pi-3b-gentoo-install","status":"publish","type":"post","link":"https:\/\/cdblog.cdstealer.com\/?p=1251","title":{"rendered":"Raspberry Pi 3B Gentoo Install"},"content":{"rendered":"<div id=\"top\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1272 alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/Raspberry_Pi_Logo.svg_-237x300.png\" alt=\"Raspberry_Pi_Logo.svg\" width=\"237\" height=\"300\" srcset=\"https:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/Raspberry_Pi_Logo.svg_-237x300.png 237w, https:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/Raspberry_Pi_Logo.svg_.png 810w, https:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/Raspberry_Pi_Logo.svg_-300x379.png 300w\" sizes=\"auto, (max-width: 237px) 100vw, 237px\" \/><\/p>\n<p>NOTE: \u00a0Although the CPU is 64bit, the rest of it is 32bit. \u00a0Trying to run in 64bit will cause pain and suffering.<\/p>\n<p>Other NOTE: \u00a0I cannot YET get the display to work with hardware acceleration. \u00a0Blank screen when enabled and kodi goes nuts, writing hundreds of lines to the log per second.<\/p>\n<pre><span style=\"color: #ff0000;\">15:24:07 T:1943678976 ERROR: Previous line repeats 1 times.<\/span>\r\n<span style=\"color: #ff0000;\">15:24:07 T:1943678976 ERROR: Invalid GUI Shader selected - [guishader_frag_fonts.glsl]<\/span>\r\n<span style=\"color: #ff0000;\">15:24:07 T:1943678976 ERROR: Invalid GUI Shader selected - [guishader_frag_texture_noblend.glsl]<\/span><\/pre>\n<h4>Contents:<\/h4>\n<p><strong> <a href=\"#partitionSd\">Partition SD<\/a><\/strong><br \/>\n<strong> <a href=\"#boot\">Boot<\/a><\/strong><br \/>\n<strong> <a href=\"#root\">Root<\/a><\/strong><br \/>\n<strong> <a href=\"#portage\">Portage<\/a><\/strong><br \/>\n<strong> <a href=\"#sorted\">Get a few things sorted<\/a><\/strong><br \/>\n<strong> <a href=\"#screen\">Screen<\/a><\/strong><br \/>\n<strong> <a href=\"#offBox\">Offbox Building<\/a><\/strong><br \/>\n<strong> <a href=\"#compile\">Time to get compiling!<\/a><\/strong><br \/>\n<strong> <a href=\"#distccServer\">Distcc Server<\/a><\/strong><br \/>\n<strong> <a href=\"#distccClient\">Distcc Client<\/a><\/strong><br \/>\n<strong> <a href=\"#systemd\">Systemd<\/a><\/strong><br \/>\n<strong> <a href=\"#wifi\">WIFI<\/a><\/strong><br \/>\n<strong> <a href=\"#locale\">Locale<\/a><\/strong><br \/>\n<strong> <a href=\"#hostname\">Hostname<\/a><\/strong><br \/>\n<strong> <a href=\"#keymap\">Keymap<\/a><\/strong><br \/>\n<strong> <a href=\"#tweaks\">Tweaks<\/a><\/strong><br \/>\n<strong> <a href=\"#caveats\">Caveats<\/a><\/strong><br \/>\n<strong> <a href=\"#KODI\">Kodi<\/a><\/strong><br \/>\n<strong> <a href=\"#MAME\">Mame<\/a><\/strong><\/p>\n<h2 id=\"partitionSd\">Partition SD<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>Example setup:<\/p>\n<pre># fdisk -H255 -S63 \/dev\/sdX\r\n--------------------------------------------------------------------------------\r\nDisk \/dev\/sdg: 59 GiB, 63367544832 bytes, 123764736 sectors\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 512 bytes\r\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\r\nDisklabel type: dos\r\nDisk identifier: 0x00000000\r\n\r\nDevice Boot Start End Sectors Size Id Type\r\n\/dev\/sdg1 * 2048 104447 102400 50M c W95 FAT32 (LBA)\r\n\/dev\/sdg2 104448 115447807 115343360 55G 83 Linux\r\n\/dev\/sdg3 115447808 123764735 8316928 4G 5 Extended\r\n\/dev\/sdg5 115449856 123764735 8314880 4G 82 Linux swap \/ Solaris\r\n--------------------------------------------------------------------------------<\/pre>\n<p>Format Filesystems:<\/p>\n<pre>mkfs.vfat -n BOOT \/dev\/sdg1\r\nmke2fs -t ext4 -L ROOTFS \/dev\/sdg2\r\nmkswap \/dev\/sdg5<\/pre>\n<p>The boot filesystem needs to be VFAT but the rest are up to you :)<\/p>\n<hr \/>\n<h2 id=\"boot\">Boot!<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>Download the firmware archive from <a href=\"https:\/\/github.com\/raspberrypi\/firmware\" target=\"_blank\">here<\/a><\/p>\n<p>extract the \/boot\/* to the boot filesystem of the SD card.<\/p>\n<p>Create a file called cmdline.txt to specify any necessary kernel parameters.<br \/>\nFor example:<\/p>\n<pre>root=\/dev\/mmcblk0p2 rootdelay=2 rootfstype=ext4 rootwait<\/pre>\n<p>Create the file\u00a0config.txt for more options.<br \/>\nFor example:<\/p>\n<pre>gpu_mem=64 arm_control=0x200<\/pre>\n<p>That should be the boot system sorted :)<\/p>\n<hr \/>\n<h2 id=\"root\">Root<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>Download <a href=\"http:\/\/distfiles.gentoo.org\/releases\/arm\/autobuilds\/current-stage3-armv7a_hardfp\/\" target=\"_blank\">stage3<\/a><br \/>\nstage3-armv7a_hardfp-YYYYMMDD.tar.bz2<\/p>\n<p>Download <a href=\"http:\/\/distfiles.gentoo.org\/snapshots\/portage-latest.tar.bz2\" target=\"_blank\">portage<\/a><\/p>\n<p>Unpack the stage3 tarball:<\/p>\n<pre>tar xpjf stage3-arm64-YYYYMMDD.tar.bz2 -C \/path\/to\/sd\/ROOTFS<\/pre>\n<p>Adjust the make.conf file:<\/p>\n<p>\/path\/to\/sd\/ROOTFS\/etc\/portage\/make.conf<\/p>\n<pre>CFLAGS=\"-O2 -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard\"\r\nCXXFLAGS=\"${CFLAGS}\"<\/pre>\n<p>Generate the root password hash:<\/p>\n<pre>openssl passwd -1<\/pre>\n<p>Add this to the <strong>\/path\/to\/sd\/ROOTFS\/etc\/shadow<\/strong> file<\/p>\n<p>eg (replace the * between the first and second :)<\/p>\n<pre>root:<span style=\"color: #ff0000;\">$1$SnXkVgp0$AhbB\/IogzcV.opa9suOx21<\/span>:9797:0:::::<\/pre>\n<p>Adjust the <strong>\/path\/to\/sd\/ROOTFS\/etc\/fstab file<\/strong>. The SD card is recognized as \/dev\/mmcblk0<\/p>\n<div class=\"tg-wrap\">\n<table>\n<tbody>\n<tr>\n<td>&lt;fs&gt;<\/td>\n<td>&lt;mountpoint&gt;<\/td>\n<td>&lt;type&gt;<\/td>\n<td>&lt;opts&gt;<\/td>\n<td>&lt;dump&gt;<\/td>\n<td>&lt;pass&gt;<\/td>\n<\/tr>\n<tr>\n<td>\/dev\/mmcblk0p1<\/td>\n<td>\/boot<\/td>\n<td>vfat<\/td>\n<td>noauto,noatime<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>\/dev\/mmcblk0p2<\/td>\n<td>\/<\/td>\n<td>ext4<\/td>\n<td>noatime<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>\/dev\/mmcblk0p3<\/td>\n<td>none<\/td>\n<td>swap<\/td>\n<td>sw<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr \/>\n<h2 id=\"portage\">Portage<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>Unpack the portage tarball:<\/p>\n<pre>tar xpjf \/path\/\r\nto\/Downloads\/portage-latest.tar.bz2 -C \/path\/to\/sd\/ROOTFS\/usr\/<\/pre>\n<p><strong>At this point we should now have a bootable RPi3. :) \u00a0It can't do very much, but we'll work on that.<\/strong><\/p>\n<p>Hint: Boot up the RPi<\/p>\n<hr \/>\n<h2 id=\"sorted\">Get a few things sorted<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>Once booted and logged in, do this before we do anything else.<\/p>\n<p><strong>Get the network up<\/strong>:<\/p>\n<p>Assuming the use of DHCP on the eth0 network interface.<\/p>\n<pre>cd \/etc\/init.d\/\r\ncp net.lo net.eth0\r\nrc-config start net.eth0\r\nrc-update add net.eth0 boot\r\nrc-update add sshd default<\/pre>\n<p>If you intend on doing remotely, we need to create a user and assign to the wheel group. \u00a0We could configure SSH to accept direct root connections, but that's bad practice.<\/p>\n<p>execute the command:<\/p>\n<pre>useradd -m &lt;username&gt; -G wheel<\/pre>\n<p>This will create the user, the home directory and amend the assigned groups with the wheel group.<\/p>\n<p>Now set the passwd:<\/p>\n<pre>passwd &lt;username&gt;<\/pre>\n<p>Edit rc.conf<\/p>\n<pre>nano \/etc\/rc.conf<\/pre>\n<p>uncomment <strong>rc_sys=\"\"<\/strong><\/p>\n<p>Stop the annoying \"s0 respawning too fast\" error:<\/p>\n<pre>nano \/etc\/inittab<\/pre>\n<p>Comment the s0:12345... line<\/p>\n<p>The RaspberryPi does not have a hwclock:<\/p>\n<pre>rc-update add swclock boot\r\nrc-update del hwclock boot<\/pre>\n<p>Set a hostname (optional unless you run your own DHCP\/DNS)<\/p>\n<pre>nano -w \/etc\/conf.d\/hostname\r\nhostname=\"pifukka\"<\/pre>\n<p>Set the correct keymap for the console.<\/p>\n<pre>nano -w \/etc\/conf.d\/keymaps\r\nset keymap=\"uk\"<\/pre>\n<p>Set the correct timezone<\/p>\n<pre>ln -sf \/usr\/share\/zoneinfo\/Europe\/London \/etc\/localtime<\/pre>\n<p>Create the portage directories.<\/p>\n<pre>mkdir \/etc\/portage\/package.{keywords,mask,use}<\/pre>\n<p>Until we have NTP installed and working, each time the RPi is booted, we'll need to set the time\/date. \u00a0This is done by executing:<\/p>\n<pre>date --set=\"04\/09\/2016 19:55:00\"<\/pre>\n<p>MM\/DD\/YYYY HH:MM:SS<\/p>\n<p>Failure to do this will cause pain if you try and compile anything. \u00a0eg distcc goes into a configure loop :(<\/p>\n<p>Select the profile of the OS:<\/p>\n<p>Execute:<\/p>\n<pre>eselect profile list<\/pre>\n<p>will get you this:<\/p>\n<pre> [1] default\/linux\/arm\/13.0\r\n [2] default\/linux\/arm\/13.0\/desktop\r\n [3] default\/linux\/arm\/13.0\/desktop\/gnome\r\n [4] default\/linux\/arm\/13.0\/desktop\/gnome\/systemd\r\n [5] default\/linux\/arm\/13.0\/desktop\/kde\r\n [6] default\/linux\/arm\/13.0\/desktop\/kde\/systemd\r\n [7] default\/linux\/arm\/13.0\/developer\r\n [8] default\/linux\/arm\/13.0\/armv4\r\n [9] default\/linux\/arm\/13.0\/armv4\/desktop\r\n [10] default\/linux\/arm\/13.0\/armv4\/desktop\/gnome\r\n [11] default\/linux\/arm\/13.0\/armv4\/desktop\/kde\r\n [12] default\/linux\/arm\/13.0\/armv4\/developer\r\n [13] default\/linux\/arm\/13.0\/armv4t\r\n [14] default\/linux\/arm\/13.0\/armv4t\/desktop\r\n [15] default\/linux\/arm\/13.0\/armv4t\/desktop\/gnome\r\n [16] default\/linux\/arm\/13.0\/armv4t\/desktop\/kde\r\n [17] default\/linux\/arm\/13.0\/armv4t\/developer\r\n [18] default\/linux\/arm\/13.0\/armv5te\r\n [19] default\/linux\/arm\/13.0\/armv5te\/desktop\r\n [20] default\/linux\/arm\/13.0\/armv5te\/desktop\/gnome\r\n [21] default\/linux\/arm\/13.0\/armv5te\/desktop\/kde\r\n [22] default\/linux\/arm\/13.0\/armv5te\/developer\r\n [23] default\/linux\/arm\/13.0\/armv6j\r\n [24] default\/linux\/arm\/13.0\/armv6j\/desktop\r\n [25] default\/linux\/arm\/13.0\/armv6j\/desktop\/gnome\r\n [26] default\/linux\/arm\/13.0\/armv6j\/desktop\/kde\r\n [27] default\/linux\/arm\/13.0\/armv6j\/developer\r\n [28] default\/linux\/arm\/13.0\/armv7a *\r\n [29] default\/linux\/arm\/13.0\/armv7a\/desktop\r\n [30] default\/linux\/arm\/13.0\/armv7a\/desktop\/gnome\r\n [31] default\/linux\/arm\/13.0\/armv7a\/desktop\/kde\r\n [32] default\/linux\/arm\/13.0\/armv7a\/developer\r\n [33] hardened\/linux\/arm\/armv7a\r\n [34] hardened\/linux\/arm\/armv6j\r\n [35] hardened\/linux\/musl\/arm\/armv7a\r\n [36] default\/linux\/uclibc\/arm\/armv7a\r\n [37] hardened\/linux\/uclibc\/arm\/armv7a<\/pre>\n<p>As you can see by the `*`, I have left it at the default (option 28)<\/p>\n<p>We are going to be required to build a few packages natively on the RPi3. \u00a0This will take a while due to the ARM CPU having to compile power of a decomposing turd :|<\/p>\n<p>I also found it useful to get screen installed :) \u00a0Should take approx. \u00a05 minutes.<\/p>\n<pre>emerge app-misc\/screen<\/pre>\n<hr \/>\n<h2 id=\"screen\">Screen<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>I find screen extremely useful. \u00a0I'm sure you had situations where you were part way through something on a remote terminal and you gotten disconnected and lost everything. \u00a0With screen, that doesn't matter. \u00a0If you get disconnected, just reconnect to the server then reconnect to the screen session. :)<\/p>\n<p>start a screen session<\/p>\n<pre>screen -S sesh1<\/pre>\n<hr \/>\n<h2 id=\"offBox\">Offbox Building<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>We are going to configure both the RPi and full fat system as a server\/client compiler array as compiling anything on the RPi is beyond time and space.<\/p>\n<h1 id=\"distccServer\">SERVER:<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<p><strong>CROSSDEV<\/strong><\/p>\n<p>Add the crossdev package to keywords to install the latest version.<\/p>\n<table style=\"background-color: #ffcccc;\">\n<tr>\n<td>\nIf you need to remove cross building:<\/p>\n<p>execute <strong>crossdev -C cross-armv7a-hardfloat-linux-gnueabi<\/strong><\/p>\n<pre>* Uninstalling target 'armv7a-hardfloat-linux-gnueabi' ...\r\n<<< cross-armv7a-hardfloat-linux-gnueabi\/glibc-2.22-r4\r\n<<< cross-armv7a-hardfloat-linux-gnueabi\/linux-headers-4.3\r\n<<< cross-armv7a-hardfloat-linux-gnueabi\/binutils-2.25.1-r1\r\nPORTAGE_BZIP2_COMMAND setting is invalid: 'bzip2'\r\nPORTAGE_BZIP2_COMMAND setting from make.globals is invalid: 'bzip2'\r\n<<< cross-armv7a-hardfloat-linux-gnueabi\/gcc-4.9.3\r\n\/usr\/armv7a-hardfloat-linux-gnueabi: directory still exists; remove recursively? [y\/N]<\/pre>\n<p>Then reverse the steps below.\n<\/td>\n<\/tr>\n<\/table>\n<pre>emerge crossdev<\/pre>\n<p>Tell portage about our repo.<\/p>\n<pre>mkdir -p \/usr\/local\/portage-crossdev\/{profiles,metadata}\r\necho 'portage-crossdev' &gt; \/usr\/local\/portage-crossdev\/profiles\/repo_name\r\necho 'masters = gentoo' &gt; \/usr\/local\/portage-crossdev\/metadata\/layout.conf\r\nchown -R portage:portage \/usr\/local\/portage-crossdev\r\n\r\nvi \/etc\/portage\/repos.conf\/gentoo.conf\r\n[portage-crossdev]\r\nlocation=\/usr\/local\/portage-crossdev\r\nmasters=gentoo\r\npriority=10<\/pre>\n<p><strong>Build the Toolchain<\/strong>:<\/p>\n<pre>crossdev -S -v -t armv7a-hardfloat-linux-gnueabi<\/pre>\n<p>You should get the following output:<\/p>\n<pre>--------------------------------------------------------------------------------\r\n * crossdev version: 20160602\r\n * Host Portage ARCH: amd64\r\n * Target Portage ARCH: arm\r\n * Target System: armv7a-hardfloat-linux-gnueabi\r\n * Stage: 4 (C\/C++ compiler)\r\n * ABIs: default\r\n\r\n* binutils: binutils-[stable]\r\n * gcc: gcc-[stable]\r\n * headers: linux-headers-[stable]\r\n * libc: glibc-[stable]\r\n\r\n* CROSSDEV_OVERLAY: \/usr\/local\/portage-crossdev\r\n * PORT_LOGDIR: \/var\/log\/portage\r\n * PORTAGE_CONFIGROOT: \r\n * Portage flags: -v\r\n _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - \r\n * leaving metadata\/layout.conf alone in \/usr\/local\/portage-crossdev\r\n _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - \r\n * Log: \/var\/log\/portage\/cross-armv7a-hardfloat-linux-gnueabi-binutils.log\r\n * Emerging cross-binutils ...\r\n\r\nThese are the packages that would be merged, in order:\r\n\r\nCalculating dependencies\r\n\r\n--------------------------------------------------------------------------------\r\nTHIS IS WHERE SHIT GETS BUILT!<\/pre>\n<p>NOTE:<br \/>\nIf everything fails with the following error, that means you borked the setup eg NOT FOLLOWED THE INSTRUCTIONS ;).<\/p>\n<pre>Calculating dependencies \/usr\/lib\/portage\/python3.4\/ebuild.sh: line 624:\r\n \/path\/to\/sd\/ROOTFS\/usr\/local\/portage-crossdev\/cross-aarch64-unknown-linux-gnu\/binutils\/binutils-9999.ebuild:\r\n Permission denied<\/pre>\n<p><strong>DISTCCD<\/strong><\/p>\n<p>Add \"sys-devel\/distcc crossdev\" to \/etc\/portage\/package.use\/package.use<\/p>\n<pre>emerge \u00a0distcc\r\n\r\nThese are the packages that would be merged, in order:\r\n\r\nCalculating dependencies... done!\r\n[ebuild N ] sys-devel\/distcc-3.2_rc1-r4::gentoo USE=\"crossdev ipv6 -avahi -gnome -gssapi -gtk -hardened (-selinux) -xinetd\" PYTHON_TARGETS=\"python2_7\" 0 KiB<\/pre>\n<p>----------------------------------------------------------<br \/>\nINITRC:<br \/>\n\/etc\/conf.d\/distccd<\/p>\n<p>DISTCCD_OPTS=\"${DISTCCD_OPTS} --allow 192.168.0.0\/24\"<br \/>\n----------------------------------------------------------<br \/>\nSYSTEMD:<br \/>\n\/etc\/systemd\/system\/distccd.service.d\/00gentoo.conf<\/p>\n<p>[Service]<br \/>\nEnvironment=\"ALLOWED_SERVERS=192.168.0.0\/24\"<br \/>\n----------------------------------------------------------<\/p>\n<p>This can be space separated IPs.<\/p>\n<pre>\/etc\/distcc\/hosts\r\njust IPs of the clients. eg 192.168.0.1,cpp,lzo<\/pre>\n<h1 id=\"distccClient\">CLIENT:<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<p><strong>DISTCC<\/strong><\/p>\n<pre>emerge distcc<\/pre>\n<p>Takes approx. 5 minutes.<\/p>\n<p>execute <strong>distcc-config --set-hosts \"&lt;build_host&gt;,cpp,lzo\"<\/strong><\/p>\n<p>Once installed add `<strong>FEATURES=\"distcc distcc-pump\"<\/strong>` to \/etc\/portage\/make.conf.<\/p>\n<p>Also add `<strong>MAKEOPTS=\"-jX -lX\"<\/strong>` to \/etc\/portage\/make.conf where `jX` is the number of CPUs on the build server times 2+1 and lX is the number of CPUs on the client.<\/p>\n<p>eg MAKEOPTS=\"-j17 -l4\"<\/p>\n<p>Edit \/etc\/portage\/make.conf and add EMERGE_DEFAULT_OPTS=\"--jobs=8 --load-average=1\" <strong>(optional)<\/strong><\/p>\n<p><strong>NOTE<\/strong>: Although the main work is now off loaded, all the pre and post compile work is still done natively.<\/p>\n<hr \/>\n<h2 id=\"compile\">Time to get compiling!<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h2>\n<p>Install a time daemon.<\/p>\n<pre>pump emerge ntp<\/pre>\n<p>(2 packages &amp; approx. 12 minutes)<\/p>\n<p>Auto start ntp.<\/p>\n<pre>rc-update add ntp-client default\r\n\/etc\/init.d\/ntp-client start<\/pre>\n<p><strong>KERNEL<\/strong>:<\/p>\n<p>We're going to need this at some point. \u00a0Some applications need a kernel source to compile. \u00a0This should be relatively painless now we have a build server. \u00a0Compiling natively takes ~6 hours!<\/p>\n<p>You will\u00a0need to add <strong>sys-kernel\/raspberrypi-sources **<\/strong> to package.keywords<\/p>\n<pre>pump emerge raspberrypi-sources<\/pre>\n<p>This will download an uncompressed kernel source from git ~1.45Gb. \u00a0That and about 21 other deps that take roughly 2 hours to install (not including kernel build).<\/p>\n<pre>cd \/usr\/src\/linux-4.4.9999-raspberrypi<\/pre>\n<p><strong>CROSSDEV ONLY!!!<\/strong><\/p>\n<p>x64:<\/p>\n<pre>make ARCH=arm64 defconfig\r\nmake ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- oldconfig\r\nmake ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu-\r\nmake ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- modules_install INSTALL_MOD_PATH=\/run\/media\/cdstealer\/ROOTFS<\/pre>\n<p>NOTE: Ensure python2.7 is enabled as &gt;=3.4 gets the error<br \/>\n\"TypeError: 'str' does not support the buffer interface\"<\/p>\n<pre>imagetool-uncompressed.py arch\/arm\/boot\/Image \/run\/media\/cdstealer\/BOOT\/boot\/kernel.img<\/pre>\n<p>x32:<\/p>\n<pre>make ARCH=arm bcm2709_defconfig\r\nmake ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- oldconfig\r\nmake ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- -j$(nproc)\r\nmake ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- modules_install INSTALL_MOD_PATH=\/run\/media\/cdstealer\/ROOTFS<\/pre>\n<pre>cp arch\/arm\/boot\/zImage \/run\/media\/cdstealer\/BOOT\/boot\/kernel.img<\/pre>\n<p><strong>NATIVE<\/strong>:<\/p>\n<pre>make\u00a0bcm2709_defconfig\r\nmake\r\nmake modules_install\r\ncp arch\/arm\/boot\/zImage \/boot\/kernel.img<\/pre>\n<p>Another way is by the official docs:<\/p>\n<pre>make -j4 zImage modules dtbs\r\ncp arch\/arm\/boot\/dts\/*.dtb \/boot\/\r\ncp arch\/arm\/boot\/dts\/overlays\/*.dtb* \/boot\/overlays\/\r\ncp arch\/arm\/boot\/dts\/overlays\/README \/boot\/overlays\/\r\nscripts\/mkknlimg arch\/arm\/boot\/zImage \/boot\/kernel7.img\r\nmake modules_install<\/pre>\n<p>Which should then output:<\/p>\n<pre>Version: Linux version 4.4.19-raspberrypi-v7+ (root@pifukka) (gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4) ) #3 SMP Wed Sep 7 00:07:23 BST 2016\r\nDT: y\r\nDDT: y\r\n270x: y\r\n283x: n<\/pre>\n<p>With a slightly modified config (I removed <strong>most<\/strong> drivers\u00a0not relevant to me. \u00a0This is the config I used (<a href=\"http:\/\/cdstealer.com\/filez\/blog\/RPi\/rpikernel4_4_21.config\" target=\"_blank\">4.4.21-raspberrypi-v7+<\/a>) and got a compile time of 1 hour!! \u00a0So the config is mainly to power the bare RPi3b, a MCE remote and a Playstation controller.<\/p>\n<p>Executed this:<\/p>\n<pre>ks=$(date); make -j4 zImage modules dtbs; kf=$(date) &amp;&amp; cp arch\/arm\/boot\/dts\/*.dtb \/boot\/ &amp;&amp; cp arch\/arm\/boot\/dts\/overlays\/*.dtb* \/boot\/overlays\/ &amp;&amp; cp arch\/arm\/boot\/dts\/overlays\/README \/boot\/overlays\/ &amp;&amp; scripts\/mkknlimg arch\/arm\/boot\/zImage \/boot\/kernel7-custom.img &amp;&amp; make modules_install &amp;&amp; echo -e \"Kernel start: ${ks}\\nKernel end: ${kf}\"<\/pre>\n<p>and got this:<\/p>\n<pre>Version: Linux version 4.4.21-raspberrypi-v7-custom+ (root@pifukka) (gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4) ) #1 SMP Fri Sep 16 13:55:51 BST 2016\r\nDT: y\r\nDDT: y\r\n270x: y\r\n283x: n\r\nKernel start: Fri Sep 16 13:00:09 BST 2016\r\nKernel end: Fri Sep 16 14:00:00 BST 2016<\/pre>\n<p>You can add <strong>kernel=kernel-myconfig.img<\/strong> to config.txt to specify your own kernel name.<\/p>\n<p>NOTE: \u00a0There is a hell of a lot of bloat in this, so if you know what you're doing, you could do a <strong>make menuconfig<\/strong> to trim the fat before you run make.<\/p>\n<p>&nbsp;<\/p>\n<p>Using <strong>pump<\/strong>\u00a0didn't work when compiling the kernel and failed very quickly. \u00a0So it's a 6 hour native compile for the default .config :(<\/p>\n<p>It seems that there are just too many versions of the firmware floating about the tinterwebs. \u00a0So I managed to get this working by downloading the Jessie image from <a href=\"https:\/\/www.raspberrypi.org\/downloads\/raspbian\/\" target=\"_blank\">here<\/a>, mounting the img file and copying the contents of \/lib\/firmware\/brcm to the same location on the RPi.<\/p>\n<p>Although the RPi3B has 802.11n, it will not use 5Ghz frequency band, only 2.4Ghz.<\/p>\n<p>Once you have rebooted with the new kernel and firmware, hopefully you will now see the following in dmesg:<\/p>\n<pre>[ 7.270284] usbcore: registered new interface driver brcmfmac\r\n[ 7.460455] cfg80211: World regulatory domain updated:\r\n[ 7.460475] cfg80211: DFS Master region: unset\r\n[ 7.460484] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)\r\n[ 7.460498] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N\/A, 2000 mBm), (N\/A)\r\n[ 7.460513] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N\/A, 2000 mBm), (N\/A)\r\n[ 7.460525] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N\/A, 2000 mBm), (N\/A)\r\n[ 7.460539] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N\/A, 2000 mBm), (N\/A)\r\n[ 7.460553] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N\/A, 2000 mBm), (0 s)\r\n[ 7.460565] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N\/A, 2000 mBm), (0 s)\r\n[ 7.460577] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N\/A, 2000 mBm), (N\/A)\r\n[ 7.460589] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N\/A, 0 mBm), (N\/A)\r\n[ 8.339256] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50\r\n[ 9.349147] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50\r\n[ 10.359184] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50<\/pre>\n<p>&nbsp;<\/p>\n<hr \/>\n<h1 id=\"systemd\">Systemd<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<p>OK. \u00a0So far we've got a bootable RPi using RC. \u00a0If you want to use systemd, we'll need to change a few things and also configure the daemons.<\/p>\n<p>I added <strong>USE=\"systemd\"<\/strong> to <strong>\/etc\/portage\/make.conf<\/strong><\/p>\n<p>Don't forget to add\u00a0<strong>init=\/usr\/lib\/systemd\/systemd<\/strong> to the line in cmdline.txt.<\/p>\n<p>Yes systemd has it's pitfalls, but I've gotten used to it and actually quite like it &lt;don't shoot me&gt;<\/p>\n<p>You'll then need to rebuild everything to use it.<\/p>\n<pre>emerge -uvND world<\/pre>\n<h3 id=\"wifi\">WIFI Network<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h3>\n<p>Create the file:<\/p>\n<pre>vi \/etc\/systemd\/network\/wireless.network<\/pre>\n<p>And populate with content:<\/p>\n<pre>[Match]\r\nName=wlan0\r\n\r\n[Network]\r\nDHCP=ipv4\r\nDomains=cdstealer.com<\/pre>\n<p>Also create this file:<\/p>\n<pre>vi\u00a0\/etc\/wpa_supplicant\/wpa_supplicant-wlan0.conf<\/pre>\n<p>And populate with content:<\/p>\n<pre>ctrl_interface=\/var\/run\/wpa_supplicant\r\n\r\n\r\neapol_version=1\r\n\r\n\r\nap_scan=1\r\n\r\n\r\nfast_reauth=1\r\n\r\n\r\nnetwork={\r\n ssid=\"&lt;yourSSID\"\r\n proto=WPA\r\n key_mgmt=WPA-PSK\r\n pairwise=CCMP TKIP\r\n group=CCMP TKIP WEP104 WEP40\r\n psk=\"yourSecretPassPhrase\"\r\n priority=2\r\n}<\/pre>\n<p>Then enable the services:<\/p>\n<pre>systemctl enable sshd\r\nsystemctl enable wpa_supplicant@wlan0\r\nsystemctl enable systemd-networkd<\/pre>\n<h3>Locale<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h3>\n<p>As locales may vary, execute\u00a0<strong>localectl list-locales<\/strong> and make a note of yours. \u00a0Mine is <strong>en_GB.utf8<\/strong>. \u00a0Then execute:<\/p>\n<pre>localectl set-locale LANG=en_GB.utf8<\/pre>\n<p>I also had to add\u00a0<strong>LC_ALL=\"en_GB.utf8\"<\/strong> to \/etc\/environment.<\/p>\n<h3 id=\"hostname\">Hostname<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h3>\n<pre>hostnamectl set-hostname &lt;hostname&gt;<\/pre>\n<h3 id=\"keymap\">Keymap<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h3>\n<pre>localectl set-keymap uk<\/pre>\n<p>Execute\u00a0<strong>localectl<\/strong> to confirm the settings:<\/p>\n<pre># localectl status\r\n System Locale: LANG=en_GB.utf8\r\n VC Keymap: uk\r\n X11 Layout: gb\r\n X11 Model: pc105\r\n X11 Options: terminate:ctrl_alt_bksp<\/pre>\n<h1>NTP<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1332\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<pre>timedatectl set-ntp true<\/pre>\n<h1>Drivers<\/h1>\n<p>Don't forget to install the driver package.<\/p>\n<pre>pump\u00a0emerge raspberrypi-userland<\/pre>\n<pre>pump emerge xorg-server<\/pre>\n<p>Should yield:<\/p>\n<pre>Total: 25 packages (25 new), Size of downloads: 11,256 KiB<\/pre>\n<hr \/>\n<h1>Tweaks<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<p>edit <strong>\/boot\/config.txt<\/strong> and add the following to the existing line\u00a0<strong>dtoverlay=lirc-rpi, i2c_arm=on, dtoverlay=mmc,overclock_50=100<\/strong><\/p>\n<p><strong>dtoverlay=lirc-rpi<\/strong> = loads the lirc modules for remotes.<\/p>\n<p><strong>i2c_arm=on<\/strong> = enabled i2c for the CPU.<\/p>\n<p><strong>dtoverlay=mmc,overclock_50=100<\/strong> = this should speed up the SD access. \u00a0You may need to reduce the 100 value as I notice considerable file corruption. \u00a0Some forums have suggested a value of 83.<\/p>\n<p>I also added the following to \/etc\/portage\/make.conf<\/p>\n<pre>LINGUAS=\"en en_GB\"\r\nL10N=\"en en-GB\"\r\nVIDEO_CARDS=\"vc4\"<\/pre>\n<hr \/>\n<h1 id=\"caveats\">Caveats<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<p>There are a few packages that are not compatible with distcc. \u00a0So if any of these give you butthurt when emerging, \u00a0Try emerging them individually. \u00a0Eg. \u00a0<strong>FEATURES=\"-distcc -distcc-pump\" MAKEOPTS=\"-j4\" emerge -av llvm. <\/strong>\u00a0Unfortunately that does mean slooooooooow compiles :(<\/p>\n<p><strong>Note<\/strong>: \u00a0When compiling anything without distcc, ensure you specify the <strong>MAKEOPTS<\/strong> as omitting this will crash the Pi. \u00a0The\u00a0<strong>-j17<\/strong> that was specified in <strong>\/etc\/portage\/make.conf<\/strong> will be used which will be counter productive and slow down the builds until <strong><span style=\"color: #ff0000;\">BOOM<\/span><\/strong>!<\/p>\n<p>The common error that highlights this is at configure time:<\/p>\n<pre><span style=\"color: #ff0000;\">Checking uname sysname type              : Traceback (most recent call last):<\/span><\/pre>\n<p>Affected packages:<\/p>\n<p><strong>Package (native compile time)<\/strong><br \/>\nsys-libs\/talloc (~3 minutes)<br \/>\nsys-devel\/llvm (~200 minutes)<br \/>\nsys-libs\/tdb (~7 minutes)<br \/>\nsys-libs\/ntdb (~3 minutes)<br \/>\nsys-libs\/tevent (~3 minutes)<br \/>\nmedia-video\/ffmpeg (~22 minutes)<br \/>\nnet-libs\/socket_wrapper (~1 minute)<br \/>\nsys-libs\/ldb (~4 minutes)<br \/>\nnet-fs\/samba (~44 minutes)<\/p>\n<hr \/>\n<p>Now you need to decide what you want to do with it :)<\/p>\n<h1 id=\"KODI\">KODI<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1332 size-full alignnone\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<p>At this point, this should yield the following:<\/p>\n<pre>Total: 166 packages (164 new, 1 in new slot, 1 reinstall)<\/pre>\n<p>I have the following global USE flags set in \/etc\/portage\/make.conf<\/p>\n<pre>USE=\"X systemd -bindist opengl xorg udev\"<\/pre>\n<p>I also have the following local USE flags set in\u00a0\/etc\/portage\/package.use\/package.use<\/p>\n<pre># Kodi\r\n&gt;=sys-libs\/tevent-0.9.28 python\r\n&gt;=sys-libs\/ntdb-1.0-r1 python\r\n&gt;=dev-lang\/python-2.7.10-r1:2.7 sqlite\r\n&gt;=sys-libs\/tdb-1.3.8 python\r\nmedia-tv\/kodi -gles X alsa bluray css java samba usb opengl\r\nmedia-libs\/mesa gles2\r\nmedia-libs\/cogl gles2 opengl<\/pre>\n<p>I have the following packages in\u00a0\/etc\/portage\/package.keywords\/package.keywords<\/p>\n<pre># Kodi\r\n=media-sound\/dcadec-0.2.0 ~arm\r\n=dev-libs\/tinyxml-2.6.2-r2 ~arm\r\n=app-eselect\/eselect-java-0.2.0-r1 ~arm\r\n#=media-tv\/kodi-9999 **\r\n=media-tv\/kodi-16.0 **\r\n=dev-java\/icedtea-web-1.6.2 ~arm\r\n=sys-apps\/baselayout-java-0.1.0 ~arm\r\n=virtual\/jre-1.8.0-r1 ~arm\r\n=dev-java\/java-config-2.2.0-r3 ~arm\r\n=virtual\/jdk-1.8.0-r3 ~arm\r\n=dev-java\/icedtea-bin-3.1.0 ~arm\r\n=dev-libs\/crossguid-0_pre20150817 ~arm\r\n=media-fonts\/roboto-2.134 ~arm<\/pre>\n<p>I had to limit kodi to 16.0 as 9999 would not compile and repeatedly failed with EGLNative errors. \u00a0Each time failed costs 30 mins :( \u00a0A successful build takes ~90mins (not including deps).<\/p>\n<h1 id=\"MAME\">MAME<a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1332\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/09\/top-e1473831860140.jpg\" alt=\"top\" width=\"50\" height=\"50\" \/><\/a><\/h1>\n<p>SDLMame yields:<\/p>\n<pre>Total: 49 packages (49 new)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: \u00a0Although the CPU is 64bit, the rest of it is 32bit. \u00a0Trying to run in 64bit will cause pain and suffering. Other NOTE: \u00a0I cannot YET get the display to work with hardware acceleration. \u00a0Blank screen when enabled and kodi goes nuts, writing hundreds of lines to the log per second. 15:24:07 T:1943678976 ERROR: &hellip; <a href=\"https:\/\/cdblog.cdstealer.com\/?p=1251\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Raspberry Pi 3B Gentoo Install<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[213,240],"class_list":["post-1251","post","type-post","status-publish","format-standard","hentry","category-gentoo","tag-gentoo","tag-raspberrypi"],"_links":{"self":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1251"}],"version-history":[{"count":126,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1251\/revisions"}],"predecessor-version":[{"id":1811,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1251\/revisions\/1811"}],"wp:attachment":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}