20:01:03 <j_dulaney> #startmeeting 20:01:04 <zodbot> Meeting started Fri Feb 22 20:01:03 2013 UTC. The chair is j_dulaney. Information about MeetBot at http://wiki.debian.org/MeetBot. 20:01:04 <zodbot> Useful Commands: #action #agreed #halp #info #idea #link #topic. 20:01:21 <j_dulaney> #meetingname Fedora on the ARM based Samsung Chromebook 20:01:21 <zodbot> The meeting name has been set to 'fedora_on_the_arm_based_samsung_chromebook' 20:01:48 <j_dulaney> #topic Give it five minutes for folks to trickle in 20:03:14 <j_dulaney> #topic What you need 20:03:50 <j_dulaney> Ok, besides the obvious Chromebook, you will need an 8GB SD card that you don't mind having the data on wiped 20:05:50 <j_dulaney> You'll also need to go ahead and grab the armv7 image here: http://scotland.proximity.on.ca/arm-nightlies/vault/f18/Images/armhfp/Fedora-18-armhfp-rootfs.tar.xz 20:06:30 <j_dulaney> #info Image at: http://scotland.proximity.on.ca/arm-nightlies/vault/f18/Images/armhfp/Fedora-18-armhfp-rootfs.tar.xz 20:06:45 <j_dulaney> #info: An 8GB SD card is needed 20:07:13 <j_dulaney> #topic Phase one: Fedora on the SD card 20:08:15 <j_dulaney> Insert the SD card into the card reader on another machine and find it in your /dev 20:08:30 <j_dulaney> It will probably be /dev/mmcblk0 or similar 20:09:26 <j_dulaney> sudo gdisk /dev/$SDCARD 20:09:42 <j_dulaney> (replace $SDCARD with the actual device file) 20:10:06 <j_dulaney> Delete any partitions on the card with d 20:10:22 <j_dulaney> Once there are none left, type the following: 20:10:23 <j_dulaney> x 20:10:27 <j_dulaney> l 20:10:33 <j_dulaney> 8192 20:10:34 <j_dulaney> m 20:10:40 <j_dulaney> n 20:10:43 <j_dulaney> 1 20:10:46 <j_dulaney> Enter 20:10:52 <j_dulaney> +16M 20:10:59 <j_dulaney> 7f00 20:11:03 <j_dulaney> n 20:11:06 <j_dulaney> 2 20:11:09 <j_dulaney> Enter 20:11:15 <j_dulaney> +16M 20:11:18 <j_dulaney> 7f00 20:11:24 <j_dulaney> n 20:11:25 <j_dulaney> 3 20:11:33 <j_dulaney> Enter three times 20:11:38 <j_dulaney> Then exit gpdisk 20:11:49 <j_dulaney> You will then have a properly formated SD 20:11:50 <j_dulaney> card 20:12:11 <j_dulaney> On the Chromebook, enter developer mode 20:12:55 <j_dulaney> Hold down Esc and Refresh keys and press the power button 20:13:43 <j_dulaney> The Refresh key is the circular looking key where F3 normally is 20:14:05 <j_dulaney> The system will then reboot 20:14:34 <j_dulaney> When it comes back up, it will say something along the lines of to turn off OS verification, press enter 20:14:36 <j_dulaney> Do so 20:15:08 <j_dulaney> At this point, you can easily access your TTYs 20:15:26 <j_dulaney> the various keys across the top map to the function keys 20:15:46 <j_dulaney> For instance, <- maps to F1, -> to F2, etc 20:16:08 <j_dulaney> Hit the -> key and log in as root 20:16:13 <j_dulaney> There is no password 20:16:43 <j_dulaney> Back to the box you are using to work on the SD card 20:17:30 <j_dulaney> sudo mkfs.ext4 -L rootfssd /dev/$SDCARD 20:17:52 <j_dulaney> Actually 20:18:04 <j_dulaney> sudo mkfs.ext4 -L rootfs /dev/$SDCARDp3 20:18:31 <j_dulaney> That will give you an ext4 fs on the third partition 20:19:10 <j_dulaney> Extract the tarball that you downloaded earlier to that partition 20:19:27 <j_dulaney> Unmount the SD card and insert it into the Chromebook 20:19:54 <dajt> You might want to fix up /etc/fstab on the image you just extracted. 20:20:09 <j_dulaney> dajt: Haven't got there yet 20:20:27 <j_dulaney> Although, yes, that can be done now 20:20:45 <j_dulaney> edit the /etc/fstab file on the SD card such that 20:21:57 <j_dulaney> Such that it reads /dev/mmcblk1p3 / ext4 defaults 1 1 20:22:13 <j_dulaney> Back to the Chromebook 20:22:32 <j_dulaney> mkdir /media/sd 20:22:45 <j_dulaney> mount /dev/mmcblk1p3 /media/sd 20:23:05 <j_dulaney> mkdir /media/sd/modules 20:23:16 <j_dulaney> mkdir /media/sd/firmware 20:23:25 <j_dulaney> mkdir /media/sd/ucm 20:24:00 <j_dulaney> cp -rf /lib/modules/* /media/sd/modules 20:24:17 <j_dulaney> cp -rf /lib/firmware/* /media/sd/firmware 20:24:32 <j_dulaney> cp -rf /usr/share/alsa/ucm/* /media/sd/ucm 20:24:45 <j_dulaney> The last will prevent you from burning your speakers 20:25:07 <j_dulaney> Now, it is time to copy over the ChromeOS kernel 20:25:41 <j_dulaney> We're going to create two kernels, one with the config to boot from the SD card, the other to boot from the internal SSD 20:26:05 <j_dulaney> If all you're going to do is put Fedora on an SD card and never install to the internal SSD, then the second kernel can be skipped 20:26:34 <j_dulaney> cd /media/sd 20:26:40 <j_dulaney> mkdir kerns 20:27:26 <j_dulaney> echo "console=tty1 debug verbose root=/dev/mmcblk1p3 rootwait rw" > /kerns/sdconfig 20:27:35 <j_dulaney> For the ssd: 20:27:44 <j_dulaney> echo "console=tty1 debug verbose root=/dev/mmcblk0p3 rootwait rw" > /kerns/ssdconfig 20:28:01 <j_dulaney> Notice the difference is in the mmcblk 20:29:31 <j_dulaney> vbutil_kernel --pack /kerns/sdkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=./kerns/sdconfig --vmlinuz /boot/vmlinuz-3.4.0 --arch arm 20:29:53 <j_dulaney> That will give you the kernel for the SD card 20:30:00 <j_dulaney> For internal SSD: 20:30:22 <j_dulaney> vbutil_kernel --pack ./kerns/ssdkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=./kerns/ssdconfig --vmlinuz /boot/vmlinuz-3.4.0 --arch arm 20:30:54 <j_dulaney> Now, copy the sd kernel over to the sd card's first partition: 20:31:23 <j_dulaney> dd if=./kerns/sdkern of=/dev/mmcblk1p1 20:32:04 <j_dulaney> dd if=./kerns/sdkern of=/dev/mmcblk1p1 20:32:06 <j_dulaney> dd if=./kerns/sdkern of=/dev/mmcblk1p2 20:32:30 <j_dulaney> Make the partitions bootable: 20:32:48 <j_dulaney> cgpt add -i 1 -S 1 -T 5 -P 10 -l KERN-A /dev/mmcblk1 20:33:12 <j_dulaney> cgpt add -i 2 -S 1 -T 5 -P 5 -l KERN-B /dev/mmcblk1 20:33:32 <dajt> Do you mean --config=./kerns/sdconfig or --config ./kerns/sdconfig? 20:33:57 <j_dulaney> dajt: Good catch 20:34:00 * j_dulaney missed the . 20:34:05 <j_dulaney> Apologies 20:35:04 <j_dulaney> Now, copy the firmware and modules into the appropriate place on the sd card 20:35:40 <j_dulaney> cp -rf ./modules/* ./lib/modules/ 20:35:55 <j_dulaney> cp -rf ./firmware/* ./lib/firmware/ 20:36:38 <j_dulaney> Congrats, you now have a useable SD card 20:36:52 <j_dulaney> crossystem dev_boot_usb=1 20:37:04 <j_dulaney> That tells the Chromebook to boot from external drives 20:37:08 <j_dulaney> reboot 20:37:31 <j_dulaney> When it comes up to the white boot screen, hit ctl-u to boot from the sd card 20:37:54 <j_dulaney> You should have a working Fedora boot up; run through Firstboot 20:38:50 <j_dulaney> If this is as far as you want to go with the project, yum update 20:39:07 <j_dulaney> Keep in mind that the update will take a very long time on the SD card 20:39:08 <dajt> Do you need to move the ucm files too, or do they stay in /ucm ? 20:39:35 <j_dulaney> dajt: If this is as far as you're going, they'll need to be moved 20:40:04 <j_dulaney> sudo cp -rf /ucm/* /usr/share/alsa/ucm/ 20:41:01 <j_dulaney> Now, if you are going to continue with installing Fedora on the internal SSD, first you'll need to build vboot-utils 20:43:17 <j_dulaney> yum install gcc fedora-packager 20:43:41 <j_dulaney> wget -c http://people.redhat.com/wcohen/chromebook/vboot-utils-20130129git68f54d4-4.fc17.src.rpm 20:45:24 <j_dulaney> As something other than root: 20:45:26 <j_dulaney> fedora-packager-setup 20:46:02 <j_dulaney> copy the srpm downloaded above into the ~/rpmbuild/SRPM directory 20:46:55 <j_dulaney> cd ~/rpmbuild/SRPM 20:47:03 <j_dulaney> sudo yumbuild-deps ./vboot-utils-*.rpm 20:47:19 <j_dulaney> rpm -Uvh ./vboot-utils-*.rpm 20:47:30 <j_dulaney> cd ~/rpmbuild/SPECS/ 20:47:41 <j_dulaney> rpmbuild -ba vboot-utils.spec 20:47:55 <j_dulaney> sudo yum install ~/rpmbuild/RPMS/*/vboot-utils.*.rpm 20:48:26 * ctyler wonders if that's being packaged for Fedora? 20:48:39 <j_dulaney> ctyler: It's in the review process 20:48:45 <ctyler> cool 20:49:19 <j_dulaney> Now, it is time to partition the internal SSD 20:49:43 <dajt> Is there a way to make a backup of the ssd so we can put ChromeOS back if we need to? 20:50:16 <j_dulaney> dajt: No need, you can download a recovery image from Google 20:50:31 <j_dulaney> sudo gdisk /dev/mmcblk0 20:50:50 <j_dulaney> Once again, delete all partitions; there's a crapton of them 20:50:56 <j_dulaney> d will do this 20:52:01 <j_dulaney> And then 20:52:03 <j_dulaney> x 20:52:06 <j_dulaney> l 20:52:10 <j_dulaney> 8192 20:52:11 <j_dulaney> m 20:52:14 <j_dulaney> n 20:52:16 <j_dulaney> 1 20:52:19 <j_dulaney> +16M 20:52:22 <j_dulaney> Enter 20:52:40 <j_dulaney> Swap the +16M and Enter 20:52:45 <j_dulaney> so, it should be: 20:52:47 <j_dulaney> n 20:52:47 <j_dulaney> 1 20:52:50 <j_dulaney> Enter 20:52:53 <j_dulaney> +16M 20:53:00 <j_dulaney> 7f00 20:53:03 <j_dulaney> n 20:53:05 <j_dulaney> 2 20:53:07 <j_dulaney> Enter 20:53:10 <j_dulaney> +16M 20:53:13 <j_dulaney> 7f00 20:53:18 <j_dulaney> n 20:53:19 <j_dulaney> 3 20:53:25 <j_dulaney> Enter three times 20:53:36 <j_dulaney> exit gdisk 20:54:10 <j_dulaney> mkfs.ext4 -l Fedora /dev/mmcblk0p3 20:55:16 <j_dulaney> You'll once again need to grab the rootfs tarball; easiest way is to poweroff the Chromebook at this point and copy over to the SD card from the computer you used to download it 20:55:52 <j_dulaney> Reinsert the SD card into the Chromebook and boot it up using the same procedure as before (ctl-u at the white boot screen) 20:56:15 <j_dulaney> back in the terminal, 20:57:04 <j_dulaney> mkdir /run/media/sd 20:57:20 <j_dulaney> mount /dev/mmcblk0p3 /run/media/sd 20:57:36 <j_dulaney> extract the rootfs tarball to /run/media/sd 20:57:48 <j_dulaney> copy over firmware, modules, and ucm profiles 20:58:20 <j_dulaney> cp -rf /modules/* /run/media/sd/lib/modules/ 20:58:36 <j_dulaney> cp -rf /firmware/* /run/media/sd/lib/firmware/ 20:59:02 <j_dulaney> cp -rf /ucm/* /run/media/sd/usr/share/alsa/ucm/ 20:59:14 <j_dulaney> copy over the kernel 20:59:40 <j_dulaney> dd if=/kerns/ssdkern of=/dev/mmcblk0p1 20:59:43 <j_dulaney> dd if=/kerns/ssdkern of=/dev/mmcblk0p2 21:00:22 <j_dulaney> cgpt add -i 1 -S 1 -T 5 -P 10 -l /dev/mmcblk0p1 21:00:50 <j_dulaney> cgpt add -i 2 -S 1 -T 5 -P 5 -l /dev/mmcblk0 21:00:59 <j_dulaney> remove the trailing p1 on the first 21:01:05 <j_dulaney> My mistake 21:01:20 <j_dulaney> And, that's it 21:01:31 <j_dulaney> type poweroff to shutdown from the SD card 21:02:05 <j_dulaney> turn the chromebook back on; you can get it to boot right away by hitting ctl-d, or you can wait 30 seconds and it will boot on its own 21:02:21 <j_dulaney> Run through firstboot, and yum update your system 21:02:30 <j_dulaney> the internal SSD is much faster 21:02:51 <j_dulaney> You can mount the SD card and copy over the vboot-utils rpm and install that 21:03:07 <j_dulaney> Any questions? 21:03:59 <pwhalen> j_dulaney, very cool, thanks very much for doing the talk today. 21:04:22 <j_dulaney> pwhalen: Indeed 21:04:36 <dajt> Yes, thank you. 21:04:53 <dajt> Are you going to do another talk on building your own kernels for the Chromebook? 21:05:08 <j_dulaney> dajt: I was going to, but I ran out of time 21:06:02 <pwhalen> perhaps a followup in the future? 21:06:06 <e-ndy> j_dulaney, yes i have, do you plan use non-verified u-boot instead of kernel? 21:06:09 <j_dulaney> dajt: At this point, actually building the kernel is done in the typical fashion; the only problem is that the Chromebook stuff isn't in the main line yet 21:06:39 <j_dulaney> It's installing it that requires extra steps 21:07:46 <j_dulaney> e-ndy: I have been informed that there is a way to get u-boot to work, I have not yet done so 21:08:24 <j_dulaney> The current source for the Chromebook kernel is at https://git.chromium.org/git/chromiumos/third_party/kernel.git 21:08:34 <e-ndy> j_dulaney, i have it working on sd card but not yet found time to place all on internal emmc 21:09:00 <j_dulaney> e-ndy: It really isn't that diffult to get working on the internal storage 21:09:36 <dajt> I like being able to dual-boot into ChromeOS and play Gardens of Time. :-) 21:10:03 <dajt> We need Google Chrome for Linux on Arm. 21:10:56 <j_dulaney> dajt: Dual booting is possible by resizing the largest partition on the internal SSD and replacing the spare ChromeOS kernel with one that points to the Fedora partition 21:11:15 <j_dulaney> It's some more involved than just wiping ChromeOS totally 21:11:50 <e-ndy> j_dulaney, why alignment is 8192 instead of default? 21:12:23 <j_dulaney> e-endy: That's where the boot loader looks for it 21:12:37 <j_dulaney> I tried default alignment and it didn't boot 21:13:39 <j_dulaney> Any other questions? 21:13:44 * j_dulaney sets the time for one minute 21:14:34 <j_dulaney> Okay 21:14:37 <j_dulaney> #endmeeting