MediaTek-Labs / linkit-smart-7688-uboot

Other
103 stars 109 forks source link

Readme instructions does not work #1

Open versamodule opened 8 years ago

versamodule commented 8 years ago

I followed the readme instructions. After doing make this is what I received in terminal.

jim@jim-M4HM85P:~/linkit-smart-uboot$ make find . -type f \ ( -name 'core' -o -name '.bak' -o -name '~' \ -o -name '.o' -o -name '.a' ) -print \ | xargs rm -f /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: find ./ -name '.depend' -print | xargs rm -f rm -f examples/hello_world examples/timer \ examples/eepro100_eeprom examples/sched \ examples/mem_to_mem_idma2intr examples/82559_eeprom rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr rm -f tools/mpc86x_clk tools/ncb rm -f tools/easylogo/easylogo tools/bmp_logo rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend rm -f tools/env/fw_printenv tools/env/fw_setenv rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image rm -f board/trab/trab_fkt rm -f stage1/stage2.bin stage1/stage1n2.elf stage1/stage1n2.map rm -f ./uboot.bin ./uboot.img ./u-boot ./u-boot.* ./uboot_a.bin ./System.map rm -f scripts/lxdialog/lxdialog /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: make[1]: Entering directory /home/jim/linkit-smart-uboot/tools' make[1]: Nothing to be done for.depend'. make[1]: Leaving directory /home/jim/linkit-smart-uboot/tools' make -C tools all /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: make[1]: Entering directory/home/jim/linkit-smart-uboot/tools' gcc -I./ -DUSE_HOSTCC -c mkimage.c In file included from mkimage.c:61:0: ./image.h:210:1: warning: ‘packed’ attribute ignored [-Wattributes] } dram_header_t attribute ((packed)); ^ ./image.h:218:1: warning: ‘packed’ attribute ignored [-Wattributes] } nand_badblock_info1_t attribute ((packed)); ^ ./image.h:232:1: warning: ‘packed’ attribute ignored [-Wattributes] } nand_info_1_t attribute ((packed)); ^ ./image.h:246:1: warning: ‘packed’ attribute ignored [-Wattributes] } nand_header_t attribute ((packed)); ^ ./image.h:266:1: warning: ‘packed’ attribute ignored [-Wattributes] } image_header_t attribute((packed)); ^ gcc -I./ -DUSE_HOSTCC -c crc32.c gcc -I./ -DUSE_HOSTCC -c crc.c gcc -o mkimage mkimage.o crc32.o crc.o make[1]: Leaving directory `/home/jim/linkit-smart-uboot/tools' echo make -C tools all make -C tools all /opt/buildroot-gcc342/bin/mipsel-linux-gcc -Wa,-gstabs -DASSEMBLY -gdwarf-2 -DDEBUG -Os -DKERNEL -DTEXT_BASE=0xBC000000 -I/home/jim/linkit-smart-uboot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -pipe -DCONFIG_MIPS -DMIPS -mabicalls -DRALINK_MDIO_ACCESS_FUN -DRALINK_DDR_POWERSAVE -DCONFIG_DDR_CAL -march=4kc -mtune=4kc -DRALINK_SPI_UPGRADE_CHECK -DRALINK_RW_RF_REG_FUN -DRALINK_UPGRADE_BY_SERIAL -DRALINK_CMDLINE -DRALINK_EPHY_INIT -DCONFIG_LZMA -DRALINK_USB -DRALINK_EHCI -DP5_MAC_TO_NONE_MODE -DP4_MAC_TO_NONE_MODE -DASIC_BOARD -DMT7628_ASIC_BOARD -DMT7628_MP -DUBOOT_ROM -DON_BOARD_DDR2 -DON_BOARD_DDR_WIDTH_16 -DON_BOARD_16BIT_DRAM_BUS -DON_BOARD_1024M_DRAM_COMPONENT -DCFG_ENV_IS_IN_SPI -c -o cpu/ralink_soc/start.o /home/jim/linkit-smart-uboot/cpu/ralink_soc/start.S /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: make: /opt/buildroot-gcc342/bin/mipsel-linux-gcc: Command not found make: *\ [cpu/ralink_soc/start.o] Error 127

jim@jim-M4HM85P:~/linkit-smart-uboot$ jim@jim-M4HM85P:~/linkit-smart-uboot$ cd /opt/buildroot-gcc342/bin/

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ ls lzma_alone mipsel-linux-gccbug mipsel-linux-uclibc-ar mipsel-linux-uclibc-nm lzop mipsel-linux-gcov mipsel-linux-uclibc-as mipsel-linux-uclibc-objcopy mipsel-linux-addr2line mipsel-linux-ld mipsel-linux-uclibc-c++ mipsel-linux-uclibc-objdump mipsel-linux-ar mipsel-linux-nm mipsel-linux-uclibc-cc mipsel-linux-uclibc-ranlib mipsel-linux-as mipsel-linux-objcopy mipsel-linux-uclibc-c++filt mipsel-linux-uclibc-readelf mipsel-linux-c++ mipsel-linux-objdump mipsel-linux-uclibc-cpp mipsel-linux-uclibc-size mipsel-linux-cc mipsel-linux-ranlib mipsel-linux-uclibc-g++ mipsel-linux-uclibc-strings mipsel-linux-c++filt mipsel-linux-readelf mipsel-linux-uclibc-gcc mipsel-linux-uclibc-strip mipsel-linux-cpp mipsel-linux-size mipsel-linux-uclibc-gcc-3.4.2 mksquashfs_lzma-3.0 mipsel-linux-g++ mipsel-linux-strings mipsel-linux-uclibc-gccbug mksquashfs_lzma-3.2 mipsel-linux-gcc mipsel-linux-strip mipsel-linux-uclibc-gcov mksquashfs_lzma-4.2 mipsel-linux-gcc-3.4.2 mipsel-linux-uclibc-addr2line mipsel-linux-uclibc-ld unsquashfs

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$

blogic commented 8 years ago

On 13/01/2016 15:32, Jim wrote:

I followed the readme instructions After doing make this is what I received in terminal

jim@jim-M4HM85P:~/linkit-smart-uboot$ make find -type f \ ( -name 'core' -o -name '/bak' -o -name '/~' \ -o -name '/o' -o -name '/a' ) -print \ | xargs rm -f /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: find / -name 'depend' -print | xargs rm -f rm -f examples/hello_world examples/timer \ examples/eepro100_eeprom examples/sched \ examples/mem_to_mem_idma2intr examples/82559_eeprom rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr rm -f tools/mpc86x_clk tools/ncb rm -f tools/easylogo/easylogo tools/bmp_logo rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend rm -f tools/env/fw_printenv tools/env/fw_setenv rm -f board/cray/L1/bootscriptc board/cray/L1/bootscriptimage rm -f board/trab/trab_fkt rm -f stage1/stage2bin stage1/stage1n2elf stage1/stage1n2map rm -f /ubootbin /ubootimg /u-boot /u-boot* /uboot_abin /Systemmap rm -f scripts/lxdialog/lxdialog /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: make[1]: Entering directory |/home/jim/linkit-smart-uboot/tools' make[1]: Nothing to be done for|depend' make[1]: Leaving directory |/home/jim/linkit-smart-uboot/tools' make -C tools all /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: make[1]: Entering directory|/home/jim/linkit-smart-uboot/tools' gcc -I/ -DUSE_HOSTCC -c mkimagec In file included from mkimagec:61:0: /imageh:210:1: warning: ‘packed’ attribute ignored [-Wattributes] } dram_header_t attribute ((packed)); ^ /imageh:218:1: warning: ‘packed’ attribute ignored [-Wattributes] } nand_badblock_info1_t attribute ((packed)); ^ /imageh:232:1: warning: ‘packed’ attribute ignored [-Wattributes] } nand_info_1_t attribute ((packed)); ^ /imageh:246:1: warning: ‘packed’ attribute ignored [-Wattributes] } nand_header_t attribute ((packed)); ^ /imageh:266:1: warning: ‘packed’ attribute ignored [-Wattributes] } image_header_t attribute((packed)); ^ gcc -I/ -DUSE_HOSTCC -c crc32c gcc -I/ -DUSE_HOSTCC -c crcc gcc -o mkimage mkimageo crc32o crco make[1]: Leaving directory `/home/jim/linkit-smart-uboot/tools' echo make -C tools all make -C tools all /opt/buildroot-gcc342/bin/mipsel-linux-gcc -Wa,-gstabs -DASSEMBLY -gdwarf-2 -DDEBUG -Os -DKERNEL -DTEXT_BASE=0xBC000000 -I/home/jim/linkit-smart-uboot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/48/include -pipe -DCONFIG_MIPS -DMIPS -mabicalls -DRALINK_MDIO_ACCESS_FUN -DRALINK_DDR_POWERSAVE -DCONFIG_DDR_CAL -march=4kc -mtune=4kc -DRALINK_SPI_UPGRADE_CHECK -DRALINK_RW_RF_REG_FUN -DRALINK_UPGRADE_BY_SERIAL -DRALINK_CMDLINE -DRALINK_EPHY_INIT -DCONFIG_LZMA -DRALINK_USB -DRALINK_EHCI -DP5_MAC_TO_NONE_MODE -DP4_MAC_TO_NONE_MODE -DASIC_BOARD -DMT7628_ASIC_BOARD -DMT7628_MP -DUBOOT_ROM -DON_BOARD_DDR2 -DON_BOARD_DDR_WIDTH_16 -DON_BOARD_16BIT_DRAM_BUS -DON_BOARD_1024M_DRAM_COMPONENT -DCFG_ENV_IS_IN_SPI -c -o cpu/ralink_soc/starto /home/jim/linkit-smart-uboot/cpu/ralink_soc/startS /bin/sh: 1: /opt/buildroot-gcc342/bin/mipsel-linux-as: not found /bin/sh: 1: [: Illegal number: make: /opt/buildroot-gcc342/bin/mipsel-linux-gcc: Command not found make: *\ [cpu/ralink_soc/starto] Error 127

