[help] Trying to build a close to mainline image
#2
First of all, if you just want a mainline image, I've got one over here. Wink

To be honest, I don't know much about the 4.4 simpleimage, which I assume is the one you're talking about. But I can tell you how to build a functioning 4.7-rc1 image yourself. 

Getting bootloader set up

1: Get this firmware image and flash it to the SD card. That provides the boot0, a special version of uboot* and boot script.

Kernel compile

2: Download this kernel tree (by zip or git... your choice).
3: You said you had already compiled stuff... but if you still need a crosscompile toolchain, get one (apt-get install aarch64-linux-gnu-gcc should do the job on Ubuntu and maybe Debian)
4: Go into the directory you put the source in and fart around with menuconfig (make ARCH=arm64 CROSS_COMPILE=<name/path of crosscompiler, in above case "aarch64-linux-gnu-"> menuconfig) or go the lazy route and use my .config file (rename to .config, put into kernel directory)
5: Build kernel with make ARCH=arm64 CROSS_COMPILE=<crosscompiler as before> -j<number of cores in system> Image dtbs. Depending on the speed of the system you're running this on, you may have time to go get a drink, or a 5 course meal. Wink

Move kernel and DTBs

6: Assuming the build completed (didn't give any errors), from your kernel build directory go to arch/arm64/boot. Here you should find a file simply called "Image". Copy this to the root of the boot partition of the SD card, alongside the boot script (yes, this boot script works a little different from the usual one). From where you found the image, go deeper to dts/allwinner. Copy the files called "sun50i-a64-pine64-plus.dtb" and "sun50i-a64-pine64.dtb" to the same place as the kernel.

Make rootfs partition

7: This boot script needs the rootfs to be at sdX5/mmcblk0p5. So in your partitioning tool of choice, make the partition for that (make extended DOS type partition at #2, and a logical one inside that at #5).
8: Copy your rootfs of choice to the new partition.

9: Put SD card in Pine, pray to whatever serious or comical deity you choose to worship on this fateful day, turn on Pine, and hope it boots!
(A serial adapter set up as shown here will be very useful in case anything goes wrong)

I hope my 30 straight minutes of typing is helpful. Smile

* The normal BSP kernels can control the hidden ARISC core inside the A64, which manages power distribution. The mainline kernels can't do that yet. Without this special uboot, no power is provided to the Ethernet PHY, which means no Ethernet.
Community administrator and sysadmin for PINE64
(Translation: If something breaks on the website, forum, or chat network, I'm a good person to yell at about it)

  Reply


Messages In This Thread
RE: [help] Trying to build a close to mainline image - by fire219 - 08-02-2016, 06:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pine64 Debian Stretch/mainline [4.14.7] CallMeFoxie 50 122,701 07-22-2019, 09:24 PM
Last Post: amp
  Script to build pure Debian images for Pine64+ amp 1 4,282 05-01-2019, 09:09 PM
Last Post: tllim
  Is there just one fuctioning Debian Desktop image? KNERD 7 13,314 03-29-2019, 02:00 AM
Last Post: desai_amogh
Question A64+ vs. A64-LTS - Build boots? Baldnerd 10 13,749 09-05-2018, 11:48 PM
Last Post: tllim
  Gambas3 installation on Debian image linusky 0 2,246 11-29-2016, 11:10 AM
Last Post: linusky
  Very long boot time with Debian image Xabaras76 5 7,410 07-14-2016, 03:49 PM
Last Post: Xabaras76
  Cannot install Dstat on Debian Base PineA64 image ywoody 6 7,774 07-11-2016, 07:15 PM
Last Post: dkryder
  Image without Guu WhiteSnake86 1 2,951 07-06-2016, 11:11 PM
Last Post: MarkHaysHarris777
  Pine64 not booting with image m16bishop 9 10,152 06-13-2016, 10:50 AM
Last Post: robertvaldimarsson
  dose the debian-mate-jessie-lenny.raposo image support lcd display? MicroDiery 1 2,962 06-03-2016, 07:59 AM
Last Post: Luke

Forum Jump:


Users browsing this thread: 1 Guest(s)