Forum Discussion
Altera_Forum
Honored Contributor
8 years agoMy strategy was to create a working kernel build environment so that I can ensure the devices I need are built into the kernel.
The second part of that strategy is that the kernel would boot into the ubuntu 1604 release anyone can download from the terasic site (http://www.terasic.com/downloads/cd-rom/de1-soc/linux_bsp/). I discovered that by using a variety of tools including binwalk I was able to recover the initramfs (rootfs.cpio) from my new kernel sunshine helped me to build. This rootfs.cpio initramfs is a given part of the WS2 project so I had it anyway, but it was proof that it could be done. Optimistically I had hoped to be able to do the same with the ubuntu zImage and use the extracted ubuntu initramfs as the initramfs of my new kernel. But alas the kernel seems to be built in a different manner and I have so far failed to recover the initramfs from the ubuntu zImage file; However I have managed to recover the ubuntu kernel .config file and it tells me that CONFIG_USB_SERIAL is not set, which explains a lot.
# CONFIG_USB_SERIAL is not set
... and CONFIG_USB_SERIAL_PL2303 is nowhere to be seen. So I am not going to get very far without those two as part of the kernel. If you know how I can go about building a kernel which will boot to an existing ubuntu installation, I really would be very grateful for your pearls of wisdom. I have had a look at altera's github (https://github.com/altera-opensource/linux-socfpga) but can't see which release (if any) corresponds to the Terasic Ubuntu 1604 release. If there is a better path and I am well and truly barking up the wrong tree, I will be delighted to be redirected and thanks for reading so far. I have spent far too much time on something which I thought would be the simplest part of the project; That would be OK if I was making progress. Yours very frustrated, Paul.DRRB
New Contributor
6 years agoHi, better late than never.
I have done that with ubuntu 1604 sd image.
Like this :
- Go to https://github.com/altera-opensource/linux-socfpga
- Git clone the repo
- Switch to an altera's branch like "git checkout remotes/origin/socfpga-5.1"
- Gunzip /proc/config.gz from DE1 board to .config
- Do oldconfig, like "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- oldconfig", lot of conf updates (4.5 vs 5.1)
- Do menuconfig to add/config stuff
- Build deb package with "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j 8 KBUILD_DEBARCH=armhf deb-pkg"
- Copy/scp deb files to DE1 board
- install with "sudo dpkg -i *.deb"
- Mount /dev/mmcblk0p1 on /boot and cd to it
- Copy zImage to zImage.old (in case of problems)
- Copy vmlinuz-5.1.0-00097-ga64da520ac0b to zImage
- Sync
- Reboot
Everything works here, eth (need to set a MAC address in uboot, EEPROM read fail), FrameBuffer, HPS/FPGA Bridges, regions...