jim@jim-M4HM85P:~/linkit-smart-uboot$ jim@jim-M4HM85P:~/linkit-smart-uboot$ cd /opt/buildroot-gcc342/bin/

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ ls lzma_alone mipsel-linux-gccbug mipsel-linux-uclibc-ar mipsel-linux-uclibc-nm lzop mipsel-linux-gcov mipsel-linux-uclibc-as mipsel-linux-uclibc-objcopy mipsel-linux-addr2line mipsel-linux-ld mipsel-linux-uclibc-c++ mipsel-linux-uclibc-objdump mipsel-linux-ar mipsel-linux-nm mipsel-linux-uclibc-cc mipsel-linux-uclibc-ranlib mipsel-linux-as mipsel-linux-objcopy mipsel-linux-uclibc-c++filt mipsel-linux-uclibc-readelf mipsel-linux-c++ mipsel-linux-objdump mipsel-linux-uclibc-cpp mipsel-linux-uclibc-size mipsel-linux-cc mipsel-linux-ranlib mipsel-linux-uclibc-g++ mipsel-linux-uclibc-strings mipsel-linux-c++filt mipsel-linux-readelf mipsel-linux-uclibc-gcc mipsel-linux-uclibc-strip mipsel-linux-cpp mipsel-linux-size mipsel-linux-uclibc-gcc-342 mksquashfs_lzma-30 mipsel-linux-g++ mipsel-linux-strings mipsel-linux-uclibc-gccbug mksquashfs_lzma-32 mipsel-linux-gcc mipsel-linux-strip mipsel-linux-uclibc-gcov mksquashfs_lzma-42 mipsel-linux-gcc-342 mipsel-linux-uclibc-addr2line mipsel-linux-uclibc-ld unsquashfs

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$

