====== Firmware build ====== ===== build script ===== ==== usage ==== # ./build_firm_E4xx.sh -h MA-E4xx series Firmware build script usage: build_firm_E4xx.sh -k kernel_dir -r rootfs dir [-o firmware_file] \\ ==== build ==== root@jetson:/home/kikuchi/work# ./build_firm_E4xx.sh -k ../src/linux-kernel-MAE4xx -r mae4xx_xenial_rootfs -o mae4xx_xenial_v3_0_0testing2.img MA-E4xx series Firmware build script * kernelrelease: 4.4.30 CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CHK include/generated/timeconst.h CHK include/generated/bounds.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h CHK kernel/config_data.h Kernel: arch/arm/boot/Image is ready Building modules, stage 2. MODPOST 177 modules Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h CHK kernel/config_data.h Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready Image arch/arm/boot/uImage is ready * copying kernel image * copying DeviceTree blob * remove old kernel modules * instal kernel modules to /home/kikuchi/work/mae4xx_xenial_rootfs/lib/modules/4.4.30 INSTALL crypto/authenc.ko INSTALL crypto/authencesn.ko INSTALL crypto/md4.ko INSTALL drivers/block/zram/zram.ko INSTALL drivers/mtd/devices/m25p80.ko INSTALL drivers/mtd/spi-nor/spi-nor.ko INSTALL drivers/usb/phy/phy-msm-qusb.ko INSTALL drivers/usb/phy/phy-msm-ssusb-qmp.ko INSTALL drivers/usb/serial/cp210x.ko INSTALL drivers/usb/serial/ftdi_sio.ko INSTALL drivers/usb/serial/qcserial.ko INSTALL drivers/usb/usbip/usbip-core.ko INSTALL drivers/usb/usbip/usbip-host.ko INSTALL drivers/usb/usbip/vhci-hcd.ko INSTALL fs/cifs/cifs.ko INSTALL fs/fscache/fscache.ko INSTALL mm/zsmalloc.ko INSTALL net/bridge/netfilter/ebt_802_3.ko INSTALL net/bridge/netfilter/ebt_among.ko INSTALL net/bridge/netfilter/ebt_arp.ko INSTALL net/bridge/netfilter/ebt_arpreply.ko INSTALL net/bridge/netfilter/ebt_dnat.ko INSTALL net/bridge/netfilter/ebt_ip.ko INSTALL net/bridge/netfilter/ebt_ip6.ko INSTALL net/bridge/netfilter/ebt_limit.ko INSTALL net/bridge/netfilter/ebt_log.ko INSTALL net/bridge/netfilter/ebt_mark.ko INSTALL net/bridge/netfilter/ebt_mark_m.ko INSTALL net/bridge/netfilter/ebt_nflog.ko INSTALL net/bridge/netfilter/ebt_pkttype.ko INSTALL net/bridge/netfilter/ebt_redirect.ko INSTALL net/bridge/netfilter/ebt_snat.ko INSTALL net/bridge/netfilter/ebt_stp.ko INSTALL net/bridge/netfilter/ebt_vlan.ko INSTALL net/bridge/netfilter/ebtable_broute.ko INSTALL net/bridge/netfilter/ebtable_filter.ko INSTALL net/bridge/netfilter/ebtable_nat.ko INSTALL net/bridge/netfilter/nf_log_bridge.ko INSTALL net/bridge/netfilter/nft_meta_bridge.ko INSTALL net/bridge/netfilter/nft_reject_bridge.ko INSTALL net/ipv4/ah4.ko INSTALL net/ipv4/esp4.ko INSTALL net/ipv4/ip_vti.ko INSTALL net/ipv4/ipcomp.ko INSTALL net/ipv4/netfilter/arp_tables.ko INSTALL net/ipv4/netfilter/arpt_mangle.ko INSTALL net/ipv4/netfilter/arptable_filter.ko INSTALL net/ipv4/netfilter/ipt_CLUSTERIP.ko INSTALL net/ipv4/netfilter/ipt_ECN.ko INSTALL net/ipv4/netfilter/ipt_SYNPROXY.ko INSTALL net/ipv4/netfilter/ipt_ah.ko INSTALL net/ipv4/netfilter/ipt_rpfilter.ko INSTALL net/ipv4/netfilter/nf_log_arp.ko INSTALL net/ipv4/netfilter/nf_nat_h323.ko INSTALL net/ipv4/netfilter/nf_nat_pptp.ko INSTALL net/ipv4/netfilter/nf_nat_proto_gre.ko INSTALL net/ipv4/netfilter/nf_nat_snmp_basic.ko INSTALL net/ipv4/netfilter/nf_tables_arp.ko INSTALL net/ipv4/netfilter/nft_dup_ipv4.ko INSTALL net/ipv4/xfrm4_mode_beet.ko INSTALL net/ipv4/xfrm4_mode_transport.ko INSTALL net/ipv4/xfrm4_mode_tunnel.ko INSTALL net/ipv4/xfrm4_tunnel.ko INSTALL net/ipv6/ah6.ko INSTALL net/ipv6/esp6.ko INSTALL net/ipv6/ila.ko INSTALL net/ipv6/ip6_gre.ko INSTALL net/ipv6/ip6_vti.ko INSTALL net/ipv6/ipcomp6.ko INSTALL net/ipv6/mip6.ko INSTALL net/ipv6/netfilter/ip6t_SYNPROXY.ko INSTALL net/ipv6/netfilter/ip6t_ah.ko INSTALL net/ipv6/netfilter/ip6t_eui64.ko INSTALL net/ipv6/netfilter/ip6t_frag.ko INSTALL net/ipv6/netfilter/ip6t_hbh.ko INSTALL net/ipv6/netfilter/ip6t_ipv6header.ko INSTALL net/ipv6/netfilter/ip6t_mh.ko INSTALL net/ipv6/netfilter/ip6t_rpfilter.ko INSTALL net/ipv6/netfilter/ip6t_rt.ko INSTALL net/ipv6/netfilter/ip6table_mangle.ko INSTALL net/ipv6/netfilter/ip6table_raw.ko INSTALL net/ipv6/netfilter/nf_dup_ipv6.ko INSTALL net/ipv6/netfilter/nft_dup_ipv6.ko INSTALL net/ipv6/netfilter/nft_masq_ipv6.ko INSTALL net/ipv6/netfilter/nft_redir_ipv6.ko INSTALL net/ipv6/xfrm6_mode_beet.ko INSTALL net/ipv6/xfrm6_mode_ro.ko INSTALL net/ipv6/xfrm6_mode_transport.ko INSTALL net/ipv6/xfrm6_mode_tunnel.ko INSTALL net/ipv6/xfrm6_tunnel.ko INSTALL net/l2tp/l2tp_debugfs.ko INSTALL net/l2tp/l2tp_eth.ko INSTALL net/l2tp/l2tp_ip.ko INSTALL net/l2tp/l2tp_ip6.ko INSTALL net/netfilter/ipset/ip_set_bitmap_ip.ko INSTALL net/netfilter/ipset/ip_set_bitmap_ipmac.ko INSTALL net/netfilter/ipset/ip_set_bitmap_port.ko INSTALL net/netfilter/ipset/ip_set_hash_ip.ko INSTALL net/netfilter/ipset/ip_set_hash_ipmark.ko INSTALL net/netfilter/ipset/ip_set_hash_ipport.ko INSTALL net/netfilter/ipset/ip_set_hash_ipportip.ko INSTALL net/netfilter/ipset/ip_set_hash_ipportnet.ko INSTALL net/netfilter/ipset/ip_set_hash_mac.ko INSTALL net/netfilter/ipset/ip_set_hash_net.ko INSTALL net/netfilter/ipset/ip_set_hash_netiface.ko INSTALL net/netfilter/ipset/ip_set_hash_netnet.ko INSTALL net/netfilter/ipset/ip_set_hash_netport.ko INSTALL net/netfilter/ipset/ip_set_hash_netportnet.ko INSTALL net/netfilter/ipset/ip_set_list_set.ko INSTALL net/netfilter/ipvs/ip_vs.ko INSTALL net/netfilter/nf_conntrack_amanda.ko INSTALL net/netfilter/nf_conntrack_broadcast.ko INSTALL net/netfilter/nf_conntrack_h323.ko INSTALL net/netfilter/nf_conntrack_irc.ko INSTALL net/netfilter/nf_conntrack_netbios_ns.ko INSTALL net/netfilter/nf_conntrack_pptp.ko INSTALL net/netfilter/nf_conntrack_proto_dccp.ko INSTALL net/netfilter/nf_conntrack_proto_gre.ko INSTALL net/netfilter/nf_conntrack_proto_sctp.ko INSTALL net/netfilter/nf_conntrack_proto_udplite.ko INSTALL net/netfilter/nf_conntrack_sane.ko INSTALL net/netfilter/nf_conntrack_sip.ko INSTALL net/netfilter/nf_conntrack_snmp.ko INSTALL net/netfilter/nf_conntrack_tftp.ko INSTALL net/netfilter/nf_nat_amanda.ko INSTALL net/netfilter/nf_nat_irc.ko INSTALL net/netfilter/nf_nat_proto_dccp.ko INSTALL net/netfilter/nf_nat_proto_sctp.ko INSTALL net/netfilter/nf_nat_proto_udplite.ko INSTALL net/netfilter/nf_nat_sip.ko INSTALL net/netfilter/nf_nat_tftp.ko INSTALL net/netfilter/nf_synproxy_core.ko INSTALL net/netfilter/nfnetlink_acct.ko INSTALL net/netfilter/nfnetlink_cthelper.ko INSTALL net/netfilter/nft_queue.ko INSTALL net/netfilter/xt_RATEEST.ko INSTALL net/netfilter/xt_TCPOPTSTRIP.ko INSTALL net/netfilter/xt_TEE.ko INSTALL net/netfilter/xt_addrtype.ko INSTALL net/netfilter/xt_bpf.ko INSTALL net/netfilter/xt_cgroup.ko INSTALL net/netfilter/xt_cluster.ko INSTALL net/netfilter/xt_comment.ko INSTALL net/netfilter/xt_connbytes.ko INSTALL net/netfilter/xt_connlabel.ko INSTALL net/netfilter/xt_cpu.ko INSTALL net/netfilter/xt_dccp.ko INSTALL net/netfilter/xt_devgroup.ko INSTALL net/netfilter/xt_dscp.ko INSTALL net/netfilter/xt_ecn.ko INSTALL net/netfilter/xt_esp.ko INSTALL net/netfilter/xt_helper.ko INSTALL net/netfilter/xt_hl.ko INSTALL net/netfilter/xt_id.ko INSTALL net/netfilter/xt_ipcomp.ko INSTALL net/netfilter/xt_ipvs.ko INSTALL net/netfilter/xt_l2tp.ko INSTALL net/netfilter/xt_mac.ko INSTALL net/netfilter/xt_nfacct.ko INSTALL net/netfilter/xt_osf.ko INSTALL net/netfilter/xt_owner.ko INSTALL net/netfilter/xt_physdev.ko INSTALL net/netfilter/xt_pkttype.ko INSTALL net/netfilter/xt_policy.ko INSTALL net/netfilter/xt_quota.ko INSTALL net/netfilter/xt_rateest.ko INSTALL net/netfilter/xt_realm.ko INSTALL net/netfilter/xt_recent.ko INSTALL net/netfilter/xt_sctp.ko INSTALL net/netfilter/xt_socket.ko INSTALL net/netfilter/xt_time.ko INSTALL net/netfilter/xt_u32.ko INSTALL net/xfrm/xfrm_ipcomp.ko INSTALL sound/core/seq/snd-seq-midi.ko INSTALL sound/core/snd-rawmidi.ko INSTALL sound/usb/snd-usb-audio.ko INSTALL sound/usb/snd-usbmidi-lib.ko DEPMOD 4.4.30 total 108 lrwxrwxrwx 1 root root 37 Sep 22 10:31 build -> /home/kikuchi/src/linux-kernel-MAE4xx drwxr-xr-x 8 root root 4096 Sep 22 10:31 kernel -rw-r--r-- 1 root root 194 Sep 22 10:31 modules.alias -rw-r--r-- 1 root root 259 Sep 22 10:31 modules.alias.bin -rw-r--r-- 1 root root 16128 Sep 22 10:31 modules.builtin -rw-r--r-- 1 root root 19272 Sep 22 10:31 modules.builtin.bin -rw-r--r-- 1 root root 8170 Sep 22 10:31 modules.dep -rw-r--r-- 1 root root 14779 Sep 22 10:31 modules.dep.bin -rw-r--r-- 1 root root 52 Sep 22 10:31 modules.devname -rw-r--r-- 1 root root 6713 Sep 22 10:31 modules.order -rw-r--r-- 1 root root 131 Sep 22 10:31 modules.softdep -rw-r--r-- 1 root root 7603 Sep 22 10:31 modules.symbols -rw-r--r-- 1 root root 8987 Sep 22 10:31 modules.symbols.bin lrwxrwxrwx 1 root root 37 Sep 22 10:31 source -> /home/kikuchi/src/linux-kernel-MAE4xx Parallel mksquashfs: Using 1 processor Creating 4.0 filesystem on /home/kikuchi/work/build_1506043849/kmod.sqfs, block size 131072. [==============================================================================================/] 191/191 100% Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072 compressed data, compressed metadata, compressed fragments, compressed xattrs duplicates are removed Filesystem size 583.32 Kbytes (0.57 Mbytes) 25.36% of uncompressed filesystem size (2299.76 Kbytes) Inode table size 1578 bytes (1.54 Kbytes) 22.14% of uncompressed inode table size (7126 bytes) Directory table size 2198 bytes (2.15 Kbytes) 43.49% of uncompressed directory table size (5054 bytes) Number of duplicate files found 0 Number of inodes 222 Number of files 188 Number of fragments 16 Number of symbolic links 0 Number of device nodes 0 Number of fifo nodes 0 Number of socket nodes 0 Number of directories 34 Number of ids (unique uids + gids) 1 Number of uids 1 root (0) Number of gids 1 root (0) Parallel mksquashfs: Using 2 processors Creating 4.0 filesystem on /home/kikuchi/work/build_1506043849/rootfs.img, block size 262144. [==========================================================================================-] 14390/14390 100% Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144 compressed data, compressed metadata, compressed fragments, compressed xattrs duplicates are removed Filesystem size 68160.20 Kbytes (66.56 Mbytes) 29.07% of uncompressed filesystem size (234482.63 Kbytes) Inode table size 164542 bytes (160.69 Kbytes) 24.82% of uncompressed inode table size (662961 bytes) Directory table size 170398 bytes (166.40 Kbytes) 41.54% of uncompressed directory table size (410216 bytes) Number of duplicate files found 861 Number of inodes 19501 Number of files 14066 Number of fragments 518 Number of symbolic links 3545 Number of device nodes 80 Number of fifo nodes 0 Number of socket nodes 0 Number of directories 1810 Number of ids (unique uids + gids) 23 Number of uids 7 root (0) daemon (1) ubuntu (1000) rtkit (108) saned (109) www-data (33) usbmux (104) Number of gids 20 root (0) video (44) audio (29) tty (5) kmem (15) disk (6) daemon (1) dip (30) shadow (42) mail (8) ubuntu (1000) messagebus (108) nogroup (65534) utmp (43) fuse (107) lpadmin (110) scanner (111) staff (50) avahi-autoipd (112) adm (4) * create initramfs ... update-initramfs: Generating /boot/initrd.img-4.4.30 adding: kernel.img (stored 0%) adding: kmod.img (stored 0%) adding: initramfs.img (stored 0%) adding: rootfs.img (stored 0%) adding: dtb.img (deflated 75%) adding: .config (deflated 77%) * Firmware filename: /home/kikuchi/work/mae4xx_xenial_v3_0_0testing2.img done. please remove working directory '/home/kikuchi/work/build_1506043849' manually. root@jetson:/home/kikuchi/work# \\ ===== firmware 構造 ===== ZIP archive になっています (MA-E3xx と同じ)。 root@jetson:/home/kikuchi/work# unzip -l mae4xx_xenial_v3_0_0testing2.img Archive: mae4xx_xenial_v3_0_0testing2.img Length Date Time Name --------- ---------- ----- ---- 3659232 2017-09-22 10:31 kernel.img 604160 2017-09-22 10:31 kmod.img 2834808 2017-09-22 10:32 initramfs.img 69799936 2017-09-22 10:32 rootfs.img 27536 2017-09-22 10:31 dtb.img 100137 2017-09-22 10:31 .config --------- ------- 77025809 6 files root@jetson:/home/kikuchi/work#