Skip to content

uomoukko/dga4331-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 

Repository files navigation

arm dga4331-compiler

c/c++ arm compiler for libc 2.27 to be used with DGA4331

if you cannot de-xz a tar.xz file on the modem, because your
tar is old and doesn't understand xz files, decompress it
in an updated unix system, (for example Windows WSL linux)
giving the command xz -d ct-ng-127REL-arm-arm-shortpath.tar.xz
or in windows installing the 7-Zip utility, right-clicking
on the tar.xz file and selecting Extract to yourfile.tar

Then you will have to format an usb disk as ext4 filesystem
If you have a real unix/linux, sudo mkfs -t ext4 /dev/sda1
If you have windows, you can use the free versions of DiskGenius
or MiniTool Partition Wizard

mount the usb disk on a live-linux or windows-WSL-linux
on the mounted device, create the directory m and then m/opt
copy the ct-ng-127REL-arm-arm-shortpath.tar file on /m/opt
optionally at this point you can also extract the tar
(tar xvf ct-ng-127REL-arm-arm-shortpath.tar)
or (tar xvaf ct-ng-127REL-arm-arm-shortpath.tar.xz)
you should have the directory /m/opt/arm-unknown-linux-gnueabi

now mount the usb disk on the modem. You will have to remove
the noexec option for the ext4 mounted filesystem:
edit /etc/config/mountd (make a copy) and change the 'noexec,errors=continue'
to 'errors=continue' for all the filesystem you will use (ext2,ext3,ext4)
then /sda1 will be automounted as /chroot/tmp/run/mountd/sda1 type ext4 (rw,relatime,data=ordered)

cd to /chroot/tmp/run/mountd/sda/m/opt
if you didn't do previously, extract the tar
(tar xvf ct-ng-127REL-arm-arm-shortpath.tar)
you should have the directory /m/opt/arm-unknown-linux-gnueabi

now everything is ok.
Just add the compiler binaries to the path editing .profile
PATH=$PATH:/usr/local/bin/:/chroot/tmp/run/mountd/sda1/m/opt/arm-unknown-linux-gnueabi/bin/
you can test the compiler typing
gcc -v
or you can compile and run a test program
printf '#include <stdio.h>\n\nint main() { printf("Hello, world\\n"); return 0; }' > main.c && gcc main.c && ./a.out && echo "OK" || echo "ERROR" && rm main.c

About

c/c++ compiler for libc 2.27 and kernel 4.1.49 for the DGA4331 modem router

Resources

Stars

Watchers

Forks

Packages

No packages published