IRC log of #cubox of Fri 23 Feb 2018. All times are in CET < Back to index

08:10 topi`> does anyone remember how to enable the debug("") stuff in uboot's SPL code?
08:10 topi`> I'll ask google but that'll just lead to frustration
10:47 bkeys> Hello, does anyone here have experience setting up Fedora on a MACCHIATObin?
10:49 Ke> bkeys: no, but should be trivial, just remember that you need to install removable grub and perhaps a custom kernel
10:49 Ke> debian buster kernel has at least some support for mcbin
10:50 Ke> (at least ethernet works, disk controller works and usb works)
10:50 Ke> and sd controller
10:50 bkeys> There was a guy on #fedora-arm who said he got it working, but I was asleep when he said it so I didn't get into a dialogue with him
10:50 suihkulokki> follow the instructions from http://wiki.macchiatobin.net/tiki-index.php?page=Setup+alternative+boot+sources to make UEFI boot from SD card
10:51 bkeys> He didn't mention a custom kernel though
10:51 bkeys> I need to get UEFI in the first place, I am trying to flash it now
10:51 Ke> you can also boot UEFI from SD or eMMC, then saving EFI variables does not work
10:52 bkeys> http://eciton.net/~leif/macchiatobin/flash-image-a8k-mcbin.bin_opp
10:52 Ke> saving EFI variables works for some builds
10:52 bkeys> A guy on #fedora-arm mentioned this file
10:52 bkeys> And booting from SD, but I didn't know really what he meant
10:52 bkeys> Do I dd the .bin file to my SD card?
10:52 bkeys> Or do I just format it and copy it to the filesystem?
10:52 Ke> dd to 2M offset
10:53 Ke> I have a partition for it to protect it from other partitioning
10:53 suihkulokki> bkeys: see the link above for partitioning the SD and dd'ing the .bin
10:54 suihkulokki> it's a bit sad that we still don't have an "official" UEFI for macchiatobin, but rather builds from random dudes
10:54 bkeys> Is there a prebuilt one you recommend?
10:55 bkeys> I think the one I posted should work
10:55 suihkulokki> at least people have had good experiences with it
10:56 suihkulokki> I have also built my own, but it requires flashing to SPI flash
10:56 Ke> I also build my own
10:56 suihkulokki> and I should update it to latest edi
10:56 suihkulokki> latest dtb
10:57 Ke> how easily can you update the dtb in the EFI?
10:57 Ke> can you just copy a file?
10:58 suihkulokki> copy new dtb in place and rebuild
10:59 Ke> that should be a lot easier than updating my grub.cfg after every build
10:59 Ke> sorry after every update-grub
10:59 bkeys> Alright I ran
10:59 bkeys> sudo dd if=flash-image-a8k-mcbin.bin_opp of=/dev/mmcblk0 bs=2M
11:00 Ke> I still rather think that we should get master edk2 and openpkg working on mcbin
11:00 bkeys> There aren't any partitions showing in the SD card after I dd'ed it
11:01 bkeys> Is that okay?
11:01 Ke> yes
11:01 bkeys> Alright and I just drop the SD card in the mcbin and reboot?
11:01 Ke> dd:ing content will not create a partition
11:01 bkeys> Do I need to create a partition/
11:01 bkeys> ?
11:01 Ke> you'll need to set proper boot order in the mcbin
11:01 Ke> you don't need to, but I recommend you to
11:01 bkeys> Which type?
11:02 bkeys> fat32? or ext4?
11:02 Ke> so you don't forget threre is some content there
11:02 Ke> no filesystem, just partition
11:02 Ke> but you can do that later
11:02 bkeys> So an unformatted partition?
11:02 bkeys> Is using a filesystem a bad thing?
11:03 Ke> http://wiki.macchiatobin.net/tiki-index.php?page=MACCHIATObin+Interface+list#Boot_Selection
11:03 Ke> formatting a filesystem there will overwrite your image
11:03 Ke> it's either or thing
11:03 Ke> either raw image or a filesystem
11:03 Ke> in this case it needs to be the raw image
11:04 bkeys> So can I create a ext4 filesystem then copy the .bin file to that filesystem?
11:05 Ke> no, needs to be the raw image
11:05 bkeys> So I am fine with just dd'ing it and inserting it as is?
11:05 Ke> you can have a raw image on a partition without a filesystem
11:05 Ke> yes
11:05 bkeys> I'll do that then
11:06 Ke> just set the boot order as described in the link above
11:06 bkeys> Yeah I got the 1.3 so I don't have these switches, they got jumpers instead
11:06 Ke> yes
11:09 bkeys> Why is this necessary? Can't I just tell uboot to boot from SD card?
11:10 Ke> you can tell u-boot to boot grub from the image as EFI payload
11:10 bkeys> So this isn't necessary? I can accomplish the same with a uboot prompt?
11:10 bkeys> Cause I have minicom and all that set up
11:11 Ke> you can in theory, haven't tested
11:11 Ke> we might not be able to help you as easily, if you are using a different setup
11:11 bkeys> Well I got a row of pins, 10 wide and 2 tall
11:12 bkeys> I am going to imply that SW2 is the bottom row of pins?
11:12 Ke> if you use what others use, you will get more specific help
11:12 bkeys> I am talking about
11:12 bkeys> http://wiki.macchiatobin.net/tiki-index.php?page=MACCHIATObin+Interface+list#Boot_Selection
11:12 Ke> bkeys: typically it reads on the board
11:12 bkeys> The image
11:12 bkeys> I think I see it
11:12 bkeys> Oh they got a picture on the board itself, I didn't notice that
11:14 bkeys> Alright, so the plungers are in place, the SD card is in with the image dd'ed
11:14 bkeys> Gonna hook it up and get into a minicom prompt
11:17 bkeys> https://8n1.org/12816/7165
11:18 bkeys> Ke: This is what my minicom output looks like when I press the reset button
11:28 Ke> ok, perhaps that image is not of the proper type
11:28 Ke> you could try some alternative image
11:29 Ke> it could be that you were expected to eg. build ATF with that image as payload
11:29 Ke> I'll go for lunch now, will be back after an hour or so
11:30 bkeys> Do you have an image you could upload?
11:31 suihkulokki> 11:59 < bkeys> sudo dd if=flash-image-a8k-mcbin.bin_opp of=/dev/mmcblk0 bs=2M
11:31 suihkulokki> bkeys, that's incorrect dd command
11:31 Ke> yeah, seek=1
11:32 Ke> needs to be added
11:32 Ke> if you used the partition, this problem could not occur
11:32 Ke> =o)
11:33 bkeys> The partition thing was confusing to me, I gotta wrap my head around it
11:33 Ke> ->
11:33 bkeys> I create an unformatted partition
11:33 bkeys> Then dd the image to that parititon?
11:33 Ke> yes
11:33 Ke> partition needs to start at 2M
11:33 Ke> and be sufficiently large
11:34 suihkulokki> bkeys: just follow the instructions on the wikipage
11:34 Ke> yeah that's probably better
11:37 bkeys> If it gave me the fdisk commands that would have been nice
11:37 bkeys> I will just use gparted and figure it out
11:37 Ke> just remember that gparted might use different numbering scheme for sectors
11:38 bkeys> Well I will do gparted, then see if it matches the fdisk output they say it should look like
11:38 Ke> use fdisk -l to verify that it matches what the instructions tell it should match
11:38 Ke> yes
11:39 Ke> fdisk commands would be something like g ... n ... n ... w
11:39 Ke> ... is some interactive questions, m will print help
11:41 Ke> p to print what you have created
11:41 bkeys> Device Boot Start End Sectors Size Id Type
11:41 bkeys> /dev/mmcblk0p1 4096 14340095 14336000 6.9G 83 Linux
11:41 bkeys> /dev/mmcblk0p2 14340096 131071999 116731904 55.7G 83 Linux
11:41 bkeys> That looks similar enough to what they want in the wiki
11:42 bkeys> I figure the size of the partitions don't matter, only where the first one begins
11:42 Ke> yeah the start of the /dev/mmcblk0p1 is 4096 that's enough
11:42 Ke> yes
11:42 bkeys> Now the wiki makes no mention of bs=2M or seek=1
11:42 Ke> definitely though 6.9G is way overkill
11:42 bkeys> Do I add those anyway?
11:43 Ke> no, if you use of=/dev/mmcblk0p1, no seek
11:43 Ke> if you use of=/dev/mmcblk0, seek=1 bs=2M
11:43 Ke> use what the wiki tells you to, so of=/dev/mmcblk0p1, no seek
11:44 Ke> bs=2M does no harm
11:44 bkeys> Alright, ran
11:44 bkeys> sudo dd if=/tmp/flash-image-a8k-mcbin.bin_opp of=/dev/mmcblk0p1 conv=fdatasync
11:44 bkeys> gonna put it in the mcbin and boot now
11:44 Ke> yes
11:44 Ke> my lunch got delayed a bit
11:45 bkeys> my bad
11:45 Ke> not really due to IRC, due to factors here locally
11:45 bkeys> It booted UEFI!
11:46 bkeys> It's booting Fedora!
11:47 bkeys> I am hoping there isn't anything else I need to do before it's discoverable on the network
11:47 Ke> anyway, if grub is not booting after install, the grub-install --removable is the solution
11:48 bkeys> Do you think hooking it up to a monitor would give me any graphical output?
11:48 Ke> do you have a graphics card there?
11:48 bkeys> Yes
11:48 Ke> I think there was something that needed to be done there, so not sure
11:49 Ke> now off->
11:49 bkeys> Yee
11:51 bkeys> It's certainly detecting the ATI card
11:51 bkeys> But the monitor isn't lighting up
12:10 bkeys> I am going to retry with the server image for Fedora, and see if that at least makes it accessible on the network
14:15 Ke> bkeys: just remember, you can install on a VM and and just copy the image to mcbin
14:17 bkeys> Well I got it so it lights up the monitor, I even get a shell
14:17 bkeys> It's still not discoverable on the network
14:19 bkeys> It's not reporting any issues with the ethernet port either
14:19 bkeys> In fact it says the link is up, it just doesn't get an IP address
14:20 Ke> I remember I had to wait a bit after setting the interface up
14:21 Ke> systemd was able to do it properly, but there was some minor glitch there
18:22 vpeter> Seems my idea for automouting hdd on lede can't be done with autofs - there is no such package included :(