[Arm-dev] Supporting the Cubieboard2 and lots other boards as Fedora does

Thu Dec 17 15:36:06 UTC 2015
Fabian Arrotin <arrfab at centos.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17/12/15 16:19, Robert Moskowitz wrote:
> 
> 
> On 12/16/2015 04:49 PM, Fabian Arrotin wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> On 16/12/15 22:06, Robert Moskowitz wrote:
>>> I kind of assumed that there would be a /usr/share/uboot/ dir
>>> with all the u-boot-sunxi-with-spl.bin and I could just dd the 
>>> Cubieboard2 uboot with bs=1024 seek 8, but no such directory.
>>> And I can't find a Fedora-arm image that has the 2015-10
>>> uboot. Actually it would probably be in a Rawhide image, as F23
>>> has 2015-09 and current Rawhide has 2016-01.
>>> 
>>> So in your next image, include all of the uboots, or a least a
>>> lot more than none.  Then we can take the Fedora-installer
>>> (which is now an rpm to install on a Fedora workstation, use to
>>> be a downloadable zip.  Ask Paul Whalen, its author where it is
>>> these days) and pretty much use it as is.
>>> 
>>> At least point me to the Cubieboard2 uboot 2015-10 and I will
>>> give it a test spin.
>>> 
>>> And, yes RPi2 has its own set of differences...
>>> 
>> I thought about including it, but as it's only used at image
>> creation time, it's only on the builder node. But one can install
>> it from Extras (when It will be released and so available
>> directly) but only available now on buildlogs : 
>> http://buildlogs.centos.org/centos/7/extras/armhfp/Packages/uboot-images-armv7-2015.10-4.el7.noarch.rpm
>>
>> 
That package should contain everything you need I guess
> 
> So I tried on the Cubietruck:
> 
> yum install 
> http://buildlogs.centos.org/centos/7/extras/armhfp/Packages/uboot-images-armv7-2015.10-4.el7.noarch.rpm
>
>  and it told me I need uboot-tools.  Added that to the install and
> was told I needed dtc.  Finally got the uboots installed.
> 
> So I then copied off the Cubieboard2 uboot, dd it to a new image 
> install.  Put THAT it into my Cubieboard2 and it almost booted up 
> cleanly.  There was some problem it worked around with a single
> auto reboot:
> 
> 
> U-Boot SPL 2015.10 (Nov 26 2015 - 15:14:54) DRAM: 1024 MiB CPU:
> 912000000Hz, AXI/AHB/APB: 3/2/2
> 
> 
> U-Boot 2015.10 (Nov 26 2015 - 15:14:54 -0500) Allwinner Technology
> 
> CPU:   Allwinner A20 (SUN7I) I2C:   ready DRAM:  1 GiB MMC:   SUNXI
> SD/MMC: 0 *** Warning - bad CRC, using default environment
> 
> HDMI connected: Setting up a 1920x1080 hdmi console (overscan 0x0) 
> In:    serial Out:   vga Err:   vga SCSI:  SUNXI SCSI INIT Target
> spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl
> SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc
> apst Net:   eth0: ethernet at 01c50000 starting USB... USB0:   USB
> EHCI 1.00 USB1:   USB OHCI 1.0 USB2:   USB EHCI 1.00 USB3:   USB
> OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found 
> scanning bus 2 for devices... 1 USB Device(s) found scanning bus 1
> for devices... unable to get device descriptor (error=-1) 1 USB
> Device(s) found scanning bus 3 for devices... 1 USB Device(s)
> found Hit any key to stop autoboot:  0 switch to partitions #0, OK 
> mmc0 is current device Scanning mmc 0:1... Found
> /extlinux/extlinux.conf Retrieving file: /extlinux/extlinux.conf 
> 333 bytes read in 197 ms (1000 Bytes/s) Ignoring unknown command:
> ui Ignoring malformed menu command:  autoboot Ignoring unknown
> command: totaltimeout centos Options 1:    centos Enter choice: 1:
> centos Retrieving file: /initramfs-4.2.3-200.el7.armv7hl.img 
> 34976246 bytes read in 2802 ms (11.9 MiB/s) Retrieving file:
> /vmlinuz-4.2.3-200.el7.armv7hl data abort pc : [<7af72728>]
> lr : [<7ef7db68>] reloc pc : [<46012728>]       lr : [<4a01db68>] 
> sp : 7af36b68  ip : 0000001c     fp : 00000001 r10: 7af72618  r9 :
> 7af3fee0     r8 : 7af72978 r7 : 000000d0  r6 : 00000126     r5 :
> 00000126  r4 : e3a00000 r3 : 7af41954  r2 : 7af368c8     r1 :
> 7af368c8  r0 : 00000126 Flags: nzCv  IRQs off  FIQs off  Mode
> SVC_32 Resetting CPU ...
> 
> resetting ...
> 
> U-Boot SPL 2015.10 (Nov 26 2015 - 15:14:54) DRAM: 1024 MiB CPU:
> 912000000Hz, AXI/AHB/APB: 3/2/2
> 
> 
> U-Boot 2015.10 (Nov 26 2015 - 15:14:54 -0500) Allwinner Technology
> 
> CPU:   Allwinner A20 (SUN7I) I2C:   ready DRAM:  1 GiB MMC:   SUNXI
> SD/MMC: 0 *** Warning - bad CRC, using default environment
> 
> HDMI connected: Setting up a 1920x1080 hdmi console (overscan 0x0) 
> In:    serial Out:   vga Err:   vga SCSI:  SUNXI SCSI INIT Target
> spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl
> SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc
> apst Net:   eth0: ethernet at 01c50000 starting USB... USB0:   USB
> EHCI 1.00 USB1:   USB OHCI 1.0 USB2:   USB EHCI 1.00 USB3:   USB
> OHCI 1.0
> 
> And so forth, eventually getting to the login.  The C2 is now up
> and running just fine.  Console is working well in text mode (HDMI
>  resolution).  Oh, ALL of my Cubies, and my one Pogoplug have a 
> 'permanent' USB/TTL serial port that I monitor with screen.
> 
> So, minimally ( :) ), you can build a Cubieboard2 image for others
> by just replacing the Cubietruck uboot with the Cubieboard2 uboot.
> 
> Preferably you should implement the method used in the 
> Fedora-arm-installer and pick up a larger set of boards.  The RPi2
> will take a bit to customize an installer script, as you would have
> to overright much in /boot?  Perhaps more?  It may not be worth it
> at this point to roll the RPi2 into the single install image.
> 
> Now to test the auto-resize.  Don't expect a problem, as I am
> running off the mSD not a sata HD right now.
> 
> 

Thanks a lot for this report.
Let me build an image for cubieboard2, and push it to dev.centos.org
.. but I'm working on multiple things at the same time right now, so
no ETA.
 I'll send a mail to the list when ready

Cheers,


- -- 
Fabian Arrotin
The CentOS Project | http://www.centos.org
gpg key: 56BEC54E | twitter: @arrfab
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlZy1mYACgkQnVkHo1a+xU5gBgCdEFELPhiKi2hu1vmNwFoxWBHA
IqMAnR0cZJr02Ie8TzEDy9tmL9S7+1Q1
=Djuk
-----END PGP SIGNATURE-----