please choosego to mobile | Continue to access the PC version
Author: loboris

Linux Distributions for Orange PI H3 boards

  [Copy link]

1

threads

47

posts

189

credits

Registered member

Rank: 2

credits
189
Published in 2015-6-26 19:45:12 | Show all floors
loboris replied at 2015-6-26 17:48
build_linux_kernel.sh contains everything I've changed ...

Thanks for all your job, loboris.
I wanted to generate a minimal kernel (most drivers as modules) and I found an horror: a ia64 binary in the kernel tree!
    lichee/linux-3.4/arch/arm/mach-sunxi/power/brom/gen_check_code
I am generating on a ARM machine, and I am blocked.
As, for sure, nobody has the source of this program 'gen_check_code', may you give us the 2 files
    'resumes.bin' (source) and 'resumes.code' (target)
as they are generated in the directory arch/arm/mach-sunxi/power/brom/ ?

10

threads

448

posts

5116

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5116
 Author| Published in 2015-6-26 21:27:25 | Show all floors
moinejf replied at 2015-6-26 19:45
Thanks for all your job, loboris.
I wanted to generate a minimal kernel (most drivers as modules)  ...

linux-3.4_arch_arm_mach-sunxi_power_brom.tar.gz on Mega.


1

threads

39

posts

137

credits

Registered member

Rank: 2

credits
137
Published in 2015-6-26 22:08:39 | Show all floors
I downloaded h3-lichee-1.0.tar.gz, then did gunzip.  Then tar -xvf h3-lichee-1.0.tar.
The cd to lichee.  Copied lichee lichee.tar.gz there, gunzip lichee.tar.gz, tar -xvf of lichee.tar.