— Reply to this email directly or view it on GitHub https://github.com/MediaTek-Labs/linkit-smart-7688-uboot/issues/1.

can you try to manually execute /opt/buildroot-gcc342/bin/mipsel-linux-gcc . it seems that you installed the troolchain but for some reason your machine refuses to actually execute it.

versamodule commented 8 years ago

I did try that before posting. The weird thing is that it says No such file, yet i am loking right at it see below.

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ ls lzma_alone mipsel-linux-gcc mipsel-linux-size mipsel-linux-uclibc-g++ mipsel-linux-uclibc-readelf lzop mipsel-linux-gcc-3.4.2 mipsel-linux-strings mipsel-linux-uclibc-gcc mipsel-linux-uclibc-size mipsel-linux-addr2line mipsel-linux-gccbug mipsel-linux-strip mipsel-linux-uclibc-gcc-3.4.2 mipsel-linux-uclibc-strings mipsel-linux-ar mipsel-linux-gcov mipsel-linux-uclibc-addr2line mipsel-linux-uclibc-gccbug mipsel-linux-uclibc-strip mipsel-linux-as mipsel-linux-ld mipsel-linux-uclibc-ar mipsel-linux-uclibc-gcov mksquashfs_lzma-3.0 mipsel-linux-c++ mipsel-linux-nm mipsel-linux-uclibc-as mipsel-linux-uclibc-ld mksquashfs_lzma-3.2 mipsel-linux-cc mipsel-linux-objcopy mipsel-linux-uclibc-c++ mipsel-linux-uclibc-nm mksquashfs_lzma-4.2 mipsel-linux-c++filt mipsel-linux-objdump mipsel-linux-uclibc-cc mipsel-linux-uclibc-objcopy unsquashfs mipsel-linux-cpp mipsel-linux-ranlib mipsel-linux-uclibc-c++filt mipsel-linux-uclibc-objdump mipsel-linux-g++ mipsel-linux-readelf mipsel-linux-uclibc-cpp mipsel-linux-uclibc-ranlib jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ ./mipsel-linux-gcc bash: ./mipsel-linux-gcc: No such file or directory jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$

blogic commented 8 years ago

On 13/01/2016 16:20, Jim wrote:

