How can I rebuild a kernel for XU?

Moderators: mdrjr, odroid

How can I rebuild a kernel for XU?

Unread postby ru_master » Tue Oct 30, 2018 5:21 pm

I want to connect my XU to sintezator (yamaha ypt-360). But there is not found /dev/snd/seq in my system.
(I downloaded ubuntu/xubuntu with 3.4.91 (where can I find a newer one?))

I founded kernel 3.14.y for odroid (https://github.com/smaccm/odroid-3.14.y-linaro) and tried to build and install it but it does not work.
What I doing wrong I don't know. I want to know the secret how some people build kernels. I want to learn how to do it.
ru_master
 
Posts: 22
Joined: Sun Feb 02, 2014 6:44 pm
languages_spoken: russian, english
ODROIDs: ODROID-XU

Re: How can I rebuild a kernel for XU?

Unread postby tobetter » Tue Oct 30, 2018 6:20 pm

ru_master wrote:I want to connect my XU to sintezator (yamaha ypt-360). But there is not found /dev/snd/seq in my system.
(I downloaded ubuntu/xubuntu with 3.4.91 (where can I find a newer one?))

I founded kernel 3.14.y for odroid (https://github.com/smaccm/odroid-3.14.y-linaro) and tried to build and install it but it does not work.
What I doing wrong I don't know. I want to know the secret how some people build kernels. I want to learn how to do it.

Could you let us know how you tried? Commands to build, toolchains and what logs you get for your XU?
User avatar
tobetter
 
Posts: 2465
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: How can I rebuild a kernel for XU?

Unread postby ru_master » Wed Oct 31, 2018 2:33 pm

Of course! Today I will return the image on which I tried installing the kernel and write down the actions in detail.
ru_master
 
Posts: 22
Joined: Sun Feb 02, 2014 6:44 pm
languages_spoken: russian, english
ODROIDs: ODROID-XU

Re: How can I rebuild a kernel for XU?

Unread postby ru_master » Wed Oct 31, 2018 5:38 pm

I do not remember the link by which I downloaded this image. Here is xubuntu 14.04 and kernel 3.4.98.
$ cat /etc/os-release | grep PRETTY_NAME
PRETTY_NAME="Ubuntu 14.04 LTS"

$ uname -a
Linux odroid-desktop 3.4.98 #1 SMP PREEMPT Sun Jul 13 13:54:27 UTC 2014 armv7l armv7l armv7l GNU/Linux

$ sudo -i
# cd /usr/src
# git clone https://github.com/hardkernel/linux.git -b odroid-3.14.y-linaro linux-3.14.y-linaro --depth 10
# ln -s linux-3.14.y-linaro/ linux
# cd linux

# make odroidxu_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#

# make -j5 uImage dtbs zImage modules
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
WRAP arch/arm/include/generated/asm/auxvec.h
CHK include/generated/uapi/linux/version.h
WRAP arch/arm/include/generated/asm/bitsperlong.h
...SKIPPED...
LD [M] net/netfilter/xt_limit.ko
LD [M] net/netfilter/xt_mark.ko
LD [M] net/netfilter/xt_multiport.ko
LD [M] net/netfilter/xt_nat.ko
LD [M] net/netfilter/xt_tcpudp.ko

# sudo make modules_install
INSTALL crypto/ansi_cprng.ko
INSTALL drivers/gator/gator.ko
INSTALL drivers/net/usb/smsc95xx.ko
INSTALL drivers/usb/serial/usbserial.ko
INSTALL net/802/p8022.ko
INSTALL net/802/psnap.ko
INSTALL net/802/stp.ko
INSTALL net/bridge/bridge.ko
INSTALL net/bridge/netfilter/ebt_mark.ko
INSTALL net/bridge/netfilter/ebtable_nat.ko
INSTALL net/bridge/netfilter/ebtables.ko
INSTALL net/ipv4/netfilter/ip_tables.ko
INSTALL net/ipv4/netfilter/ipt_MASQUERADE.ko
INSTALL net/ipv4/netfilter/ipt_REJECT.ko
INSTALL net/ipv4/netfilter/iptable_filter.ko
INSTALL net/ipv4/netfilter/iptable_mangle.ko
INSTALL net/ipv4/netfilter/iptable_nat.ko
INSTALL net/ipv4/netfilter/nf_conntrack_ipv4.ko
INSTALL net/ipv4/netfilter/nf_defrag_ipv4.ko
INSTALL net/ipv4/netfilter/nf_nat_ipv4.ko
INSTALL net/ipv6/netfilter/ip6_tables.ko
INSTALL net/ipv6/netfilter/ip6t_MASQUERADE.ko
INSTALL net/ipv6/netfilter/ip6t_REJECT.ko
INSTALL net/ipv6/netfilter/ip6table_filter.ko
INSTALL net/ipv6/netfilter/ip6table_mangle.ko
INSTALL net/ipv6/netfilter/ip6table_nat.ko
INSTALL net/ipv6/netfilter/nf_conntrack_ipv6.ko
INSTALL net/ipv6/netfilter/nf_defrag_ipv6.ko
INSTALL net/ipv6/netfilter/nf_nat_ipv6.ko
INSTALL net/llc/llc.ko
INSTALL net/netfilter/nf_conntrack.ko
INSTALL net/netfilter/nf_nat.ko
INSTALL net/netfilter/x_tables.ko
INSTALL net/netfilter/xt_CHECKSUM.ko
INSTALL net/netfilter/xt_LOG.ko
INSTALL net/netfilter/xt_REDIRECT.ko
INSTALL net/netfilter/xt_connmark.ko
INSTALL net/netfilter/xt_limit.ko
INSTALL net/netfilter/xt_mark.ko
INSTALL net/netfilter/xt_multiport.ko
INSTALL net/netfilter/xt_nat.ko
INSTALL net/netfilter/xt_tcpudp.ko
DEPMOD 3.14.0+

# cat <<EOF > cmds1.sh
kernelversion=\`cat ./include/config/kernel.release\`
sudo cp .config /boot/config-$kernelversion
mkinitramfs -c gzip -o ./initramfs-$kernelversion $kernelversion
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ./initramfs-$kernelversion ./uInitrd
sudo cp uInitrd /boot/uInitrd-$kernelversion
EOF

# sh ./cmds1.sh

Warning: root device does not exist

Press Ctrl-C to abort build, or Enter to continue
[pressed to Enter]

Image Name: initramfs
Created: Wed Oct 31 12:20:17 2018
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 2351627 Bytes = 2296.51 kB = 2.24 MB
Load Address: 00000000
Entry Point: 00000000

At this point, I'm confused by the string "Warning: root device does not exist"
# mkdir /home/odroid/Desktop/kernelstaging

# cp arch/arm/boot/zImage /home/odroid/Desktop/kernelstaging/
# cp arch/arm/boot/dts/exynos5410-odroidxu.dtb /home/odroid/Desktop/kernelstaging/
# cp uInitrd /home/odroid/Desktop/kernelstaging/
# cp /media/boot/boot.ini /home/odroid/Desktop/kernelstaging/
# cp /media/boot/u-boot.bin /home/odroid/Desktop/kernelstaging/


# cp /home/odroid/Desktop/kernelstaging/* /media/boot
# reboot


Broadcast message from root@odroid-desktop
(/dev/pts/9) at 12:32 ...

The system is going down for reboot NOW!


LED is green, system does not boot.
ru_master
 
Posts: 22
Joined: Sun Feb 02, 2014 6:44 pm
languages_spoken: russian, english
ODROIDs: ODROID-XU

Re: How can I rebuild a kernel for XU?

Unread postby ru_master » Wed Oct 31, 2018 8:58 pm

UART output:
[14:55:45:561] ␊
[14:55:45:561] ␍␊
[14:55:45:561] ␍U-Boot 2012.07 (Sep 13 2013 - 13:53:58) for Exynos5410␊
[14:55:45:561] ␍␊
[14:55:45:561] ␍CPU: Exynos5410 Rev2.3 [Samsung SOC on SMP Platform Base on ARM CortexA15]␊
[14:55:45:561] ␍APLL = 900MHz, KPLL = 600MHz␊
[14:55:45:561] ␍MPLL = 532MHz, BPLL = 800MHz␊
[14:55:45:561] ␍DRAM: 2 GiB␊
[14:55:45:566] ␍WARNING: Caches not enabled␊
[14:55:45:584] ␍␊
[14:55:45:584] ␍TrustZone Enabled BSP␊
[14:55:45:584] ␍BL1 version: ␊
[14:55:45:584] ␍PMIC VER : 0, CHIP REV : 6␊
[14:55:45:598] ␍VDD MIF : 1.00000V␊
[14:55:45:598] ␍VDD ARM : 1.00000V␊
[14:55:45:598] ␍VDD INT : 1.00000V␊
[14:55:45:598] ␍VDD G3D : 1.00000V␊
[14:55:45:598] ␍VDD KFC : 1.00000V␊
[14:55:45:598] ␍␊
[14:55:45:598] ␍Checking Boot Mode ... EMMC4.41␊
[14:55:45:598] ␍MMC: S5P_MSHC0: 0, S5P_MSHC2: 1␊
[14:55:45:605] ␍MMC Device 0: 7.3 GiB␊
[14:55:45:677] ␍MMC Device 1: [ERROR] response error : 00000006 cmd 8␊
[14:55:45:688] ␍[ERROR] response error : 00000006 cmd 55␊
[14:55:45:688] ␍[ERROR] response error : 00000006 cmd 2␊

[14:55:45:692] ␍there are pending interrupts 0x00010001␊
[14:55:45:718] ␍*** Warning - bad CRC, using default environment␊
[14:55:45:726] ␍␊
[14:55:45:726] ␍In: serial␊
[14:55:45:737] ␍Out: serial␊
[14:55:45:737] ␍Err: serial␊
[14:55:45:737] ␍Net: No ethernet found.␊
[14:55:45:737] ␍Press 'Enter' or 'Space' to stop autoboot: 1 <0x08><0x08><0x08> 0 ␊
[14:55:46:942] ␍reading boot.ini␊
[14:55:46:946] ␍␊
[14:55:46:962] ␍5507 bytes read␊
[14:55:46:962] ␍Find boot.ini file from FAT Area!!␊
[14:55:46:962] ␍boot.ini command = setenv hk_current_version "2"␊
[14:55:46:962] ␍boot.ini command = setenv verify 'if test $hk_version != $hk_current_version;then;fatload mmc 0:1 40008000 u-boot.bin;emmc open 0;movi w z u 0 40008000;emmc close 0;setenv hk_version $hk_current_version;save;reset;fi'␊
[14:55:46:981] ␍boot.ini command = setenv initrd_high "0xffffffff"␊
[14:55:46:986] ␍boot.ini command = setenv fdt_high "0xffffffff"␊
[14:55:46:991] ␍boot.ini command = setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro"␊
[14:55:47:003] ␍boot.ini command = setenv fb_x_res "1280"␊
[14:55:47:008] ␍boot.ini command = setenv fb_y_res "720"␊
[14:55:47:012] ␍boot.ini command = setenv vout "hdmi"␊
[14:55:47:017] ␍boot.ini command = setenv left "56"␊
[14:55:47:020] ␍boot.ini command = setenv right "24"␊
[14:55:47:024] ␍boot.ini command = setenv upper "3"␊
[14:55:47:027] ␍boot.ini command = setenv lower "3"␊
[14:55:47:031] ␍boot.ini command = setenv hsync "14"␊
[14:55:47:035] ␍boot.ini command = setenv vsync "3"␊
[14:55:47:038] ␍boot.ini command = setenv fb_control "left=${left} right=${right} upper=${upper} lower=${lower} vsync=${vsync} hsync=${hsync}"␊
[14:55:47:050] ␍boot.ini command = setenv hdmi_phy_res "720p60hz"␊
[14:55:47:056] ␍boot.ini command = setenv led_blink "1"␊
[14:55:47:060] ␍boot.ini command = setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootz 0x40008000 0x42000000"␊
[14:55:47:072] ␍boot.ini command = setenv bootargs "${bootrootfs} ${fb_control} fb_x_res=${fb_x_res} fb_y_res=${fb_y_res} vout=${vout} hdmi_phy_res=${hdmi_phy_res} led_blink=${led_blink}"␊
[14:55:47:088] ␍boot.ini command = boot␊
[14:55:47:092] ␍reading zImage␊
[14:55:47:095] ␍␊
[14:55:47:169] ␍4656496 bytes read␊
[14:55:47:169] ␍reading uInitrd␊
[14:55:47:172] ␍␊
[14:55:47:230] ␍2351691 bytes read␊
[14:55:47:230] ␍## Loading init Ramdisk from Legacy Image at 42000000 ...␊
[14:55:47:230] ␍ Image Name: initramfs␊
[14:55:47:230] ␍ Image Type: ARM Linux RAMDisk Image (uncompressed)␊
[14:55:47:230] ␍ Data Size: 2351627 Bytes = 2.2 MiB␊
[14:55:47:230] ␍ Load Address: 00000000␊
[14:55:47:230] ␍ Entry Point: 00000000␊
[14:55:47:235] ␍␊
[14:55:47:235] ␍Starting kernel ...␊
[14:55:47:235] ␍␊
[14:55:47:235] ␍


"MMC Device 1" - microSD?
ru_master
 
Posts: 22
Joined: Sun Feb 02, 2014 6:44 pm
languages_spoken: russian, english
ODROIDs: ODROID-XU

Re: How can I rebuild a kernel for XU?

Unread postby tobetter » Thu Nov 01, 2018 8:31 am

Hi,

Do you need to run 3.14.y instead of 3.4.y in order to enable a module?

I haven't tried to build it for XU for long time, overall commands you tried seems no problem. However, what I noticed is that the Linux kernel versions are different and between them, there were one major change which is to use the device tree since 3.8 if I remember correctly. So what this does mean that even if your build is success, you are missing to load the device tree for 3.14.y in your boot.ini. The device tree what you have to load is in arch/arm/boot/dts/exynos5410-odroidxu.dtb which is generated from */exysnos5410-odroidxu.dts. You can add "fatload mmc 0:1 43000000 exynos5410-odroidxu.dtb" and "bootz 0x40008000 0x42000000 0x43000000" in your boot.ini. Obviously, you must copy the file at the same directory where zImage and uInitrd are located.

But what I am not sure is that the branch still works...not sure. Since you already have a build of 3.14.y, it's worth to try them. Regardless you success to get kernel log with your build, 98% of the problem you have is solved, I would say.
User avatar
tobetter
 
Posts: 2465
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: How can I rebuild a kernel for XU?

Unread postby ru_master » Thu Nov 01, 2018 4:17 pm

Thanks, your advice helped 100%
The kernel has started. :)
But the view on the display is bad. It looks like a malfunction of the horizontal scan CRT. In the upper half of the screen spans 6 penguins. The image ripples...
ru_master
 
Posts: 22
Joined: Sun Feb 02, 2014 6:44 pm
languages_spoken: russian, english
ODROIDs: ODROID-XU

Re: How can I rebuild a kernel for XU?

Unread postby tobetter » Thu Nov 01, 2018 4:37 pm

ru_master wrote:Thanks, your advice helped 100%
The kernel has started. :)
But the view on the display is bad. It looks like a malfunction of the horizontal scan CRT. In the upper half of the screen spans 6 penguins. The image ripples...

Good to hear your kernel start, how does it look like?
User avatar
tobetter
 
Posts: 2465
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: How can I rebuild a kernel for XU?

Unread postby ru_master » Fri Nov 02, 2018 12:56 am

I think the hdmi driver is not working there.
ru_master
 
Posts: 22
Joined: Sun Feb 02, 2014 6:44 pm
languages_spoken: russian, english
ODROIDs: ODROID-XU


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 1 guest