I try to run the script build_linux_kernel.sh, it errors immediately trying to cd to rootfs becuase there there is no linux-3.4/rootfs directory to cd to.  But it continues and eventurally fails.
mark@orangepi:~/kernel-bld/lichee$ ./build_linux_kernel.sh
rm: cannot remove ‘rootfs-lobo.img.gz’: No such file or directory
./build_linux_kernel.sh: line 15: cd: rootfs: No such file or directory
1073543 blocks
cp: cannot stat ‘../lobo/Kconfig.pi2’: No such file or directory
cp: cannot stat ‘../lobo/sunxi_geth.c.pi2’: No such file or directory
cp: cannot stat ‘../lobo/sun8iw7p1smp_lobo_defconfig’: No such file or directory
make: *** No rule to make target `sun8iw7p1smp_lobo_defconfig'.  Stop.
make: *** No rule to make target `uImage'.  Stop.
make: *** No rule to make target `modules_install'.  Stop.
cp: cannot stat ‘arch/arm/boot/uImage’: No such file or directory

Do I need to somehow create the rootfs first?

1

threads

39

posts

137

credits

Registered member

Rank: 2

credits
137
Published in 2015-6-26 22:45:04 | Show all floors
I tried this:
cd liniux-3.4
mkdir rootfs

Then tried the build.
mark@orangepi:~/kernel-bld/lichee$ ./build_linux_kernel.sh
rm: cannot remove ‘rootfs-lobo.img.gz’: No such file or directory
1 block
  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
#
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
scripts/kconfig/conf --silentoldconfig Kconfig
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
  CHK     include/linux/version.h
  WRAP    arch/arm/include/generated/asm/auxvec.h
  UPD     include/linux/version.h
  WRAP    arch/arm/include/generated/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/errno.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/ioctl.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/percpu.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/kallsyms
  CC      scripts/mod/empty.o
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  SHIPPED scripts/genksyms/lex.lex.c
  SHIPPED scripts/genksyms/keywords.hash.c
  SHIPPED scripts/genksyms/parse.tab.h
  SHIPPED scripts/genksyms/parse.tab.c
  HOSTCC  scripts/genksyms/lex.lex.o
  Generating include/generated/mach-types.h
  CC      kernel/bounds.s
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
make[1]: *** [kernel/bounds.s] Error 2
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTLD  scripts/genksyms/genksyms
make: *** [scripts] Error 2
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
cp: cannot stat ‘/home/mark/kernel-bld/lichee/linux-3.4/modules.builtin’: No such file or directory
make: *** [_modinst_] Error 1
cp: cannot stat ‘arch/arm/boot/uImage’: No such file or directory

I have no idea about where this syntax error comes from.
Must be more to it than just creating the directory.

10

threads

448

posts

5116

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5116
 Author| Published in 2015-6-26 23:11:59 | Show all floors
Edited by loboris at 2015-6-26 23:16
markwinger replied at 2015-6-26 22:45
I tried this:
cd liniux-3.4
mkdir rootfs

Sorry, I forgot to put rootfs directory into the archive.
Please download lichee.tar.gz again, copy it into the lechee directory, execute:
  1. tar -xvf lichee.tar.gz
Copy code
in the lichee directory

execute build_linux_kernel.sh in the lichee directory:
  1. <your_path>/lichee$ ./build_linux_kernel.sh
Copy code

1

threads

76

posts

519

credits

Senior member

Rank: 4

credits
519
Published in 2015-6-27 01:34:30 | Show all floors
Edited by roblad at 2015-6-27 02:26
loboris replied at 2015-6-26 18:12
I think emmc driver is included in the kernel.
If you can see and mount emmc partitions when booted ...

Hi,

Do you have a list of commands needed to properly write img to emmc
additionaly do you have any idea to add FTDI suppor /dev/ttyUSB0

during build I have

cp: cannot stat ‘arch/arm/boot/uImage’



Thanks,

10

threads

448

posts

5116

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5116
 Author| Published in 2015-6-27 03:43:07 | Show all floors
roblad replied at 2015-6-27 01:34
Hi,

Do you have a list of commands needed to properly write img to emmc

I don't have OPI+, so I cannot test it, but you can write the image to emmc the same way you write it to sd card (with dd command).
Can you see and mount your emmc partitions when booted from sd card ?

If you are building the kernel, you have to enable USB serial for the adapter(s) you need. In my kernel FTDI, PL2303 and CP210X are enabled (as modules).

If you get cp: cannot stat ‘arch/arm/boot/uImage’ it means that there were some errors, and uImage is not built.

1

threads

76

posts

519

credits

Senior member

Rank: 4

credits
519
Published in 2015-6-27 05:28:40 | Show all floors
Hi,

Could you prepare image for opi+ (that procedure with upload modules and writing dd as you specified in one previous post, cause that the opi+ hangs without full boot, one image 22 or 20 June for opi+ on mega was correct but disappeared) Please create such full opi+ image with emmc and sound and proper eth0 and wlan driver (after some period time my router got crazy and all network goes done - something is wrong either with wifi or eth0, i see 2 wifi cards wlan0 and wlan1). I will test it for you but there should be a change for emmc for mmcblk, it should be directed to emmc partition as in zacho_seven did in his u-boot. Could you do it for opi+ testers and we will see according your direction everything you want.

Regs,

1

threads

39

posts

137

credits

Registered member

Rank: 2

credits
137
Published in 2015-6-27 05:51:47 | Show all floors
Thanks for posting a new lichee.tar.gz laboris, but there are still problems.  The lichee.tar.gz file is corrupt, I cannot extract the entire file:
......
linux-3.4/rootfs/root/
linux-3.4/rootfs/proc/
linux-3.4/rootfs/
linux-3.4/
tar: Exiting with failure status due to previous errors

If I try building with what I get it errors:

mark@orangepi:~/kernel-bld/lichee$ ./build_linux_kernel.sh
rm: cannot remove ‘rootfs-lobo.img.gz’: No such file or directory
15521 blocks
  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
#
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
scripts/kconfig/conf --silentoldconfig Kconfig
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
  WRAP    arch/arm/include/generated/asm/auxvec.h
  WRAP    arch/arm/include/generated/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/ioctl.h
  WRAP    arch/arm/include/generated/asm/errno.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/percpu.h
  CHK     include/linux/version.h
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  UPD     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  HOSTCC  scripts/genksyms/genksyms.o
  SHIPPED scripts/genksyms/lex.lex.c
  SHIPPED scripts/genksyms/keywords.hash.c
  HOSTCC  scripts/kallsyms
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
make[2]: *** [scripts/mod/empty.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/conmakehash
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  SHIPPED scripts/genksyms/parse.tab.h
  Generating include/generated/mach-types.h
  SHIPPED scripts/genksyms/parse.tab.c
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/genksyms/parse.tab.o
  CC      kernel/bounds.s
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
make[1]: *** [kernel/bounds.s] Error 2
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
  HOSTLD  scripts/genksyms/genksyms
make: *** [scripts] Error 2
/home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: 1: /home/mark/kernel-bld/lichee/brandy/gcc-linaro/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
cp: cannot stat ‘/home/mark/kernel-bld/lichee/linux-3.4/modules.builtin’: No such file or directory
make: *** [_modinst_] Error 1
cp: cannot stat ‘arch/arm/boot/uImage’: No such file or directory

I assume  because something is missing or incomplete due to the currupt lichee.tar.gz

10

threads

448

posts

5116

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5116
 Author| Published in 2015-6-27 06:44:10 | Show all floors
markwinger replied at 2015-6-27 05:51
Thanks for posting a new lichee.tar.gz laboris, but there are still problems.  The lichee.tar.gz fil ...

lichee.tar.gz unpacking reports some errors, but unpacked files are just fine.

Only now I saw your command prompt: mark@orangepi:~/kernel-bld/lichee$
Are you building the kernel on OPI ? It is not going to work, not without some (many) changes !
And I wouldn't recommend it, even if you configure it right it will take many hours to complete (on my i7 machine it takes less then 5 min).

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list