I did try that before posting. The weird thing is that it says No such file, yet i am loking right at it see below.

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ ls lzma_alone mipsel-linux-gcc mipsel-linux-size mipsel-linux-uclibc-g++ mipsel-linux-uclibc-readelf lzop mipsel-linux-gcc-3.4.2 mipsel-linux-strings mipsel-linux-uclibc-gcc mipsel-linux-uclibc-size mipsel-linux-addr2line mipsel-linux-gccbug mipsel-linux-strip mipsel-linux-uclibc-gcc-3.4.2 mipsel-linux-uclibc-strings mipsel-linux-ar mipsel-linux-gcov mipsel-linux-uclibc-addr2line mipsel-linux-uclibc-gccbug mipsel-linux-uclibc-strip mipsel-linux-as mipsel-linux-ld mipsel-linux-uclibc-ar mipsel-linux-uclibc-gcov mksquashfs_lzma-3.0 mipsel-linux-c++ mipsel-linux-nm mipsel-linux-uclibc-as mipsel-linux-uclibc-ld mksquashfs_lzma-3.2 mipsel-linux-cc mipsel-linux-objcopy mipsel-linux-uclibc-c++ mipsel-linux-uclibc-nm mksquashfs_lzma-4.2 mipsel-linux-c++filt mipsel-linux-objdump mipsel-linux-uclibc-cc mipsel-linux-uclibc-objcopy unsquashfs mipsel-linux-cpp mipsel-linux-ranlib mipsel-linux-uclibc-c++filt mipsel-linux-uclibc-objdump mipsel-linux-g++ mipsel-linux-readelf mipsel-linux-uclibc-cpp mipsel-linux-uclibc-ranlib jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ ./mipsel-linux-uclibc-cpp bash: ./mipsel-linux-uclibc-cpp: No such file or directory jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ ^C jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$

— Reply to this email directly or view it on GitHub https://github.com/MediaTek-Labs/linkit-smart-7688-uboot/issues/1#issuecomment-171326688.

your distro probably mounted /opt as noexec or similar. could you please call "mount" and check if you see a "noexec" anywhere ?

versamodule commented 8 years ago

I see it in quite a few places.

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ mount /dev/sda6 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/cgroup type tmpfs (rw) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /sys/firmware/efi/efivars type efivarfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) none on /sys/fs/pstore type pstore (rw) /dev/sda2 on /boot/efi type vfat (rw) systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=jim) jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$

blogic commented 8 years ago

On 13/01/2016 16:42, Jim wrote:

I see it in quite a few places.

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ mount /dev/sda6 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/cgroup type tmpfs (rw) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /sys/firmware/efi/efivars type efivarfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) none on /sys/fs/pstore type pstore (rw) /dev/sda2 on /boot/efi type vfat (rw) systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=jim) jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$

— Reply to this email directly or view it on GitHub https://github.com/MediaTek-Labs/linkit-smart-7688-uboot/issues/1#issuecomment-171334930.

nothing obvious there. you could try moving the buildroot folder to some other and place see if it is executable there. if it is you can edit line 50 of the Makefile to point at that folder.

versamodule commented 8 years ago

Tried that, same problem. I unziped buildroot-gcc342.tar.bz2 into /linkit-smart-uboot after opening the makefile @ line 50 to read:

CONFIG_CROSS_COMPILER_PATH ?= /buildroot-gcc342/bin

Yet gives same results.

blogic commented 8 years ago

On 13/01/2016 16:42, Jim wrote:

I see it in quite a few places.

jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$ mount /dev/sda6 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/cgroup type tmpfs (rw) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /sys/firmware/efi/efivars type efivarfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) none on /sys/fs/pstore type pstore (rw) /dev/sda2 on /boot/efi type vfat (rw) systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=jim) jim@jim-M4HM85P:/opt/buildroot-gcc342/bin$

— Reply to this email directly or view it on GitHub https://github.com/MediaTek-Labs/linkit-smart-7688-uboot/issues/1#issuecomment-171334930.

i will try to reproduce this today. what distro are you using ?

versamodule commented 8 years ago

Linux Version: 4.2.0-22-generic Linux Dist: Ubuntu 14.04.3 LTS

hewittc commented 8 years ago

@versamodule Are you running a 64-bit system? For some reason vendors like shipping around 32-bit binaries that don't work without a 32-bit libc. You might need to do something like: "dpkg --add-architecture i386", then "apt-get update", and then "apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386" before you can run their ancient toolchain.

% file ./mipsel-linux-uclibc-gcc ./mipsel-linux-uclibc-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.4.1, stripped

simonemarra commented 8 years ago

@hewittc for me it worked like a charm!! Thanks!! :+1:

hitfzyangdianshi commented 3 years ago

https://docs.labs.mediatek.com/resource/linkit-smart-7688/en/tutorials/firmware-and-bootloader/build-the-bootloader